public class CharSetEventReader extends AbstractDataModelEventReader<CharSetDataModel>
CharacterSetEvent
s from JPhyloIO into instances of CharSetDataModel
.
CharacterSetEvent
s between alignment start and end events are stored as associated
with the according alignment model. Events fired outside alignments are stored in an additional
global model not associated with any alignment model. This global model is returned when the end
of the event stream was reached (if any according events occurred).
For parsing Nexus files that would mean that all character sets defined in SETS
blocks
are stored in the global model. Additionally the supported MrBayes MIXED
data type
extension may lead to character set events within alignments. These are than stored in separate
models, because different sets may be defined for each alignment block in the file. If this
MrBayes extension is not used all character sets (also from separate SETS
blocks
will be stored in one global model, which will be the only returned instance.
Constructor and Description |
---|
CharSetEventReader(AlignmentDataReader mainReader) |
Modifier and Type | Method and Description |
---|---|
boolean |
isReadingInstance()
Determines whether this object contains an unpublished data model that is currently read.
|
void |
processEvent(info.bioinfweb.jphyloio.JPhyloIOEventReader source,
info.bioinfweb.jphyloio.events.JPhyloIOEvent event) |
createNewInfo, createNewInfo, getCurrentInfo, getFactory, getMainReader, getModels, publishCurrentInfo
public CharSetEventReader(AlignmentDataReader mainReader)
public void processEvent(info.bioinfweb.jphyloio.JPhyloIOEventReader source, info.bioinfweb.jphyloio.events.JPhyloIOEvent event)
public boolean isReadingInstance()
AbstractDataModelEventReader
AbstractDataModelEventReader.getModels()
as soon as it is completely read.isReadingInstance
in class AbstractDataModelEventReader<CharSetDataModel>
true
if an unpublished object is present, false
otherwise.