uk.ac.soton.ecs.grimoires.jena.sesame.impl
Class GraphSesame

java.lang.Object
  extended bycom.hp.hpl.jena.graph.impl.GraphBase
      extended byuk.ac.soton.ecs.grimoires.jena.sesame.impl.GraphSesame
All Implemented Interfaces:
com.hp.hpl.jena.graph.Graph, com.hp.hpl.jena.graph.GraphAdd, com.hp.hpl.jena.graph.impl.GraphWithPerform

public class GraphSesame
extends com.hp.hpl.jena.graph.impl.GraphBase

Author:
wf

Field Summary
 
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
GraphSesame()
          Create a Jena Graph, which represents a Sesame in-memory local repository that does not have persistent support, synchroinzation support and inference capability.
GraphSesame(boolean inferencing, boolean sync, String fileName, String format, int delay)
          Create a Jena Graph, which represents a Sesame in-memory local repository that has the following customizable features.
GraphSesame(boolean sync, String dir)
          Create a Jena Graph, which represents a Sesame native local repository.
GraphSesame(boolean sync, String driver, String url, String user, String password)
          Create a Jena Graph, which represents a Sesame rdbms local repository.
 
Method Summary
 org.openrdf.sesame.repository.local.LocalRepository getRepository()
           
static org.openrdf.model.ValueFactory getValueFactory()
          Get a Sesame ValueFactory used to create Sesame URI, blank node, literal, etc.
protected  com.hp.hpl.jena.util.iterator.ExtendedIterator graphBaseFind(com.hp.hpl.jena.graph.TripleMatch tm)
           
 void performAdd(com.hp.hpl.jena.graph.Triple t)
           
 void performDelete(com.hp.hpl.jena.graph.Triple t)
           
 com.hp.hpl.jena.graph.query.QueryHandler queryHandler()
           
 
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
add, checkOpen, close, contains, contains, containsByFind, delete, dependsOn, find, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getTransactionHandler, graphBaseContains, graphBaseFind, graphBaseSize, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, reifierContains, reifierSize, reifierTriples, size, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphSesame

public GraphSesame()
Create a Jena Graph, which represents a Sesame in-memory local repository that does not have persistent support, synchroinzation support and inference capability.


GraphSesame

public GraphSesame(boolean inferencing,
                   boolean sync,
                   String fileName,
                   String format,
                   int delay)
Create a Jena Graph, which represents a Sesame in-memory local repository that has the following customizable features. It will firstly create a Sesame repository, then create a Sesame graph from the repository.

Parameters:
inferencing - the Sesame repository supports inference or not.
sync - the the Sesame repository is synchronized or not.
fileName - the name of the file provides the persistent storage. Null means no persistent support required.
format - the RDF data format in the persistent storage.
delay - specifies the time (in milliseconds) to wait after a transaction was commited before writing the changed data to file.

GraphSesame

public GraphSesame(boolean sync,
                   String dir)
Create a Jena Graph, which represents a Sesame native local repository.

Parameters:
sync - the the Sesame repository is synchronized or not.
dir - specifies the directory that can be used by the native sail to store its files.

GraphSesame

public GraphSesame(boolean sync,
                   String driver,
                   String url,
                   String user,
                   String password)
Create a Jena Graph, which represents a Sesame rdbms local repository.

Parameters:
sync - true: the model is synchronized; false: not.
driver - identifies the JDBC (Java Data Base Connectivity) driver that is to be used to access the database.
url - identifies the location of the database through a URL.
user - identifies a username with which Sesame can access the database.
password - identifies a password with which Sesame can access the database.
Method Detail

getValueFactory

public static org.openrdf.model.ValueFactory getValueFactory()
Get a Sesame ValueFactory used to create Sesame URI, blank node, literal, etc.

Returns:
Sesame ValueFactory

graphBaseFind

protected com.hp.hpl.jena.util.iterator.ExtendedIterator graphBaseFind(com.hp.hpl.jena.graph.TripleMatch tm)

performAdd

public void performAdd(com.hp.hpl.jena.graph.Triple t)

performDelete

public void performDelete(com.hp.hpl.jena.graph.Triple t)

queryHandler

public com.hp.hpl.jena.graph.query.QueryHandler queryHandler()

getRepository

public org.openrdf.sesame.repository.local.LocalRepository getRepository()