@Override public void visit(P_Inverse path) { result = path.getSubPath(); }
@Override public int hashCode() { return getSubPath().hashCode() ^ hashInverse; }
@Override public boolean equalTo(Path path2, NodeIsomorphismMap isoMap) { if ( !(path2 instanceof P_Inverse) ) return false; P_Inverse other = (P_Inverse)path2; return getSubPath().equalTo(other.getSubPath(), isoMap); }
@Override public Path transform(P_Inverse path, Path subPath) { Path result = path.getSubPath() == subPath ? path : new P_Inverse(subPath) ; return result; }
@Override public void visit(P_Inverse path) { Path subPath = path.getSubPath(); result = PathVisitorInvert.apply(subPath); } }
@Override public void visit(P_Inverse path) { Path newSubPath = apply(path.getSubPath()); result = path.getSubPath() == newSubPath ? path : new P_Inverse(newSubPath) ; }
/** * Constructs a PathEvaluator for an arbitrary SPARQL path (except single forward properties). * @param path the path * @param shapesModel the shapes Model */ public PathEvaluator(Path path, Model shapesModel) { this.jenaPath = path; isInverse = jenaPath instanceof P_Inverse && ((P_Inverse)jenaPath).getSubPath() instanceof P_Link; if(isInverse) { P_Link link = (P_Link) ((P_Inverse)jenaPath).getSubPath(); predicate = shapesModel.getProperty(link.getNode().getURI()); } }
@Override public void visit(P_Inverse inversePath) { out.print("^") ; Path p = inversePath.getSubPath() ; boolean parens = true ; if ( p instanceof P_Link ) parens = false ; visitPath(p, parens) ; } }
@Override public void visit(P_Inverse path) { before(path); if (path.getSubPath() != null) { path.getSubPath().visit(this); } proc.visit(path); after(path); }
@Override public void visit(P_Inverse inversePath) { PathTransform pt = new PathTransform(object, subject) ; inversePath.getSubPath().visit(pt) ; result = pt.getResult() ; }
@Override public void visit(P_Inverse inversePath) { // boolean b = forwardMode ; // Flip direction and evaluate engine.flipDirection() ; engine.eval(inversePath.getSubPath(), node, output) ; engine.flipDirection() ; }
@Override public void visit(P_Inverse inversePath) { inversePath.getSubPath().visit(this); push(new P_Inverse(pop())); }
@Override public void visit(P_Inverse inversePath) { inversePath.getSubPath().visit(this); push(new P_Inverse(pop())); }
@Override public void visit(P_Inverse reversePath) { out.print("(") ; out.print(Tags.tagPathReverse) ; nl(out) ; out.incIndent() ; Path p = reversePath.getSubPath() ; output(p) ; out.decIndent() ; nl(out, false) ; out.print(")") ; }
if ( subPath instanceof P_Inverse ) { P_Inverse pInv = (P_Inverse)subPath ; if ( pInv.getSubPath() instanceof P_Link ) { P_Link link = (P_Link)(pInv.getSubPath()) ; if ( ! isPropertyFunction(link.getNode(), execCxt.getContext()) ) { Iterator<Triple> sIter = graph.find(null, link.getNode(), null) ;
result.addProperty(SH.inversePath, createPath(((P_Inverse) path).getSubPath(), model)); return result;
result.addProperty(SH.inversePath, createPath(((P_Inverse) path).getSubPath(), model)); return result;
reduce(x, varAlloc, endNode, ((P_Inverse)path).getSubPath(), startNode) ; return ;