Java Code Examples for org.apache.jena.sparql.core.Quad#isDefaultGraph()

The following examples show how to use org.apache.jena.sparql.core.Quad#isDefaultGraph() . 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: RDFChangesWriter.java    From rdf-delta with Apache License 2.0 5 votes vote down vote up
private void output(String code, Node g, Node s, Node p, Node o) {
    tok.startTuple();
    outputWord(code);
    output(s);
    output(p);
    output(o);
    if ( g != null && ! Quad.isDefaultGraph(g) )
        output(g);
    tok.endTuple();
    tok.flush();
}
 
Example 2
Source File: DatasetWrappingDatasetGraph.java    From shacl with Apache License 2.0 5 votes vote down vote up
protected Graph getGraph(Quad quad) {
	if(quad.isDefaultGraph()) {
		return getDefaultGraph();
	}
	else {
		return getGraph(quad.getGraph());
	}
}
 
Example 3
Source File: DatasetGraphStableGraphs.java    From rdf-delta with Apache License 2.0 2 votes vote down vote up
/**
 * Forget about a graph.
 *
 * If called with argument "null", it will reset the
 * cached copy of the default graph.
 */
public void expel(Node graphName) {
    if ( graphName == null || Quad.isDefaultGraph(graphName) )
        defaultGraph = get().getDefaultGraph();
    namedGraphs.remove(graphName);
}