public abstract class AbstractSequenceContentReceiver<P extends WriterStreamDataProvider<? extends AbstractEventWriter<P>>> extends BasicEventReceiver<P>
Constructor and Description |
---|
AbstractSequenceContentReceiver(P streamDataProvider,
ReadWriteParameterMap parameterMap,
boolean longTokens) |
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() |
add, addIgnoredComments, addIgnoredLiteralMetadata, addIgnoredResourceMetadata, addIgnoreLogMessage, didIgnoreComments, didIgnoreLiteralMetadata, didIgnoreMetadata, didIgnoreResourceMetadata, getIgnoredComments, getIgnoredLiteralMetadata, getIgnoredMetadata, getIgnoredResourceMetadata, getLogger, getParameterMap, getParentEvent, getParentEvents, getStreamDataProvider, handleComment, handleLiteralContentMeta, handleLiteralMetaStart, handleMetaEndEvent, handleResourceMetaStart, isInComment
public AbstractSequenceContentReceiver(P streamDataProvider, ReadWriteParameterMap parameterMap, boolean longTokens)
protected abstract void handleToken(java.lang.String token, java.lang.String label) throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected boolean doAdd(JPhyloIOEvent event) throws javax.xml.stream.XMLStreamException, java.io.IOException
BasicEventReceiver
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.
doAdd
in class BasicEventReceiver<P extends WriterStreamDataProvider<? extends AbstractEventWriter<P>>>
event
- the event to be processedtrue
if more events can be written to this acceptor or false
if writing should
be abortedjavax.xml.stream.XMLStreamException
- if an XML stream error occurs when writing to the underlying streamjava.io.IOException
- if an I/O error occurs when writing to the underlying streampublic boolean isLongTokens()