public class TokenSetDefinitionEvent extends LabeledIDEvent
This event may or may not occur in combination with one or more SingleTokenDefinitionEvent
, which
define single tokens (e.g. nucleotides or the gap character) used in this set. If no or only a few of the tokens
implied by the return value of getSetType()
are defined by nested events, the remaining one are still
assumed to be part of the tokens set.
JPhyloIO enumerates some standard token sets in TokenSetType
. Some formats might define additional
sets which would be represented as TokenSetType#UNKNOWN
. Application developers would have to rely on
LabeledEvent.getLabel()
in such cases, to determine the meaning.
Constructor and Description |
---|
TokenSetDefinitionEvent(CharacterStateSetType type,
java.lang.String id,
java.lang.String label)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
CharacterStateSetType |
getSetType()
Returns the meaning of the the new character state set.
|
checkID, getID
getLabel, hasLabel
asCharacterDefinitionEvent, asCharacterSetIntervalEvent, asCommentEvent, asEdgeEvent, asLabeledIDEvent, asLinkedLabeledIDEvent, asLiteralMetadataContentEvent, asLiteralMetadataEvent, asNodeEvent, asPartEndEvent, asResourceMetadataEvent, asSequenceTokensEvent, asSetElementEvent, asSingleSequenceTokenEvent, asSingleTokenDefinitionEvent, asTokenSetDefinitionEvent, asUnknownCommandEvent, createEndEvent, getType
public TokenSetDefinitionEvent(CharacterStateSetType type, java.lang.String id, java.lang.String label)
type
- the meaning of the token set as defined by TokenSetType
id
- the document-wide unique ID associated with the represented token set (Must be a valid
NCName.)label
- a name describing this token setjava.lang.NullPointerException
- if null
is specified for type
public CharacterStateSetType getSetType()
TokenSetType