Class FocusNodeExpression

java.lang.Object
org.topbraid.shacl.expr.AbstractNodeExpression
org.topbraid.shacl.expr.lib.FocusNodeExpression
All Implemented Interfaces:
AtomicNodeExpression, NodeExpression

public class FocusNodeExpression extends AbstractNodeExpression implements AtomicNodeExpression
  • 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: NodeExpression
      Produces an iterator of value nodes for a given focus node.
      Specified by:
      eval in interface NodeExpression
      Parameters:
      focusNode - the focus node
      context - the context
      Returns:
      an iterator (never null)
    • getFunctionalSyntax

      public String getFunctionalSyntax()
      Description copied from interface: NodeExpression
      Produces a "functional" syntax used to display node expressions in a compact form.
      Specified by:
      getFunctionalSyntax in interface NodeExpression
      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: NodeExpression
      Gets 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:
      getOutputShape in interface NodeExpression
      Overrides:
      getOutputShape in class AbstractNodeExpression
      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

      public String getTypeId()
      Specified by:
      getTypeId in interface NodeExpression
    • visit

      public void visit(NodeExpressionVisitor visitor)
      Specified by:
      visit in interface NodeExpression