|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.sesame.sailimpl.rdbms.iterators.RdbmsStatementIterator
A StatementIterator that executes an SQL query. The ResultSet should contain 3 columns for each resource or literal that is not fixed. For a resource this is: id, namespace and localname. For a literal this is: id, language and value. The total number of columns expected depends on the number of values/positions that have been specified by the caller. E.g. if the caller asks for all statements with a specific subject, the subject is 'fixed', and doesn't have to be queried from the database. In this case, the query is expected to have six columns: three for the predicate and three for the object.
| Constructor Summary | |
RdbmsStatementIterator(RdfSource source,
String[] namespaceNames,
Connection databaseCon,
String queryResources,
String queryLiterals,
Resource subject,
URI predicate,
Value object)
Constructor. |
|
| Method Summary | |
void |
close()
Closes the iterator and frees any resources that it uses (e.g. |
boolean |
hasNext()
Checks whether there are any more statements available. |
Statement |
next()
Gets the next statement. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RdbmsStatementIterator(RdfSource source,
String[] namespaceNames,
Connection databaseCon,
String queryResources,
String queryLiterals,
Resource subject,
URI predicate,
Value object)
source - the object to supply as 'creator' to created IdValues.namespaceNames - an array of namespace names that are index using
their IDs.databaseCon - connection to the repositoryqueryResources - query specified for the resources table, or
null if statements with resources as object do not need to be
queried.queryLiterals - query specified for the literals table, or
null if statements with literals as object do not need to be
queried.subject - A (fixed) subject, or null if the subject
should be queried from the database.predicate - A (fixed) predicate, or null if the predicate
should be queried from the database.object - A (fixed) object, or null if the object
should be queried from the database.| Method Detail |
public boolean hasNext()
StatementIterator
hasNext in interface StatementIteratorpublic Statement next()
StatementIterator
next in interface StatementIteratorpublic void close()
StatementIterator
close in interface StatementIterator
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||