public class UtilTupleQueryIterator extends Object implements gate.creole.ontology.OntologyTupleQuery
The following steps should be carried out when using this class:
setBinding(java.lang.String, org.openrdf.model.Value) one or more times
evaluate. This is optional, if not done,
it will be done implicitly in the first call to hasNext().
close() function to free the query resources. However, if all
results have been returned and hasNext() has returned false,
the query has been closed automatically. It is allowed to call close
on a closed query.
| Constructor and Description |
|---|
UtilTupleQueryIterator(SesameManager sm,
String query,
gate.creole.ontology.OConstants.QueryLanguage queryLanguage) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
evaluate() |
List<String> |
getBindingNames() |
boolean |
getIncludeInferred() |
boolean |
hasNext() |
Vector<gate.creole.ontology.LiteralOrONodeID> |
next()
Returns a vector of LiterOrONodeID object that represent a result row
from the query.
|
Vector<String> |
nextAsString() |
Vector<org.openrdf.model.Value> |
nextAsValue() |
gate.creole.ontology.LiteralOrONodeID |
nextFirst() |
String |
nextFirstAsString()
Returns the first variable of the next result row as a String.
|
org.openrdf.model.Value |
nextFirstAsValue() |
void |
prepare() |
void |
remove() |
void |
setBinding(String name,
gate.creole.ontology.Literal value) |
void |
setBinding(String name,
gate.creole.ontology.LiteralOrONodeID value) |
void |
setBinding(String name,
gate.creole.ontology.ONodeID value) |
void |
setBinding(String name,
org.openrdf.model.Value value) |
void |
setIncludeInferred(boolean value) |
public UtilTupleQueryIterator(SesameManager sm, String query, gate.creole.ontology.OConstants.QueryLanguage queryLanguage)
public void prepare()
public void setBinding(String name, org.openrdf.model.Value value)
name - value - public void setBinding(String name, gate.creole.ontology.LiteralOrONodeID value)
public void setBinding(String name, gate.creole.ontology.Literal value)
setBinding in interface gate.creole.ontology.OntologyTupleQuerypublic void setBinding(String name, gate.creole.ontology.ONodeID value)
setBinding in interface gate.creole.ontology.OntologyTupleQuerypublic void evaluate()
evaluate in interface gate.creole.ontology.OntologyTupleQuerypublic boolean hasNext()
public String nextFirstAsString()
nextFirstAsString in interface gate.creole.ontology.OntologyTupleQuerypublic gate.creole.ontology.LiteralOrONodeID nextFirst()
nextFirst in interface gate.creole.ontology.OntologyTupleQuerypublic org.openrdf.model.Value nextFirstAsValue()
public Vector<org.openrdf.model.Value> nextAsValue()
public Vector<String> nextAsString()
nextAsString in interface gate.creole.ontology.OntologyTupleQuerypublic Vector<gate.creole.ontology.LiteralOrONodeID> next()
public void close()
close in interface gate.creole.ontology.OntologyTupleQueryclose in interface gate.util.ClosableIterator<Vector<gate.creole.ontology.LiteralOrONodeID>>public void remove()
public void setIncludeInferred(boolean value)
public boolean getIncludeInferred()