info.bioinfweb.jphyloio.formats.newick

## Class NewickNodeEdgeEventReceiver<E extends JPhyloIOEvent>

- java.lang.Object
- - info.bioinfweb.jphyloio.dataadapters.implementations.receivers.BasicEventReceiver
  - - info.bioinfweb.jphyloio.formats.newick.NewickNodeEdgeEventReceiver<E>

- All Implemented Interfaces:
    JPhyloIOEventReceiver, NewickConstants

      public class NewickNodeEdgeEventReceiver<E extends JPhyloIOEvent>
      extends BasicEventReceiver
      implements NewickConstants

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char` | `STRING_DELEMITER_REPLACEMENT`

    - ### Fields inherited from interface info.bioinfweb.jphyloio.formats.newick.NewickConstants

      `ALLOCATION_SEPARATOR_SYMBOL, ALLOCATION_SYMBOL, ALTERNATIVE_NAME_DELIMITER, COMMENT_END, COMMENT_START, DATA_TYPE_NEWICK_ARRAY, E_NEWICK_EDGE_TYPE_HYBRIDIZATION, E_NEWICK_EDGE_TYPE_LATERAL_GENE_TRANSFER, E_NEWICK_EDGE_TYPE_RECOMBINATION, E_NEWICK_NAMESPACE_PREFIX, E_NEWICK_NETWORK_DATA_SEPARATOR, ELEMENT_SEPERATOR, FIELD_END_SYMBOL, FIELD_START_SYMBOL, FIELD_VALUE_SEPARATOR_SYMBOL, FREE_NAME_BLANK, HOT_COMMENT_START_SYMBOL, INDEX_END_SYMBOL, INDEX_START_SYMBOL, LENGTH_SEPERATOR, NAME_DELIMITER, NEWICK_DATA_TYPE_NAMESPACE, NEWICK_FORMAT_NAME, NEWICK_NAMESPACE_PREFIX, NHX_KEY_CONFIDENCE, NHX_KEY_EVENT, NHX_KEY_GENE_NAME, NHX_KEY_PREFIX, NHX_KEY_SCIENTIFIC_NAME, NHX_KEY_SEQUENCE_ACCESSION, NHX_KEY_TAXONOMY_ID, NHX_START, NHX_VALUE_SEPARATOR_SYMBOL, PREDICATE_E_NEWICK_EDGE_TYPE, ROOTED_HOT_COMMENT, SUBTREE_END, SUBTREE_START, TERMINAL_SYMBOL, UNROOTED_HOT_COMMENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NewickNodeEdgeEventReceiver(TextWriterStreamDataProvider<?> streamDataProvider, ReadWriteParameterMap parameterMap)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `TextWriterStreamDataProvider` | `getStreamDataProvider()`
    `protected void` | `handleComment(CommentEvent event)`
    `protected void` | `handleLiteralContentMeta(LiteralMetadataContentEvent event)`
    `protected void` | `handleLiteralMetaStart(LiteralMetadataEvent event)`
    `protected void` | `handleMetaEndEvent(JPhyloIOEvent event)`
    `boolean` | `hasMetadataToWrite()` Determines whether this receiver currently stores metadata to be written into a Newick/Nexus hot comment.
    `boolean` | `isIgnoredXMLMetadata()`
    `void` | `writeComments()`
    `void` | `writeMetadata()` Write the metadata stored in this receiver into a Newick/Nexus hot comment.

    - ### Methods inherited from class info.bioinfweb.jphyloio.dataadapters.implementations.receivers.BasicEventReceiver

      `add, addIgnoredComments, addIgnoredLiteralMetadata, addIgnoredResourceMetadata, addIgnoreLogMessage, didIgnoreComments, didIgnoreLiteralMetadata, didIgnoreMetadata, didIgnoreResourceMetadata, doAdd, getIgnoredComments, getIgnoredLiteralMetadata, getIgnoredMetadata, getIgnoredResourceMetadata, getLogger, getParameterMap, getParentEvent, getParentEvents, handleResourceMetaStart, isInComment`

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

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

- - ### Field Detail

    - #### STRING_DELEMITER_REPLACEMENT

          public static final char STRING_DELEMITER_REPLACEMENT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### NewickNodeEdgeEventReceiver

          public NewickNodeEdgeEventReceiver(TextWriterStreamDataProvider<?> streamDataProvider,
                                             ReadWriteParameterMap parameterMap)

  - ### Method Detail

    - #### getStreamDataProvider

          public TextWriterStreamDataProvider getStreamDataProvider()

      Overrides:
        `getStreamDataProvider` in class `BasicEventReceiver`

    - #### isIgnoredXMLMetadata

          public boolean isIgnoredXMLMetadata()

    - #### clear

          public void clear()

    - #### handleLiteralMetaStart

          protected void handleLiteralMetaStart(LiteralMetadataEvent event)
                                         throws java.io.IOException,
                                                javax.xml.stream.XMLStreamException

      Overrides:
        `handleLiteralMetaStart` in class `BasicEventReceiver`
      Throws:
        `java.io.IOException`
        `javax.xml.stream.XMLStreamException`

    - #### handleLiteralContentMeta

          protected void handleLiteralContentMeta(LiteralMetadataContentEvent event)
                                           throws java.io.IOException,
                                                  javax.xml.stream.XMLStreamException

      Overrides:
        `handleLiteralContentMeta` in class `BasicEventReceiver`
      Throws:
        `java.io.IOException`
        `javax.xml.stream.XMLStreamException`

    - #### handleMetaEndEvent

          protected void handleMetaEndEvent(JPhyloIOEvent event)
                                     throws java.io.IOException,
                                            javax.xml.stream.XMLStreamException

      Overrides:
        `handleMetaEndEvent` in class `BasicEventReceiver`
      Throws:
        `java.io.IOException`
        `javax.xml.stream.XMLStreamException`

    - #### handleComment

          protected void handleComment(CommentEvent event)

      Overrides:
        `handleComment` in class `BasicEventReceiver`

    - #### hasMetadataToWrite

          public boolean hasMetadataToWrite()

      Determines whether this receiver currently stores metadata to be written into a Newick/Nexus hot comment.
      Returns:
        `true` if any data can be written, `false` otherwise

    - #### writeMetadata

          public void writeMetadata()
                             throws java.io.IOException

      Write the metadata stored in this receiver into a Newick/Nexus hot comment.
      Throws:
        `java.io.IOException`

    - #### writeComments

          public void writeComments()
                             throws java.io.IOException

      Throws:
        `java.io.IOException`