@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; } }
@Override public void visit(P_OneOrMoreN p) { if (bestEffort) { ElementPathBlock e = new ElementPathBlock(); e.addTriple(new TriplePath(subject, p, object)); result = e; resultHasPropertyPaths = true; } else { result = null; } }
@Override public void visit(P_ZeroOrMore1 p) { if (bestEffort) { ElementPathBlock e = new ElementPathBlock(); e.addTriple(new TriplePath(subject, p, object)); result = e; resultHasPropertyPaths = true; } else { result = null; } }
@Override public void visit(P_ZeroOrMoreN p) { if (bestEffort) { ElementPathBlock e = new ElementPathBlock(); e.addTriple(new TriplePath(subject, p, object)); result = e; resultHasPropertyPaths = true; } else { result = null; } }
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(OpPath opPath) { ElementPathBlock epb = new ElementPathBlock() ; epb.addTriplePath(opPath.getTriplePath()) ; ElementGroup g = currentGroup() ; g.addElement(epb) ; }
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) ; }
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) ; }
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) ; }
final public Element TriplesBlock(ElementPathBlock acc) throws ParseException { if ( acc == null ) acc = new ElementPathBlock() ; TriplesSameSubjectPath(acc); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
final public Element TriplesBlock(ElementPathBlock acc) throws ParseException { if ( acc == null ) acc = new ElementPathBlock() ; TriplesSameSubjectPath(acc); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
tpres = new ElementPathBlock(); ((ElementPathBlock) tpres).addTriple(tp); for (TriplePath t: ((ElementPathBlock) tpres).getPattern().getList()) { if (epb == null) { epb = new ElementPathBlock(); g.addElement(epb);
ElementPathBlock pathBlock = new ElementPathBlock(); for (Element elt: group.getElements()) { elt.visit(this);
@Override public Var evaluate(NodeSelector nodeSelector, ElementGroup elementGroup, Var var, LDPathEvaluatorConfiguration evaluatorConfiguration) { ReversePropertySelector reversePropertySelector = (ReversePropertySelector) nodeSelector; Var id = Var.alloc(VarIDGenerator.createID()); ElementPathBlock epb = new ElementPathBlock(); epb.addTriple(new TriplePath(var.asNode(), new P_Inverse(new P_Link(NodeFactory.createURI(reversePropertySelector.getProperty().toString()))), id.asNode())); ElementGroup group = new ElementGroup(); group.addElement(epb); elementGroup.addElement(group); return id; } }
private Element process(BasicPattern pattern) { // The different SPARQL versions use different internal structures for BGPs. if ( query.getSyntax() == Syntax.syntaxSPARQL_10 ) { ElementTriplesBlock e = new ElementTriplesBlock() ; for (Triple t : pattern) // Leave bNode variables as they are // Query serialization will deal with them. e.addTriple(t) ; return e ; } if ( query.getSyntax() == Syntax.syntaxSPARQL_11 || query.getSyntax() == Syntax.syntaxARQ ) { ElementPathBlock e = new ElementPathBlock() ; for (Triple t : pattern) // Leave bNode variables as they are // Query serialization will deal with them. e.addTriple(t) ; return e ; } throw new ARQInternalErrorException("Unrecognized syntax: "+query.getSyntax()) ; }
private Element process(BasicPattern pattern) { // The different SPARQL versions use different internal structures for BGPs. if ( query.getSyntax() == Syntax.syntaxSPARQL_10 ) { ElementTriplesBlock e = new ElementTriplesBlock() ; for (Triple t : pattern) // Leave bNode variables as they are // Query serialization will deal with them. e.addTriple(t) ; return e ; } if ( query.getSyntax() == Syntax.syntaxSPARQL_11 || query.getSyntax() == Syntax.syntaxARQ ) { ElementPathBlock e = new ElementPathBlock() ; for (Triple t : pattern) // Leave bNode variables as they are // Query serialization will deal with them. e.addTriple(t) ; return e ; } throw new ARQInternalErrorException("Unrecognized syntax: "+query.getSyntax()) ; }
ElementPathBlock epb = new ElementPathBlock(); String pathExpression = recursivePathSelector.getPathExpression(new SesameValueBackend());
case LPAREN: case LBRACKET: ElementPathBlock tempAcc = new ElementPathBlock() ; s = TriplesNode(tempAcc); PropertyList(s, tempAcc);
case LPAREN: case LBRACKET: ElementPathBlock tempAcc = new ElementPathBlock() ; s = TriplesNode(tempAcc); PropertyList(s, tempAcc);