/** * Adds a triple to the where clause. * * @param t * The triple path to add * @return The Builder for chaining. */ public UpdateBuilder addWhere(Triple t) { return addWhere(new TriplePath(t)); }
static OpPath make(Node subject, Path path, Node object) { TriplePath tp = new TriplePath(subject, path, object) ; return new OpPath(tp) ; }
@Override public DescribeBuilder addOptional(Triple t) { getWhereHandler().addOptional( new TriplePath( t ) ); return this; }
@Override public AskBuilder addOptional(Triple t) { getWhereHandler().addOptional(new TriplePath(t)); return this; }
@Override public SelectBuilder addWhere(Triple t) { getWhereHandler().addWhere(new TriplePath(t)); return this; }
@Override public SelectBuilder addOptional(Triple t) { getWhereHandler().addOptional(new TriplePath(t)); return this; }
@Override public AskBuilder addWhere(Triple t) { getWhereHandler().addWhere(new TriplePath(t)); return this; }
@Override public DescribeBuilder addWhere(Triple t) { getWhereHandler().addWhere(new TriplePath(t)); return this; }
@Override public DescribeBuilder addWhere(FrontsTriple t) { getWhereHandler().addWhere(new TriplePath(t.asTriple())); return this; }
@Override public DescribeBuilder addOptional(FrontsTriple t) { getWhereHandler().addOptional( new TriplePath( t.asTriple() ) ); return this; }
@Override public ConstructBuilder addWhere(FrontsTriple t) { getWhereHandler().addWhere(new TriplePath(t.asTriple())); return this; }
protected void insert(TripleCollectorMark acc, int index, Node s, Node p, Path path, Node o) { if ( p == null ) acc.addTriplePath(index, new TriplePath(s, path, o)) ; else acc.addTriple(index, new Triple(s, p, o)) ; }
@Override public DescribeBuilder addGraph(Object graph, Triple triple) { getWhereHandler().addGraph(makeNode(graph), new TriplePath(triple)); return this; } @Override
@Override public ConstructBuilder addOptional(FrontsTriple t) { getWhereHandler().addOptional(new TriplePath(t.asTriple())); return this; }
@Override public ConstructBuilder addGraph(Object graph, Triple triple) { getWhereHandler().addGraph(makeNode(graph), new TriplePath(triple)); return this; } @Override
@Override public SelectBuilder addOptional(FrontsTriple t) { getWhereHandler().addOptional(new TriplePath(t.asTriple())); return this; }
@Override public WhereBuilder addGraph(Object graph, Triple triple) { getWhereHandler().addGraph(makeNode(graph), new TriplePath(triple)); return this; } @Override
@Override public DescribeBuilder addGraph(Object graph, FrontsTriple triple) { getWhereHandler().addGraph(makeNode(graph), new TriplePath(triple.asTriple())); return this; } @Override
@Override public AskBuilder addGraph(Object graph, FrontsTriple triple) { getWhereHandler().addGraph(makeNode(graph), new TriplePath(triple.asTriple())); return this; } @Override
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) ; }