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

tv.amwa.maj.model.impl

## Class TimelineTrackImpl

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

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

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=15104,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="TimelineTrack",
                  aliases="TimelineMobSlot",
                  description="The TimelineTrack class describes time-varying timeline essence.",
                  symbol="TimelineTrack")
      public class TimelineTrackImpl
      extends TrackImpl
      implements TimelineTrack, Serializable, Cloneable

  Implements the representation of a track that describes time-varying timeline essence.

  See Also:
    Serialized Form

- - ### Field Summary

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

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimelineTrackImpl()` Default constructor is not public to avoid unset required fields.
    `TimelineTrackImpl(int trackId, Segment segment, Rational editRate, long origin)` Creates and initializes a new timeline track, which describes time-varying timeline essence.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TimelineTrack` | `clone()` Create a cloned copy of this interchange object.
    `Rational` | `getEditRate()` Returns the edit rate for this timeline track, which specifies the units of time of the track.
    `String` | `getEditRateString()`
    `long` | `getMarkIn()` Returns the mark in property of the timeline track.
    `long` | `getMarkOut()` Returns the mark out property of this timeline track, which specifies the position of the marked out point as a count of edit units from the zero position of this timeline track.
    `long` | `getOrigin()` Returns the origin of this timeline track, which specifies the offset used to resolve source clip references in this timeline track.
    `long` | `getUserPosition()` Returns the user position property of the timeline track, which specifies a user position as a count of edit units from the zero position of the timeline track.
    `static Rational` | `initializeEditRate()`
    `static long` | `initializeOrigin()`
    `void` | `setEditRate(Rational editRate)` Sets the edit rate for this timeline track, which specifies the units of time of the track.
    `void` | `setEditRateString(String editRate)`
    `void` | `setMarkIn(Long value)` Sets the mark in property for this timeline track, which specifies the position of the marked in point as a count of edit units from the zero position of this timeline track.
    `void` | `setMarkOut(Long value)` Sets the mark out property of this timeline track, which specifies the position of the marked out point as a count of edit units from the zero position of this timeline track.
    `void` | `setOrigin(long origin)` Sets the origin of this timeline track, which specifies the offset used to resolve source clip references in this timeline track.
    `void` | `setTrackSegment(Segment segment)` Sets the segment for this timeline track if the given segment satisfies all the required constraints.
    `void` | `setUserPosition(Long userPosition)` Sets the user position property of the timeline track, which specifies a user position as a count of edit units from the zero position of the timeline track.
    `void` | `sourcePackageContext()` Sets this timeline track to be in the context of a source package.

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

      `getComment, getDataDefinition, getEssenceTrackNumber, getTrackID, getTrackName, getTrackSegment, initializeTrackID, initializeTrackSegment, 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

    - #### TimelineTrackImpl

          public TimelineTrackImpl()

      Default constructor is not public to avoid unset required fields.

    - #### TimelineTrackImpl

          public TimelineTrackImpl(@UInt32
                                   int trackId,
                                   Segment segment,
                                   Rational editRate,
                                   @PositionType
                                   long origin)
                            throws NullPointerException,
                                   IllegalArgumentException

      Creates and initializes a new timeline track, which describes time-varying timeline essence.

      Parameters:
        `trackId` - Integer that is used to reference the `track`.
        `segment` - Value of the new timeline track.
        `editRate` - Units of time for the new timeline track.
        `origin` - Offset used to resolve `source clip` references to the new timeline track. A positive value of origin means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.
      Throws:
        `NullPointerException` - The segment and/or edit rate arguments is/are `null`.
        `IllegalArgumentException` - Track id is negative or the given segment is not valid for a timeline track.

  - ### Method Detail

    - #### getEditRate

          @MediaProperty(uuid1=87032837,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="EditRate",
                         aliases="TimelineMobSlotEditRate",
                         typeName="Rational",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=19201,
                         symbol="EditRate")
          public Rational getEditRate()

      Description copied from interface: `TimelineTrack`

      Returns the edit rate for this timeline track, which specifies the units of time of the track.

      Specified by:
        `getEditRate` in interface `TimelineTrack`
      Returns:
        Edit rate for this timeline track.

    - #### setEditRate

          @MediaPropertySetter(value="EditRate")
          public void setEditRate(Rational editRate)
                                                                  throws NullPointerException

      Description copied from interface: `TimelineTrack`

      Sets the edit rate for this timeline track, which specifies the units of time of the track.

      Specified by:
        `setEditRate` in interface `TimelineTrack`
      Parameters:
        `editRate` - Edit rate for this timeline track.
      Throws:
        `NullPointerException` - The given edit rate is `null`.

    - #### initializeEditRate

          public static final Rational initializeEditRate()

    - #### getMarkIn

          @MediaProperty(uuid1=117571843,
                         uuid2=268,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,7},
                         definedName="MarkIn",
                         typeName="PositionType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=19203,
                         symbol="MarkIn")
          public long getMarkIn()
                                                                                                                                                                                                                                                                                                                                                                  throws PropertyNotPresentException

      Description copied from interface: `TimelineTrack`

      Returns the mark in property of the timeline track. This property specifies the position of the marked in point as a count of edit units from the zero position of the timeline track. This is an optional property.

      Note that this property shall not be present for a source package.

      Specified by:
        `getMarkIn` in interface `TimelineTrack`
      Returns:
        Mark in property for the timeline track.
      Throws:
        `PropertyNotPresentException` - The optional mark in property is not present in this timeline track.

    - #### setMarkIn

          @MediaPropertySetter(value="MarkIn")
          public void setMarkIn(Long value)

      Description copied from interface: `TimelineTrack`

      Sets the mark in property for this timeline track, which specifies the position of the marked in point as a count of edit units from the zero position of this timeline track. Set this optional property to `null` to omit it.

      Note that this property shall not be present for a source package.

      Specified by:
        `setMarkIn` in interface `TimelineTrack`
      Parameters:
        `value` - Mark in property for this timeline track.

    - #### getMarkOut

          @MediaProperty(uuid1=117571843,
                         uuid2=515,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,7},
                         definedName="MarkOut",
                         typeName="PositionType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=19204,
                         symbol="MarkOut")
          public long getMarkOut()
                                                                                                                                                                                                                                                                                                                                                                     throws PropertyNotPresentException

      Description copied from interface: `TimelineTrack`

      Returns the mark out property of this timeline track, which specifies the position of the marked out point as a count of edit units from the zero position of this timeline track. This is an optional property.

      Note that this property shall not be present for a source package.

      Specified by:
        `getMarkOut` in interface `TimelineTrack`
      Returns:
        Mark out property of this timeline track.
      Throws:
        `PropertyNotPresentException` - The optional mark out property is not present in this timeline track.

    - #### setMarkOut

          @MediaPropertySetter(value="MarkOut")
          public void setMarkOut(Long value)

      Description copied from interface: `TimelineTrack`

      Sets the mark out property of this timeline track, which specifies the position of the marked out point as a count of edit units from the zero position of this timeline track. Set this optional property to `null` to omit it.

      Note that this property shall not be present for a source package.

      Specified by:
        `setMarkOut` in interface `TimelineTrack`
      Parameters:
        `value` - Mark out property of this timeline track.

    - #### getOrigin

          @MediaProperty(uuid1=117571843,
                         uuid2=259,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="Origin",
                         aliases="SlotOrigin",
                         typeName="PositionType",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=19202,
                         symbol="Origin")
          public long getOrigin()

      Description copied from interface: `TimelineTrack`

      Returns the origin of this timeline track, which specifies the offset used to resolve source clip references in this timeline track. A positive value of origin means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.

      Specified by:
        `getOrigin` in interface `TimelineTrack`
      Returns:
        Origin of this timeline track.

    - #### setOrigin

          @MediaPropertySetter(value="Origin")
          public void setOrigin(long origin)

      Description copied from interface: `TimelineTrack`

      Sets the origin of this timeline track, which specifies the offset used to resolve source clip references in this timeline track. A positive value of origin means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.

      Specified by:
        `setOrigin` in interface `TimelineTrack`
      Parameters:
        `origin` - Origin of this timeline track.

    - #### initializeOrigin

          public static final long initializeOrigin()

    - #### getUserPosition

          @MediaProperty(uuid1=117571843,
                         uuid2=269,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,7},
                         definedName="UserPosition",
                         aliases="UserPos",
                         typeName="PositionType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=19205,
                         symbol="UserPosition")
          public long getUserPosition()
                                                                                                                                                                                                                                                                                                                                                                                                                      throws PropertyNotPresentException

      Description copied from interface: `TimelineTrack`

      Returns the user position property of the timeline track, which specifies a user position as a count of edit units from the zero position of the timeline track. This is an optional property.

      Note that this property shall not be present for a source package.

      Specified by:
        `getUserPosition` in interface `TimelineTrack`
      Returns:
        The user position property of this timeline track.
      Throws:
        `PropertyNotPresentException` - The optional user position property is not present in this timeline track.

    - #### setUserPosition

          @MediaPropertySetter(value="UserPosition")
          public void setUserPosition(Long userPosition)

      Description copied from interface: `TimelineTrack`

      Sets the user position property of the timeline track, which specifies a user position as a count of edit units from the zero position of the timeline track. Set this optional property to `null` to omit it.

      Note that this property shall not be present for a source package.

      Specified by:
        `setUserPosition` in interface `TimelineTrack`
      Parameters:
        `userPosition` - User position property of this timeline track.

    - #### setTrackSegment

          public void setTrackSegment(Segment segment)
                               throws NullPointerException,
                                      IllegalArgumentException

      Sets the segment for this timeline track if the given segment satisfies all the required constraints. These constraints only affect `timeline tracks` with a `sequence` that contains an `event`. In this case, the constraints are:

      - All segments in the given sequence must be either `events` or `fillers`.
      - All events in the sequence shall belong to the same concrete sub-class of event.
      - All events and fillers in the sequence shall have the same `data definition` as the sequence.
      Specified by:
        `setTrackSegment` in interface `Track`
      Overrides:
        `setTrackSegment` in class `TrackImpl`
      Parameters:
        `segment` - Segment representing the value for this track.
      Throws:
        `NullPointerException` - Argument is null.
        `IllegalArgumentException` - The given segment does not satisfy the contraints of a timeline track.
      See Also:
        `TrackImpl.setTrackSegment(tv.amwa.maj.model.Segment)`

    - #### sourcePackageContext

          public void sourcePackageContext()

      Sets this timeline track to be in the context of a source package. In this context, the mark in, mark out and user position properties are all not present.

    - #### clone

          public TimelineTrack 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 `InterchangeObject`
      Specified by:
        `clone` in interface `TimelineTrack`
      Specified by:
        `clone` in interface `Track`
      Overrides:
        `clone` in class `TrackImpl`
      Returns:
        Cloned copy of this interchange object.

    - #### getEditRateString

          public String getEditRateString()

    - #### setEditRateString

          public void setEditRateString(String editRate)

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