info.bioinfweb.jphyloio

## Interface JPhyloIOEventWriter

- All Superinterfaces:
    JPhyloIOFormatSpecificObject
  All Known Subinterfaces:
    JPhyloIOXMLEventWriter
  All Known Implementing Classes:
    AbstractEventWriter, AbstractSingleMatrixEventWriter, AbstractTextEventWriter, AbstractXMLEventWriter, FASTAEventWriter, NewickEventWriter, NeXMLEventWriter, NexusEventWriter, PhylipEventWriter, PhyloXMLEventWriter

      public interface JPhyloIOEventWriter
      extends JPhyloIOFormatSpecificObject

  The main JPhyloIO interface to be implemented by all format specific event writers.

  Instances of this interface access application data through an instance of `DocumentDataAdapter` that is passed to a `writeDocument()` method. Such an instance links other nested data adapters. Implementations of the adapters will usually be made in application code (based on abstract implementations provided by JPhyloIO) and mediate between instances of this class and the classes implementing the application's data model.

  Since:
    0.0.0
  Author:
    Ben Stöver

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `writeDocument(DocumentDataAdapter document, java.io.File file, ReadWriteParameterMap parameters)` Writes the data provided by the data adapter to a document in the according format of the implementing class.
    `void` | `writeDocument(DocumentDataAdapter document, java.io.OutputStream stream, ReadWriteParameterMap parameters)` Writes the data provided by the data adapter to a document in the according format of the implementing class.
    `void` | `writeDocument(DocumentDataAdapter document, java.io.Writer writer, ReadWriteParameterMap parameters)` Writes the data provided by the data adapter to a document in the according format of the implementing class.

    - ### Methods inherited from interface info.bioinfweb.jphyloio.JPhyloIOFormatSpecificObject

      `getFormatID`

- - ### Method Detail

    - #### writeDocument

          void writeDocument(DocumentDataAdapter document,
                             java.io.OutputStream stream,
                             ReadWriteParameterMap parameters)
                      throws java.io.IOException

      Writes the data provided by the data adapter to a document in the according format of the implementing class.
      Parameters:
        `document` - the adapter providing the data to be written
        `stream` - the stream to write the data to
        `parameters` - a map of parameters to exchange information with the writer implementation (Care should be taken, if a parameter map is reused for multiple calls, since the writer implementation may add or changes entries in the map.)
      Throws:
        `InconsistentAdapterDataException` - if any inconsistency in the specified document adapter is found
        `java.lang.Exception` - implementing classes may choose to throw additional types of exceptions
        `java.io.IOException`

    - #### writeDocument

          void writeDocument(DocumentDataAdapter document,
                             java.io.File file,
                             ReadWriteParameterMap parameters)
                      throws java.io.IOException

      Writes the data provided by the data adapter to a document in the according format of the implementing class.
      Parameters:
        `document` - the adapter providing the data to be written
        `file` - the file to write the data to
        `parameters` - a map of parameters to exchange information with the writer implementation (Care should be taken, if a parameter map is reused for multiple calls, since the writer implementation may add or changes entries in the map.)
      Throws:
        `InconsistentAdapterDataException` - if any inconsistency in the specified document adapter is found
        `java.lang.Exception` - implementing classes may choose to throw additional types of exceptions
        `java.io.IOException`

    - #### writeDocument

          void writeDocument(DocumentDataAdapter document,
                             java.io.Writer writer,
                             ReadWriteParameterMap parameters)
                      throws java.io.IOException

      Writes the data provided by the data adapter to a document in the according format of the implementing class.
      Parameters:
        `document` - the adapter providing the data to be written
        `writer` - the writer to write the data to
        `parameters` - a map of parameters to exchange information with the writer implementation (Care should be taken, if a parameter map is reused for multiple calls, since the writer implementation may add or changes entries in the map.)
      Throws:
        `InconsistentAdapterDataException` - if any inconsistency in the specified document adapter is found
        `java.lang.Exception` - implementing classes may choose to throw additional types of exceptions
        `java.io.IOException`