@Override public int hashCode() { return getSubPath().hashCode() ^ hashInverse ; }
@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 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) ; }
public void visit(P_Inverse inversePath) { //boolean b = forwardMode ; // Flip direction and evaluate forwardMode = ! forwardMode ; inversePath.getSubPath().visit(this) ; forwardMode = ! forwardMode ; }
public void visit(P_Inverse inversePath) { //boolean b = forwardMode ; // Flip direction and evaluate forwardMode = ! forwardMode ; inversePath.getSubPath().visit(this) ; forwardMode = ! forwardMode ; }
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 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 p) { TriplePath newtp = new TriplePath(object, p.getSubPath(), subject); boolean[] resHasPropertyPaths = new boolean[]{false}; result = transform(newtp, bestEffort, vargen, resHasPropertyPaths); if (!resultHasPropertyPaths) { resultHasPropertyPaths = resHasPropertyPaths[0]; } }
@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(graph, inversePath.getSubPath(), node, output) ; engine.flipDirection() ; }
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(")") ; }
@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(")") ; }
@Override public void visit(P_Inverse p) { boolean prevRightRecursion = rightRecursion; rightRecursion = !rightRecursion; p.getSubPath().visit(this); rightRecursion = prevRightRecursion; List<Rule> rules = result; Predicate pred = resultMainPredicate; Predicate newpred = new Predicate(idpPredicateGen.createNewVariable(), 2); VariableExpr x = new VariableExpr("X"); VariableExpr y = new VariableExpr("Y"); // add : newpred(x, y) :- pred(y, z) rules.add( new Rule(new AtomicFormula(newpred, x, y), ruleid++, new AtomicFormula(pred, y, x))); result = rules; resultMainPredicate = newpred; }
reduce(x, varAlloc, endNode, ((P_Inverse)path).getSubPath(), startNode) ; return ;
reduce(x, varAlloc, endNode, ((P_Inverse)path).getSubPath(), startNode) ; return ;