Package org.topbraid.shacl.expr.lib
Class IfExpression
java.lang.Object
org.topbraid.shacl.expr.AbstractNodeExpression
org.topbraid.shacl.expr.ComplexNodeExpression
org.topbraid.shacl.expr.AbstractInputExpression
org.topbraid.shacl.expr.lib.IfExpression
- All Implemented Interfaces:
NodeExpression
Implements support for sh:if.
This node expression type is not part of the SHACL-AF 1.0 document, but a candidate for 1.1.
- Author:
- Holger Knublauch
-
Constructor Summary
ConstructorsConstructorDescriptionIfExpression(org.apache.jena.rdf.model.RDFNode expr, NodeExpression input, NodeExpression then, NodeExpression else_) -
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.getElse()protected StringgetThen()voidvisit(NodeExpressionVisitor visitor) Methods inherited from class org.topbraid.shacl.expr.AbstractInputExpression
evalInput, getInputMethods inherited from class org.topbraid.shacl.expr.ComplexNodeExpression
getFunctionalSyntaxMethods inherited from class org.topbraid.shacl.expr.AbstractNodeExpression
evalReverse, getOutputShape, getRDFNode, isReversible, toString
-
Constructor Details
-
IfExpression
public IfExpression(org.apache.jena.rdf.model.RDFNode expr, NodeExpression input, NodeExpression then, NodeExpression else_)
-
-
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.- Parameters:
focusNode- the focus nodecontext- the context- Returns:
- an iterator (never null)
-
getElse
-
getFunctionalSyntaxArguments
- Overrides:
getFunctionalSyntaxArgumentsin classAbstractInputExpression
-
getFunctionalSyntaxName
- Overrides:
getFunctionalSyntaxNamein classComplexNodeExpression
-
getInputExpressions
- Specified by:
getInputExpressionsin interfaceNodeExpression- Overrides:
getInputExpressionsin classAbstractInputExpression
-
getThen
-
getTypeId
-
visit
-