public interface Validator
Modifier and Type | Method and Description |
---|---|
ValidationResultModel |
validate(org.eclipse.lyo.oslc4j.core.model.AbstractResource resource)
Validate a single resource against the shape based on its class annotations.
|
ValidationResultModel |
validate(org.apache.jena.rdf.model.Model dataModel,
Class<? extends org.eclipse.lyo.oslc4j.core.model.AbstractResource> clazz)
Validate
dataModel against the ShaclShape that is constructed from
the shape annotations in the resource class passed in the
clazz variable. |
ValidationResultModel |
validate(org.apache.jena.rdf.model.Model dataModel,
org.apache.jena.rdf.model.Model shapeModel)
Validate.
|
ValidationResultModel validate(org.eclipse.lyo.oslc4j.core.model.AbstractResource resource) throws org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException, URISyntaxException, ParseException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, DatatypeConfigurationException
resource
- Resource to be validatedorg.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException
URISyntaxException
ParseException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
DatatypeConfigurationException
ShaclShapeFactory.createShaclShape(Class)
ValidationResultModel validate(org.apache.jena.rdf.model.Model dataModel, org.apache.jena.rdf.model.Model shapeModel) throws IllegalAccessException, InvocationTargetException, DatatypeConfigurationException, org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException
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 the first
error in each resource.
dataModel
- the data modelshapeModel
- the shape modelIllegalAccessException
- the illegal access exceptionInvocationTargetException
- the invocation target exceptionDatatypeConfigurationException
- the datatype configuration exceptionorg.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException
- the oslc core application exceptionValidationResultModel validate(org.apache.jena.rdf.model.Model dataModel, Class<? extends org.eclipse.lyo.oslc4j.core.model.AbstractResource> clazz) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, DatatypeConfigurationException, org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException, URISyntaxException, ParseException
dataModel
against the ShaclShape
that is constructed from
the shape annotations in the resource class passed in the
clazz
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 the first
error in each resource.
dataModel
- Data model to be validatedclazz
- Resource class with shape annotationsIllegalAccessException
IllegalArgumentException
InvocationTargetException
DatatypeConfigurationException
org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException
URISyntaxException
ParseException
Copyright © 2018. All Rights Reserved.