|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Generic database interface used for implementing RDF Stores. Different database table layouts and different SQL dialects should all be supportable via this generic interface. Each driver instance can support multiple stores so long as "supportsMultipleModels" is true.
Method Summary | |
void |
addStatement(Statement s,
ModelRDB m)
Register a statement in the database. |
IDBID |
allocateModelID(java.lang.String modelName)
Allocate a new databaseID for a new model in the same database. |
void |
attachStore(StoreRDB store)
Register a store as a user of this driver. |
void |
cleanDB()
Remove all RDF information from a database. |
void |
close()
Close the databse connection |
IConstraints |
createConstraints(ModelRDB model)
Create a constraint object appropriate for this type of database layout |
void |
deleteStatement(Resource subject,
Property predicate,
RDFNode object,
ModelRDB m)
Delete the statements in the model which match the given subject, predicate object. |
void |
detachStore(StoreRDB store)
Notify that a store is no longer using this driver. |
void |
formatDB()
Initialise a database ready to store RDF tables. |
java.sql.Connection |
getConnection()
Return the jdbc connection to the database, opening it if necessary |
Literal |
getLiteral(IDBID id)
Fetch a literal just knowing its lliteral rdb-id |
IDBID |
getLiteralID(Literal l)
Return the database ID for the literal |
IDBID |
getModelID(java.lang.String modelName)
Return the databaseID for an existing named model within the database. |
java.lang.String |
getNamespace(IDBID nsid)
Return the namespace string corresponding to a given namespace id |
Property |
getProperty(IDBID id,
ModelRDB m)
Fetch a property just knowing its resource rdb-id. |
Property |
getProperty(java.lang.String uri,
ModelRDB m)
Fetch a property, knowing its uri. |
Resource |
getResource(IDBID id,
ModelRDB m)
Fetch a resource just knowing its resource rdb-id. |
Resource |
getResource(java.lang.String uri,
ModelRDB m)
Fetch a resource, knowing its uri. |
IDBID |
getResourceID(Resource resource)
Lookup the unique ID for a resource. |
SQLCache |
getSQLCache()
Return the SQLCache used for database commands. |
void |
hintPropertyTable(Property p)
Hint to the store that the given property could be stored as an attribute table. |
boolean |
isDBFormatOK()
Check that the database has a legal set of RDF tables. |
boolean |
isStatementPresent(Resource subject,
Property predicate,
RDFNode object,
ModelRDB m)
Check if a statement is in the database. |
java.util.Iterator |
listModels()
List the names of all models in this database |
ResultSetIterator |
listNamespaces(ModelRDB m)
List all namespaces referenced in the model |
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) ). |
ResultSetIterator |
listStatements(Resource subject,
Property predicate,
RDFNode object,
ModelRDB m)
List all the statements in the model which match the given subject, predicate object - each of which can be null (meaning wildcard). |
ResultSetIterator |
listSubjects(ModelRDB m)
List all the subject resources in the model |
void |
loadProperties(java.util.Properties props)
Load a set of configuration parameters into the driver. |
Resource |
makeResource(IDBID id,
java.lang.String localname,
IDBID nsidw,
ModelRDB m)
Re-create a resource from its local name and namespace identifier |
void |
setConnection(IDBConnection dbcon)
Link an existing instance of the driver to a specific jdbc connection |
boolean |
supportsMultipleModels()
Returns true of the database layout supports multiple RDF models in the same database. |
IDBID |
wrapDBID(java.lang.Object id)
Convert the raw SQL object used to store a database identifier into a java object which meets the IDBID interface |
Method Detail |
public void setConnection(IDBConnection dbcon) throws RDFRDBException
public java.sql.Connection getConnection() throws RDFRDBException
public void close() throws RDFRDBException
RDFRDBException
- if there is an access problempublic boolean isDBFormatOK() throws RDFRDBException
RDFRDBException
- if the is a problem opening the connection or an internal SQL error.public void formatDB() throws RDFRDBException
RDFRDBException
- if the is a problem opening the connection or an internal SQL error.public void cleanDB()
public IDBID allocateModelID(java.lang.String modelName) throws RDFRDBException
public IDBID getModelID(java.lang.String modelName) throws RDFRDBException
public java.util.Iterator listModels() throws RDFRDBException
public void loadProperties(java.util.Properties props)
public void attachStore(StoreRDB store)
public void detachStore(StoreRDB store)
public void addStatement(Statement s, ModelRDB m) throws RDFException
public void deleteStatement(Resource subject, Property predicate, RDFNode object, ModelRDB m) throws RDFException
public ResultSetIterator listSubjects(ModelRDB m) throws RDFRDBException
public ResultSetIterator listNamespaces(ModelRDB m) throws RDFRDBException
public ResultSetIterator listStatements(Resource subject, Property predicate, RDFNode object, ModelRDB m) throws RDFException
public boolean isStatementPresent(Resource subject, Property predicate, RDFNode object, ModelRDB m) throws RDFException
public ResultSetIterator listStatements(IConstraints constraints, ModelRDB m) throws RDFException
createConstraints(com.hp.hpl.mesa.rdf.jena.rdb.ModelRDB)
).public IConstraints createConstraints(ModelRDB model)
public boolean supportsMultipleModels()
public Resource makeResource(IDBID id, java.lang.String localname, IDBID nsidw, ModelRDB m) throws RDFException
public IDBID wrapDBID(java.lang.Object id) throws RDFException
public Resource getResource(IDBID id, ModelRDB m) throws RDFException
public Property getProperty(IDBID id, ModelRDB m) throws RDFException
public Literal getLiteral(IDBID id) throws RDFException
public IDBID getLiteralID(Literal l) throws RDFRDBException
public IDBID getResourceID(Resource resource) throws RDFException
public java.lang.String getNamespace(IDBID nsid) throws RDFRDBException
public SQLCache getSQLCache()
public Resource getResource(java.lang.String uri, ModelRDB m) throws RDFException
public Property getProperty(java.lang.String uri, ModelRDB m) throws RDFException
public void hintPropertyTable(Property p) throws RDFException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |