public class MEGAFactory extends AbstractStartStringSingleFactory implements SingleReaderWriterFactory, JPhyloIOFormatIDs, MEGAConstants
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
COMMAND_END, COMMAND_NAME_DESCRIPTION, COMMAND_NAME_DOMAIN, COMMAND_NAME_FORMAT, COMMAND_NAME_GENE, COMMAND_NAME_LABEL, COMMAND_NAME_TITLE, COMMAND_START, COMMENT_END, COMMENT_START, DEFAULT_LABEL_CHAR, FIRST_LINE, FORMAT_SUBCOMMAND_DATA_FORMAT, FORMAT_SUBCOMMAND_DATA_TYPE, FORMAT_SUBCOMMAND_IDENTICAL, FORMAT_SUBCOMMAND_INDEL, FORMAT_SUBCOMMAND_MISSING, FORMAT_SUBCOMMAND_NSITES, FORMAT_SUBCOMMAND_NTAXA, FORMAT_VALUE_DNA_DATA_TYPE, FORMAT_VALUE_INTERLEAVED_DATA_FORMAT, FORMAT_VALUE_NUCLEOTIDE_DATA_TYPE, FORMAT_VALUE_PROTEIN_DATA_TYPE, FORMAT_VALUE_RNA_DATA_TYPE, LABEL_CHAR_SET_ID, MEGA_FORMAT_NAME, MEGA_NAMESPACE_PREFIX, MEGA_PREDICATE_NAMESPACE, SEUQUENCE_START
Constructor and Description |
---|
MEGAFactory() |
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.
|
checkFormat, getExpectedStart
checkFormat, getFormatInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkFormat, checkFormat, getFormatInfo
public MEGAFactory()
public JPhyloIOEventReader getReader(java.io.InputStream stream, ReadWriteParameterMap parameters) throws java.io.IOException
SingleReaderWriterFactory
getReader
in interface SingleReaderWriterFactory
stream
- the stream to provide the content for the readerparameters
- the parameter map for the new reader instancejava.io.IOException
public JPhyloIOEventReader getReader(java.io.Reader reader, ReadWriteParameterMap parameters) throws java.io.IOException
SingleReaderWriterFactory
getReader
in interface SingleReaderWriterFactory
parameters
- the parameter map for the new reader instancenull
if this factory is not able to create readersjava.io.IOException
SingleReaderWriterFactory.hasReader()
public JPhyloIOEventWriter getWriter()
SingleReaderWriterFactory
getWriter
in interface SingleReaderWriterFactory
null
if this factory is not able to create writersSingleReaderWriterFactory.hasWriter()
public boolean hasReader()
SingleReaderWriterFactory
hasReader
in interface SingleReaderWriterFactory
true
if creating readers is supported or false
otherwisepublic boolean hasWriter()
SingleReaderWriterFactory
hasWriter
in interface SingleReaderWriterFactory
true
if creating writers is supported or false
otherwiseprotected JPhyloIOFormatInfo createFormatInfo()
createFormatInfo
in class AbstractSingleReaderWriterFactory