|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.hp.hpl.jena.graph.impl.GraphBase
org.openrdf.jena.GraphSesame
public class GraphSesame
This class wraps a Sesame repository and presents it as a Jena Graph NOTE: This class does NOT support remove'ing triples from the iterators returned by find! This means essentially everything, removing can only be done by performRemove call!
| Field Summary | |
|---|---|
protected Logger |
logger
|
protected Repository |
repository
|
private static ValueFactory |
sesameFactory
|
| 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)
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. |
|
GraphSesame(Repository repository)
Create a Jena graph from an existing repository |
|
| Method Summary | |
|---|---|
private Repository |
_createRepository(RepositoryConfig rc)
Copied from sesame org.openrdf.sesame.server.Server |
private void |
addSyncLayer(RepositoryConfig repConfig)
|
void |
close()
|
private void |
createOnConfig(RepositoryConfig repConfig)
|
BulkUpdateHandler |
getBulkUpdateHandler()
|
Repository |
getRepository()
|
static ValueFactory |
getValueFactory()
Get a Sesame ValueFactory used to create Sesame URI, blank node, literal, etc. |
protected ExtendedIterator |
graphBaseFind(TripleMatch tm)
|
protected int |
graphBaseSize()
We override this, maybe Sesame's version is more efficient. |
Statement |
jena2sesame(Triple t)
|
void |
performAdd(Triple t)
|
void |
performDelete(Triple t)
|
private void |
setCapabilities()
|
| 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 |
|---|
protected Repository repository
protected Logger logger
private static ValueFactory sesameFactory
| Constructor Detail |
|---|
public GraphSesame(Repository repository)
public GraphSesame()
public GraphSesame(boolean inferencing,
boolean sync,
String fileName,
String format)
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.
public GraphSesame(boolean sync,
String dir)
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.
public GraphSesame(boolean sync,
String driver,
String url,
String user,
String password)
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 |
|---|
public static ValueFactory getValueFactory()
private void setCapabilities()
private void addSyncLayer(RepositoryConfig repConfig)
private void createOnConfig(RepositoryConfig repConfig)
private Repository _createRepository(RepositoryConfig rc)
throws ServerConfigException
rc -
ServerConfigExceptionpublic Statement jena2sesame(Triple t)
protected ExtendedIterator graphBaseFind(TripleMatch tm)
graphBaseFind in class com.hp.hpl.jena.graph.impl.GraphBaseGraphBase.graphBaseFind(com.hp.hpl.jena.graph.TripleMatch)public void performAdd(Triple t)
performAdd in interface com.hp.hpl.jena.graph.impl.GraphWithPerformperformAdd in class com.hp.hpl.jena.graph.impl.GraphBaseGraphWithPerform.performAdd(com.hp.hpl.jena.graph.Triple)public void performDelete(Triple t)
performDelete in interface com.hp.hpl.jena.graph.impl.GraphWithPerformperformDelete in class com.hp.hpl.jena.graph.impl.GraphBaseGraphWithPerform.performDelete(com.hp.hpl.jena.graph.Triple)public Repository getRepository()
Graph.queryHandler()public void close()
close in interface Graphclose in class com.hp.hpl.jena.graph.impl.GraphBaseprotected int graphBaseSize()
graphBaseSize in class com.hp.hpl.jena.graph.impl.GraphBasepublic BulkUpdateHandler getBulkUpdateHandler()
getBulkUpdateHandler in interface GraphgetBulkUpdateHandler in class com.hp.hpl.jena.graph.impl.GraphBase
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||