|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.trippi.impl.kowari.CollapsedAnswer
public class CollapsedAnswer
An Answer wrapper that collapses any inner-Answers into JRDF Nodes. This is useful for converting a given kowari Answer to a simple iterator of tuples.
Example input: Answer { Row { prop1 = value1 prop2 = value2 k0 = Answer { Row { prop3 = value3a } Row { prop3 = value3b } } k1 = Answer { Row { prop4 = value4 } } } } Example output: Answer { Row { prop1 = value1 prop2 = value2 prop3 = value3a prop4 = value4 } Row { prop1 = value1 prop2 = value2 prop3 = value3b prop4 = null } }
Field Summary |
---|
Fields inherited from interface org.kowari.query.Cursor |
---|
MANY, ONE, ZERO |
Constructor Summary | |
---|---|
CollapsedAnswer(org.kowari.query.Answer wrappedAnswer)
|
Method Summary | |
---|---|
void |
beforeFirst()
Reset to iterate through every single element. |
java.lang.Object |
clone()
|
void |
close()
Free resources associated with this instance. |
int |
getColumnIndex(org.kowari.query.Variable column)
Find the index of a variable. |
int |
getNumberOfVariables()
Return the number of variables (columns). |
java.lang.Object |
getObject(int column)
|
java.lang.Object |
getObject(java.lang.String columnName)
|
int |
getRowCardinality()
Return cardinality of the number of rows which this instance contains. |
long |
getRowCount()
Return the exact number of rows this instance contains. |
long |
getRowUpperBound()
Return an upper bound on the number of rows this instance contains. |
org.kowari.query.Variable[] |
getVariables()
Get the variables bound and their default collation order. |
boolean |
isUnconstrained()
Test whether this is a unit-valued answer. |
boolean |
next()
Move to the next row. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollapsedAnswer(org.kowari.query.Answer wrappedAnswer) throws org.kowari.query.TuplesException
org.kowari.query.TuplesException
Method Detail |
---|
public java.lang.Object getObject(int column) throws org.kowari.query.TuplesException
getObject
in interface org.kowari.query.Answer
org.kowari.query.TuplesException
public java.lang.Object getObject(java.lang.String columnName) throws org.kowari.query.TuplesException
getObject
in interface org.kowari.query.Answer
org.kowari.query.TuplesException
public void beforeFirst() throws org.kowari.query.TuplesException
beforeFirst
in interface org.kowari.query.Cursor
org.kowari.query.TuplesException
public void close() throws org.kowari.query.TuplesException
close
in interface org.kowari.query.Cursor
org.kowari.query.TuplesException
public int getColumnIndex(org.kowari.query.Variable column) throws org.kowari.query.TuplesException
getColumnIndex
in interface org.kowari.query.Cursor
org.kowari.query.TuplesException
public int getNumberOfVariables()
getNumberOfVariables
in interface org.kowari.query.Cursor
public org.kowari.query.Variable[] getVariables()
getVariables
in interface org.kowari.query.Cursor
public boolean isUnconstrained() throws org.kowari.query.TuplesException
isUnconstrained
in interface org.kowari.query.Cursor
org.kowari.query.TuplesException
public long getRowCount() throws org.kowari.query.TuplesException
getRowCount
in interface org.kowari.query.Cursor
org.kowari.query.TuplesException
public long getRowUpperBound() throws org.kowari.query.TuplesException
getRowUpperBound
in interface org.kowari.query.Cursor
org.kowari.query.TuplesException
public int getRowCardinality() throws org.kowari.query.TuplesException
getRowCardinality
in interface org.kowari.query.Cursor
org.kowari.query.TuplesException
public boolean next() throws org.kowari.query.TuplesException
next
in interface org.kowari.query.Cursor
org.kowari.query.TuplesException
public java.lang.Object clone()
clone
in interface org.kowari.query.Answer
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |