public abstract class AbstractPhylipFactory extends AbstractSingleReaderWriterFactory implements SingleReaderWriterFactory, PhylipConstants, JPhyloIOFormatIDs
| Modifier and Type | Field and Description |
|---|---|
static int |
MAXIMUM_EXPECTED_DIGITS_OR_WHITESPACE
Defines the maximum number of digits in a column or line count definition of a Phylip file.
|
DEFAULT_NAME_LENGTH, PHYLIP_FORMAT_NAME, PREMATURE_NAME_END_CHARACTER, RELAXED_PHYLIP_NAME_PATTERN, SEQUENTIAL_PHYLIP_FORMAT_NAMEFASTA_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 and Description |
|---|
AbstractPhylipFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkFormat(java.io.Reader reader,
ReadWriteParameterMap parameters)
Implementations should read the start of the characters returned by the reader here and determine whether
the content could be valid according to the target format.
|
protected JPhyloIOFormatInfo |
createFormatInfo(java.lang.String formatID,
java.lang.String formatName,
java.util.Set<java.lang.String> supportedReaderParameters,
java.util.Set<java.lang.String> supportedWriterParameters,
java.lang.String adapterDescription) |
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.
|
checkFormat, createFormatInfo, getFormatInfoclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckFormat, getFormatInfo, getReader, getReaderpublic static final int MAXIMUM_EXPECTED_DIGITS_OR_WHITESPACE
checkFormat().public AbstractPhylipFactory()
public boolean checkFormat(java.io.Reader reader, ReadWriteParameterMap parameters) throws java.io.IOException
SingleReaderWriterFactorycheckFormat in interface SingleReaderWriterFactoryreader - the reader to read the first bytes fromparameters - the parameters map that would also be used to create a readertrue if the tested reader may return content in target format or false if the content is not
in valid target formatjava.io.IOExceptionpublic JPhyloIOEventWriter getWriter()
SingleReaderWriterFactorygetWriter in interface SingleReaderWriterFactorynull if this factory is not able to create writersSingleReaderWriterFactory.hasWriter()public boolean hasReader()
SingleReaderWriterFactoryhasReader in interface SingleReaderWriterFactorytrue if creating readers is supported or false otherwisepublic boolean hasWriter()
SingleReaderWriterFactoryhasWriter in interface SingleReaderWriterFactorytrue if creating writers is supported or false otherwiseprotected JPhyloIOFormatInfo createFormatInfo(java.lang.String formatID, java.lang.String formatName, java.util.Set<java.lang.String> supportedReaderParameters, java.util.Set<java.lang.String> supportedWriterParameters, java.lang.String adapterDescription)