use of com.inova8.pathql.element.BoundPathElement in project com.inova8.intelligentgraph by peterjohnlawrence.
the class PathPatternVisitor method visitBoundPattern.
/**
* Visit bound pattern.
*
* @param ctx the ctx
* @return the path element
*/
@Override
public PathElement visitBoundPattern(PathPatternParser.BoundPatternContext ctx) {
// boundPattern : binding ('/'|'>') pathPatterns EOF
PathElement pathElement = new BoundPathElement(this.repositoryContext);
pathElement.setLeftPathElement((FactFilterElement) visit(ctx.binding()));
if (ctx.pathPatterns() != null)
pathElement.setRightPathElement(visit(ctx.pathPatterns()));
else
throw new ScriptFailedException(String.format("Bolund pattern %s must be followed by pathPatterns", ctx.getText()));
return pathElement;
}
Aggregations