E
- the event type of start events representing elements of this listpublic interface ObjectListDataAdapter<E extends JPhyloIOEvent>
getIDIterator(ReadWriteParameterMap)
. The start event of each object will
be requested by separate calls of getObjectStartEvent(ReadWriteParameterMap, String)
and the event
sequence by separate calls of writeContentData(ReadWriteParameterMap, JPhyloIOEventReceiver, String)
.
Such objects may e.g. be OTUs, token sets or character sets, depending on where instances of this interface are used.
Applications implementing this adapter may consider to inherit their implementation from
EmptyAnnotatedDataAdapter
. EmptyObjectListDataAdapter
allows to directly define an empty list.
Modifier and Type | Method and Description |
---|---|
long |
getCount(ReadWriteParameterMap parameters)
Returns the number of objects to be returned by
getIDIterator(ReadWriteParameterMap) . |
java.util.Iterator<java.lang.String> |
getIDIterator(ReadWriteParameterMap parameters)
Returns an iterator returning the IDs of all objects contained in the list modeled by this instance.
|
E |
getObjectStartEvent(ReadWriteParameterMap parameters,
java.lang.String id)
Returns the start event of an object determined by the specified object ID.
|
void |
writeContentData(ReadWriteParameterMap parameters,
JPhyloIOEventReceiver receiver,
java.lang.String id)
Writes the nested events in the specified object describing its contents.
|
E getObjectStartEvent(ReadWriteParameterMap parameters, java.lang.String id) throws java.lang.IllegalArgumentException
parameters
- the parameter map of the calling writer that provides context information for the data requestid
- the ID of the requested objectjava.lang.IllegalArgumentException
- if no to object for the specified ID is presentlong getCount(ReadWriteParameterMap parameters)
getIDIterator(ReadWriteParameterMap)
.parameters
- the parameter map of the calling writer that provides context information for the data requestjava.util.Iterator<java.lang.String> getIDIterator(ReadWriteParameterMap parameters)
parameters
- the parameter map of the calling writer that provides context information for the data requestnull
.)void writeContentData(ReadWriteParameterMap parameters, JPhyloIOEventReceiver receiver, java.lang.String id) throws java.io.IOException, java.lang.IllegalArgumentException
parameters
- the parameter map of the calling writer that provides context information for the data requestreceiver
- the receiver for the eventsnodeID
- the ID of the requested nodejava.io.IOException
- if a I/O error occurs while writing the datajava.lang.IllegalArgumentException
- if an unknown ID was specified