public class MEGAEventReader extends AbstractTextEventReader<TextReaderStreamDataProvider<MEGAEventReader>> implements MEGAConstants, ReadWriteConstants
In addition to alignment data (including match token replacement) this reader also supports the , and commands and models their data as character sets.
lineConsumed
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
ATTRIBUTE_STRING_KEY, ATTRIBUTES_NAMESPACE_FOLDER, DATA_TYPE_NAMESPACE_FOLDER, DATA_TYPE_SIMPLE_VALUE_LIST, DEFAULT_CHAR_SET_ID_PREFIX, DEFAULT_CHARACTER_DEFINITION_ID_PREFIX, DEFAULT_EDGE_ID_PREFIX, DEFAULT_GENERAL_ID_PREFIX, DEFAULT_MATRIX_ID_PREFIX, DEFAULT_MAX_COMMENT_LENGTH, DEFAULT_MAX_TOKENS_TO_READ, DEFAULT_META_ID_PREFIX, DEFAULT_NETWORK_ID_PREFIX, DEFAULT_NODE_EDGE_SET_ID_PREFIX, DEFAULT_NODE_ID_PREFIX, DEFAULT_OTU_ID_PREFIX, DEFAULT_OTU_LIST_ID_PREFIX, DEFAULT_OTU_SET_ID_PREFIX, DEFAULT_SEQUENCE_ID_PREFIX, DEFAULT_SEQUENCE_SET_ID_PREFIX, DEFAULT_TOKEN_DEFINITION_ID_PREFIX, DEFAULT_TOKEN_SET_ID_PREFIX, DEFAULT_TREE_ID_PREFIX, DEFAULT_TREE_NETWORK_GROUP_ID_PREFIX, DEFAULT_TREE_NETWORK_SET_ID_PREFIX, JPHYLOIO_ATTRIBUTES_NAMESPACE, JPHYLOIO_ATTRIBUTES_PREFIX, JPHYLOIO_DATA_TYPE_NAMESPACE, JPHYLOIO_DATA_TYPE_PREFIX, JPHYLOIO_FORMATS_NAMESPACE_PREFIX, JPHYLOIO_GENERAL_NAMESPACE, JPHYLOIO_NAMESPACE_PREFIX, JPHYLOIO_PREDICATE_NAMESPACE, JPHYLOIO_PREDICATE_PREFIX, PREDICATE_CHARACTER_COUNT, PREDICATE_EDGE_LENGTH, PREDICATE_EDGE_SOURCE_NODE, PREDICATE_EDGE_TARGET_NODE, PREDICATE_HAS_CUSTOM_XML, PREDICATE_HAS_LITERAL_METADATA, PREDICATE_HAS_RESOURCE_METADATA, PREDICATE_IS_CROSSLINK, PREDICATE_NAMESPACE_FOLDER, PREDICATE_PART_SEPERATOR, PREDICATE_SEQUENCE_COUNT, RESERVED_ID_PREFIX
Constructor and Description |
---|
MEGAEventReader(java.io.BufferedReader reader,
ReadWriteParameterMap parameters)
Creates a new instance of this class.
|
MEGAEventReader(java.io.File file,
ReadWriteParameterMap parameters)
Creates a new instance of this class.
|
MEGAEventReader(java.io.InputStream stream,
ReadWriteParameterMap parameters)
Creates a new instance of this class.
|
MEGAEventReader(java.io.Reader reader,
ReadWriteParameterMap parameters)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFormatID()
Returns a string ID uniquely identifying the target format of this instance.
|
protected void |
readNextEvent()
Method to be implemented be inherited classes that adds at least one additional event (determined from
the underlying data source) to the event queue.
|
close, consumeWhiteSpaceAndComments, createStreamDataProvider, createTokenList, getReader, readCharacters, readCharacters, readComment, readKeyValueInformation, readToken
addEventListener, fireEvent, getCurrentEventCollection, getIDManager, getLastNonCommentEvent, getParameters, getParentInformation, getPreviousEvent, getSequenceTokensEventManager, getStreamDataProvider, getUpcomingEvents, hasNextEvent, hasSpecialEventCollection, isBeforeFirstAccess, next, nextOfType, peek, removeEventListener, resetCurrentEventCollection, setCurrentEventCollection
public MEGAEventReader(java.io.BufferedReader reader, ReadWriteParameterMap parameters) throws java.io.IOException
reader
- the reader providing the MEGA data to be readparameters
- the parameter map for this reader instancejava.io.IOException
- if an I/O exception occurs while parsing the first eventpublic MEGAEventReader(java.io.File file, ReadWriteParameterMap parameters) throws java.io.IOException
file
- the MEGA file to be readparameters
- the parameter map for this reader instancejava.io.IOException
- if an I/O exception occurs while parsing the first eventpublic MEGAEventReader(java.io.InputStream stream, ReadWriteParameterMap parameters) throws java.io.IOException
stream
- the stream providing the MEGA data to be readparameters
- the parameter map for this reader instancejava.io.IOException
- if an I/O exception occurs while parsing the first eventpublic MEGAEventReader(java.io.Reader reader, ReadWriteParameterMap parameters) throws java.io.IOException
reader
- the reader providing the MEGA data to be readparameters
- the parameter map for this reader instancejava.io.IOException
- if an I/O exception occurs while parsing the first eventpublic java.lang.String getFormatID()
JPhyloIOFormatSpecificObject
JPhyloIOReaderWriterFactory.getFormatInfo(String)
.
Third party developers that create readers or writers for additional formats must make sure to use a globally unique
format ID. It is strongly recommended to use owned reverse domain names for this (e.g.
org.example.additionalformat
).
getFormatID
in interface JPhyloIOFormatSpecificObject
JPhyloIOReaderWriterFactory.getFormatInfo(String)
protected void readNextEvent() throws java.io.IOException
AbstractEventReader
readNextEvent
in class AbstractEventReader<TextReaderStreamDataProvider<MEGAEventReader>>
java.io.IOException