|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository
An implementation of the RdfRepository interface from the RDF Sail API that stores its data in, and queries it from files on disk.
| Field Summary | |
static String |
DATA_DIR_KEY
Key used to specify a data directory in the initialization parameters. |
static String |
TRIPLES_INDEXES_KEY
Key used to specify which triple indexes to use. |
| Constructor Summary | |
NativeRdfRepository()
Creates a new NativeRdfRepository. |
|
| 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. |
NamespaceIterator |
getNamespaces()
Gets the prefix and name of all namespaces. |
StatementIterator |
getStatements(Resource subj,
URI pred,
Value obj)
Gets all statements with a specific subject, predicate and/or object. |
ValueFactory |
getValueFactory()
Gets a ValueFactory object that can be used to create URI-, blank node- and literal objects. |
boolean |
hasStatement(Resource subj,
URI pred,
Value obj)
Checks whether some statement with a specific subject, predicate and/or object is present in the repository. |
void |
initialize(File dataDir)
Initializes this repository. |
void |
initialize(File dataDir,
String tripleIndexes)
Initializes this repository. |
void |
initialize(Map configParams)
Initializes this NativeRdfRepository. |
static void |
main(String[] args)
|
Query |
optimizeQuery(Query qc)
Gives the RdfSource the oportunity to optimize a Query to its specific storage model. |
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 |
shutDown()
Allow the SAIL to synchronize any stale data. |
void |
startTransaction()
Starts a transaction. |
boolean |
transactionStarted()
Checks whether a transaction has been started. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String DATA_DIR_KEY
public static final String TRIPLES_INDEXES_KEY
| Constructor Detail |
public NativeRdfRepository()
| Method Detail |
public void initialize(Map configParams)
throws SailInitializationException
| key | value |
| dir | The fully qualified name of the data directory |
initialize in interface SailconfigParams - The configuration parameters.
SailInitializationException - If this RdfRepository could not be
initialized using the supplied parameters.DATA_DIR_KEY
public void initialize(File dataDir)
throws SailInitializationException
dataDir - The data directory.
SailInternalException - If the initialization failed.
SailInitializationException
public void initialize(File dataDir,
String tripleIndexes)
throws SailInitializationException
dataDir - The data directory.
SailInternalException - If the initialization failed.
SailInitializationExceptionpublic void shutDown()
Sail
shutDown in interface Sailpublic ValueFactory getValueFactory()
RdfSource
getValueFactory in interface RdfSource
public StatementIterator getStatements(Resource subj,
URI pred,
Value obj)
RdfSource
getStatements in interface RdfSourcesubj - subject of patternpred - predicate of patternobj - object of pattern
public boolean hasStatement(Resource subj,
URI pred,
Value obj)
RdfSource
hasStatement in interface RdfSourcesubj - subject of statementpred - predicate of statementobj - object of statement
public Query optimizeQuery(Query qc)
RdfSource
optimizeQuery in interface RdfSourceqc - The Query to optimize.
public NamespaceIterator getNamespaces()
RdfSource
getNamespaces in interface 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)
RdfRepository
changeNamespacePrefix in interface RdfRepositorynamespace - The namespace for which the associated prefix should
be changed.prefix - The new prefix.
public static void main(String[] args)
throws Exception
Exceptionpublic 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 | ||||||||||