org.apache.jena.sparql.ARQException Java Examples

The following examples show how to use org.apache.jena.sparql.ARQException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SPARQLExtPathWriter.java    From sparql-generate with Apache License 2.0 6 votes vote down vote up
@Override
public void visit(P_NegPropSet pathNotOneOf) {
    List<P_Path0> props = pathNotOneOf.getNodes();
    if (props.size() == 0) {
        throw new ARQException("Bad path element: NotOneOf found with no elements");
    }
    out.print("!");
    if (props.size() == 1) {
        output(props.get(0));
    } else {
        out.print("(");
        boolean first = true;
        for (P_Path0 p : props) {
            if (!first) {
                out.print("|");
            }
            first = false;
            output(p);
        }
        out.print(")");
    }
}
 
Example #2
Source File: SPARQLExtFunction.java    From sparql-generate with Apache License 2.0 5 votes vote down vote up
public SPARQLExtFunction(SPARQLExtQuery function) {
    if (!function.isFunctionType()) {
        throw new ARQException("creating function for a query that is not a function");
    }
    this.function = function;
    function.normalizeXExpr();
}
 
Example #3
Source File: SPARQLExtIteratorFunction.java    From sparql-generate with Apache License 2.0 5 votes vote down vote up
public SPARQLExtIteratorFunction(SPARQLExtQuery select, Context context) {
	if (!select.isSelectType()) {
		throw new ARQException("creating iterator for a query that is not a SELECT");
	}
	this.select = select;
	select.normalizeXExpr();
	select.normalizeBNode();
}
 
Example #4
Source File: ElementGenerateTriplesBlock.java    From sparql-generate with Apache License 2.0 4 votes vote down vote up
@Override
public void addTriplePath(TriplePath path) {
    throw new ARQException("Triples-only collector");
}
 
Example #5
Source File: ElementGenerateTriplesBlock.java    From sparql-generate with Apache License 2.0 4 votes vote down vote up
@Override
public void addTriplePath(int index, TriplePath path) {
    throw new ARQException("Triples-only collector");
}