public abstract class AbstractXMLEventWriter<P extends XMLWriterStreamDataProvider<? extends AbstractXMLEventWriter<P>>> extends AbstractEventWriter<P> implements JPhyloIOXMLEventWriter
AbstractEventWriter.NoEditUniqueLabelHandler, AbstractEventWriter.UniqueLabelHandler
EDITED_LABEL_SEPARATOR
Constructor and Description |
---|
AbstractXMLEventWriter() |
Modifier and Type | Method and Description |
---|---|
javax.xml.stream.XMLEventWriter |
createMetaXMLEventWriter(JPhyloIOEventReceiver receiver)
Creates a new
XMLEventWriter that allows to write events of XML content of literal metadata to this
JPhyloIO event writer instance through that interface. |
javax.xml.stream.XMLStreamWriter |
createMetaXMLStreamWriter(JPhyloIOEventReceiver receiver)
Creates a new
XMLStreamWriter that allows to write events of XML content of literal metadata to this
JPhyloIO event writer instance through that interface. |
protected abstract void |
doWriteDocument() |
protected void |
doWriteDocument(DocumentDataAdapter document,
java.io.Writer writer,
ReadWriteParameterMap parameters) |
protected DocumentDataAdapter |
getDocument() |
protected ApplicationLogger |
getLogger() |
javax.xml.namespace.NamespaceContext |
getNamespaceContext()
Returns the currently valid namespace context of the writer.
|
protected ReadWriteParameterMap |
getParameters() |
protected javax.xml.stream.XMLStreamWriter |
getXMLWriter() |
createStreamDataProvider, createUniqueLabel, createUniqueLabel, createUniqueLabel, createUniqueLinkedOTULabel, decreaseIndention, determineMaxSequenceLength, extendSequence, getFileStartInfo, getIndention, getLabeledIDName, getLinkedOTUNameOTUFirst, getLinkedOTUNameOwnFirst, getReferencedOTUList, getStreamDataProvider, increaseIndention, logIngnoredOTULists, writeDocument, writeDocument, writeDocument, writeLineBreak, writeLineStart
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeDocument, writeDocument, writeDocument
getFormatID
public AbstractXMLEventWriter()
protected javax.xml.stream.XMLStreamWriter getXMLWriter()
protected ReadWriteParameterMap getParameters()
protected ApplicationLogger getLogger()
protected DocumentDataAdapter getDocument()
public javax.xml.namespace.NamespaceContext getNamespaceContext()
JPhyloIOXMLEventWriter
getNamespaceContext
in interface JPhyloIOXMLEventWriter
NamespaceContext
objectprotected abstract void doWriteDocument() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected void doWriteDocument(DocumentDataAdapter document, java.io.Writer writer, ReadWriteParameterMap parameters) throws java.io.IOException
doWriteDocument
in class AbstractEventWriter<P extends XMLWriterStreamDataProvider<? extends AbstractXMLEventWriter<P>>>
java.io.IOException
public javax.xml.stream.XMLEventWriter createMetaXMLEventWriter(JPhyloIOEventReceiver receiver) throws java.lang.IllegalStateException
JPhyloIOXMLEventWriter
XMLEventWriter
that allows to write events of XML content of literal metadata to this
JPhyloIO event writer instance through that interface. Instances can be created any time, while this instance is located
inside a literal metadata subsequence with the LiteralContentSequenceType.XML
, but not outside of such a sequence.
In principle this method may be called multiple times within the same literal metadata event subsequence, which would result in having multiple XML event writer instances delegating to the same JPhyloIO reader, although that is not recommended.
In implementations of this interface that are part of JPhyloIO, the returned writer is an instance of
MetaXMLEventWriter
. You can have a look at its documentation for furthter details in how the returned instance
behaves. (Note that third party implementations might return a different implementation of XMLEventWriter
here.)
createMetaXMLEventWriter
in interface JPhyloIOXMLEventWriter
receiver
- the receiver to write events to (Each XMLEvent
will be translated into a
LiteralMetadataContentEvent
.)java.lang.IllegalStateException
- if no writer can be created at the current position (outside of a literal metadata event
subsequence with type LiteralContentSequenceType.XML
)public javax.xml.stream.XMLStreamWriter createMetaXMLStreamWriter(JPhyloIOEventReceiver receiver) throws java.lang.IllegalStateException
JPhyloIOXMLEventWriter
XMLStreamWriter
that allows to write events of XML content of literal metadata to this
JPhyloIO event writer instance through that interface. Instances can be created any time, while this instance is located
inside a literal metadata subsequence with the LiteralContentSequenceType.XML
, but not outside of such a sequence.
In theory this method may be called multiple times within the same literal metadata event subsequence, which would result in having multiple XML event writer instances delegating to the same JPhyloIO reader, although that is not recommended.
In implementations of this interface that are part of JPhyloIO, the returned writer is an instance of
MetaXMLStreamWriter
. You can have a look at its documentation for furthter details in how the returned instance
behaves. (Note that third party implementations might return a different implementation of XMLStreamWriter
here.)
createMetaXMLStreamWriter
in interface JPhyloIOXMLEventWriter
receiver
- the receiver to write events to (Each writing operation will be translated into a
LiteralMetadataContentEvent
.)java.lang.IllegalStateException
- if no writer can be created at the current position (outside of a literal metadata event
subsequence with type LiteralContentSequenceType.XML
)