EventTrackImpl (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.model.impl

## Class EventTrackImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.TrackImpl
    - - tv.amwa.maj.model.impl.EventTrackImpl

- All Implemented Interfaces:
    Serializable, Cloneable, MediaEntity, MetadataObject, XMLSerializable, EventTrack, InterchangeObject, Track

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=14592,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="EventTrack",
                  aliases="EventMobSlot",
                  description="The EventTrack class has a Sequence of Events.",
                  symbol="EventTrack")
      public class EventTrackImpl
      extends TrackImpl
      implements EventTrack, Serializable, Cloneable

  Implements a container for a sequence of events.

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EventTrackImpl()` Default constructor is not public to avoid unset required fields.
    `EventTrackImpl(int trackId, Segment segment, Rational editRate)` Creates and initializes a new event track, which holds a sequence of events.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `EventTrack` | `clone()` Create a cloned copy of this interchange object.
    `Rational` | `getEventTrackEditRate()` Returns the edit rate for this track, which specifies the units in which the events specify their starting time and duration
    `String` | `getEventTrackEditRateString()`
    `long` | `getEventTrackOrigin()` Gets the event track origin of this event track, which specifies the point, in edit units, in a track from which relative times are measured.
    `static Rational` | `initializeEventTrackEditRate()`
    `Segment` | `initializeTrackSegment()`
    `void` | `setEventTrackEditRate(Rational eventTrackEditRate)` Sets the edit rate for this track, which specifies the units in which the events specify their starting time and duration
    `void` | `setEventTrackEditRateString(String eventTrackEditRate)`
    `void` | `setEventTrackOrigin(Long eventTrackOrigin)` Sets the event track origin of this event track, which specifies the point, in edit units, in a track from which relative times are measured.
    `void` | `setTrackSegment(Segment segment)` This method applies the constraints required for a segment that forms part of an event track.

    - ### Methods inherited from class tv.amwa.maj.model.impl.TrackImpl

      `getComment, getDataDefinition, getEssenceTrackNumber, getTrackID, getTrackName, getTrackSegment, initializeTrackID, setEssenceTrackNumber, setTrackID, setTrackName`

    - ### Methods inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `addApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toString`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface tv.amwa.maj.model.Track

      `getDataDefinition, getEssenceTrackNumber, getTrackID, getTrackName, getTrackSegment, setEssenceTrackNumber, setTrackID, setTrackName`

    - ### Methods inherited from interface tv.amwa.maj.model.InterchangeObject

      `addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toString`

    - ### Methods inherited from interface tv.amwa.maj.industry.MediaEntity

      `getPersistentID, setPersistentIndex`

    - ### Methods inherited from interface tv.amwa.maj.io.xml.XMLSerializable

      `appendXMLChildren`

- - ### Constructor Detail

    - #### EventTrackImpl

          public EventTrackImpl()

      Default constructor is not public to avoid unset required fields.

    - #### EventTrackImpl

          public EventTrackImpl(@UInt32
                                int trackId,
                                Segment segment,
                                Rational editRate)
                         throws NullPointerException,
                                IllegalArgumentException

      Creates and initializes a new event track, which holds a sequence of events.

      Parameters:
        `trackId` - Integer that is used to reference the new track.
        `segment` - Value of the new track.
        `editRate` - Units in which the events specify their starting time and duration.
      Throws:
        `NullPointerException` - The segment or edit rate values are `null`.
        `IllegalArgumentException` - Cannot set the track id for an event track to a negative value.

  - ### Method Detail

    - #### getEventTrackEditRate

          @MediaProperty(uuid1=87032834,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="EventTrackEditRate",
                         aliases={"EditRate","EventMobSlotEditRate","EditTrackEditRate"},
                         typeName="Rational",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=18689,
                         symbol="EventTrackEditRate")
          public Rational getEventTrackEditRate()

      Description copied from interface: `EventTrack`

      Returns the edit rate for this track, which specifies the units in which the events specify their starting time and duration

      Specified by:
        `getEventTrackEditRate` in interface `EventTrack`
      Returns:
        Edit rate for this track.

    - #### setEventTrackEditRate

          @MediaPropertySetter(value="EventTrackEditRate")
          public void setEventTrackEditRate(Rational eventTrackEditRate)
                                                                                      throws NullPointerException

      Description copied from interface: `EventTrack`

      Sets the edit rate for this track, which specifies the units in which the events specify their starting time and duration

      Specified by:
        `setEventTrackEditRate` in interface `EventTrack`
      Parameters:
        `eventTrackEditRate` - Edit rate for this track.
      Throws:
        `NullPointerException` - The given edit rate is `null`

    - #### initializeEventTrackEditRate

          public static final Rational initializeEventTrackEditRate()

    - #### getEventTrackOrigin

          @MediaProperty(uuid1=117571843,
                         uuid2=267,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,5},
                         definedName="EventTrackOrigin",
                         aliases="EventSlotOrigin",
                         typeName="PositionType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=18690,
                         symbol="EventTrackOrigin")
          public long getEventTrackOrigin()
                                                                                                                                                                                                                                                                                                                                                                                                                                          throws PropertyNotPresentException

      Description copied from interface: `EventTrack`

      Gets the event track origin of this event track, which specifies the point, in edit units, in a track from which relative times are measured. This is an optional property.

      Specified by:
        `getEventTrackOrigin` in interface `EventTrack`
      Returns:
        Event track origin of this event track.
      Throws:
        `PropertyNotPresentException` - The optional event track origin property is not present in this event track.

    - #### setEventTrackOrigin

          @MediaPropertySetter(value="EventTrackOrigin")
          public void setEventTrackOrigin(Long eventTrackOrigin)

      Description copied from interface: `EventTrack`

      Sets the event track origin of this event track, which specifies the point, in edit units, in a track from which relative times are measured. Set this optional property to `null` to omit it.

      Specified by:
        `setEventTrackOrigin` in interface `EventTrack`
      Parameters:
        `eventTrackOrigin` - Event track origin of this event track.

    - #### setTrackSegment

          public void setTrackSegment(Segment segment)
                               throws NullPointerException,
                                      IllegalArgumentException

      This method applies the constraints required for a segment that forms part of an event track. These are:

      - The segment of an event track must either be an `event` or a `sequence`.
      - If the segment is a sequence, the following additional constraints apply:
        1. All elements of the sequence must be events and events of the same kind.
        2. All elements of the sequence must have the same `data kind`.
        3. The data kind for each element must be the same as the data kind for the sequence.
        4. The `positions` for each event must be increasing with the order of the sequence.
      Specified by:
        `setTrackSegment` in interface `Track`
      Overrides:
        `setTrackSegment` in class `TrackImpl`
      Parameters:
        `segment` - Segment representing the value for this track.
      Throws:
        `NullPointerException` - The given segment is `null`.
        `IllegalArgumentException`
      See Also:
        `TrackImpl.setTrackSegment(tv.amwa.maj.model.Segment)`

    - #### initializeTrackSegment

          public Segment initializeTrackSegment()

      Overrides:
        `initializeTrackSegment` in class `TrackImpl`

    - #### clone

          public EventTrack clone()

      Description copied from interface: `InterchangeObject`

      Create a cloned copy of this interchange object.

      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `EventTrack`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `Track`
      Overrides:
        `clone` in class `TrackImpl`
      Returns:
        Cloned copy of this interchange object.

    - #### getEventTrackEditRateString

          public String getEventTrackEditRateString()

    - #### setEventTrackEditRateString

          public void setEventTrackEditRateString(String eventTrackEditRate)

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.