|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Query
Represents a conjunctive DL-safe query over an ontology. Query objects are not thread-safe; however, you may simultaneously use different query objects on different threads.
| Nested Class Summary | |
|---|---|
static class |
Query.UntypedPredicate
Models a predicate whose type is not known. |
| Method Summary | |
|---|---|
boolean |
afterLast()
Returns true if the current stream is after the last tuple. |
void |
close()
Closes the evaluation of the query. |
void |
dispose()
Should be callend when the query is not used any more in order to free resources. |
void |
doNotSortResults()
Cancels any sorting of the result. |
void |
executeStoreResults(Ontology resultOntology)
Executes the query by evaluating the construct pattern and by storing the result into supplied ontology. |
Literal[] |
getConstructPattern()
Returns the construct pattern of the query. |
Variable[] |
getDistinguishedVariables()
Returns the distinguished variables of the query. |
int |
getNumberOfTuples()
Returns the number of tuples in the result. |
Literal[] |
getQueryLiterals()
Returns the literals of the query. |
Reasoner |
getReasoner()
Returns the reasoner that created the query. |
void |
interrupt()
Equivalent to getReasoner().interrupt(). |
void |
next()
Moves the cursor of the stream to the next position. |
void |
open()
Starts the evaluation of the query. |
void |
setDistinct(boolean distinct)
Ensures that duplicates are removed from the query result. |
void |
setLimit(int limit)
Sets the limit on the number of results returned. |
void |
setOffset(int offset)
Sets the number of tuples that are skipped after the query is executed. |
void |
sortResults(int[] sortedPositions)
Ensures that the results are sorted. |
void |
sortResults(int[] sortedPositions,
java.util.Comparator[] comparators)
Ensures that the results are sorted. |
java.lang.Object[] |
tupleBuffer()
Returns the buffer containing the current tuple of the operator. |
| Method Detail |
|---|
void dispose()
Reasoner getReasoner()
Literal[] getQueryLiterals()
Variable[] getDistinguishedVariables()
Literal[] getConstructPattern()
void interrupt()
throws KAON2Exception
KAON2Exception - thrown if there is an error
void setDistinct(boolean distinct)
throws KAON2Exception
distinct - if true, duplicate tuples are removed from the query result
KAON2Exception - thrown if there is an error in evaluation
void sortResults(int[] sortedPositions,
java.util.Comparator[] comparators)
throws KAON2Exception
sortedPositions - the positions which are sortedcomparators - the comparators for positions
KAON2Exception - thrown if there is an error in evaluation
void sortResults(int[] sortedPositions)
throws KAON2Exception
sortedPositions - the positions which are sorted
KAON2Exception - thrown if there is an error in evaluation
void doNotSortResults()
throws KAON2Exception
KAON2Exception - thrown if there is an error in evaluation
void setLimit(int limit)
throws KAON2Exception
limit - the limit on the number of results returned (-1 cancels any limit)
KAON2Exception - thrown if there is an error in evaluation
void setOffset(int offset)
throws KAON2Exception
offset - the offset (0 cancels any offset)
KAON2Exception - thrown if there is an error in evaluation
void executeStoreResults(Ontology resultOntology)
throws KAON2Exception,
java.lang.InterruptedException
resultOntology - the ontology receiving results
KAON2Exception - thrown if there is an error in evaluation
java.lang.InterruptedException - thrown if query evaluation is interrupted
void open()
throws KAON2Exception,
java.lang.InterruptedException
KAON2Exception - thrown if there is an error in evaluation
java.lang.InterruptedException - thrown if query evaluation is interrupted
int getNumberOfTuples()
throws KAON2Exception
KAON2Exception - thrown if there is an error
void close()
throws KAON2Exception
KAON2Exception - thrown if there is an error in evaluation
java.lang.Object[] tupleBuffer()
throws KAON2Exception
KAON2Exception - thrown if there is an error
boolean afterLast()
throws KAON2Exception
true if the current stream is after the last tuple.
true if the stream is after the last tuple
KAON2Exception - thrown if there is an error
void next()
throws KAON2Exception,
java.lang.InterruptedException
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if query evaluation is interrupted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||