OSID Logo
OSID Specifications
ontology package
Version 3.0.0
Release Candidate Preview
Interfaceosid.ontology.OntologyNodeList
Implementsosid.OsidList
Description

Like all OsidLists, OntologyNodeList provides a means for accessing OntologyNode elements sequentially either one at a time or many at a time. Examples:

                     
                     
                     while (onl.hasNext()) {
                          OntologyNode node = onl.getNextOntologyNode();
                     }
                     
                                 
                     
                
or
                     
                     
                     while (onl.hasNext()) {
                          OntologyNode[] nodes = onl.getNextOntologyNodes(onl.available());
                     }
                     
                                 
                     
                
MethodgetNextOntologyNode
Description

Gets the next OntologyNode in this list.

Returnosid.ontology.OntologyNodethe next OntologyNode in this list. The hasNext() method should be used to test that a next OntologyNode is available before calling this method.
ErrorsILLEGAL_STATEno more elements available in this list
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetNextOntologyNodes
Description

Gets the next set of OntologyNode elements in this list which must be less than or equal to the return from available().

Parameterscardinalnthe number of OntologyNode elements requested which must be less than or equal to available()
Returnosid.ontology.OntologyNode[]an array of OntologyNode elements. The length of the array is less than or equal to the number specified.
ErrorsILLEGAL_STATEno more elements available in this list
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.