Package org.eclipse.lyo.validation.impl
Class ShaclExValidatorImpl
java.lang.Object
org.eclipse.lyo.validation.impl.ShaclExValidatorImpl
- All Implemented Interfaces:
Validator
- Since:
- 2.3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidate
(Model dataModel, Class<? extends AbstractResource> clazz) ValidatedataModel
against theShape
that is constructed from the shape annotations in the resource class passed in theclazz
variable.Validate.validate
(AbstractResource resource) Validate a single resource against the shape based on its class annotations.
-
Constructor Details
-
ShaclExValidatorImpl
public ShaclExValidatorImpl()
-
-
Method Details
-
validate
public ValidationReport validate(AbstractResource resource) throws OslcCoreApplicationException, URISyntaxException, ParseException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, DatatypeConfigurationException, InstantiationException, SecurityException, NoSuchMethodException Description copied from interface:Validator
Validate a single resource against the shape based on its class annotations.- Specified by:
validate
in interfaceValidator
- Parameters:
resource
- Resource to be validated- Returns:
ValidationReport
- Throws:
InstantiationException
SecurityException
NoSuchMethodException
OslcCoreApplicationException
URISyntaxException
ParseException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
DatatypeConfigurationException
- See Also:
-
validate
public ValidationReport validate(Model dataModel, Model shapeModel) throws IllegalAccessException, IllegalArgumentException, InstantiationException, InvocationTargetException, SecurityException, NoSuchMethodException, DatatypeConfigurationException, OslcCoreApplicationException, URISyntaxException Description copied from interface:Validator
Validate.This method takes JenaModels as parameters, validates the dataModel against shapeModel and return the ValidationResultModel
It iterates on all the resources with in the
dataModel
and returns all the errors found in all resources.- Specified by:
validate
in interfaceValidator
- Parameters:
dataModel
- the data modelshapeModel
- the shape model- Returns:
ValidationReport
- Throws:
IllegalAccessException
- the illegal access exceptionIllegalArgumentException
InstantiationException
InvocationTargetException
- the invocation target exceptionSecurityException
NoSuchMethodException
DatatypeConfigurationException
- the datatype configuration exceptionOslcCoreApplicationException
- the oslc core application exceptionURISyntaxException
-
validate
public ValidationReport validate(Model dataModel, Class<? extends AbstractResource> clazz) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, DatatypeConfigurationException, OslcCoreApplicationException, URISyntaxException, ParseException, InstantiationException, SecurityException, NoSuchMethodException Description copied from interface:Validator
ValidatedataModel
against theShape
that is constructed from the shape annotations in the resource class passed in theclazz
variable. The target is set to the class type of the resource class.It iterates on all the resources with in the
dataModel
and returns all the errors in each resource.- Specified by:
validate
in interfaceValidator
- Parameters:
dataModel
- Data model to be validatedclazz
- Resource class with shape annotations- Returns:
ValidationReport
- Throws:
InstantiationException
SecurityException
NoSuchMethodException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
DatatypeConfigurationException
OslcCoreApplicationException
URISyntaxException
ParseException
-