public class CharSetDataAdapter extends java.lang.Object implements info.bioinfweb.jphyloio.dataadapters.ObjectListDataAdapter<info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent>
CharSetDataModel
.
The color of a character set can be written as metadata.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COLOR_METADATA_ID_SUFFIX |
static java.lang.String |
COLOR_METADATA_LABEL |
Constructor and Description |
---|
CharSetDataAdapter(java.lang.String idPrefix,
CharSetDataModel model,
java.lang.String linkedMatrixID)
Creates a new instance of this class that will not write character set colors.
|
CharSetDataAdapter(java.lang.String idPrefix,
CharSetDataModel model,
java.lang.String linkedMatrixID,
info.bioinfweb.jphyloio.events.meta.URIOrStringIdentifier colorPredicate,
info.bioinfweb.jphyloio.events.meta.URIOrStringIdentifier colorDataType)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
long |
getCount(info.bioinfweb.jphyloio.ReadWriteParameterMap parameters) |
java.util.Iterator<java.lang.String> |
getIDIterator(info.bioinfweb.jphyloio.ReadWriteParameterMap parameters) |
info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent |
getObjectStartEvent(info.bioinfweb.jphyloio.ReadWriteParameterMap parameters,
java.lang.String id) |
void |
writeContentData(info.bioinfweb.jphyloio.ReadWriteParameterMap parameters,
info.bioinfweb.jphyloio.dataadapters.JPhyloIOEventReceiver receiver,
java.lang.String id) |
public static final java.lang.String COLOR_METADATA_ID_SUFFIX
public static final java.lang.String COLOR_METADATA_LABEL
public CharSetDataAdapter(java.lang.String idPrefix, CharSetDataModel model, java.lang.String linkedMatrixID, info.bioinfweb.jphyloio.events.meta.URIOrStringIdentifier colorPredicate, info.bioinfweb.jphyloio.events.meta.URIOrStringIdentifier colorDataType)
idPrefix
- the JPhyloIO ID prefix to be used for the character set events to be written
(Maybe "".)model
- the model providing the data to be writtenlinkedMatrixID
- the ID used by the start event of the associated matrix datacolorPredicate
- the predicate to be used to write the color metadata event (Maybe null
.)colorDataType
- the data type to be used to write the color metadata event (Maybe null
only if colorPredicate
is null as well.)java.lang.IllegalArgumentException
- if idPrefix
, model
or linkedMatrixID
are
null
or if colorDataType
is null
while colorPredicate
is notpublic CharSetDataAdapter(java.lang.String idPrefix, CharSetDataModel model, java.lang.String linkedMatrixID)
idPrefix
- the JPhyloIO ID prefix to be used for the character set events to be written
(Maybe "".)model
- the model providing the data to be writtenlinkedMatrixID
- the ID used by the start event of the associated matrix datajava.lang.IllegalArgumentException
- if idPrefix
, model
or linkedMatrixID
are
null
public info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent getObjectStartEvent(info.bioinfweb.jphyloio.ReadWriteParameterMap parameters, java.lang.String id) throws java.lang.IllegalArgumentException
getObjectStartEvent
in interface info.bioinfweb.jphyloio.dataadapters.ObjectListDataAdapter<info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent>
java.lang.IllegalArgumentException
public long getCount(info.bioinfweb.jphyloio.ReadWriteParameterMap parameters)
getCount
in interface info.bioinfweb.jphyloio.dataadapters.ObjectListDataAdapter<info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent>
public java.util.Iterator<java.lang.String> getIDIterator(info.bioinfweb.jphyloio.ReadWriteParameterMap parameters)
getIDIterator
in interface info.bioinfweb.jphyloio.dataadapters.ObjectListDataAdapter<info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent>
public void writeContentData(info.bioinfweb.jphyloio.ReadWriteParameterMap parameters, info.bioinfweb.jphyloio.dataadapters.JPhyloIOEventReceiver receiver, java.lang.String id) throws java.io.IOException, java.lang.IllegalArgumentException
writeContentData
in interface info.bioinfweb.jphyloio.dataadapters.ObjectListDataAdapter<info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent>
java.io.IOException
java.lang.IllegalArgumentException