Package org.eclipse.lyo.validation.impl
Class JenaShaclValidatorImpl
java.lang.Object
org.eclipse.lyo.validation.impl.JenaShaclValidatorImpl
- All Implemented Interfaces:
Validator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidate(Model dataModel, Class<? extends AbstractResource> clazz) ValidatedataModelagainst theShapethat is constructed from the shape annotations in the resource class passed in theclazzvariable.Validate.validate(AbstractResource resource) Validate a single resource against the shape based on its class annotations.
-
Constructor Details
-
JenaShaclValidatorImpl
public JenaShaclValidatorImpl()
-
-
Method Details
-
validate
public ValidationReport validate(AbstractResource resource) throws OslcCoreApplicationException, URISyntaxException, ParseException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, DatatypeConfigurationException, InstantiationException, SecurityException, NoSuchMethodException Description copied from interface:ValidatorValidate a single resource against the shape based on its class annotations.- Specified by:
validatein interfaceValidator- Parameters:
resource- Resource to be validated- Returns:
ValidationReport- Throws:
InstantiationExceptionSecurityExceptionNoSuchMethodExceptionOslcCoreApplicationExceptionURISyntaxExceptionParseExceptionIllegalAccessExceptionIllegalArgumentExceptionInvocationTargetExceptionDatatypeConfigurationException- See Also:
-
validate
public ValidationReport validate(Model dataModel, Model shapeModel) throws IllegalAccessException, IllegalArgumentException, InstantiationException, InvocationTargetException, SecurityException, NoSuchMethodException, DatatypeConfigurationException, OslcCoreApplicationException, URISyntaxException Description copied from interface:ValidatorValidate.This method takes JenaModels as parameters, validates the dataModel against shapeModel and return the ValidationResultModel
It iterates on all the resources with in the
dataModeland returns all the errors found in all resources.- Specified by:
validatein interfaceValidator- Parameters:
dataModel- the data modelshapeModel- the shape model- Returns:
ValidationReport- Throws:
IllegalAccessException- the illegal access exceptionIllegalArgumentExceptionInstantiationExceptionInvocationTargetException- the invocation target exceptionSecurityExceptionNoSuchMethodExceptionDatatypeConfigurationException- 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:ValidatorValidatedataModelagainst theShapethat is constructed from the shape annotations in the resource class passed in theclazzvariable. The target is set to the class type of the resource class.It iterates on all the resources with in the
dataModeland returns all the errors in each resource.- Specified by:
validatein interfaceValidator- Parameters:
dataModel- Data model to be validatedclazz- Resource class with shape annotations- Returns:
ValidationReport- Throws:
InstantiationExceptionSecurityExceptionNoSuchMethodExceptionIllegalAccessExceptionIllegalArgumentExceptionInvocationTargetExceptionDatatypeConfigurationExceptionOslcCoreApplicationExceptionURISyntaxExceptionParseException
-