info.bioinfweb.jphyloio.dataadapters

## Interface DocumentDataAdapter

- All Superinterfaces:
    AnnotatedDataAdapter
  All Known Implementing Classes:
    EmptyDocumentDataAdapter, ListBasedDocumentDataAdapter, StoreDocumentDataAdapter

      public interface DocumentDataAdapter
      extends AnnotatedDataAdapter

  The root adapter interface to be used with `JPhyloIOEventWriter`s. Implementations model a document containing phylogenetic data, consisting of taxon lists, character matrices and trees or networks.

  Application developers need to implement this and one or more of the references interfaces with an adapter class, that allows `JPhyloIOEventWriter`s to access the business model of their application. (Alternatively the business model classes of the application may also implement these interfaces directly, if suitable.)

  JPhyloIO offers a set of default implementations in `info.bioinfweb.jphyloio.dataadapters.implementations` that could be used as superclasses of application adapter implementations, which may reduce the workload in application development.

  Author:
    Ben Stöver
  See Also:
    `ListBasedDocumentDataAdapter`, `JPhyloIOEventWriter`, `OTUListDataAdapter`, `MatrixDataAdapter`, `TreeNetworkDataAdapter`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Iterator<MatrixDataAdapter>` | `getMatrixIterator(ReadWriteParameterMap parameters)` Returns an iterator providing access to all matrices contained in the document to be written.
    `OTUListDataAdapter` | `getOTUList(ReadWriteParameterMap parameters, java.lang.String id)` Returns the OTU list referenced by the specified ID.
    `long` | `getOTUListCount(ReadWriteParameterMap parameters)` Returns the number of OTU lists provided by this document adapter.
    `java.util.Iterator<OTUListDataAdapter>` | `getOTUListIterator(ReadWriteParameterMap parameters)` Returns an iterator providing access to all OTU lists contained in the document to be written.
    `java.util.Iterator<TreeNetworkGroupDataAdapter>` | `getTreeNetworkGroupIterator(ReadWriteParameterMap parameters)` Returns an iterator providing access to all trees and network groups contained in the document to be written.

    - ### Methods inherited from interface info.bioinfweb.jphyloio.dataadapters.AnnotatedDataAdapter

      `writeMetadata`

- - ### Method Detail

    - #### getOTUListIterator

          java.util.Iterator<OTUListDataAdapter> getOTUListIterator(ReadWriteParameterMap parameters)

      Returns an iterator providing access to all OTU lists contained in the document to be written.
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        the iterator (May be empty but not `null`.)

    - #### getOTUListCount

          long getOTUListCount(ReadWriteParameterMap parameters)

      Returns the number of OTU lists provided by this document adapter.
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        the number of OTU lists, that will be returned by `getOTUListIterator(ReadWriteParameterMap)`

    - #### getOTUList

          OTUListDataAdapter getOTUList(ReadWriteParameterMap parameters,
                                        java.lang.String id)
                                 throws java.lang.IllegalArgumentException

      Returns the OTU list referenced by the specified ID.
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
        `id` - the ID of the OTU list to be returned
      Returns:
        the OTU list referenced by the specified ID
      Throws:
        `java.lang.IllegalArgumentException` - if no OTU list with the specified ID is available

    - #### getMatrixIterator

          java.util.Iterator<MatrixDataAdapter> getMatrixIterator(ReadWriteParameterMap parameters)

      Returns an iterator providing access to all matrices contained in the document to be written.
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        the iterator (Maybe empty but not `null`.)

    - #### getTreeNetworkGroupIterator

          java.util.Iterator<TreeNetworkGroupDataAdapter> getTreeNetworkGroupIterator(ReadWriteParameterMap parameters)

      Returns an iterator providing access to all trees and network groups contained in the document to be written.
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        the iterator (Maybe empty but not `null`.)