Search in sources :

Example 6 with SSEParseException

use of org.apache.jena.sparql.sse.SSEParseException in project jena by apache.

the class TestSerialization method runTestWorker.

protected void runTestWorker(Query query, Syntax syntax) {
    IndentedLineBuffer buff = new IndentedLineBuffer();
    query.serialize(buff, syntax);
    String baseURI = null;
    if (!query.explicitlySetBaseURI())
        // Not in query - use the same one (e.g. file read from) .  
        baseURI = query.getBaseURI();
    try {
        QueryUtils.checkParse(query);
    } catch (RuntimeException ex) {
        System.err.println("**** Test: " + getName());
        System.err.println("** " + ex.getMessage());
        System.err.println(query);
        throw ex;
    }
    try {
        QueryUtils.checkOp(query, true);
    } catch (SSEParseException ex) {
        System.err.println("**** Test: " + getName());
        System.err.println("** Algebra error: " + ex.getMessage());
    }
}
Also used : SSEParseException(org.apache.jena.sparql.sse.SSEParseException) IndentedLineBuffer(org.apache.jena.atlas.io.IndentedLineBuffer)

Aggregations

SSEParseException (org.apache.jena.sparql.sse.SSEParseException)6 IndentedLineBuffer (org.apache.jena.atlas.io.IndentedLineBuffer)2 ParseException (org.apache.jena.sparql.sse.lang.parser.ParseException)2 SSE_ParserCore (org.apache.jena.sparql.sse.lang.parser.SSE_ParserCore)2 TokenMgrError (org.apache.jena.sparql.sse.lang.parser.TokenMgrError)2 Node (org.apache.jena.graph.Node)1 Op (org.apache.jena.sparql.algebra.Op)1 QueryCheckException (org.apache.jena.sparql.core.QueryCheckException)1 ReorderTransformation (org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformation)1 BuildException (org.apache.jena.sparql.sse.builders.BuildException)1 NodeLib (org.apache.jena.tdb.lib.NodeLib)1