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, delete
find, findNG
public DatasetGraphMap(Graph defaultGraph)
public DatasetGraphMap(DatasetGraph dsg)
public boolean containsGraph(Node graphNode)
containsGraph
in interface DatasetGraph
containsGraph
in class DatasetGraphBase
public Graph getDefaultGraph()
DatasetGraph
getDefaultGraph
in interface DatasetGraph
getDefaultGraph
in class DatasetGraphBase
public Graph getGraph(Node graphNode)
DatasetGraph
getGraph
in interface DatasetGraph
getGraph
in class DatasetGraphBase
public void addGraph(Node graphName, Graph graph)
DatasetGraph
DatasetGraph.getGraph(com.hp.hpl.jena.graph.Node)
addGraph
in interface DatasetGraph
addGraph
in class DatasetGraphBase
public void removeGraph(Node graphName)
DatasetGraph
removeGraph
in interface DatasetGraph
removeGraph
in class DatasetGraphBase
public void setDefaultGraph(Graph g)
DatasetGraph
DatasetGraph.getDefaultGraph()
setDefaultGraph
in interface DatasetGraph
setDefaultGraph
in class DatasetGraphBase
public Iterator<Node> listGraphNodes()
DatasetGraph
listGraphNodes
in interface DatasetGraph
listGraphNodes
in class DatasetGraphCollection
public long size()
DatasetGraph
size
in interface DatasetGraph
size
in class DatasetGraphBase
public void close()
DatasetGraph
close
in interface DatasetGraph
close
in interface Closeable
close
in class DatasetGraphBase
Licenced under the Apache License, Version 2.0