use of org.apache.jena.query.Query in project jena by apache.
the class ParserSPARQL11 method parseTemplate.
public static Template parseTemplate(String string) {
final Query query = new Query();
Action action = new Action() {
@Override
public void exec(SPARQLParser11 parser) throws Exception {
Template t = parser.ConstructTemplate();
query.setConstructTemplate(t);
}
};
perform(query, string, action);
return query.getConstructTemplate();
}
use of org.apache.jena.query.Query in project jena by apache.
the class SPARQLParser method parse.
public final Query parse(Query query, String queryString) throws QueryParseException {
Query q = parse$(query, queryString);
validateParsedQuery(q);
return q;
}
use of org.apache.jena.query.Query in project jena by apache.
the class SPARQLParserBase method setUpdateSink.
// protected UpdateSink getUpdateSink() { return sink ; }
public void setUpdateSink(UpdateSink sink) {
this.sink = sink;
this.query = new Query();
setPrologue(sink.getPrologue());
}
use of org.apache.jena.query.Query in project jena by apache.
the class ParserARQ method parseTemplate.
public static Template parseTemplate(String string) {
final Query query = new Query();
Action action = new Action() {
@Override
public void exec(ARQParser parser) throws Exception {
Template t = parser.ConstructTemplate();
query.setConstructTemplate(t);
}
};
perform(query, string, action);
return query.getConstructTemplate();
}
use of org.apache.jena.query.Query in project jena by apache.
the class ParserARQ method parseElement.
public static Element parseElement(String string) {
final Query query = new Query();
Action action = new Action() {
@Override
public void exec(ARQParser parser) throws Exception {
Element el = parser.GroupGraphPattern();
query.setQueryPattern(el);
}
};
perform(query, string, action);
return query.getQueryPattern();
}
Aggregations