Package org.topbraid.shacl.model
Class SHFactory
java.lang.Object
org.topbraid.shacl.model.SHFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SHConstraintComponentasConstraintComponent(org.apache.jena.rdf.model.RDFNode resource) static SHJSConstraintasJSConstraint(org.apache.jena.rdf.model.RDFNode node) static SHNodeShapeasNodeShape(org.apache.jena.rdf.model.RDFNode node) static SHParameterasParameter(org.apache.jena.rdf.model.RDFNode resource) static SHParameterizableasParameterizable(org.apache.jena.rdf.model.RDFNode resource) static SHParameterizableTargetasParameterizableTarget(org.apache.jena.rdf.model.RDFNode node) static SHPropertyShapeasPropertyShape(org.apache.jena.rdf.model.RDFNode node) static SHShapeasShape(org.apache.jena.rdf.model.RDFNode node) static SHSPARQLConstraintasSPARQLConstraint(org.apache.jena.rdf.model.RDFNode node) static SHSPARQLFunctionasSPARQLFunction(org.apache.jena.rdf.model.RDFNode resource) static SHSPARQLTargetasSPARQLTarget(org.apache.jena.rdf.model.RDFNode node) static SHParameterizableInstanceasTemplateCall(org.apache.jena.rdf.model.RDFNode resource) static voidstatic booleanisJSConstraint(org.apache.jena.rdf.model.RDFNode node) static booleanisJSTarget(org.apache.jena.rdf.model.RDFNode node) static booleanisNodeShape(org.apache.jena.rdf.model.RDFNode node) Checks if a given node is a NodeShape.static booleanisParameter(org.apache.jena.rdf.model.Resource resource) static booleanisParameterizableConstraint(org.apache.jena.rdf.model.RDFNode node) static booleanisParameterizableInstance(org.apache.jena.rdf.model.RDFNode node) Checks if a given RDFNode represents a parameterizable instance.static booleanisPropertyShape(org.apache.jena.rdf.model.Resource resource) static booleanisSPARQLConstraint(org.apache.jena.rdf.model.RDFNode node) static booleanisSPARQLTarget(org.apache.jena.rdf.model.RDFNode node)
-
Constructor Details
-
SHFactory
public SHFactory()
-
-
Method Details
-
ensureInited
public static void ensureInited() -
asConstraintComponent
public static SHConstraintComponent asConstraintComponent(org.apache.jena.rdf.model.RDFNode resource) -
asJSConstraint
-
asSPARQLFunction
-
asParameter
-
asParameterizable
-
asPropertyShape
-
asNodeShape
-
asSPARQLConstraint
-
asSPARQLTarget
-
asTemplateCall
-
asShape
-
asParameterizableTarget
public static SHParameterizableTarget asParameterizableTarget(org.apache.jena.rdf.model.RDFNode node) -
isJSConstraint
public static boolean isJSConstraint(org.apache.jena.rdf.model.RDFNode node) -
isJSTarget
public static boolean isJSTarget(org.apache.jena.rdf.model.RDFNode node) -
isSPARQLConstraint
public static boolean isSPARQLConstraint(org.apache.jena.rdf.model.RDFNode node) -
isSPARQLTarget
public static boolean isSPARQLTarget(org.apache.jena.rdf.model.RDFNode node) -
isNodeShape
public static boolean isNodeShape(org.apache.jena.rdf.model.RDFNode node) Checks if a given node is a NodeShape. This is just an approximation based on a couple of hard-coded properties.- Parameters:
node- the node to test- Returns:
- true if node is a NodeShape
-
isParameterizableConstraint
public static boolean isParameterizableConstraint(org.apache.jena.rdf.model.RDFNode node) -
isParameter
public static boolean isParameter(org.apache.jena.rdf.model.Resource resource) -
isParameterizableInstance
public static boolean isParameterizableInstance(org.apache.jena.rdf.model.RDFNode node) Checks if a given RDFNode represents a parameterizable instance. It either needs to be an instance of an instance of sh:Parameterizable, or be a typeless node that has an incoming edge via a property that has a declared sh:defaultType, such as sh:property.- Parameters:
node- the node to check- Returns:
- true if node is a parameterizable instance
-
isPropertyShape
public static boolean isPropertyShape(org.apache.jena.rdf.model.Resource resource)
-