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

tv.amwa.maj.union.impl

## Class MultiCreateItemImpl

- java.lang.Object
- - tv.amwa.maj.union.impl.MultiCreateItemImpl

- All Implemented Interfaces:
    Serializable, Cloneable, MultiCreateItem

      public class MultiCreateItemImpl
      extends Object
      implements MultiCreateItem, Serializable, Cloneable

  Implementation of an element of an array used to create interleaved audio and video essence.

  Interleaved-essence: An essence format that combines two or more channels of audio or video data into a single essence stream.

  See Also:
    `tv.amwa.maj.model.MaterialPackage#createMultiEssence(AUIDImpl, tv.amwa.maj.union.MultiCreateItem[], tv.amwa.maj.enumeration.CompressEnable, tv.amwa.maj.model.Locator, AUIDImpl)`, `tv.amwa.maj.model.MaterialPackage#extendMultiEssence(AUIDImpl, tv.amwa.maj.union.MultiCreateItem[], tv.amwa.maj.enumeration.CompressEnable, tv.amwa.maj.model.Locator, AUIDImpl)`, `EssenceData`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiCreateItemImpl(AUID mediaKind, short subTrackNum, int trackID, Rational sampleRate)` Create an element of interleaved essence.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MultiCreateItemImpl` | `clone()`
    `boolean` | `equals(Object o)`
    `AUID` | `getMediaKind()` Returns the kind of media represented by this item.
    `Rational` | `getSampleRate()` Returns the sample rate of this item.
    `short` | `getSubTrackNum()` Returns the sub track number associated with this item, which is the physical output channel.
    `int` | `getTrackID()` Returns the track id of this item within its package.
    `int` | `hashCode()`
    `void` | `setMediaKind(AUID mediaKind)` Sets the kind of media represented by this item.
    `void` | `setSampleRate(Rational sampleRate)` Sets the sample rate of this item.
    `void` | `setSubTrackNum(short subTrackNum)` Sets the sub track number associated with this item, which is the physical output channel.
    `void` | `setTrackID(int trackID)` Sets the track id of this item within its package.
    `String` | `toString()` Pseudo-XML representation of this multi-create item.

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

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

- - ### Constructor Detail

    - #### MultiCreateItemImpl

          public MultiCreateItemImpl(AUID mediaKind,
                                     @Int16
                                     short subTrackNum,
                                     @TrackID
                                     int trackID,
                                     Rational sampleRate)
                              throws NullPointerException,
                                     IllegalArgumentException

      Create an element of interleaved essence.

      Parameters:
        `mediaKind` - Kind of media represented by this item.
        `subTrackNum` - Sub track number associated with this item - the physical output channel.
        `trackID` - Track id for this item within the essence.
        `sampleRate` - Sample rate of this item.
      Throws:
        `NullPointerException` - One or both of the given media kind or sample rates is `null`.
        `IllegalArgumentException` - The given sample rate for this multi-create item has a zero denominator or is negative.

  - ### Method Detail

    - #### getMediaKind

          public AUID getMediaKind()

      Description copied from interface: `MultiCreateItem`

      Returns the kind of media represented by this item.

      Specified by:
        `getMediaKind` in interface `MultiCreateItem`
      Returns:
        Kind of media represented by this item.

    - #### setMediaKind

          public void setMediaKind(AUID mediaKind)
                            throws NullPointerException

      Description copied from interface: `MultiCreateItem`

      Sets the kind of media represented by this item.

      Specified by:
        `setMediaKind` in interface `MultiCreateItem`
      Parameters:
        `mediaKind` - Kind of media represented by this item.
      Throws:
        `NullPointerException` - The given media kind is `null`.

    - #### getSampleRate

          public Rational getSampleRate()

      Description copied from interface: `MultiCreateItem`

      Returns the sample rate of this item.

      Specified by:
        `getSampleRate` in interface `MultiCreateItem`
      Returns:
        Sample rate of this item.

    - #### setSampleRate

          public void setSampleRate(Rational sampleRate)
                             throws NullPointerException,
                                    IllegalArgumentException

      Description copied from interface: `MultiCreateItem`

      Sets the sample rate of this item.

      Specified by:
        `setSampleRate` in interface `MultiCreateItem`
      Parameters:
        `sampleRate` - Sample rate of this item.
      Throws:
        `NullPointerException` - The given sample rate for the item is `null`.
        `IllegalArgumentException` - The given sample rate for this multi-create item has a zero denominator or is negative.

    - #### getTrackID

          @TrackID
          public int getTrackID()

      Description copied from interface: `MultiCreateItem`

      Returns the track id of this item within its package.

      Specified by:
        `getTrackID` in interface `MultiCreateItem`
      Returns:
        Track id of this item.

    - #### setTrackID

          public void setTrackID(@TrackID
                                 int trackID)
                          throws IllegalArgumentException

      Description copied from interface: `MultiCreateItem`

      Sets the track id of this item within its package.

      Specified by:
        `setTrackID` in interface `MultiCreateItem`
      Parameters:
        `trackID` - Track id of this item.
      Throws:
        `IllegalArgumentException` - The given track id for this multi-create item is negative.

    - #### getSubTrackNum

          @Int16
          public short getSubTrackNum()

      Description copied from interface: `MultiCreateItem`

      Returns the sub track number associated with this item, which is the physical output channel.

      Specified by:
        `getSubTrackNum` in interface `MultiCreateItem`
      Returns:
        Sub track number associated with this item.

    - #### setSubTrackNum

          public void setSubTrackNum(@Int16
                                     short subTrackNum)

      Description copied from interface: `MultiCreateItem`

      Sets the sub track number associated with this item, which is the physical output channel.

      Specified by:
        `setSubTrackNum` in interface `MultiCreateItem`
      Parameters:
        `subTrackNum` - Sub track number associated with this item.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Pseudo-XML representation of this multi-create item. No associated XML schema or DTD exists. For example:

           <MultiCreateItem>
             <MediaKind>urn:x-ul:060e2b34.0401.0101.01030202.0100.0000</MediaKind>
             <TrackID>3</TrackID>
             <SubTrackNum>7</SubTrackNum>
             <SampleRate>24/60</SampleRate>
           </MultiCreateItem>

      Overrides:
        `toString` in class `Object`
      Returns:
        Pseudo-XML representation of this multi-create item.

    - #### clone

          public MultiCreateItemImpl clone()
                                    throws CloneNotSupportedException

      Overrides:
        `clone` in class `Object`
      Throws:
        `CloneNotSupportedException`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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