org.semanticweb.kaon2.api
Interface Request<E>


public interface Request<E>

This interface encapsulates the request for a retrieval of a set of objects from the KAON2 API. Its state represents the parameters of the retrieval.


Method Summary
 Request<E> addCondition(java.lang.String conditionName, java.lang.Object value)
          Sets the value a condition for the retrieval.
 java.util.Set<E> get()
          Returns the entire result set by considering axioms only from the given ontology.
 java.util.Set<E> get(int fromIndex, int toIndex)
          Returns the window of the result set by considering axioms only from the given ontology.
 java.util.Set<E> getAll()
          Returns the entire result set by considering axioms only from the given and all included ontologies.
 java.util.Set<E> getAll(int fromIndex, int toIndex)
          Returns the window of the result set by considering axioms only from the given and all included ontologies.
 Cursor<E> openCursor()
          Returns a cursor containing results from the given ontology.
 int size()
          Returns the number of results in this ontology.
 int sizeAll()
          Returns the number of results in this and all included ontologies.
 

Method Detail

addCondition

Request<E> addCondition(java.lang.String conditionName,
                        java.lang.Object value)
Sets the value a condition for the retrieval. Each condition has a string name. Available conditions depend on the type of objects being retrieved.

Parameters:
conditionName - the name of the condition
value - the value of the condition
Returns:
this request

size

int size()
         throws KAON2Exception
Returns the number of results in this ontology.

Returns:
the number of results in this ontology
Throws:
KAON2Exception

get

java.util.Set<E> get()
                     throws KAON2Exception
Returns the entire result set by considering axioms only from the given ontology.

Returns:
entire result set
Throws:
KAON2Exception - thrown if there is an error

get

java.util.Set<E> get(int fromIndex,
                     int toIndex)
                     throws KAON2Exception
Returns the window of the result set by considering axioms only from the given ontology.

Parameters:
fromIndex - the index of the first element
toIndex - the index of the last element
Returns:
entire result set
Throws:
KAON2Exception - thrown if there is an error

sizeAll

int sizeAll()
            throws KAON2Exception
Returns the number of results in this and all included ontologies. WARNING: The returned size is simply the sum of all the sizes in each and every ontology. There is no guarantee for duplicate removal.

Returns:
the number of results in this and all included ontologies
Throws:
KAON2Exception - thrown if there is an error

getAll

java.util.Set<E> getAll()
                        throws KAON2Exception
Returns the entire result set by considering axioms only from the given and all included ontologies.

Returns:
entire result set
Throws:
KAON2Exception - thrown if there is an error

getAll

java.util.Set<E> getAll(int fromIndex,
                        int toIndex)
                        throws KAON2Exception
Returns the window of the result set by considering axioms only from the given and all included ontologies.

Parameters:
fromIndex - the index of the first element
toIndex - the index of the last element
Returns:
entire result set
Throws:
KAON2Exception - thrown if there is an error

openCursor

Cursor<E> openCursor()
                     throws KAON2Exception
Returns a cursor containing results from the given ontology.

Returns:
the cursor
Throws:
KAON2Eception - thrown if there is an error
KAON2Exception