public class DatasetGraphMap extends DatasetGraphCollection
| Constructor and Description |
|---|
DatasetGraphMap(DatasetGraph dsg)
Create a new DatasetGraph that initially shares the graphs of the
givem DatasetGraph.
|
DatasetGraphMap(Graph defaultGraph) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGraph(Node graphName,
Graph graph)
Add the given graph to the dataset.
|
void |
close()
Close the dataset
|
boolean |
containsGraph(Node graphNode) |
Graph |
getDefaultGraph()
Get the default graph as a Jena Graph
|
Graph |
getGraph(Node graphNode)
Get the graph named by graphNode : returns null on no graph
NB Whether a dataset contains a graph if there are no triples is not defined - see the specifc implementation.
|
Iterator<Node> |
listGraphNodes()
Iterate over all names of named graphs
|
void |
removeGraph(Node graphName)
Remove all data associated with the named graph
|
void |
setDefaultGraph(Graph g)
Set the default graph.
|
long |
size()
Get the size (number of named graphs) - may be -1 for unknown
|
add, deletefind, findNGpublic DatasetGraphMap(Graph defaultGraph)
public DatasetGraphMap(DatasetGraph dsg)
public boolean containsGraph(Node graphNode)
containsGraph in interface DatasetGraphcontainsGraph in class DatasetGraphBasepublic Graph getDefaultGraph()
DatasetGraphgetDefaultGraph in interface DatasetGraphgetDefaultGraph in class DatasetGraphBasepublic Graph getGraph(Node graphNode)
DatasetGraphgetGraph in interface DatasetGraphgetGraph in class DatasetGraphBasepublic void addGraph(Node graphName, Graph graph)
DatasetGraphDatasetGraph.getGraph(com.hp.hpl.jena.graph.Node)addGraph in interface DatasetGraphaddGraph in class DatasetGraphBasepublic void removeGraph(Node graphName)
DatasetGraphremoveGraph in interface DatasetGraphremoveGraph in class DatasetGraphBasepublic void setDefaultGraph(Graph g)
DatasetGraphDatasetGraph.getDefaultGraph()setDefaultGraph in interface DatasetGraphsetDefaultGraph in class DatasetGraphBasepublic Iterator<Node> listGraphNodes()
DatasetGraphlistGraphNodes in interface DatasetGraphlistGraphNodes in class DatasetGraphCollectionpublic long size()
DatasetGraphsize in interface DatasetGraphsize in class DatasetGraphBasepublic void close()
DatasetGraphclose in interface DatasetGraphclose in interface Closeableclose in class DatasetGraphBaseLicenced under the Apache License, Version 2.0