Package org.eclipse.lyo.validation
Interface Validator
- All Known Implementing Classes:
ShaclExValidatorImpl
public interface Validator
- Since:
- 2.3.0
- Version:
- $version-stub$
- Author:
- Yash Khatri
-
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.
-
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:
NoSuchMethodException
SecurityException
InstantiationException
OslcCoreApplicationException
URISyntaxException
ParseException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
DatatypeConfigurationException
- 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
dataModel
and 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 exceptionURISyntaxException
NoSuchMethodException
SecurityException
InstantiationException
IllegalArgumentException
-
validate
ValidationReport validate(Model dataModel, Class<? extends AbstractResource> clazz) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, DatatypeConfigurationException, OslcCoreApplicationException, URISyntaxException, ParseException, InstantiationException, SecurityException, NoSuchMethodException 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.- Parameters:
dataModel
- Data model to be validatedclazz
- Resource class with shape annotations- Returns:
ValidationReport
- Throws:
NoSuchMethodException
SecurityException
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
DatatypeConfigurationException
OslcCoreApplicationException
URISyntaxException
ParseException
-