info.bioinfweb.jphyloio.dataadapters.implementations.receivers

## Class AbstractSequenceContentReceiver<P extends WriterStreamDataProvider<? extends AbstractEventWriter<P>>>

- java.lang.Object
- - info.bioinfweb.jphyloio.dataadapters.implementations.receivers.BasicEventReceiver<P>
  - - info.bioinfweb.jphyloio.dataadapters.implementations.receivers.AbstractSequenceContentReceiver<P>

- All Implemented Interfaces:
    JPhyloIOEventReceiver
  Direct Known Subclasses:
    NeXMLHandleSequenceDataReceiver, TextSequenceContentReceiver

      public abstract class AbstractSequenceContentReceiver<P extends WriterStreamDataProvider<? extends AbstractEventWriter<P>>>
      extends BasicEventReceiver<P>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSequenceContentReceiver(P streamDataProvider, ReadWriteParameterMap parameterMap, boolean longTokens)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `doAdd(JPhyloIOEvent event)` This method is called internally by `BasicEventReceiver.add(JPhyloIOEvent)` to process events that do not model metadata or comments.
    `protected abstract void` | `handleToken(java.lang.String token, java.lang.String label)`
    `boolean` | `isLongTokens()`

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

      `add, addIgnoredComments, addIgnoredLiteralMetadata, addIgnoredResourceMetadata, addIgnoreLogMessage, didIgnoreComments, didIgnoreLiteralMetadata, didIgnoreMetadata, didIgnoreResourceMetadata, getIgnoredComments, getIgnoredLiteralMetadata, getIgnoredMetadata, getIgnoredResourceMetadata, getLogger, getParameterMap, getParentEvent, getParentEvents, getStreamDataProvider, handleComment, handleLiteralContentMeta, handleLiteralMetaStart, handleMetaEndEvent, handleResourceMetaStart, isInComment`

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

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

- - ### Constructor Detail

    - #### AbstractSequenceContentReceiver

          public AbstractSequenceContentReceiver(P streamDataProvider,
                                                 ReadWriteParameterMap parameterMap,
                                                 boolean longTokens)

  - ### Method Detail

    - #### handleToken

          protected abstract void handleToken(java.lang.String token,
                                              java.lang.String label)
                                       throws java.io.IOException,
                                              javax.xml.stream.XMLStreamException

      Throws:
        `java.io.IOException`
        `javax.xml.stream.XMLStreamException`

    - #### doAdd

          protected boolean doAdd(JPhyloIOEvent event)
                           throws javax.xml.stream.XMLStreamException,
                                  java.io.IOException

      Description copied from class: `BasicEventReceiver`
      This method is called internally by `BasicEventReceiver.add(JPhyloIOEvent)` to process events that do not model metadata or comments. (Such events are treated by the according special methods of this class).

      This default implementation just throws an `IllegalEventException`. Inherited classes that need to support other events then these modeling metadata or comments, must overwrite this method.

      Overrides:
        `doAdd` in class `BasicEventReceiver<P extends WriterStreamDataProvider<? extends AbstractEventWriter<P>>>`
      Parameters:
        `event` - the event to be processed
      Returns:
        `true` if more events can be written to this acceptor or `false` if writing should be aborted
      Throws:
        `javax.xml.stream.XMLStreamException` - if an XML stream error occurs when writing to the underlying stream
        `java.io.IOException` - if an I/O error occurs when writing to the underlying stream

    - #### isLongTokens

          public boolean isLongTokens()