| java.lang.Object com.hp.hpl.jena.db.impl.ResultSetIterator com.hp.hpl.jena.db.impl.ResultSetReifIterator
ResultSetReifIterator | public class ResultSetReifIterator extends ResultSetIterator (Code) | | Version of ResultSetIterator that extracts database rows as Triples from a reified statement table.
author: hkuno. Based on ResultSetResource Iterator, by Dave Reynolds, HPLabs, Bristol Dave Reynolds version: $Revision: 1.13 $ on $Date: 2008/01/02 12:08:23 $ |
Method Summary | |
protected void | deleteRow() Delete the current row, which should have already been extracted. | protected void | extractRow() Extract the current row into a triple. | protected int | getFragCount() Return the number of (reification statement) fragments for the current row. | protected boolean | getHasType() Return the hasType value of current row, which should have already been extracted. | protected Object | getRow() Return triples for the current row, which should have already been extracted. | protected Node | getStmtURI() Return the reifying URI for current row, which should have already been extracted. | protected boolean | hasObj() Return the true if the current row has a non-null object. | protected boolean | hasPred() Return the true if the current row has a non-null predicate. | protected boolean | hasSubj() Return the true if the current row has a non-null subject. | protected boolean | hasType() Return the true if the current row has T (true) for hasType. | public void | reset(ResultSet resultSet, PreparedStatement sourceStatement, SQLCache cache, String opname) Reset an existing iterator to scan a new result set. | public void | setGraphID(IDBID gid) Set m_graphID. |
logger | protected static Log logger(Code) | | |
m_fragCount | protected int m_fragCount(Code) | | total number of fragments to generate for this row (ranges 1-4)
|
m_fragRem | protected int m_fragRem(Code) | | number of remaining fragments to generate for this row (ranges 1-4)
|
m_getTriples | protected boolean m_getTriples(Code) | | getTriples is true if this iterator should return all triples for the reified statement
otherwise, reified statements are returned.
|
m_graphID | protected IDBID m_graphID(Code) | | The rdf model in which to instantiate any resources
|
m_hasType | protected boolean m_hasType(Code) | | HasType flag is true if reified statement has type rdf:Statement
|
m_matchObj | protected Node m_matchObj(Code) | | a triple match over a reified table might specify an object value
to match but no property. so, return all columns (properties)
that match the specified object value.
|
m_nextFrag | protected int m_nextFrag(Code) | | number of next fragment to generate (0-3 for subj, pred, obj, type).
|
m_propCol | protected int m_propCol(Code) | | a triple match over a reified table might return one property.
m_propCol identifies the column number of the property to return.
it ranges 1-4.
|
m_pset | protected IPSet m_pset(Code) | | The database driver, used to access namespace and resource caches
|
m_stmtURI | protected Node m_stmtURI(Code) | | Statement URI of current row
|
m_subjNode | protected Node m_subjNode(Code) | | Holds subject, predicate and object of current row
|
ResultSetReifIterator | public ResultSetReifIterator(IPSet p, boolean getTriples, IDBID graphID)(Code) | | |
ResultSetReifIterator | public ResultSetReifIterator(IPSet p, char getProp, IDBID graphID)(Code) | | |
deleteRow | protected void deleteRow()(Code) | | Delete the current row, which should have already been extracted.
Should only be used (carefully and) internally by db layer.
|
extractRow | protected void extractRow() throws SQLException(Code) | | Extract the current row into a triple.
Requires the row to be of the form:
subject URI (String)
predicate URI (String)
object URI (String)
object value (String)
Object literal id (Object)
The object of the triple can be either a URI, a simple literal (in
which case it will just have an object value, or a complex literal
(in which case both the object value and the object literal id
columns may be populated.
|
getFragCount | protected int getFragCount()(Code) | | Return the number of (reification statement) fragments for the current row.
|
getHasType | protected boolean getHasType()(Code) | | Return the hasType value of current row, which should have already been extracted.
|
getRow | protected Object getRow()(Code) | | Return triples for the current row, which should have already been extracted.
|
getStmtURI | protected Node getStmtURI()(Code) | | Return the reifying URI for current row, which should have already been extracted.
|
hasObj | protected boolean hasObj()(Code) | | Return the true if the current row has a non-null object.
|
hasPred | protected boolean hasPred()(Code) | | Return the true if the current row has a non-null predicate.
|
hasSubj | protected boolean hasSubj()(Code) | | Return the true if the current row has a non-null subject.
|
hasType | protected boolean hasType()(Code) | | Return the true if the current row has T (true) for hasType.
|
reset | public void reset(ResultSet resultSet, PreparedStatement sourceStatement, SQLCache cache, String opname)(Code) | | Reset an existing iterator to scan a new result set.
Parameters: resultSet - the result set being iterated over Parameters: sourceStatement - The source Statement to be cleaned up when the iterator finishes - return it to cache or close it if no cache Parameters: cache - The originating SQLcache to return the statement to, can be null Parameters: opname - The name of the original operation that lead to this statement, can be null if SQLCache is null |
setGraphID | public void setGraphID(IDBID gid)(Code) | | Set m_graphID.
Parameters: gid - is the id of the graph associated with this iterator. |
|
|