org.openrdf.jena
Class NamedGraphSesame

java.lang.Object
  extended by com.hp.hpl.jena.graph.impl.GraphBase
      extended by org.openrdf.jena.GraphSesame
          extended by org.openrdf.jena.NamedGraphSesame
All Implemented Interfaces:
Graph, GraphAdd, com.hp.hpl.jena.graph.impl.GraphWithPerform

public class NamedGraphSesame
extends GraphSesame

This pretends to be a named graph. TODO: re-ification i haven't really considered at all -= with some luck it will JUST WORK (tm)

Author:
grimnes

Field Summary
(package private)  Resource contextID
           
 
Fields inherited from class org.openrdf.jena.GraphSesame
logger, repository
 
Fields inherited from class com.hp.hpl.jena.graph.impl.GraphBase
bulkHandler, capabilities, closed, gem, pm, queryHandler, reifier, style
 
Fields inherited from interface com.hp.hpl.jena.graph.Graph
emptyGraph
 
Constructor Summary
NamedGraphSesame(Repository repository, Resource contextID)
           
 
Method Summary
protected  ExtendedIterator graphBaseFind(TripleMatch tm)
          This must be overridden to pass the right contextID
protected  int graphBaseSize()
          We must override this to take the context into account.
 void performAdd(Triple t)
           
 void performDelete(Triple t)
           
 
Methods inherited from class org.openrdf.jena.GraphSesame
close, getBulkUpdateHandler, getRepository, getValueFactory, jena2sesame
 
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
add, checkOpen, contains, contains, containsByFind, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getCapabilities, getEventManager, getPrefixMapping, getReifier, getTransactionHandler, graphBaseContains, graphBaseFind, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, queryHandler, reifierContains, reifierSize, reifierTriples, size, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

contextID

Resource contextID
Constructor Detail

NamedGraphSesame

public NamedGraphSesame(Repository repository,
                        Resource contextID)
                 throws SailInitializationException
Throws:
SailInitializationException
Method Detail

graphBaseSize

protected int graphBaseSize()
We must override this to take the context into account. TODO: hopefully we can push this into sesame later.

Overrides:
graphBaseSize in class GraphSesame

graphBaseFind

protected ExtendedIterator graphBaseFind(TripleMatch tm)
This must be overridden to pass the right contextID

Overrides:
graphBaseFind in class GraphSesame
See Also:
GraphBase.graphBaseFind(com.hp.hpl.jena.graph.TripleMatch)

performAdd

public void performAdd(Triple t)
Specified by:
performAdd in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performAdd in class GraphSesame
See Also:
GraphWithPerform.performAdd(com.hp.hpl.jena.graph.Triple)

performDelete

public void performDelete(Triple t)
Specified by:
performDelete in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performDelete in class GraphSesame
See Also:
GraphWithPerform.performDelete(com.hp.hpl.jena.graph.Triple)