Package org.eclipse.lyo.validation
Interface Validator
- All Known Implementing Classes:
JenaShaclValidatorImpl
public interface Validator
- Since:
- 2.3.0
- Version:
- $version-stub$
- Author:
- Yash Khatri
-
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.
-
Method Details
-
validate
ValidationReport validate(AbstractResource resource) throws OslcCoreApplicationException, URISyntaxException, ParseException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, DatatypeConfigurationException, InstantiationException, SecurityException, NoSuchMethodException Validate a single resource against the shape based on its class annotations.- Parameters:
resource- Resource to be validated- Returns:
ValidationReport- Throws:
NoSuchMethodExceptionSecurityExceptionInstantiationExceptionOslcCoreApplicationExceptionURISyntaxExceptionParseExceptionIllegalAccessExceptionIllegalArgumentExceptionInvocationTargetExceptionDatatypeConfigurationException- See Also:
-
validate
ValidationReport validate(Model dataModel, Model shapeModel) throws IllegalAccessException, InvocationTargetException, DatatypeConfigurationException, OslcCoreApplicationException, IllegalArgumentException, InstantiationException, SecurityException, NoSuchMethodException, URISyntaxException 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
dataModeland returns all the errors found in all resources.- Parameters:
dataModel- the data modelshapeModel- the shape model- Returns:
ValidationReport- Throws:
IllegalAccessException- the illegal access exceptionInvocationTargetException- the invocation target exceptionDatatypeConfigurationException- the datatype configuration exceptionOslcCoreApplicationException- the oslc core application exceptionURISyntaxExceptionNoSuchMethodExceptionSecurityExceptionInstantiationExceptionIllegalArgumentException
-
validate
ValidationReport validate(Model dataModel, Class<? extends AbstractResource> clazz) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, DatatypeConfigurationException, OslcCoreApplicationException, URISyntaxException, ParseException, InstantiationException, SecurityException, NoSuchMethodException ValidatedataModelagainst 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.- Parameters:
dataModel- Data model to be validatedclazz- Resource class with shape annotations- Returns:
ValidationReport- Throws:
NoSuchMethodExceptionSecurityExceptionInstantiationExceptionIllegalAccessExceptionIllegalArgumentExceptionInvocationTargetExceptionDatatypeConfigurationExceptionOslcCoreApplicationExceptionURISyntaxExceptionParseException
-