@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(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(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) ; } }
@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) ; } }
@Override public void visit(ElementPathBlock arg0) { Iterator<TriplePath> it = arg0.patternElts(); while (it.hasNext()) { TriplePath t = it.next(); if (t.isTriple()) { this.atomset.add(SparqlUtils.triple2Atom(t.asTriple())); } else { throw new ParseError("TriplePath not allowed"); } } }
for(Element e : eg.getElements()){ if(e instanceof ElementPathBlock) {for(Iterator<TriplePath> iter = ((ElementPathBlock) e).patternElts(); iter.hasNext();){ Triple t = iter.next().asTriple(); triples.add(t);