public interface OntologyList extends OsidList
Like all OsidLists,
OntologyList
provides
a means for accessing Ontology
elements sequentially either
one at a time or many at a time. Examples:
while (ol.hasNext()) { Ontology ontology = ol.getNextOntology(); }or
while (ol.hasNext()) { Ontology[] ontologies = ol.getNextOntologies(ol.available()); }
Modifier and Type | Method and Description |
---|---|
Ontology[] |
getNextOntologies(long n)
Gets the next set of
Ontology elements in this list
which must be less than or equal to the return from
available(). |
Ontology |
getNextOntology()
Gets the next
Ontology in this list. |
Ontology getNextOntology() throws OperationFailedException
Ontology
in this list. Ontology
in this list. The
hasNext()
method should be used to test that a next
Ontology
is available before calling this
method.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Ontology[] getNextOntologies(long n) throws OperationFailedException
Ontology
elements in this list
which must be less than or equal to the return from
available().
n
- the number of Ontology
elements requested
which must be less than or equal to available()
Ontology
elements.
The length of the array is less than or equal to the number
specified.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented.