com.mkdoc.store
Class AbstractStoreManager

java.lang.Object
  |
  +--com.mkdoc.store.AbstractStoreManager
Direct Known Subclasses:
DatabaseStoreManager, LocalStoreManager

public abstract class AbstractStoreManager
extends java.lang.Object

A base superclass for subject manager types.

Version:
0.1 2005-11-01
Author:
Philip Shaw

Field Summary
protected  org.openrdf.sesame.repository.SesameRepository repository
          The Sesame repository.
 
Constructor Summary
AbstractStoreManager()
           
 
Method Summary
 void addDocumentStatements(org.openrdf.model.URI subjectUri, org.openrdf.model.Graph graph)
          Add statements about a document by subject URI.
 void addXmlRdfStream(java.io.InputStream inStream, java.net.URL baseUri)
          Add an RDF data stream to the store.
 QueryResult executeQuery(Query query)
          Execute a query against the data store.
protected  boolean isActive()
          Check whether the store is active.
protected  void setActive(boolean setting)
          Set the store active.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repository

protected org.openrdf.sesame.repository.SesameRepository repository
The Sesame repository.

Since:
Version 0.1 2005-11-01
Constructor Detail

AbstractStoreManager

public AbstractStoreManager()
Method Detail

addDocumentStatements

public final void addDocumentStatements(org.openrdf.model.URI subjectUri,
                                        org.openrdf.model.Graph graph)
                                 throws StoreException
Add statements about a document by subject URI.

Parameters:
subjectUri - The URI of the subject document to add.
graph - The RDF graph of statements about this document.
Throws:
StoreException - If an error occurs with the triple store.
Since:
Version 0.1 2005-11-01

addXmlRdfStream

public final void addXmlRdfStream(java.io.InputStream inStream,
                                  java.net.URL baseUri)
                           throws StoreException
Add an RDF data stream to the store.

Parameters:
inStream - The data stream to add to the store.
baseUri - The URL base of the source.
Throws:
StoreException - If there is a problem reading the input stream or validating the RDF content.
Since:
Version 0.1 2005-11-01

executeQuery

public final QueryResult executeQuery(Query query)
Execute a query against the data store.

Parameters:
query - The query to apply to the store.
Returns:
A result set that fulfils the submitted query.
Since:
Version 0.1 2005-11-01

isActive

protected final boolean isActive()
Check whether the store is active.

Returns:
true if the repository been initialized and not shut down.
Since:
Version 0.1 2005-11-01

setActive

protected final void setActive(boolean setting)
Set the store active.

Parameters:
setting - Whether the store is active.
Since:
Version 0.1 2005-11-01