com.hp.hpl.jena.sparql.core
Class DatasetGraphReadOnly

java.lang.Object
  extended by com.hp.hpl.jena.sparql.core.DatasetGraphWrapper
      extended by com.hp.hpl.jena.sparql.core.DatasetGraphReadOnly
All Implemented Interfaces:
DatasetGraph, Closeable, Sync
Direct Known Subclasses:
DynamicDatasets.DynamicDatasetGraph

public class DatasetGraphReadOnly
extends DatasetGraphWrapper

Read-only view of a DatasetGraph. Assumes the dataset underneath isn't changing.


Constructor Summary
DatasetGraphReadOnly(DatasetGraph dsg)
           
 
Method Summary
 void add(Quad quad)
          Add a quad
 void addGraph(Node graphName, Graph graph)
          Add the given graph to the dataset.
 void delete(Quad quad)
          Delete a quad
 void deleteAny(Node g, Node s, Node p, Node o)
          Delete any quads matching the pattern
 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.
 void removeGraph(Node graphName)
          Remove all data associated with the named graph
 void setDefaultGraph(Graph g)
          Set the default graph.
 
Methods inherited from class com.hp.hpl.jena.sparql.core.DatasetGraphWrapper
add, close, contains, contains, containsGraph, delete, find, find, find, findNG, getContext, getLock, getWrapped, isEmpty, listGraphNodes, size, sync, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatasetGraphReadOnly

public DatasetGraphReadOnly(DatasetGraph dsg)
Method Detail

getDefaultGraph

public Graph getDefaultGraph()
Description copied from interface: DatasetGraph
Get the default graph as a Jena Graph

Specified by:
getDefaultGraph in interface DatasetGraph
Overrides:
getDefaultGraph in class DatasetGraphWrapper

getGraph

public Graph getGraph(Node graphNode)
Description copied from interface: DatasetGraph
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. Some datasets are "open" - they have all graphs even if no triples,

Specified by:
getGraph in interface DatasetGraph
Overrides:
getGraph in class DatasetGraphWrapper

setDefaultGraph

public void setDefaultGraph(Graph g)
Description copied from interface: DatasetGraph
Set the default graph. Set the active graph if it was null. This replaces the contents default graph, not merge data into it. Do not assume that the same object is returned by DatasetGraph.getDefaultGraph()

Specified by:
setDefaultGraph in interface DatasetGraph
Overrides:
setDefaultGraph in class DatasetGraphWrapper

addGraph

public void addGraph(Node graphName,
                     Graph graph)
Description copied from interface: DatasetGraph
Add the given graph to the dataset. Replaces any existing data for the named graph; to add data, get the graph and add triples to it, or add quads to the dataset. Do not assume that the same Java object is returned by DatasetGraph.getGraph(com.hp.hpl.jena.graph.Node)

Specified by:
addGraph in interface DatasetGraph
Overrides:
addGraph in class DatasetGraphWrapper

removeGraph

public void removeGraph(Node graphName)
Description copied from interface: DatasetGraph
Remove all data associated with the named graph

Specified by:
removeGraph in interface DatasetGraph
Overrides:
removeGraph in class DatasetGraphWrapper

add

public void add(Quad quad)
Description copied from interface: DatasetGraph
Add a quad

Specified by:
add in interface DatasetGraph
Overrides:
add in class DatasetGraphWrapper

delete

public void delete(Quad quad)
Description copied from interface: DatasetGraph
Delete a quad

Specified by:
delete in interface DatasetGraph
Overrides:
delete in class DatasetGraphWrapper

deleteAny

public void deleteAny(Node g,
                      Node s,
                      Node p,
                      Node o)
Description copied from interface: DatasetGraph
Delete any quads matching the pattern

Specified by:
deleteAny in interface DatasetGraph
Overrides:
deleteAny in class DatasetGraphWrapper


Licenced under the Apache License, Version 2.0