Search in sources :

Example 1 with QueryVisitor

use of org.apache.jena.query.QueryVisitor in project jena by apache.

the class FormatterElement method visit.

@Override
public void visit(ElementSubQuery el) {
    out.print("{ ");
    out.incIndent(INDENT);
    Query q = el.getQuery();
    // Serialize with respect to the existing context
    QuerySerializerFactory factory = SerializerRegistry.get().getQuerySerializerFactory(Syntax.syntaxARQ);
    QueryVisitor serializer = factory.create(Syntax.syntaxARQ, context, out);
    q.visit(serializer);
    out.decIndent(INDENT);
    out.print("}");
}
Also used : QueryVisitor(org.apache.jena.query.QueryVisitor) Query(org.apache.jena.query.Query)

Aggregations

Query (org.apache.jena.query.Query)1 QueryVisitor (org.apache.jena.query.QueryVisitor)1