java.lang.Object
org.apache.jena.sparql.graph.GraphOps
Some operations on graphs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic booleancontainsGraph(DatasetGraph dsg, Node gn) Check whether a dataset contains a named graph of the given name.static voidstatic voidstatic GraphgetGraph(DatasetGraph dsg, Node gn) Get a graph from the dataset - the graph name may be special - the union graph (which is immutable) or a special name for the default graph.static booleanRemove one layer of graph wrapping.static GraphunionGraph(DatasetGraph dsg) Create an immutable union graph of all the named graphs in the dataset.static GraphunionGraph(DatasetGraph dsg, Set<Node> graphNames) Create an immutable union graph comprised of a set of named graphs.static GraphRemove all layers of graph wrapping.static GraphRemove one layer of graph wrapping.
-
Constructor Details
-
GraphOps
public GraphOps()
-
-
Method Details
-
containsGraph
Check whether a dataset contains a named graph of the given name. Graph with special names (union and default) return true. -
getGraph
Get a graph from the dataset - the graph name may be special - the union graph (which is immutable) or a special name for the default graph.A graph name of "null" is interpreted as the default graph.
-
unionGraph
Create an immutable union graph comprised of a set of named graphs. -
unionGraph
Create an immutable union graph of all the named graphs in the dataset. Future changes to the set of graphs in the dataset will be seen. -
addAll
-
addAll
-
deleteAll
-
deleteAll
-
unwrapAll
Remove all layers of graph wrapping. Returns the original graph if not wrapped at all. -
isWrapped
Remove one layer of graph wrapping. -
unwrapOne
Remove one layer of graph wrapping. Returns the original graph if not wrapped at all.
-