|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.sesame.sailimpl.memory.RdfSource
org.openrdf.sesame.sailimpl.memory.RdfRepository
An implementation of the RdfRepository interface extending the class org.openrdf.sesame.sail.memory.RdfSource with write-methods.
| Field Summary | |
static String |
SYNC_DELAY_KEY
Key used to specify a file for persistent storage. |
| Fields inherited from class org.openrdf.sesame.sailimpl.memory.RdfSource |
COMPRESS_FILE_KEY, DATA_FORMAT_KEY, FILE_KEY |
| Constructor Summary | |
RdfRepository()
Creates a new RdfRepository. |
|
| Method Summary | |
void |
addListener(SailChangedListener listener)
|
void |
addStatement(Resource subj,
URI pred,
Value obj)
Adds a statament to the repository. |
void |
changeNamespacePrefix(String namespace,
String prefix)
Changes the prefix of a namespace. |
void |
clearRepository()
Clears the repository. |
void |
commitTransaction()
Commits a started transaction. |
long |
getSyncDelay()
Gets the currently configured sync delay. |
void |
initialize(File file,
RDFFormat dataFormat,
boolean compressFile)
Initializes this repository, using the specified file for persistent storage. |
void |
initialize(Map configParams)
Initializes the Sail using a set of configuration parameters. |
void |
removeListener(SailChangedListener listener)
|
int |
removeStatements(Resource subj,
URI pred,
Value obj)
Removes data statements that match the (subject, predicate, object) pattern from the repository. |
void |
setSyncDelay(long syncDelay)
Sets the time (in milliseconds) to wait after a transaction was commited before writing the changed data to file. |
void |
shutDown()
Allow the SAIL to synchronize any stale data. |
void |
startTransaction()
Starts a transaction. |
void |
sync()
Synchronizes the contents of this repository with the data that is stored on disk. |
boolean |
transactionStarted()
Checks whether a transaction has been started. |
| Methods inherited from class org.openrdf.sesame.sailimpl.memory.RdfSource |
createBNode, createBNode, createLiteral, createLiteral, createLiteral, createStatement, createURI, createURI, getNamespaces, getStatements, getValueFactory, hasStatement, initialize, optimizeQuery |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openrdf.sesame.sail.RdfSource |
getNamespaces, getStatements, getValueFactory, hasStatement, optimizeQuery |
| Field Detail |
public static final String SYNC_DELAY_KEY
| Constructor Detail |
public RdfRepository()
| Method Detail |
public void initialize(Map configParams)
throws SailInitializationException
Sail
initialize in interface Sailinitialize in class RdfSourceconfigParams - The configuration parameters.
SailInitializationException - If this RdfRepository could not be
initialized using the supplied parameters.RDFFormat
public void initialize(File file,
RDFFormat dataFormat,
boolean compressFile)
throws SailInitializationException
RdfSource
initialize in class RdfSourcefile - The file to use for persistent storage.dataFormat - The format of the data in the file. Legal values are
RDFFormat.RDFXML, RDFFormat.NTRIPLES and
RDFFormat.TURTLE.compressFile - Flag indicating whether the data in the file
is/should be compressed.
SailInitializationExceptionpublic void shutDown()
Sail
shutDown in interface SailshutDown in class RdfSourcepublic void startTransaction()
RdfRepository
startTransaction in interface RdfRepositorypublic void commitTransaction()
RdfRepository
commitTransaction in interface RdfRepositorypublic boolean transactionStarted()
RdfRepository
transactionStarted in interface RdfRepository
public void addStatement(Resource subj,
URI pred,
Value obj)
throws SailUpdateException
RdfRepository
addStatement in interface RdfRepositorysubj - subject of statementpred - predicate of statementobj - object of statement
SailUpdateException - If the statement could not be added.RdfRepository.startTransaction()
public int removeStatements(Resource subj,
URI pred,
Value obj)
throws SailUpdateException
RdfRepository
removeStatements in interface RdfRepositorysubj - subject of statementpred - predicate of statementobj - object of statement
SailUpdateException - If the statement(s) could not be removed.RdfRepository.startTransaction()
public void clearRepository()
throws SailUpdateException
RdfRepository
clearRepository in interface RdfRepositorySailUpdateException - If the repository could not be
cleared (for example when a transaction was not started first).
public void changeNamespacePrefix(String namespace,
String prefix)
throws SailUpdateException
RdfRepository
changeNamespacePrefix in interface RdfRepositorynamespace - The namespace for which the associated prefix should
be changed.prefix - The new prefix.
SailUpdateException - If the namespace prefix could not be
changed, for example when no transaction was started.public void setSyncDelay(long syncDelay)
The default value for this parameter is 0 (immediate synchronization).
syncDelay - The sync delay in milliseconds.public long getSyncDelay()
setSyncDelay(long)public void sync()
public void addListener(SailChangedListener listener)
addListener in interface RdfRepositorypublic void removeListener(SailChangedListener listener)
removeListener in interface RdfRepository
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||