info.bioinfweb.jphyloio.formats.pde

## Class PDEFactory

- java.lang.Object
- - info.bioinfweb.jphyloio.factory.AbstractSingleReaderWriterFactory
  - - info.bioinfweb.jphyloio.formats.xml.AbstractXMLFactory
    - - info.bioinfweb.jphyloio.formats.pde.PDEFactory

- All Implemented Interfaces:
    SingleReaderWriterFactory, JPhyloIOFormatIDs, PDEConstants

      public class PDEFactory
      extends AbstractXMLFactory
      implements PDEConstants, JPhyloIOFormatIDs

  Reader and writer factory for the PDE format.
  Since:
    0.0.0
  Author:
    Ben Stöver, Sarah Wiechers

- - ### Field Summary

    - ### Fields inherited from interface info.bioinfweb.jphyloio.formats.pde.PDEConstants

      `AMINO_TYPE, ATTR_ALIGNMENT_LENGTH, ATTR_CHARSET_LABEL, ATTR_COLOR, ATTR_DATATYPE, ATTR_ID, ATTR_SEQUENCE_COUNT, ATTR_SEQUENCE_INDEX, ATTR_VERSION, ATTR_VISIBILITY, DNA_TYPE, FIRST_CUSTOM_META_ID, META_ID_ACCESS_NUMBER, META_ID_COMMENT, META_ID_LINKED_FILE, META_ID_SEQUENCE_LABEL, META_TYPE_FILE, META_TYPE_NUMBER, META_TYPE_STRING, PDE_FORMAT_NAME, PDE_NAMESPACE_PREFIX, PDE_PREDICATE_NAMESPACE, PREDICATE_ACCESS_NUMBER, PREDICATE_CHARSET_COLOR, PREDICATE_CHARSET_VISIBILITY, PREDICATE_COMMENT, PREDICATE_DESCRIPTION, PREDICATE_LINKED_FILE, SEQUENCE_END, TAG_ALIGNMENT, TAG_BLOCK, TAG_CHARSET, TAG_CHARSETS, TAG_DESCRIPTION, TAG_HEADER, TAG_MATRIX, TAG_META_TYPE_DEFINITIONS, TAG_ROOT, TAG_SEQUENCE_INFORMATION, TAG_SEQUENCE_META_INFORMATION, UNKNOWN_CHARS`

    - ### Fields inherited from interface info.bioinfweb.jphyloio.formats.JPhyloIOFormatIDs

      `FASTA_FORMAT_ID, FORMAT_ID_PREFIX, MEGA_FORMAT_ID, NEWICK_FORMAT_ID, NEXML_FORMAT_ID, NEXUS_FORMAT_ID, PDE_FORMAT_ID, PHYLIP_FORMAT_ID, PHYLOXML_FORMAT_ID, SEQUENTIAL_PHYLIP_FORMAT_ID, XTG_FORMAT_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PDEFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected JPhyloIOFormatInfo` | `createFormatInfo()`
    `JPhyloIOEventReader` | `getReader(java.io.InputStream stream, ReadWriteParameterMap parameters)` Creates a new reader instance for the target format of this factory.
    `JPhyloIOEventReader` | `getReader(java.io.Reader reader, ReadWriteParameterMap parameters)` Creates a new reader instance for the target format of this factory.
    `JPhyloIOEventWriter` | `getWriter()` Creates a new writer instance for the target format of this factory.
    `boolean` | `hasReader()` Determines whether this factory is able to create reader instances for its target format.
    `boolean` | `hasWriter()` Determines whether this factory is able to create writer instances for its target format.

    - ### Methods inherited from class info.bioinfweb.jphyloio.formats.xml.AbstractXMLFactory

      `checkFormat, checkRootTag, getRootTag`

    - ### Methods inherited from class info.bioinfweb.jphyloio.factory.AbstractSingleReaderWriterFactory

      `checkFormat, getFormatInfo`

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

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

- - ### Constructor Detail

    - #### PDEFactory

          public PDEFactory()

  - ### Method Detail

    - #### getReader

          public JPhyloIOEventReader getReader(java.io.InputStream stream,
                                               ReadWriteParameterMap parameters)
                                        throws java.io.IOException,
                                               javax.xml.stream.XMLStreamException

      Description copied from interface: `SingleReaderWriterFactory`
      Creates a new reader instance for the target format of this factory.
      Specified by:
        `getReader` in interface `SingleReaderWriterFactory`
      Parameters:
        `stream` - the stream to provide the content for the reader
        `parameters` - the parameter map for the new reader instance
      Returns:
        the new reader instance
      Throws:
        `java.io.IOException`
        `javax.xml.stream.XMLStreamException`

    - #### getReader

          public JPhyloIOEventReader getReader(java.io.Reader reader,
                                               ReadWriteParameterMap parameters)
                                        throws java.io.IOException,
                                               javax.xml.stream.XMLStreamException

      Description copied from interface: `SingleReaderWriterFactory`
      Creates a new reader instance for the target format of this factory.
      Specified by:
        `getReader` in interface `SingleReaderWriterFactory`
        `parameters` - the parameter map for the new reader instance
      Returns:
        the new reader instance or `null` if this factory is not able to create readers
      Throws:
        `java.io.IOException`
        `javax.xml.stream.XMLStreamException`
      See Also:
        `SingleReaderWriterFactory.hasReader()`

    - #### getWriter

          public JPhyloIOEventWriter getWriter()

      Description copied from interface: `SingleReaderWriterFactory`
      Creates a new writer instance for the target format of this factory.
      Specified by:
        `getWriter` in interface `SingleReaderWriterFactory`
      Returns:
        the new writer instance or `null` if this factory is not able to create writers
      See Also:
        `SingleReaderWriterFactory.hasWriter()`

    - #### hasReader

          public boolean hasReader()

      Description copied from interface: `SingleReaderWriterFactory`
      Determines whether this factory is able to create reader instances for its target format.
      Specified by:
        `hasReader` in interface `SingleReaderWriterFactory`
      Returns:
        `true` if creating readers is supported or `false` otherwise

    - #### hasWriter

          public boolean hasWriter()

      Description copied from interface: `SingleReaderWriterFactory`
      Determines whether this factory is able to create writer instances for its target format.
      Specified by:
        `hasWriter` in interface `SingleReaderWriterFactory`
      Returns:
        `true` if creating writers is supported or `false` otherwise

    - #### createFormatInfo

          protected JPhyloIOFormatInfo createFormatInfo()

      Specified by:
        `createFormatInfo` in class `AbstractSingleReaderWriterFactory`