Package org.topbraid.shacl.expr.lib
Class FocusNodeExpression
java.lang.Object
org.topbraid.shacl.expr.AbstractNodeExpression
org.topbraid.shacl.expr.lib.FocusNodeExpression
- All Implemented Interfaces:
AtomicNodeExpression,NodeExpression
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.rdf.model.RDFNode>eval(org.apache.jena.rdf.model.RDFNode focusNode, NodeExpressionContext context) Produces an iterator of value nodes for a given focus node.Produces a "functional" syntax used to display node expressions in a compact form.org.apache.jena.rdf.model.ResourcegetOutputShape(org.apache.jena.rdf.model.Resource contextShape) Gets the shape of the output data (if known), based on a context shape.voidvisit(NodeExpressionVisitor visitor) Methods inherited from class org.topbraid.shacl.expr.AbstractNodeExpression
evalReverse, getInputExpressions, getRDFNode, isReversible, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.topbraid.shacl.expr.NodeExpression
evalReverse, getInputExpressions, getRDFNode, isReversible
-
Constructor Details
-
FocusNodeExpression
public FocusNodeExpression(org.apache.jena.rdf.model.RDFNode thisNode)
-
-
Method Details
-
eval
public org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.rdf.model.RDFNode> eval(org.apache.jena.rdf.model.RDFNode focusNode, NodeExpressionContext context) Description copied from interface:NodeExpressionProduces an iterator of value nodes for a given focus node.- Specified by:
evalin interfaceNodeExpression- Parameters:
focusNode- the focus nodecontext- the context- Returns:
- an iterator (never null)
-
getFunctionalSyntax
Description copied from interface:NodeExpressionProduces a "functional" syntax used to display node expressions in a compact form.- Specified by:
getFunctionalSyntaxin interfaceNodeExpression- Returns:
- the functional syntax for this expression
-
getOutputShape
public org.apache.jena.rdf.model.Resource getOutputShape(org.apache.jena.rdf.model.Resource contextShape) Description copied from interface:NodeExpressionGets the shape of the output data (if known), based on a context shape. For example, for a path expression it would try to infer the output shape from the sh:class or sh:node of the property (path).- Specified by:
getOutputShapein interfaceNodeExpression- Overrides:
getOutputShapein classAbstractNodeExpression- Parameters:
contextShape- the shape where the evaluation would start, e.g. the node shape of the sh:values statement- Returns:
- an output shape or null if unknown
-
getTypeId
- Specified by:
getTypeIdin interfaceNodeExpression
-
visit
- Specified by:
visitin interfaceNodeExpression
-