java.lang.Object
org.apache.jena.atlas.lib.Pair<T,T>
org.apache.jena.atlas.lib.PairOfSameType<DatasetGraph>
org.apache.jena.sparql.util.DyadicDatasetGraph
org.apache.jena.sparql.util.UnionDatasetGraph
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable
,DatasetGraph
,Transactional
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.sparql.core.Transactional
Transactional.Promote
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Test whether the dataset (including default graph) contains a quad - may include wildcards, Node.ANY or nullboolean
containsGraph
(org.apache.jena.graph.Node graphNode) Does the DatasetGraph contain a specific named graph?find
(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Find matching quads in the dataset (including default graph) - may include wildcards, Node.ANY or nullfindNG
(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Find matching quads in the dataset in named graphs only - may include wildcards, Node.ANY or nullorg.apache.jena.graph.Graph
Get the default graph as a Jena Graphorg.apache.jena.graph.Graph
getGraph
(org.apache.jena.graph.Node graphNode) Get the graph named by graphNode : returns null when there is no such graph.org.apache.jena.graph.Graph
Return aGraph
that is the union of all named graphs in this dataset.boolean
isEmpty()
Test whether the dataset is emptyIterator<org.apache.jena.graph.Node>
Iterate over all names of named graphsMethods inherited from class org.apache.jena.sparql.util.DyadicDatasetGraph
abort, add, add, addGraph, begin, begin, begin, clear, close, commit, contains, delete, delete, deleteAny, end, find, find, getContext, getLock, isInTransaction, prefixes, promote, removeGraph, setContext, size, supportsTransactionAbort, supportsTransactions, transactionMode, transactionType
Methods inherited from class org.apache.jena.atlas.lib.PairOfSameType
apply, both, either, forEach
Methods inherited from class org.apache.jena.atlas.lib.Pair
addToMap, addToMap, car, cdr, create, equalElts, equals, getLeft, getRight, hashCode, toString
Methods inherited from interface org.apache.jena.sparql.core.DatasetGraph
addAll, stream, stream
Methods inherited from interface org.apache.jena.sparql.core.Transactional
calc, calculate, calculateRead, calculateWrite, exec, execute, executeRead, executeWrite, promote
-
Constructor Details
-
UnionDatasetGraph
-
-
Method Details
-
getDefaultGraph
public org.apache.jena.graph.Graph getDefaultGraph()Description copied from interface:DatasetGraph
Get the default graph as a Jena Graph -
getGraph
public org.apache.jena.graph.Graph getGraph(org.apache.jena.graph.Node graphNode) Description copied from interface:DatasetGraph
Get the graph named by graphNode : returns null when there is no such graph. NB Whether a dataset contains a graph if there are no triples is not defined - see the specific implementation. Some datasets are "open" - they have all graphs even if no triples. -
getUnionGraph
public org.apache.jena.graph.Graph getUnionGraph()Description copied from interface:DatasetGraph
Return aGraph
that is the union of all named graphs in this dataset. This union graph is read-only (its prefix mapping in the current JVM may be changed but that may not persist).- Specified by:
getUnionGraph
in interfaceDatasetGraph
- Overrides:
getUnionGraph
in classDyadicDatasetGraph
-
containsGraph
public boolean containsGraph(org.apache.jena.graph.Node graphNode) Description copied from interface:DatasetGraph
Does the DatasetGraph contain a specific named graph? Whether a dataset contains a graph if there are no triples is not defined - see the specific implementation. Some datasets are "open" - they have all graphs even if no triples and this returns true always.- Returns:
- boolean
-
listGraphNodes
Description copied from interface:DatasetGraph
Iterate over all names of named graphs -
find
public Iterator<Quad> find(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Description copied from interface:DatasetGraph
Find matching quads in the dataset (including default graph) - may include wildcards, Node.ANY or null- Specified by:
find
in interfaceDatasetGraph
- Overrides:
find
in classDyadicDatasetGraph
- See Also:
-
Graph.find(Node,Node,Node)
-
findNG
public Iterator<Quad> findNG(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Description copied from interface:DatasetGraph
Find matching quads in the dataset in named graphs only - may include wildcards, Node.ANY or null- Specified by:
findNG
in interfaceDatasetGraph
- Overrides:
findNG
in classDyadicDatasetGraph
- See Also:
-
Graph.find(Node,Node,Node)
-
contains
public boolean contains(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Description copied from interface:DatasetGraph
Test whether the dataset (including default graph) contains a quad - may include wildcards, Node.ANY or null -
isEmpty
public boolean isEmpty()Description copied from interface:DatasetGraph
Test whether the dataset is empty- Specified by:
isEmpty
in interfaceDatasetGraph
- Overrides:
isEmpty
in classDyadicDatasetGraph
-