Package org.eclipse.lyo.shacl
Class ShaclShapeFactory
- java.lang.Object
-
- org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory
-
- org.eclipse.lyo.shacl.ShaclShapeFactory
-
public final class ShaclShapeFactory extends ResourceShapeFactory
Factory for creating Shacl shapes form the Abstract Resource Classes.It reads the Shacl constraints or oslc constraints in the form of annotations and populate the ShaclShape instance and property instances.
It checks whether the ShaclAnnotations are available in Abstract Resource Class. If it does, then it reads the Shacl Annotations for populating ShaclShape instance. Otherwise,it reads the oslc annotations to create ShaclShape instance.
- Since:
- 2.3.0
- Version:
- $version-stub$
- Author:
- Yash Khatri
-
-
Field Summary
-
Fields inherited from class org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory
CLASS_TO_VALUE_TYPE, METHOD_NAME_START_GET, METHOD_NAME_START_GET_LENGTH, METHOD_NAME_START_IS, METHOD_NAME_START_IS_LENGTH, METHOD_NAME_START_SET
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ShapecreateShaclShape(Class<?> resourceClass)Create a SHACL shape from theorg.eclipse.lyo.shacl.annotationson the resource declaration.-
Methods inherited from class org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory
createResourceShape, getComponentType, getDefaultPropertyName, validateSetMethodExists, validateUserSpecifiedValueType
-
-
-
-
Method Detail
-
createShaclShape
public static Shape createShaclShape(Class<?> resourceClass) throws OslcCoreApplicationException, URISyntaxException, ParseException
Create a SHACL shape from theorg.eclipse.lyo.shacl.annotationson the resource declaration.- Parameters:
resourceClass- Resource class that is annotated with shape annotations.- Returns:
- an instance of
Shapeshape - Throws:
OslcCoreApplicationExceptionURISyntaxExceptionParseException
-
-