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

tv.amwa.maj.model

## Interface Track

- All Superinterfaces:
    InterchangeObject, MediaEntity, MetadataObject
  All Known Subinterfaces:
    EventTrack, StaticTrack, TimelineTrack
  All Known Implementing Classes:
    EventTrackImpl, StaticTrackImpl, TimelineTrackImpl, TrackImpl

      public interface Track
      extends InterchangeObject

  Specifies a single track in a package. A track describes the relationship between essence and time. In a material package, tracks describe the desired relationship between stored essence and the output timeline.

  See Also:
    `Package.appendPackageTrack(Track)`, `Package.getPackageTracks()`, `Package.lookupPackageTrack(int)`, `TypeDefinitions.TrackStrongReference`, `TypeDefinitions.TrackStrongReferenceVector`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Track` | `clone()` Create a cloned copy of this track.
    `DataDefinition` | `getDataDefinition()` Returns the data definition describing the type of essence represented by the value of this track.
    `int` | `getEssenceTrackNumber()` Returns the physical output channel associated with this track.
    `int` | `getTrackID()` Returns the track id of this track, which specifies an integer that is used to reference this track.
    `String` | `getTrackName()` Returns the name of this track.
    `Segment` | `getTrackSegment()` Returns the segment of this track, which is the value of the track.
    `void` | `setEssenceTrackNumber(Integer essenceTrackNumber)` Sets the physical output channel associated with this track.
    `void` | `setTrackID(int trackID)` This method will set the track id of this track, which specifies an integer that is used to reference this track.
    `void` | `setTrackName(String name)` Sets the name of this track.
    `void` | `setTrackSegment(Segment segment)` Sets the segment for this track, which is the value of the track.

    - ### 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`

- - ### Method Detail

    - #### setTrackName

          void setTrackName(@AAFString
                            String name)

      Sets the name of this track. Set this optional property to `null` to omit it.

      Parameters:
        `name` - Name of this track.

    - #### getTrackName

          @AAFString
          String getTrackName()
                                  throws PropertyNotPresentException

      Returns the name of this track. This is an optional property.

      Returns:
        Name of this track.
      Throws:
        `PropertyNotPresentException` - The optional name property is not present for this track.

    - #### setEssenceTrackNumber

          void setEssenceTrackNumber(@UInt32
                                     Integer essenceTrackNumber)
                              throws IllegalArgumentException

      Sets the physical output channel associated with this track. Set this optional property to `null` to omit it.

      The essence track number identifies the physical channel associated with the media. For file source packages that describe stereo audio media, the left channel should have a essence track number of 1 and the right channel should have a essence track number of 2.

      Parameters:
        `essenceTrackNumber` - The physical output channel associated with this track.
      Throws:
        `IllegalArgumentException` - The given physical track number is negative.

    - #### getEssenceTrackNumber

          @UInt32
          int getEssenceTrackNumber()
                                     throws PropertyNotPresentException

      Returns the physical output channel associated with this track. This is an optional property.

      The essence track number identifies the physical channel associated with the media. For file source packages that describe stereo audio media, the left channel should have an essence track number of 1 and the right channel should have a essnece track number of 2.

      Returns:
        The physical output channel associated with this track.
      Throws:
        `PropertyNotPresentException` - The track is not a physical track.

    - #### setTrackID

          void setTrackID(@TrackID
                          int trackID)
                   throws IllegalArgumentException

      This method will set the track id of this track, which specifies an integer that is used to reference this track.

      Parameters:
        `trackID` - Track id for this track.
      Throws:
        `IllegalArgumentException` - The given track id is negative.
      See Also:
        `TrackExistsException`

    - #### getTrackID

          @TrackID
          int getTrackID()

      Returns the track id of this track, which specifies an integer that is used to reference this track.

      Returns:
        Track id of this track.

    - #### setTrackSegment

          void setTrackSegment(Segment segment)
                        throws NullPointerException

      Sets the segment for this track, which is the value of the track.

      Parameters:
        `segment` - Segment representing the value for this track.
      Throws:
        `NullPointerException` - The given segment is `null`.

    - #### getTrackSegment

          Segment getTrackSegment()

      Returns the segment of this track, which is the value of the track.

      Returns:
        Segment specifying the value of this track.
      See Also:
        `TypeDefinitions.SegmentStrongReference`

    - #### getDataDefinition

          DataDefinition getDataDefinition()

      Returns the data definition describing the type of essence represented by the value of this track.

      Returns:
        Data definition object associated with the segment in the track.
      See Also:
        `DataDefinition`, `DataDefinitionConstant`, `getTrackSegment()`, `Component.getComponentDataDefinition()`

    - #### clone

          Track clone()

      Create a cloned copy of this track.

      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `MediaEntity`
      Returns:
        Cloned copy of this track.

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