info.bioinfweb.jphyloio.dataadapters

## Interface TreeNetworkDataAdapter

- All Superinterfaces:
    AnnotatedDataAdapter, ElementDataAdapter<LabeledIDEvent>
  All Known Implementing Classes:
    NoSetsTreeNetworkDataAdapter, StoreTreeNetworkDataAdapter

      public interface TreeNetworkDataAdapter
      extends ElementDataAdapter<LabeledIDEvent>

  Data adapter interface that provides data for a tree or a network.

  Applications implementing this adapter may consider to inherit their implementation from `EmptyAnnotatedDataAdapter` or `NoSetsTreeNetworkDataAdapter`.

  Note that `TreeTopologyExtractor` can be used by event writer implementations to easily generate a tree topology from the data provided by this adapter, if `isTree(ReadWriteParameterMap)` returns `true`.

  Since:
    0.0.0
  Author:
    Ben Stöver
  See Also:
    `TreeTopologyExtractor`, `NoSetsTreeNetworkDataAdapter`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ObjectListDataAdapter<EdgeEvent>` | `getEdges(ReadWriteParameterMap parameters)` Returns the set of edges contained in this tree or network.
    `ObjectListDataAdapter<LinkedLabeledIDEvent>` | `getNodeEdgeSets(ReadWriteParameterMap parameters)` Returns a list of node-and-edge-sets defined for the tree modeled by this instance.
    `ObjectListDataAdapter<NodeEvent>` | `getNodes(ReadWriteParameterMap parameters)` Returns the set of nodes contained in this tree or network.
    `boolean` | `isTree(ReadWriteParameterMap parameters)` Determines whether this instance represents a phylogenetic tree or a phylogenetic network.

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

      `getStartEvent`

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

      `writeMetadata`

- - ### Method Detail

    - #### isTree

          boolean isTree(ReadWriteParameterMap parameters)

      Determines whether this instance represents a phylogenetic tree or a phylogenetic network. (Not all formats accept networks.)
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        `true` if this instance represents a tree or `false` otherwise

    - #### getNodes

          ObjectListDataAdapter<NodeEvent> getNodes(ReadWriteParameterMap parameters)

      Returns the set of nodes contained in this tree or network.
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        a list of all nodes

    - #### getEdges

          ObjectListDataAdapter<EdgeEvent> getEdges(ReadWriteParameterMap parameters)

      Returns the set of edges contained in this tree or network. All nodes referenced by these edges are contained on `getEdges(ReadWriteParameterMap)`.
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        a list of all edges

    - #### getNodeEdgeSets

          ObjectListDataAdapter<LinkedLabeledIDEvent> getNodeEdgeSets(ReadWriteParameterMap parameters)

      Returns a list of node-and-edge-sets defined for the tree modeled by this instance.
      Parameters:
        `parameters` - the parameter map of the calling writer that provides context information for the data request
      Returns:
        a (possibly empty) list of node-edge-sets