@Override public void visit(ElementPathBlock e) { for (TriplePath t:e.getPattern().getList()) { addVars(t); } } @Override
@Override public void visit(ElementPathBlock pb) { ElementPathBlock ret = new ElementPathBlock(); for (Iterator<TriplePath> it= pb.patternElts();it.hasNext(); ) { TriplePath tp = it.next(); ret.addTriplePath(copySubstitute(tp)); } result = ret; }
@Override public void visit(P_OneOrMore1 p) { if (bestEffort) { ElementPathBlock e = new ElementPathBlock(); e.addTriple(new TriplePath(subject, p, object)); result = e; resultHasPropertyPaths = true; } else { result = null; } }
protected void add(ElementPathBlock targetPathBlock, ElementPathBlock newPaths) { for (TriplePath tp:newPaths.getPattern().getList()) { targetPathBlock.addTriple(tp); } } protected void add(ElementPathBlock targetPathBlock, ElementTriplesBlock newTriples) {
ElementTriplesBlock etb = null; ElementGroup g = new ElementGroup(); for (TriplePath tp : e.getPattern().getList()) { boolean[] hasPropPaths = new boolean[]{false}; Element tpres =transform(tp, bestEffort, vargen, hasPropPaths); tpres = new ElementPathBlock(); ((ElementPathBlock) tpres).addTriple(tp); for (TriplePath t: ((ElementPathBlock) tpres).getPattern().getList()) { if (epb == null) { epb = new ElementPathBlock(); g.addElement(epb); epb.addTriple(t);
final public Element TriplesBlock(ElementPathBlock acc) throws ParseException { if ( acc == null ) acc = new ElementPathBlock() ; TriplesSameSubjectPath(acc); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
ElementPathBlock etb2 = new ElementPathBlock() ; currentPathBlock = etb2.getPattern() ; groupElts.add(etb2) ; ElementPathBlock etb2 = new ElementPathBlock() ; currentPathBlock = etb2.getPattern() ; groupElts.add(etb2) ; currentPathBlock.addAll(epb.getPattern()) ; continue ;
public void visit(ElementPathBlock el) if ( el.isEmpty() ) PathBlock pBlk = el.getPattern() ; for ( TriplePath tp : pBlk )
final public void ObjectPath(Node s, Node p, Path path, TripleCollector acc) throws ParseException { Node o ; ElementPathBlock tempAcc = new ElementPathBlock() ; int mark = tempAcc.mark() ; o = GraphNodePath(tempAcc); insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; }
@Override public void visit(ElementPathBlock el) { for (Iterator<TriplePath> iterator = el.patternElts(); iterator.hasNext();) { TriplePath tp = iterator.next(); if(inOptionalClause){ candidates.add(tp.asTriple()); } else { triplePattern.add(tp.asTriple()); } } }
@Override public void visit(OpPath opPath) { ElementPathBlock epb = new ElementPathBlock() ; epb.addTriplePath(opPath.getTriplePath()) ; ElementGroup g = currentGroup() ; g.addElement(epb) ; }
ElementPathBlock pathBlock = new ElementPathBlock(); for (Element elt: group.getElements()) { elt.visit(this); if (pathBlock.isEmpty()) { ret.addElement(pathBlock); if (pathBlock.isEmpty()) { ret.addElement(pathBlock);
public ElementPathBlock(BasicPattern bgp) { for ( Triple t : bgp.getList() ) addTriple(t) ; }
@Override public void addTriple(Triple t) { addTriplePath(new TriplePath(t)) ; }
final public Element TriplesBlock(ElementPathBlock acc) throws ParseException { if ( acc == null ) acc = new ElementPathBlock() ; TriplesSameSubjectPath(acc); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
if ( prev2 != null ) prev2.addAll(epb.getPattern()) ; continue ; ElementPathBlock epb2 = new ElementPathBlock() ; epb2.getPattern().addAll(epb.getPattern()) ; prev2 = epb2.getPattern() ; groupElts.add(epb2) ; continue ;
@Override public void visit(ElementPathBlock el) if ( el.isEmpty() ) PathBlock pBlk = el.getPattern() ; for ( TriplePath tp : pBlk )
final public void Object(Node s, Node p, Path path, TripleCollector acc) throws ParseException { Node o ; ElementPathBlock tempAcc = new ElementPathBlock() ; int mark = tempAcc.mark() ; o = GraphNode(tempAcc); insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; }
@Override public void visit(ElementPathBlock el) { for (Iterator<TriplePath> iter = el.patternElts() ; iter.hasNext() ; ) { TriplePath tp = iter.next() ; // If it's triple-izable, then use the triple. if ( tp.isTriple() ) VarUtils.addVarsFromTriple(acc, tp.asTriple()) ; else VarUtils.addVarsFromTriplePath(acc, tp) ; } }
public ElementPathBlock(BasicPattern bgp) { for ( Triple t : bgp.getList() ) addTriple(t) ; }