info.bioinfweb.jphyloio.events

## Class LabeledIDEvent

- java.lang.Object
- - info.bioinfweb.jphyloio.events.ConcreteJPhyloIOEvent
  - - info.bioinfweb.jphyloio.events.LabeledEvent
    - - info.bioinfweb.jphyloio.events.LabeledIDEvent

- All Implemented Interfaces:
    JPhyloIOEvent
  Direct Known Subclasses:
    CharacterDefinitionEvent, EdgeEvent, LinkedLabeledIDEvent, LiteralMetadataEvent, ResourceMetadataEvent, SingleTokenDefinitionEvent, TokenSetDefinitionEvent

      public class LabeledIDEvent
      extends LabeledEvent

  Event that indicate data objects that carry an unique ID and a label.
  Author:
    Ben Stöver

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LabeledIDEvent(EventContentType contentType, java.lang.String id, java.lang.String label)` Creates a new instance of this class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkID(java.lang.String id, java.lang.String idName)`
    `java.lang.String` | `getID()` Returns the document-wide unique ID of the data element represented by this event.

    - ### Methods inherited from class info.bioinfweb.jphyloio.events.LabeledEvent

      `getLabel, hasLabel`

    - ### Methods inherited from class info.bioinfweb.jphyloio.events.ConcreteJPhyloIOEvent

      `asCharacterDefinitionEvent, asCharacterSetIntervalEvent, asCommentEvent, asEdgeEvent, asLabeledIDEvent, asLinkedLabeledIDEvent, asLiteralMetadataContentEvent, asLiteralMetadataEvent, asNodeEvent, asPartEndEvent, asResourceMetadataEvent, asSequenceTokensEvent, asSetElementEvent, asSingleSequenceTokenEvent, asSingleTokenDefinitionEvent, asTokenSetDefinitionEvent, asUnknownCommandEvent, createEndEvent, getType`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LabeledIDEvent

          public LabeledIDEvent(EventContentType contentType,
                                java.lang.String id,
                                java.lang.String label)

      Creates a new instance of this class. Instances are always start events.
      Parameters:
        `contentType` - the content type of the event
        `id` - the unique ID associated with the represented data element (Must be a valid NCName.)
        `label` - a label associated with the represented data element (Maybe `null`.)
      Throws:
        `java.lang.NullPointerException` - if `contentType`, `topologyType` or `id` are `null`
        `java.lang.IllegalArgumentException` - if the specified ID is not a valid NCName

  - ### Method Detail

    - #### checkID

          protected void checkID(java.lang.String id,
                                 java.lang.String idName)

    - #### getID

          public java.lang.String getID()

      Returns the document-wide unique ID of the data element represented by this event.
      Returns:
        a string ID without whitespace and never `null`