|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.franz.ag.Cursor
This class implements a generator for multiple Triple instances.
Many triple store search operations may generate an indeterminate number of results. These operations return a Cursor instance which may be used to iterate through the available results.
There are no public constructors. Instances are created by search operations.
Method Summary | |
boolean |
atTriple()
Query the state of a Cursor instance. |
void |
close()
Discard the remote reference to the AllegroGraph cursor instance. |
long |
get_id()
Retrieve the id number of the current triple in the Cursor instance. |
UPI |
getC()
Retrieve the context node UPI of the current triple in the Cursor instance. |
ValueNode |
getContext()
Retrieve the Value instance that identifies the context of the current triple in the Cursor. |
java.lang.String |
getContextLabel()
Retrieve the string label of the context of the current triple in the Cursor instance. |
static int |
getDefaultLookAhead()
Query the default look-ahead value for this cursor instance. |
int |
getLookAhead()
Query the look-ahead value for this cursor instance. |
Triple |
getNext()
Advance the Cursor and return a Triple instance. |
UPI |
getO()
Retrieve the object node UPI of the current triple in the Cursor instance. |
ValueNode |
getObject()
Retrieve the Value instance that identifies the object of the current triple in the Cursor. |
java.lang.String |
getObjectLabel()
Retrieve the literal string for the object of the current triple in the Cursor instance. |
UPI |
getP()
Retrieve the predicate node UPI of the current triple in the Cursor instance. |
ValueNode |
getPredicate()
Retrieve the Value instance that identifies the predicate of the current triple in the Cursor. |
java.lang.String |
getPredicateLabel()
Retrieve the literal string for the predicate of the current triple in the Cursor instance. |
UPI |
getS()
Retrieve the subject node UPI of the current triple in the Cursor instance. |
ValueNode |
getSubject()
Retrieve the Value instance that identifies the subject of the current triple in the Cursor. |
java.lang.String |
getSubjectLabel()
Retrieve the literal string for the subject of the current triple in the Cursor instance. |
Triple |
getTriple()
Create a Triple instance from the current triple in the Cursor. |
boolean |
hasNext()
Query the state of a Cursor instance. |
boolean |
limitReached()
Query the state of a Cursor instance. |
Statement |
next()
Advance the Cursor and return a Triple instance. |
java.lang.String |
queryContext()
Retrieve the string label for the context of the current triple in the Cursor instance. |
java.lang.String |
queryObject()
Retrieve the string label for the object of the current triple in the Cursor instance. |
java.lang.String |
queryPredicate()
Retrieve the string label for the predicate of the current triple in the Cursor instance. |
java.lang.String |
querySubject()
Retrieve the string label for the subject of the current triple in the Cursor instance. |
Triple |
queryTriple()
Create a Triple instance from the current triple in the Cursor. |
void |
remove()
Discard the current triple in the Cursor. |
static void |
setDefaultLookAhead(int lh)
Set the default look-ahead value for this cursor instance. |
void |
setLookAhead(int lh)
Set the look-ahead value for this cursor instance. |
boolean |
step()
Advance the Cursor instance to the next triple. |
Triple[] |
step(int n)
This method returns an array of Triple instances. |
java.lang.String |
toString()
Override the default method to give a more informatve representation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static int getDefaultLookAhead()
setDefaultLookAhead(int)
public static void setDefaultLookAhead(int lh)
lh
- an integer. Any value less than 1 denotes the built-in default of 1000.setLookAhead(int)
public int getLookAhead()
setLookAhead(int)
public void setLookAhead(int lh)
A large value optimizes access in the Java application but may incur a large delay when the cursor is created.
lh
- An integer. Any value less than 1 specifies the defaultLookAhead
value.setDefaultLookAhead(int)
public long get_id()
public UPI getS()
public java.lang.String querySubject()
public java.lang.String queryObject()
public java.lang.String queryPredicate()
public java.lang.String queryContext()
public java.lang.String getSubjectLabel() throws AllegroGraphException
AllegroGraphException
- if there is a problem during the operation.
This method almost almost always requires a round-trip to the AllegroGraph server.
public ValueNode getSubject() throws AllegroGraphException
AllegroGraphException
public ValueNode getContext() throws AllegroGraphException
AllegroGraphException
public UPI getP()
public java.lang.String getPredicateLabel() throws AllegroGraphException
AllegroGraphException
- if there is a problem during the operation.
This method almost always requires a round-trip to the AllegroGraph server.
public ValueNode getPredicate() throws AllegroGraphException
AllegroGraphException
public UPI getO()
public UPI getC()
public java.lang.String getObjectLabel() throws AllegroGraphException
AllegroGraphException
- if there is a problem during the operation.
This method almost always requires a round-trip to the AllegroGraph server.
public java.lang.String getContextLabel() throws AllegroGraphException
AllegroGraphException
- if there is a problem during the operation.
This method almost always requires a round-trip to the AllegroGraph server.
public ValueNode getObject() throws AllegroGraphException
AllegroGraphException
public Triple queryTriple()
public Triple getTriple() throws AllegroGraphException
AllegroGraphException
public Statement next()
next
in interface StatementIterator
public Triple getNext()
public boolean atTriple()
public boolean hasNext()
hasNext
in interface StatementIterator
public boolean limitReached()
public void close()
An attempt to call next() will case an exception to be thrown.
close
in interface StatementIterator
java.lang.IllegalStateException
public boolean step() throws AllegroGraphException
AllegroGraphException
public Triple[] step(int n) throws AllegroGraphException
n
- A positive integer number of instances desired.
AllegroGraphException
public java.lang.String toString()
public void remove()
The program must advance the Cursor in order to access a triple again.
Iterator.remove()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |