Class LimitExpression

  • All Implemented Interfaces:
    NodeExpression

    public class LimitExpression
    extends AbstractInputExpression
    Implements support for sh:limit. This node expression type is not part of the SHACL-AF 1.0 document, but a candidate for 1.1.
    Author:
    Holger Knublauch
    • Constructor Detail

      • LimitExpression

        public LimitExpression​(org.apache.jena.rdf.model.RDFNode expr,
                               NodeExpression input,
                               int limit)
    • Method Detail

      • 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.
        Parameters:
        focusNode - the focus node
        context - the context
        Returns:
        an iterator (never null)
      • getLimit

        public int getLimit()
      • 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()