info.bioinfweb.jphyloio.formats.phylip

## Class AbstractPhylipEventReader<P extends TextReaderStreamDataProvider<? extends AbstractPhylipEventReader<P>>>

- java.lang.Object
- - info.bioinfweb.jphyloio.AbstractEventReader<P>
  - - info.bioinfweb.jphyloio.formats.text.AbstractTextEventReader<P>
    - - info.bioinfweb.jphyloio.formats.phylip.AbstractPhylipEventReader<P>

- All Implemented Interfaces:
    PhylipConstants, JPhyloIOEventReader, JPhyloIOFormatSpecificObject, ReadWriteConstants
  Direct Known Subclasses:
    PhylipEventReader, SequentialPhylipEventReader

      public abstract class AbstractPhylipEventReader<P extends TextReaderStreamDataProvider<? extends AbstractPhylipEventReader<P>>>
      extends AbstractTextEventReader<P>
      implements PhylipConstants

  Implements shared functionality of Phylip event readers.
  Author:
    Ben Stöver

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `currentSequenceName`

    - ### Fields inherited from class info.bioinfweb.jphyloio.formats.text.AbstractTextEventReader

      `lineConsumed`

    - ### Fields inherited from interface info.bioinfweb.jphyloio.formats.phylip.PhylipConstants

      `DEFAULT_NAME_LENGTH, PHYLIP_FORMAT_NAME, PREMATURE_NAME_END_CHARACTER, RELAXED_PHYLIP_NAME_PATTERN, SEQUENTIAL_PHYLIP_FORMAT_NAME`

    - ### Fields inherited from interface info.bioinfweb.jphyloio.ReadWriteConstants

      `ATTRIBUTE_STRING_KEY, ATTRIBUTES_NAMESPACE_FOLDER, DATA_TYPE_NAMESPACE_FOLDER, DATA_TYPE_SIMPLE_VALUE_LIST, DEFAULT_CHAR_SET_ID_PREFIX, DEFAULT_CHARACTER_DEFINITION_ID_PREFIX, DEFAULT_EDGE_ID_PREFIX, DEFAULT_GENERAL_ID_PREFIX, DEFAULT_MATRIX_ID_PREFIX, DEFAULT_MAX_COMMENT_LENGTH, DEFAULT_MAX_TOKENS_TO_READ, DEFAULT_META_ID_PREFIX, DEFAULT_NETWORK_ID_PREFIX, DEFAULT_NODE_EDGE_SET_ID_PREFIX, DEFAULT_NODE_ID_PREFIX, DEFAULT_OTU_ID_PREFIX, DEFAULT_OTU_LIST_ID_PREFIX, DEFAULT_OTU_SET_ID_PREFIX, DEFAULT_SEQUENCE_ID_PREFIX, DEFAULT_SEQUENCE_SET_ID_PREFIX, DEFAULT_TOKEN_DEFINITION_ID_PREFIX, DEFAULT_TOKEN_SET_ID_PREFIX, DEFAULT_TREE_ID_PREFIX, DEFAULT_TREE_NETWORK_GROUP_ID_PREFIX, DEFAULT_TREE_NETWORK_SET_ID_PREFIX, JPHYLOIO_ATTRIBUTES_NAMESPACE, JPHYLOIO_ATTRIBUTES_PREFIX, JPHYLOIO_DATA_TYPE_NAMESPACE, JPHYLOIO_DATA_TYPE_PREFIX, JPHYLOIO_FORMATS_NAMESPACE_PREFIX, JPHYLOIO_GENERAL_NAMESPACE, JPHYLOIO_NAMESPACE_PREFIX, JPHYLOIO_PREDICATE_NAMESPACE, JPHYLOIO_PREDICATE_PREFIX, PREDICATE_CHARACTER_COUNT, PREDICATE_EDGE_LENGTH, PREDICATE_EDGE_SOURCE_NODE, PREDICATE_EDGE_TARGET_NODE, PREDICATE_HAS_CUSTOM_XML, PREDICATE_HAS_LITERAL_METADATA, PREDICATE_HAS_RESOURCE_METADATA, PREDICATE_IS_CROSSLINK, PREDICATE_NAMESPACE_FOLDER, PREDICATE_PART_SEPERATOR, PREDICATE_SEQUENCE_COUNT, RESERVED_ID_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractPhylipEventReader(java.io.File file, ReadWriteParameterMap parameters)`
    `AbstractPhylipEventReader(java.io.InputStream stream, ReadWriteParameterMap parameters)`
    `AbstractPhylipEventReader(PeekReader reader, ReadWriteParameterMap parameters)`
    `AbstractPhylipEventReader(java.io.Reader reader, ReadWriteParameterMap parameters)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected long` | `getCharacterCount()`
    `protected long` | `getSequenceCount()`
    `boolean` | `isRelaxedPhylip()`
    `protected void` | `readMatrixDimensions()`
    `protected java.lang.String` | `readSequenceName()`

    - ### Methods inherited from class info.bioinfweb.jphyloio.formats.text.AbstractTextEventReader

      `close, consumeWhiteSpaceAndComments, createStreamDataProvider, createTokenList, getReader, readCharacters, readCharacters, readComment, readKeyValueInformation, readToken`

    - ### Methods inherited from class info.bioinfweb.jphyloio.AbstractEventReader

      `addEventListener, fireEvent, getCurrentEventCollection, getIDManager, getLastNonCommentEvent, getParameters, getParentInformation, getPreviousEvent, getSequenceTokensEventManager, getStreamDataProvider, getUpcomingEvents, hasNextEvent, hasSpecialEventCollection, isBeforeFirstAccess, next, nextOfType, peek, readNextEvent, removeEventListener, resetCurrentEventCollection, setCurrentEventCollection`

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

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

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

      `getFormatID`

- - ### Field Detail

    - #### currentSequenceName

          protected java.lang.String currentSequenceName

  - ### Constructor Detail

    - #### AbstractPhylipEventReader

          public AbstractPhylipEventReader(PeekReader reader,
                                           ReadWriteParameterMap parameters)

    - #### AbstractPhylipEventReader

          public AbstractPhylipEventReader(java.io.Reader reader,
                                           ReadWriteParameterMap parameters)
                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### AbstractPhylipEventReader

          public AbstractPhylipEventReader(java.io.InputStream stream,
                                           ReadWriteParameterMap parameters)
                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### AbstractPhylipEventReader

          public AbstractPhylipEventReader(java.io.File file,
                                           ReadWriteParameterMap parameters)
                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### isRelaxedPhylip

          public boolean isRelaxedPhylip()

    - #### getSequenceCount

          protected long getSequenceCount()

    - #### getCharacterCount

          protected long getCharacterCount()

    - #### readMatrixDimensions

          protected void readMatrixDimensions()
                                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readSequenceName

          protected java.lang.String readSequenceName()
                                               throws java.io.IOException

      Throws:
        `java.io.IOException`