|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.hp.hpl.mesa.rdf.jena.common.StoreCom
|
+--com.hp.hpl.mesa.rdf.jena.rdb.StoreRDB
Generic store implementation for RDB backed RDF storage.
The underlying database operations are implemented by separate driver
classes which conform to the
IRDBDriver
interface. Different driver instances may support different database table
layouts as well as different specific databases.
A single driver instance can be shared by several StoreRDB instances whereas each ModelRDB requires a separate StoreRDB instance.
| Method Summary | |
void |
abort()
Abort the current transaction and abandon any changes in progress. |
void |
add(Statement s)
Add a new statement to the model and load it to the database |
void |
attachModel(ModelRDB m)
Note the model which this store is associated with. |
void |
begin()
Begin a new transation. |
void |
clear()
Remove all the statements from the database. |
void |
close()
Close this store |
void |
commit()
Commit the current transaction. |
boolean |
contains(Resource s,
Property p)
Return true if the model contains at least one statement with this subject/property pair |
boolean |
contains(Statement s)
Return true if the model contains a statements corresponding this triple |
IConstraints |
createConstraints(ModelRDB model)
Create a constraint object appropriate for this type of database layout |
static StoreRDB |
createDB(IRDBDriver driver)
Construct a new Store using the given database spec. |
Property |
createProperty(java.lang.String uri,
Model m)
Create a new property resource implementation for a model |
Property |
createProperty(java.lang.String namespace,
java.lang.String localPart,
Model m)
Create a new property resource implementation for a model |
Resource |
createResource(Model m)
Create a new resource implementation for a model |
Resource |
createResource(java.lang.String uri,
Model m)
Create a new resource implementation for a model |
Statement |
createStatement(Resource s,
Property p,
RDFNode o,
Model m)
create a new statement implementation for a model |
IRDBDriver |
getDriver()
Return the database driver underpining this store |
Property |
getProperty(Property p)
Fetch a property, adding it to the database if necessary |
Resource |
getResource(java.lang.String uri,
Model m)
Fetch a resource, adding it to the database if necessary |
java.util.Iterator |
list()
List all the statements in this model |
java.util.Iterator |
list(Resource subject,
Property predicate,
RDFNode object)
List all statements with this s/p/o combination. |
java.util.Iterator |
listByObject(RDFNode object)
List all statements in the model with this object |
java.util.Iterator |
listByPredicate(Property property)
List all statements in the model with this predicate |
java.util.Iterator |
listBySubject(Resource subject)
List all statements in the model with this subject |
NsIterator |
listNameSpaces()
list namespaces of the predicates of all the statements in ths store. |
ResultSetIterator |
listReifiedStatements(ModelRDB m)
Return an iterator over all statements which are have been added as reified statements. |
ResultSetIterator |
listStatements(IConstraints constraints,
ModelRDB m)
List all the statements in the given moddel which make the given set of constraints (a constraint set can be obtained using createConstraints(com.hp.hpl.mesa.rdf.jena.rdb.ModelRDB)). |
ResIterator |
listSubjects()
List all the subject resources in the model |
static StoreRDB |
openDB(IRDBDriver driver)
Open a named database and check that it is formated for RDF storage. |
void |
remove(Statement s)
remove a statement from the store |
int |
size()
Return the total number of statements in the model by a brute force - list and count! |
boolean |
supportsJenaReification()
Returns true if the database layout supports implicit reification of statements (i.e. |
| Methods inherited from class com.hp.hpl.mesa.rdf.jena.common.StoreCom |
createAlt, createAlt, createBag, createBag, createSeq, createSeq, getAlt, getAlt, getBag, getBag, getProperty, getProperty, getSeq, getSeq, getStatement |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.hp.hpl.mesa.rdf.jena.common.Store |
createAlt, createAlt, createBag, createBag, createSeq, createSeq, getAlt, getAlt, getBag, getBag, getProperty, getProperty, getSeq, getSeq, getStatement |
| Method Detail |
public static StoreRDB createDB(IRDBDriver driver)
throws RDFRDBException
driver - defines the database driver, host machine, login details
and root path for the databases.
RDFRDBException - if the database cannot be opened
public static StoreRDB openDB(IRDBDriver driver)
throws RDFRDBException
RDFRDBException - if the database cannot be opened or if once opened it does
not seem to contain a valid set of RDF storage tables.public void attachModel(ModelRDB m)
public IRDBDriver getDriver()
public void close()
close in interface Storeclose in class StoreCom
public void clear()
throws RDFRDBException
RDFRDBException
public void begin()
throws RDFException
All changes made to a model within a transaction, will either be made, or none of them will be made.
RDFException - Generic RDF Exception
public void abort()
throws RDFException
RDFException - Generic RDF Exception
public void commit()
throws RDFException
RDFException - Generic RDF Exception
public Resource createResource(Model m)
throws RDFException
createResource in interface StorecreateResource in class StoreComRDFException
public Resource createResource(java.lang.String uri,
Model m)
throws RDFException
createResource in interface StorecreateResource in class StoreComRDFException
public Property createProperty(java.lang.String uri,
Model m)
throws RDFException
createProperty in interface StorecreateProperty in class StoreComRDFException
public Property createProperty(java.lang.String namespace,
java.lang.String localPart,
Model m)
throws RDFException
createProperty in interface StorecreateProperty in class StoreComRDFException
public Statement createStatement(Resource s,
Property p,
RDFNode o,
Model m)
throws RDFException
createStatement in interface StorecreateStatement in class StoreComRDFException
public Resource getResource(java.lang.String uri,
Model m)
throws RDFException
getResource in interface StoregetResource in class StoreComRDFException
public Property getProperty(Property p)
throws RDFException
getProperty in interface StoregetProperty in class StoreComRDFException
public void add(Statement s)
throws RDFException
add in interface Stores - the statement to add
RDFException
public void remove(Statement s)
throws RDFException
Store
remove in interface Stores - the statement to remove
RDFException
public int size()
throws RDFException
size in interface StoreRDFException
public boolean contains(Statement s)
throws RDFException
contains in interface Stores - the statement to test for
RDFException
public boolean contains(Resource s,
Property p)
throws RDFException
contains in interface Stores - the subject of the statement to test forp - the predicate of the statement to test for
RDFException
public java.util.Iterator list()
throws RDFException
list in interface StoreRDFException
public java.util.Iterator list(Resource subject,
Property predicate,
RDFNode object)
throws RDFException
list in interface Storesubject - the subject of the statements to be returned or nullpredicate - the predicate of the statments to be returned or nullobject - the object of the statements to be returned or null
RDFException
public ResultSetIterator listStatements(IConstraints constraints,
ModelRDB m)
throws RDFException
createConstraints(com.hp.hpl.mesa.rdf.jena.rdb.ModelRDB)).
RDFExceptionpublic IConstraints createConstraints(ModelRDB model)
public java.util.Iterator listBySubject(Resource subject)
throws RDFException
listBySubject in interface Storesubject - the subject of the statements to be returned
RDFException
public java.util.Iterator listByPredicate(Property property)
throws RDFException
listByPredicate in interface Storeproperty - the predicate to search for
RDFException
public java.util.Iterator listByObject(RDFNode object)
throws RDFException
listByObject in interface Storeobject - the object to search for
RDFException
public ResIterator listSubjects()
throws RDFException
listSubjects in interface StoreRDFException
public NsIterator listNameSpaces()
throws RDFException
StoreEach namespace is listed only once.
listNameSpaces in interface StoreRDFExceptionpublic boolean supportsJenaReification()
public ResultSetIterator listReifiedStatements(ModelRDB m)
throws RDFException
RDFException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||