com.hp.hpl.jena.sparql.modify
Class GraphStoreNull

java.lang.Object
  extended by com.hp.hpl.jena.sparql.core.DatasetGraphBase
      extended by com.hp.hpl.jena.sparql.core.DatasetGraphQuad
          extended by com.hp.hpl.jena.sparql.modify.GraphStoreNull
All Implemented Interfaces:
DatasetGraph, GraphStore, Closeable
Direct Known Subclasses:
GraphStoreNullTransactional

public class GraphStoreNull
extends DatasetGraphQuad
implements GraphStore

A black hole for Quads, add as many as you want and it will forget them all. Useful for testing.


Constructor Summary
GraphStoreNull()
           
 
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
 Iterator<Quad> find(Node g, Node s, Node p, Node o)
          Find matching quads in the dataset (including default graph) - may include wildcards, Node.ANY or null
 Iterator<Quad> findNG(Node g, Node s, Node p, Node o)
          Find matching quads in the dataset in named graphs only - may include wildcards, Node.ANY or null
 void finishRequest()
          Signal end of a request being executed
 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 startRequest()
          Signal start of a request being executed
 Dataset toDataset()
          Convert to a dataset (for query)
 
Methods inherited from class com.hp.hpl.jena.sparql.core.DatasetGraphQuad
listGraphNodes, removeGraph
 
Methods inherited from class com.hp.hpl.jena.sparql.core.DatasetGraphBase
add, close, contains, contains, containsGraph, delete, deleteAny, find, find, getContext, getLock, isEmpty, setDefaultGraph, size, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.sparql.core.DatasetGraph
add, close, contains, contains, containsGraph, delete, deleteAny, find, find, getContext, getLock, isEmpty, listGraphNodes, removeGraph, setDefaultGraph, size
 

Constructor Detail

GraphStoreNull

public GraphStoreNull()
Method Detail

find

public Iterator<Quad> find(Node g,
                           Node s,
                           Node p,
                           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 interface DatasetGraph
Specified by:
find in class DatasetGraphQuad
See Also:
Graph.find(Node,Node,Node)

findNG

public Iterator<Quad> findNG(Node g,
                             Node s,
                             Node p,
                             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 interface DatasetGraph
Specified by:
findNG in class DatasetGraphQuad
See Also:
Graph.find(Node,Node,Node)

add

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

Specified by:
add in interface DatasetGraph
Specified by:
add in class DatasetGraphQuad

delete

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

Specified by:
delete in interface DatasetGraph
Specified by:
delete in class DatasetGraphQuad

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
Specified by:
addGraph in class DatasetGraphBase

getDefaultGraph

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

Specified by:
getDefaultGraph in interface DatasetGraph
Specified by:
getDefaultGraph in class DatasetGraphBase

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
Specified by:
getGraph in class DatasetGraphBase

toDataset

public Dataset toDataset()
Description copied from interface: GraphStore
Convert to a dataset (for query)

Specified by:
toDataset in interface GraphStore

startRequest

public void startRequest()
Description copied from interface: GraphStore
Signal start of a request being executed

Specified by:
startRequest in interface GraphStore

finishRequest

public void finishRequest()
Description copied from interface: GraphStore
Signal end of a request being executed

Specified by:
finishRequest in interface GraphStore


Licenced under the Apache License, Version 2.0