org.openrdf.sesame.sail
Interface RdfSource

All Superinterfaces:
Sail
All Known Subinterfaces:
RdfRepository, RdfSchemaRepository, RdfSchemaSource
All Known Implementing Classes:
NativeRdfRepository, RdfRepository, RdfRepository, RdfSchemaRepository, RdfSchemaRepository, RdfSource, RdfSource, SecuritySail, SyncRdfRepository, SyncRdfSchemaRepository

public interface RdfSource
extends Sail

An extension of the Storage And Inference Layer (Sail) interface that defines methods for read-only RDF-repositories or other sources of information that can be accessed as RDF.

Version:
$Revision: 1.9.2.2 $
Author:
Arjohn Kampman

Method Summary
 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.
 Query optimizeQuery(Query qc)
          Gives the RdfSource the oportunity to optimize a Query to its specific storage model.
 
Methods inherited from interface org.openrdf.sesame.sail.Sail
initialize, shutDown
 

Method Detail

getValueFactory

public ValueFactory getValueFactory()
Gets a ValueFactory object that can be used to create URI-, blank node- and literal objects.

Returns:
a ValueFactory object for this RdfSource instance.

getStatements

public StatementIterator getStatements(Resource subj,
                                       URI pred,
                                       Value obj)
Gets all statements with a specific subject, predicate and/or object. All three parameters may be null to indicate wildcards.

Parameters:
subj - subject of pattern
pred - predicate of pattern
obj - object of pattern
Returns:
iterator over statements
Throws:
SailInternalException - To indicate an internal error.

hasStatement

public 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. All three parameters may be null to indicate wildcards.

Parameters:
subj - subject of statement
pred - predicate of statement
obj - object of statement
Returns:
boolean indicating if specified statement is present
Throws:
SailInternalException - To indicate an internal error.

optimizeQuery

public Query optimizeQuery(Query qc)
Gives the RdfSource the oportunity to optimize a Query to its specific storage model.

Parameters:
qc - The Query to optimize.
Returns:
The optimized query.
Throws:
SailInternalException - To indicate an internal error.

getNamespaces

public NamespaceIterator getNamespaces()
Gets the prefix and name of all namespaces.

Returns:
iterator over namespaces
Throws:
SailInternalException - To indicate an internal error.


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.