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
public class IfExpression extends AbstractInputExpression
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
Constructors Constructor Description IfExpression(org.apache.jena.rdf.model.RDFNode expr, NodeExpression input, NodeExpression then, NodeExpression else_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.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.NodeExpressiongetElse()List<String>getFunctionalSyntaxArguments()protected StringgetFunctionalSyntaxName()List<NodeExpression>getInputExpressions()NodeExpressiongetThen()StringgetTypeId()voidvisit(NodeExpressionVisitor visitor)-
Methods inherited from class org.topbraid.shacl.expr.AbstractInputExpression
evalInput, getInput
-
Methods inherited from class org.topbraid.shacl.expr.ComplexNodeExpression
getFunctionalSyntax
-
Methods inherited from class org.topbraid.shacl.expr.AbstractNodeExpression
evalReverse, getOutputShape, getRDFNode, isReversible, toString
-
-
-
-
Constructor Detail
-
IfExpression
public IfExpression(org.apache.jena.rdf.model.RDFNode expr, NodeExpression input, NodeExpression then, NodeExpression else_)
-
-
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:NodeExpressionProduces an iterator of value nodes for a given focus node.- Parameters:
focusNode- the focus nodecontext- the context- Returns:
- an iterator (never null)
-
getElse
public NodeExpression getElse()
-
getFunctionalSyntaxArguments
public List<String> getFunctionalSyntaxArguments()
- Overrides:
getFunctionalSyntaxArgumentsin classAbstractInputExpression
-
getFunctionalSyntaxName
protected String getFunctionalSyntaxName()
- Overrides:
getFunctionalSyntaxNamein classComplexNodeExpression
-
getInputExpressions
public List<NodeExpression> getInputExpressions()
- Specified by:
getInputExpressionsin interfaceNodeExpression- Overrides:
getInputExpressionsin classAbstractInputExpression
-
getThen
public NodeExpression getThen()
-
getTypeId
public String getTypeId()
-
visit
public void visit(NodeExpressionVisitor visitor)
-
-