public class SingleTokenDefinitionEvent extends LabeledIDEvent
Not all formats support or require a token definition, therefore sequences might contain tokens that
were not previously defined by SingleTokenDefinitionEvent.
| Constructor and Description |
|---|
SingleTokenDefinitionEvent(java.lang.String id,
java.lang.String label,
java.lang.String tokenName,
CharacterSymbolMeaning meaning,
CharacterSymbolType tokenType)
Creates a new instance of this class without a constituents collection.
|
SingleTokenDefinitionEvent(java.lang.String id,
java.lang.String label,
java.lang.String tokenName,
CharacterSymbolMeaning meaning,
CharacterSymbolType tokenType,
java.util.Collection<java.lang.String> constituents)
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<java.lang.String> |
getConstituents()
Returns a collection of tokens that are constituents of this token (e.g.
|
CharacterSymbolMeaning |
getMeaning()
Returns the meaning of the new token.
|
java.lang.String |
getTokenName()
Returns the string representation of the new token.
|
CharacterSymbolType |
getTokenType()
Returns the type of the new token (e.g.
|
boolean |
hasConstituents()
Returns true if a collection of constituents is specified for this token or false if it is not.
|
checkID, getIDgetLabel, hasLabelasCharacterDefinitionEvent, asCharacterSetIntervalEvent, asCommentEvent, asEdgeEvent, asLabeledIDEvent, asLinkedLabeledIDEvent, asLiteralMetadataContentEvent, asLiteralMetadataEvent, asNodeEvent, asPartEndEvent, asResourceMetadataEvent, asSequenceTokensEvent, asSetElementEvent, asSingleSequenceTokenEvent, asSingleTokenDefinitionEvent, asTokenSetDefinitionEvent, asUnknownCommandEvent, createEndEvent, getTypepublic SingleTokenDefinitionEvent(java.lang.String id, java.lang.String label, java.lang.String tokenName, CharacterSymbolMeaning meaning, CharacterSymbolType tokenType, java.util.Collection<java.lang.String> constituents)
id - the unique ID associated with the represented single token definition (Must be a valid
NCName.)label - an optional label of the modeled single token definition (Maybe null, if no label is present. This is
not the token name.)tokenName - the string representation of the new tokenmeaning - the meaning of the new tokenconstituents - if this token is an ambiguity or uncertain token, a list of constituents can be specified here
(Maybe null.)java.lang.NullPointerException - if null is specified for any of the argumentspublic SingleTokenDefinitionEvent(java.lang.String id, java.lang.String label, java.lang.String tokenName, CharacterSymbolMeaning meaning, CharacterSymbolType tokenType)
tokenName - the string representation of the new tokenmeaning - the meaning of the new tokenjava.lang.NullPointerException - if null is specified for any of the argumentspublic java.lang.String getTokenName()
public CharacterSymbolMeaning getMeaning()
public CharacterSymbolType getTokenType()
public java.util.Collection<java.lang.String> getConstituents()
public boolean hasConstituents()