org.openanzo.client.jena
Class JenaDatasetService

java.lang.Object
  extended by org.openanzo.client.jena.JenaDatasetService

public class JenaDatasetService
extends java.lang.Object

Wrapper for an underlying DatasetService

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
JenaDatasetService(java.util.Properties properties)
          Create a wrapped DatasetService given the provided properties
 
Method Summary
 void close()
          Close the underlying datasetService
 java.util.concurrent.Executor getCustomExecutor()
          Get the custom executor for this datasetService
 DatasetServiceReplicator getDatasetReplicator()
          Get the underlying replication service
 DatasetServiceEventManager getEventManager()
          Get the eventManager for this datasetService
 IClosableDataset getLocalDataSet(boolean create, boolean createImmediately, boolean addNamedGraphTrackers, java.util.Set<java.lang.String> defaultNamedGraphUris, java.util.Set<java.lang.String> namedGraphUris)
          Create a new IClosableDataset with a set of uris to union together to form the defaultModel and a set of uris for the NamedGraphs.
 GraphImpl getLocalGraph(java.lang.String uri, boolean create, boolean addNamedGraphTracker)
          Create a new LocalGraph from the DatasetService
 java.util.Map<java.lang.String,GraphImpl> getLocalGraphs()
          Get the map of URIs to local Graphs
 NamedGraphModel getLocalModel(java.lang.String uri, boolean create, boolean addNamedGraphTracker)
          Create a new model from the DatasetService
 GraphImpl getLocalSystemGraph(boolean addNamedGraphTracker)
          Create a new local system graph from the DatasetService
 NamedGraphModel getLocalSystemModel(boolean addNamedGraphTracker)
          Create a new local system model from the DatasetService
 org.openanzo.client.jena.JenaDatasetService.JenaModelService getModelService()
          Get the modelService for this datasetService
 INotificationService getNotificationService()
          Get the notificationService for this datasetService
 IClosableDataset getRemoteDataSet(boolean create, boolean createImmediately, java.util.Set<java.lang.String> defaultNamedGraphUris, java.util.Set<java.lang.String> namedGraphUris)
          Create a new CloseableDatasetServiceDataset with a set of URIs to union together to form the defaultGraph and a set of uris for the NamedGraphs.
 GraphImpl getRemoteGraph(java.lang.String uri, boolean create)
          Create a new RemoteGraph from the DatasetService
 java.util.Map<java.lang.String,GraphImpl> getRemoteGraphs()
          Get the map of URIs to remote Graphs
 NamedGraphModel getRemoteModel(java.lang.String uri, boolean create)
          Create a new RemoteModel from the DatasetService
 GraphImpl getRemoteSystemGraph()
          Create a new remote system graph from the DatasetService
 com.hp.hpl.jena.rdf.model.Model getRemoteSystemModel()
          Create a new remote system model from the DatasetService
 ITransactionQueueManager getTransactionManager()
          Get the transaction manager for this datasetService
 ITransactionQueue getTransactionQueue()
          Get the transaction queue for this datasetService
 boolean isLocalGraphOpen(java.lang.String namedGraphUri)
          Return true if a local graph with the given URI is open
 boolean isNamedGraphStored(java.lang.String namedGraphUri)
          Return true if a graph with the given URI is available
 boolean isPersisted()
          Return true if persistence is enabled
 boolean isRemoteGraphOpen(java.lang.String namedGraphUri)
          Return true if a remote graph with the given URI is open
 void setCustomExecutor(java.util.concurrent.Executor customExecutor)
          Set the custom executor for this datasetService
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JenaDatasetService

public JenaDatasetService(java.util.Properties properties)
Create a wrapped DatasetService given the provided properties

Parameters:
properties - the configuration properties
Method Detail

getLocalGraph

public GraphImpl getLocalGraph(java.lang.String uri,
                               boolean create,
                               boolean addNamedGraphTracker)
                        throws AnzoException
Create a new LocalGraph from the DatasetService

Parameters:
uri - URI of the DatasetService
create - create the graph if it does not already exist
addNamedGraphTracker - add a tracker for the NamedGraph
Returns:
a wrapped graph for the underlying local graph
Throws:
AnzoException

getLocalModel

public NamedGraphModel getLocalModel(java.lang.String uri,
                                     boolean create,
                                     boolean addNamedGraphTracker)
                              throws AnzoException
Create a new model from the DatasetService

Parameters:
uri - URI of the DatasetService
create - create the graph if it does not already exist
addNamedGraphTracker - add a tracker for the NamedGraph
Returns:
a wrapped graph for the underlying local graph
Throws:
AnzoException

getLocalSystemGraph

public GraphImpl getLocalSystemGraph(boolean addNamedGraphTracker)
                              throws AnzoException
Create a new local system graph from the DatasetService

Parameters:
addNamedGraphTracker - add a tracker for the NamedGraph
Returns:
a wrapped graph for the underlying local graph
Throws:
AnzoException

getLocalSystemModel

public NamedGraphModel getLocalSystemModel(boolean addNamedGraphTracker)
                                    throws AnzoException
Create a new local system model from the DatasetService

Parameters:
addNamedGraphTracker - add a tracker for the NamedGraph
Returns:
a wrapped graph for the underlying local graph
Throws:
AnzoException

getRemoteGraph

public GraphImpl getRemoteGraph(java.lang.String uri,
                                boolean create)
                         throws AnzoException
Create a new RemoteGraph from the DatasetService

Parameters:
uri - URI of the DatasetService
create - create the graph if it does not already exist
Returns:
a wrapped graph for the underlying local graph
Throws:
AnzoException

getRemoteModel

public NamedGraphModel getRemoteModel(java.lang.String uri,
                                      boolean create)
                               throws AnzoException
Create a new RemoteModel from the DatasetService

Parameters:
uri - URI of the DatasetService
create - create the graph if it does not already exist
Returns:
a wrapped graph for the underlying local graph
Throws:
AnzoException

getRemoteSystemGraph

public GraphImpl getRemoteSystemGraph()
                               throws AnzoException
Create a new remote system graph from the DatasetService

Returns:
a wrapped graph for the underlying remote graph
Throws:
AnzoException

getRemoteSystemModel

public com.hp.hpl.jena.rdf.model.Model getRemoteSystemModel()
                                                     throws AnzoException
Create a new remote system model from the DatasetService

Returns:
a wrapped model for the underlying remote graph
Throws:
AnzoException

isLocalGraphOpen

public boolean isLocalGraphOpen(java.lang.String namedGraphUri)
                         throws AnzoException
Return true if a local graph with the given URI is open

Parameters:
namedGraphUri - URI of namedGraph to check
Returns:
true if a local graph with the given URI is open
Throws:
AnzoException

isRemoteGraphOpen

public boolean isRemoteGraphOpen(java.lang.String namedGraphUri)
                          throws AnzoException
Return true if a remote graph with the given URI is open

Parameters:
namedGraphUri - URI of namedGraph to check
Returns:
true if a remote graph with the given URI is open
Throws:
AnzoException

isNamedGraphStored

public boolean isNamedGraphStored(java.lang.String namedGraphUri)
                           throws AnzoException
Return true if a graph with the given URI is available

Parameters:
namedGraphUri - URI of namedGraph to check
Returns:
true if a graph with the given URI is available
Throws:
AnzoException

close

public void close()
Close the underlying datasetService


getDatasetReplicator

public DatasetServiceReplicator getDatasetReplicator()
Get the underlying replication service

Returns:
the underlying replication service

isPersisted

public boolean isPersisted()
Return true if persistence is enabled

Returns:
true if persistence is enabled

getLocalGraphs

public java.util.Map<java.lang.String,GraphImpl> getLocalGraphs()
Get the map of URIs to local Graphs

Returns:
the map of URIs to local Graphs

getRemoteGraphs

public java.util.Map<java.lang.String,GraphImpl> getRemoteGraphs()
Get the map of URIs to remote Graphs

Returns:
the map of URIs to remote Graphs

getCustomExecutor

public java.util.concurrent.Executor getCustomExecutor()
Get the custom executor for this datasetService

Returns:
the custom executor for this datasetService

setCustomExecutor

public void setCustomExecutor(java.util.concurrent.Executor customExecutor)
Set the custom executor for this datasetService

Parameters:
customExecutor - the custom executor for this datasetService

getModelService

public org.openanzo.client.jena.JenaDatasetService.JenaModelService getModelService()
Get the modelService for this datasetService

Returns:
the modelService for this datasetService

getNotificationService

public INotificationService getNotificationService()
Get the notificationService for this datasetService

Returns:
the notificationService for this datasetService

getTransactionQueue

public ITransactionQueue getTransactionQueue()
Get the transaction queue for this datasetService

Returns:
the transaction queue for this datasetService

getTransactionManager

public ITransactionQueueManager getTransactionManager()
Get the transaction manager for this datasetService

Returns:
the transaction manager for this datasetService

getEventManager

public DatasetServiceEventManager getEventManager()
Get the eventManager for this datasetService

Returns:
the eventManager for this datasetService

getLocalDataSet

public IClosableDataset getLocalDataSet(boolean create,
                                        boolean createImmediately,
                                        boolean addNamedGraphTrackers,
                                        java.util.Set<java.lang.String> defaultNamedGraphUris,
                                        java.util.Set<java.lang.String> namedGraphUris)
Create a new IClosableDataset with a set of uris to union together to form the defaultModel and a set of uris for the NamedGraphs.

Parameters:
create - create graphs if they do not exist
createImmediately - NamedGraphs should be instantiated immediately when the dataset is created
addNamedGraphTrackers - Add a NamedGraphTracker for each LocalNamedGraph instantiated threw the Dataset
defaultNamedGraphUris - Set of NamedGraph uris to union as DefaultModel.
namedGraphUris - Set of NamedGraph uris within dataset.
Returns:
a new IClosableDataset with a set of uris to union together to form the defaultModel and a set of uris for the NamedGraphs.

getRemoteDataSet

public IClosableDataset getRemoteDataSet(boolean create,
                                         boolean createImmediately,
                                         java.util.Set<java.lang.String> defaultNamedGraphUris,
                                         java.util.Set<java.lang.String> namedGraphUris)
Create a new CloseableDatasetServiceDataset with a set of URIs to union together to form the defaultGraph and a set of uris for the NamedGraphs.

Parameters:
create - create graphs if they do not exist
createImmediately - NamedGraphs should be instantiated immediately when the dataset is created
defaultNamedGraphUris - Set of NamedGraph uris to union as DefaultModel.
namedGraphUris - Set of NamedGraph uris within dataset. *
Returns:
a new IClosableDataset with a set of uris to union together to form the defaultModel and a set of uris for the


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.