@Override public Path transform(P_ReverseLink path, Node node) { Path result = new P_Link(node); return result; }
public static Path pathLink(Node property) { return new P_Link(property) ; }
@Override public Path transform(P_Link path, Node node) { Path result = path.getNode() == node ? path : new P_Link(node) ; return result; }
@Override public void visit(P_ReverseLink path) { result = new P_Link(path.getNode()); }
public static P_Path0 createStep(Node predicate, boolean isFwd) { P_Path0 result = isFwd ? new P_Link(predicate) : new P_ReverseLink(predicate); return result; }
@Override public Path make(ItemList list) { BuilderLib.checkLength(2, 2, list, "path link: wanted 1 argument") ; return new P_Link(list.get(1).getNode()) ; } };
@Override public void visit(P_Link pathNode) { push(new P_Link(changeNode(pathNode.getNode()))); }
@Override public void visit(P_Link pathNode) { push(new P_Link(changeNode(pathNode.getNode()))); }
@Override public Path transform(P_NegPropSet path, List<Node> fwdNodes, List<Node> bwdNodes) { P_NegPropSet result = new P_NegPropSet(); for(Node node : fwdNodes) { result.add(new P_ReverseLink(node)); } for(Node node : bwdNodes) { result.add(new P_Link(node)); } return result; }
result = new P_Link(NodeFactory.createURI(uri + localName));
public static P_NegPropSet createNegPropSet(List<Node> fwdNodes, List<Node> bwdNodes) { P_NegPropSet result = new P_NegPropSet(); for(Node node : fwdNodes) { result.add(new P_Link(node)); } for(Node node : bwdNodes) { result.add(new P_ReverseLink(node)); } return result; }
private static Path readPath(Resource resource) { if (resource.isURIResource()) { return new P_Link(resource.asNode());
private static Path readPath(Resource resource) { if (resource.isURIResource()) { return new P_Link(resource.asNode());
@Override public void visit(P_NegPropSet path) { P_NegPropSet tmp = new P_NegPropSet(); for(Node node : path.getFwdNodes()) { tmp.add(new P_ReverseLink(node)); } for(Node node : path.getBwdNodes()) { tmp.add(new P_Link(node)); } result = tmp; }
private Path build(Item item) { if (item.isNode() ) { if ( item.getNode().isURI() ) return new P_Link(item.getNode()) ; BuilderLib.broken(item, "Attempt to build path from a plain node") ; } if (item.isSymbol() ) BuilderLib.broken(item, "Attempt to build path from a bare symbol") ; return build(item.getList()) ; }
public static QueryIterator execTriplePath(Binding binding, TriplePath triplePath, ExecutionContext execCxt) { if ( triplePath.isTriple() ) { // Fake it. This happens only for API constructed situations. Path path = new P_Link(triplePath.getPredicate()); triplePath = new TriplePath(triplePath.getSubject(), path, triplePath.getObject()); } return execTriplePath(binding, triplePath.getSubject(), triplePath.getPath(), triplePath.getObject(), execCxt) ; }
public TriplePath(Triple triple) { this.subject = triple.getSubject() ; // Canonicalise: A triple and a path with a using P_Link of a URI Node p = triple.getPredicate() ; if ( p.isURI() ) { this.path = new P_Link(triple.getPredicate()) ; this.predicate = p ; } else { this.path = null ; this.predicate = triple.getPredicate() ; } // this.path = null ; // this.predicate = triple.getPredicate() ; this.object = triple.getObject() ; this.triple = triple ; if ( triple.getPredicate() == null ) Log.warn(this, "Triple predicate is null") ; }