info.bioinfweb.jphyloio

## Class ReadWriteParameterMap

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.TreeMap<java.lang.String,java.lang.Object>
    - - info.bioinfweb.commons.collections.ParameterMap
      - - info.bioinfweb.jphyloio.ReadWriteParameterMap

- All Implemented Interfaces:
    ReadWriteParameterNames, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>, java.util.NavigableMap<java.lang.String,java.lang.Object>, java.util.SortedMap<java.lang.String,java.lang.Object>

      public class ReadWriteParameterMap
      extends ParameterMap
      implements ReadWriteParameterNames

  Parameter map that allows to specify (optional) parameters to implementations of `JPhyloIOEventReader` or `JPhyloIOEventWriter`.
  Author:
    Ben Stöver
  See Also:
    `ReadWriteParameterNames`, `JPhyloIOFormatInfo.getSupportedParameters(boolean)`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

  - ### Field Summary

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

      `KEY_ALLOW_DEFAULT_NAMESPACE, KEY_ALLOW_INTERLEAVED_PARSING, KEY_ALWAYS_WRITE_NEXUS_NODE_LABELS, KEY_APPLICATION_NAME, KEY_APPLICATION_URL, KEY_APPLICATION_VERSION, KEY_CREATE_UNKNOWN_COMMAND_EVENTS, KEY_CUSTOM_XML_NAMESPACE_HANDLING, KEY_EXPECT_E_NEWICK, KEY_GENERATE_NEXUS_TRANSLATION_TABLE, KEY_IGNORE_COMMENTS, KEY_LABEL_EDITING_REPORTER, KEY_LINE_LENGTH, KEY_LINE_SEPARATOR, KEY_LOGGER, KEY_MATCH_TOKEN, KEY_MAXIMUM_COMMENT_LENGTH, KEY_MAXIMUM_NAME_LENGTH, KEY_MAXIMUM_TOKENS_TO_READ, KEY_NEXML_TOKEN_DEFINITION_LABEL, KEY_NEXML_TOKEN_DEFINITION_LABEL_METADATA, KEY_NEXML_TOKEN_TRANSLATION_STRATEGY, KEY_NEXUS_BLOCK_HANDLER_MAP, KEY_NEXUS_COMMAND_READER_FACTORY, KEY_OBJECT_TRANSLATOR_FACTORY, KEY_PHYLOXML_CONSIDER_PHYLOGENY_AS_TREE, KEY_PHYLOXML_EVENT_ID_TRANSLATION_MAP, KEY_PHYLOXML_METADATA_TREATMENT, KEY_PREFIX, KEY_RELAXED_PHYLIP, KEY_REPLACE_MATCH_TOKENS, KEY_SEQUENCE_EXTENSION_TOKEN, KEY_TRANSLATE_INTERNAL_NODE_NAMES, KEY_USE_OTU_LABEL, KEY_WRITER_INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReadWriteParameterMap()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LabelEditingReporter` | `getLabelEditingReporter()` Returns the label editing reporter of this map stored under `ReadWriteParameterNames.KEY_LABEL_EDITING_REPORTER`.
    `TokenDefinitionLabelHandling` | `getLabelHandling()`
    `ApplicationLogger` | `getLogger()`
    `java.lang.String` | `getMatchToken()`
    `int` | `getMaxCommentLength()`
    `int` | `getMaxTokensToRead()`
    `ObjectTranslatorFactory` | `getObjectTranslatorFactory()` Returns the object translator factory stored under `ReadWriteParameterNames.KEY_OBJECT_TRANSLATOR_FACTORY`.
    `java.util.Map<java.lang.String,java.lang.String>` | `getPhyloXMLEventIDTranslationMap()`
    `PhyloXMLMetadataTreatment` | `getPhyloXMLMetadataTreatment()`
    `TokenTranslationStrategy` | `getTranslateTokens()`
    `JPhyloIOEventWriter` | `getWriterInstance()` Returns the writer instance registered under `ReadWriteParameterNames.KEY_WRITER_INSTANCE`.

    - ### Methods inherited from class info.bioinfweb.commons.collections.ParameterMap

      `getApplicationLogger, getApplicationLogger, getBoolean, getDouble, getFile, getFile, getFloat, getInteger, getLong, getObject, getObject, getString, getString`

    - ### Methods inherited from class java.util.TreeMap

      `ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, isEmpty, toString`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove`

- - ### Constructor Detail

    - #### ReadWriteParameterMap

          public ReadWriteParameterMap()

  - ### Method Detail

    - #### getWriterInstance

          public JPhyloIOEventWriter getWriterInstance()

      Returns the writer instance registered under `ReadWriteParameterNames.KEY_WRITER_INSTANCE`.
      Returns:
        the current writer instance or `null` if none is present in the map (e.g. because it is used in a reader).

    - #### getLogger

          public ApplicationLogger getLogger()

    - #### getMaxTokensToRead

          public int getMaxTokensToRead()

    - #### getMaxCommentLength

          public int getMaxCommentLength()

    - #### getMatchToken

          public java.lang.String getMatchToken()

    - #### getLabelEditingReporter

          public LabelEditingReporter getLabelEditingReporter()

      Returns the label editing reporter of this map stored under `ReadWriteParameterNames.KEY_LABEL_EDITING_REPORTER`. If no object for this key is present in this instance, a new one is created, added to this instance and returned. The same is done, if an object which is not an instance of `LabelEditingReporter` is found for this key.
      Returns:
        the map instance

    - #### getTranslateTokens

          public TokenTranslationStrategy getTranslateTokens()

    - #### getLabelHandling

          public TokenDefinitionLabelHandling getLabelHandling()

    - #### getPhyloXMLMetadataTreatment

          public PhyloXMLMetadataTreatment getPhyloXMLMetadataTreatment()

    - #### getPhyloXMLEventIDTranslationMap

          public java.util.Map<java.lang.String,java.lang.String> getPhyloXMLEventIDTranslationMap()

    - #### getObjectTranslatorFactory

          public ObjectTranslatorFactory getObjectTranslatorFactory()

      Returns the object translator factory stored under `ReadWriteParameterNames.KEY_OBJECT_TRANSLATOR_FACTORY`. If no object for this key is present in this instance, a new one is created, added to this instance and returned. The same is done, if an object which is not an instance of `LabelEditingReporter` is found for this key. The created default instance will contain all default translators provided with JPhyloIO.
      Returns:
        the factory instance