info.bioinfweb.jphyloio.dataadapters.implementations.store

## Class StoreObjectListDataAdapter<E extends LabeledIDEvent>

- java.lang.Object
- - info.bioinfweb.jphyloio.dataadapters.implementations.store.StoreObjectListDataAdapter<E>

- Type Parameters:
    `E` -
  All Implemented Interfaces:
    ObjectListDataAdapter<E>

      public class StoreObjectListDataAdapter<E extends LabeledIDEvent>
      extends java.lang.Object
      implements ObjectListDataAdapter<E>

  Author:
    Sarah Wiechers, Ben Stöver

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StoreObjectListDataAdapter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getCount(ReadWriteParameterMap parameters)` Returns the number of objects to be returned by `ObjectListDataAdapter.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.
    `java.util.List<JPhyloIOEvent>` | `getObjectContent(java.lang.String id)`
    `org.apache.commons.collections4.map.ListOrderedMap<java.lang.String,StoreObjectData<E>>` | `getObjectMap()`
    `E` | `getObjectStartEvent(ReadWriteParameterMap parameters, java.lang.String id)` Returns the start event of an object determined by the specified object ID.
    `void` | `setObjectStartEvent(E event)`
    `void` | `writeContentData(ReadWriteParameterMap parameters, JPhyloIOEventReceiver receiver, java.lang.String id)` Writes the nested events in the specified object describing its contents.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StoreObjectListDataAdapter

          public StoreObjectListDataAdapter()

  - ### Method Detail

    - #### getObjectMap

          public org.apache.commons.collections4.map.ListOrderedMap<java.lang.String,StoreObjectData<E>> getObjectMap()

    - #### getObjectStartEvent

          public E getObjectStartEvent(ReadWriteParameterMap parameters,
                                       java.lang.String id)
                                throws java.lang.IllegalArgumentException

      Description copied from interface: `ObjectListDataAdapter`
      Returns the start event of an object determined by the specified object ID.
      Specified by:
        `getObjectStartEvent` in interface `ObjectListDataAdapter<E extends LabeledIDEvent>`
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
        `id` - the ID of the requested object
      Returns:
        an instance of a labeled ID event that describes the specified object
      Throws:
        `java.lang.IllegalArgumentException` - if no to object for the specified ID is present

    - #### setObjectStartEvent

          public void setObjectStartEvent(E event)
                                   throws java.lang.IllegalArgumentException

      Throws:
        `java.lang.IllegalArgumentException`

    - #### getObjectContent

          public java.util.List<JPhyloIOEvent> getObjectContent(java.lang.String id)

    - #### getCount

          public long getCount(ReadWriteParameterMap parameters)

      Description copied from interface: `ObjectListDataAdapter`
      Returns the number of objects to be returned by `ObjectListDataAdapter.getIDIterator(ReadWriteParameterMap)`.
      Specified by:
        `getCount` in interface `ObjectListDataAdapter<E extends LabeledIDEvent>`
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        the number of objects in the list modeled by this instance

    - #### getIDIterator

          public java.util.Iterator<java.lang.String> getIDIterator(ReadWriteParameterMap parameters)

      Description copied from interface: `ObjectListDataAdapter`
      Returns an iterator returning the IDs of all objects contained in the list modeled by this instance.
      Specified by:
        `getIDIterator` in interface `ObjectListDataAdapter<E extends LabeledIDEvent>`
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        an iterator returning the IDs (Depending in the usage of this object, the returned iterator must return at least one element or can be empty, but it may never be `null`.)

    - #### writeContentData

          public void writeContentData(ReadWriteParameterMap parameters,
                                       JPhyloIOEventReceiver receiver,
                                       java.lang.String id)
                                throws java.io.IOException,
                                       java.lang.IllegalArgumentException

      Description copied from interface: `ObjectListDataAdapter`
      Writes the nested events in the specified object describing its contents.
      Specified by:
        `writeContentData` in interface `ObjectListDataAdapter<E extends LabeledIDEvent>`
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
        `receiver` - the receiver for the events
      Throws:
        `java.io.IOException` - if a I/O error occurs while writing the data
        `java.lang.IllegalArgumentException` - if an unknown ID was specified