@Override public Element transform(ElementNamedGraph el, Node gn, Element elt1) { if ( el.getGraphNameNode() == gn && el.getElement() == elt1 ) return el ; return new ElementNamedGraph(gn, elt1) ; }
final public Element GraphGraphPattern() throws ParseException { Element el ; Node n ; jj_consume_token(GRAPH); n = VarOrIRIref(); el = GroupGraphPattern(); {if (true) return new ElementNamedGraph(n, el) ;} throw new Error("Missing return statement in function"); }
final public Element GraphGraphPattern() throws ParseException { Element el ; Node n ; jj_consume_token(GRAPH); n = VarOrIri(); el = GroupGraphPattern(); {if (true) return new ElementNamedGraph(n, el) ;} throw new Error("Missing return statement in function"); }
final public Element GraphGraphPattern() throws ParseException { Element el ; Node n ; jj_consume_token(GRAPH); n = VarOrIri(); el = GroupGraphPattern(); {if (true) return new ElementNamedGraph(n, el) ;} throw new Error("Missing return statement in function"); }
/** * Add a graph to the where clause. * * @param graph * The name of the graph. * @param subQuery * The where handler that defines the graph. */ public void addGraph(Node graph, WhereHandler subQuery) { getClause().addElement(new ElementNamedGraph(graph, subQuery.getElement())); }
/** * Add a graph to the where clause. * * @param graph * The name of the graph. * @param subQuery * The where handler that defines the graph. */ public void addGraph(Node graph, WhereHandler subQuery) { getClause().addElement(new ElementNamedGraph(graph, subQuery.getClause())); }
/** * Add a graph to the where clause. * * @param graph * The name of the graph. * @param subQuery * The where handler that defines the graph. */ public void addGraph(Node graph, WhereHandler subQuery) { getClause().addElement(new ElementNamedGraph(graph, subQuery.getElement())); }
/** * Add a graph to the where clause. * * @param graph * The name of the graph. * @param subQuery * The where handler that defines the graph. */ public void addGraph(Node graph, WhereHandler subQuery) { getClause().addElement(new ElementNamedGraph(graph, subQuery.getClause())); }
@Override public void visit(ElementNamedGraph el) { el.getElement().visit( this ); if (result == el.getElement()) { // nothing to do result = el; } else { result = new ElementNamedGraph( el.getGraphNameNode(), result); } }
@Override public void visit(ElementNamedGraph el) { el.getElement().visit( this ); if (result == el.getElement()) { // nothing to do result = el; } else { result = new ElementNamedGraph( el.getGraphNameNode(), result); } }
/** * Add a graph to the where clause. * * Short hand for graph { s, p, o } * * @param graph * The name of the graph. * @param subQuery * A triple path to add to the graph. */ public void addGraph(Node graph, TriplePath subQuery) { ElementPathBlock epb = new ElementPathBlock(); epb.addTriple(subQuery); getClause().addElement(new ElementNamedGraph(graph, epb)); }
protected ElementGroup createQueryPattern(Template t){ ElementGroup elg = new ElementGroup(); Map<Node, BasicPattern> graphs = t.getGraphPattern(); for(Node n: graphs.keySet()){ Element el = new ElementPathBlock(graphs.get(n)); if(! Quad.defaultGraphNodeGenerated.equals(n) ){ ElementGroup e = new ElementGroup(); e.addElement(el); el = new ElementNamedGraph(n, e); } elg.addElement(el); } return elg; } }
/** * Add a graph to the where clause. * * Short hand for graph { s, p, o } * * @param graph * The name of the graph. * @param subQuery * A triple path to add to the graph. */ public void addGraph(Node graph, TriplePath subQuery) { ElementPathBlock epb = new ElementPathBlock(); epb.addTriple(subQuery); getClause().addElement(new ElementNamedGraph(graph, epb)); }
public static Element createElement(Quad quad) { Element tripleEl = createElement(quad.asTriple()); Element result = Quad.isDefaultGraph(quad.getGraph()) ? tripleEl : new ElementNamedGraph(quad.getGraph(), tripleEl); return result; }
@Override public void visit(ElementNamedGraph el) { Node n = el.getGraphNameNode(); if (n != null) { n = changeNode(n); } el.getElement().visit(this); push(new ElementNamedGraph(n, getResult())); }
@Override public void visit(ElementNamedGraph el) { Node n = el.getGraphNameNode(); if (n != null) { n = changeNode(n); } el.getElement().visit(this); push(new ElementNamedGraph(n, getResult())); }
@Override public void visit(OpGraph opGraph) { startSubGroup() ; Element e = asElement(opGraph.getSubOp()) ; ElementGroup g = endSubGroup() ; Element graphElt = new ElementNamedGraph(opGraph.getNode(), e) ; currentGroup().addElement(graphElt) ; }
public static Element createElementNamedGraph(Table table) { Element elData = tableToElement(table); ElementTriplesBlock elTriples = new ElementTriplesBlock(); elTriples.addTriple(new Triple(Vars.s, Vars.p, Vars.o)); ElementGroup result = new ElementGroup(); result.addElement(elData); result.addElement(new ElementNamedGraph(Vars.g, elTriples)); return result; }
@Override public void visit(OpGraph opGraph) { startSubGroup() ; Element e = asElement(opGraph.getSubOp()) ; endSubGroup() ; // If not element group make it one if ( !(e instanceof ElementGroup) ) { ElementGroup g = new ElementGroup() ; g.addElement(e) ; e = g ; } Element graphElt = new ElementNamedGraph(opGraph.getNode(), e) ; currentGroup().addElement(graphElt) ; }
@Override public void visit(OpQuadPattern quadPattern) { Node graphNode = quadPattern.getGraphNode() ; if ( graphNode.equals(Quad.defaultGraphNodeGenerated) ) { currentGroup().addElement(process(quadPattern.getBasicPattern())) ; } else { startSubGroup() ; Element e = asElement(new OpBGP(quadPattern.getBasicPattern())) ; endSubGroup() ; // If not element group make it one if ( !(e instanceof ElementGroup) ) { ElementGroup g = new ElementGroup() ; g.addElement(e) ; e = g ; } Element graphElt = new ElementNamedGraph(graphNode, e) ; currentGroup().addElement(graphElt) ; } }