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

tv.amwa.maj.model.impl

## Class MultipleDescriptorImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.EssenceDescriptorImpl
    - - tv.amwa.maj.model.impl.AAFFileDescriptorImpl
      - - tv.amwa.maj.model.impl.MultipleDescriptorImpl

- All Implemented Interfaces:
    Serializable, Cloneable, QAAFFileDescriptor, MediaEntity, MetadataObject, AAFFileDescriptor, EssenceDescriptor, InterchangeObject, MultipleDescriptor

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=17408,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="MultipleDescriptor",
                  description="Describes the format of the content data associated with a file source package containing multiple tracks of essence.",
                  symbol="MultipleDescriptor")
      public class MultipleDescriptorImpl
      extends AAFFileDescriptorImpl
      implements MultipleDescriptor, Serializable, Cloneable

  Implements the description of content data associated with a single file source package that contains multiple tracks of essence. Each file descriptor within a multiple descriptor should set the linked track property that links it to the source track that it describes.

  See Also:
    Serialized Form

- - ### Field Summary

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

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultipleDescriptorImpl()` Creates and initializes a new multiple descriptor for static essence, which describes the format of the content data associated with a `file source package` containing multiple tracks of essence.
    `MultipleDescriptorImpl(Rational sampleRate, long length)` Creates and initializes a new multiple descriptor for time varying essence, which describes the format of the content data associated with a `file source package` containing multiple tracks of essence.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendFileDescriptor(AAFFileDescriptor fileDescriptor)` Appends a file descriptor to the list of file descriptors of this multiple descriptor.
    `void` | `clearFileDescriptors()`
    `MultipleDescriptor` | `clone()` Create a cloned copy of this interchange object.
    `int` | `countFileDescriptors()` Returns the number of file descriptors of this multiple descriptor.
    `AAFFileDescriptor` | `getFileDescriptorAt(int index)` Returns the file descriptor at the given index through the list of file descriptors of this multiple descriptor.
    `List<AAFFileDescriptor>` | `getFileDescriptors()` Returns a copy of the list of file descriptors of this multiple descriptor.
    `static List<AAFFileDescriptor>` | `initializeFileDescriptors()`
    `void` | `insertFileDescriptorAt(int index, AAFFileDescriptor fileDescriptor)` Insert a file descriptor into the list of file descriptors of this multiple descriptor at the given index.
    `void` | `prependFileDescriptor(AAFFileDescriptor fileDescriptor)` Prepends a file descriptor to the list of file descriptors of this multiple essence descriptor.
    `void` | `removeFileDescriptorAt(int index)` Removes the file descriptor at the given index from the list of file descriptors of this multiple descriptor.

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

      `describesStaticEssence, getCodec, getContainerFormat, getEssenceLength, getLinkedTrackID, getSampleRate, getSampleRateString, getTwentyFourBitAudio, initializeEssenceLength, initializeSampleRate, setCodec, setContainerFormat, setDescribesStaticEssence, setDescribesTimeVaryingEssence, setEssenceLength, setEssenceLengthFromStream, setLinkedTrackID, setSampleRate, setSampleRateFromStream, setSampleRateString, setTwentyFourBitAudio`

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

      `appendLocator, appendSubDescriptor, clearLocators, clearSubDescriptors, countLocators, countSubDescriptors, getComment, getLocatorAt, getLocators, getSubDescriptorAt, getSubDescriptors, insertLocatorAt, insertSubDescriptorAt, prependLocator, prependSubDescriptor, removeLocatorAt, removeSubDescriptorAt`

    - ### 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.AAFFileDescriptor

      `getCodec, getContainerFormat, getEssenceLength, getLinkedTrackID, getSampleRate, setCodec, setContainerFormat, setEssenceLength, setLinkedTrackID, setSampleRate`

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

      `appendLocator, appendSubDescriptor, clearLocators, countLocators, countSubDescriptors, getLocatorAt, getLocators, getSubDescriptorAt, getSubDescriptors, insertLocatorAt, insertSubDescriptorAt, prependLocator, prependSubDescriptor, removeLocatorAt, removeSubDescriptorAt`

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

- - ### Constructor Detail

    - #### MultipleDescriptorImpl

          public MultipleDescriptorImpl()

      Creates and initializes a new multiple descriptor for static essence, which describes the format of the content data associated with a `file source package` containing multiple tracks of essence. File descriptors for each of the tracks of data can then be added using the `append,` `insert` and `prepend` methods.

    - #### MultipleDescriptorImpl

          public MultipleDescriptorImpl(Rational sampleRate,
                                        @LengthType
                                        long length)
                                 throws NullPointerException,
                                        IllegalArgumentException

      Creates and initializes a new multiple descriptor for time varying essence, which describes the format of the content data associated with a `file source package` containing multiple tracks of essence. File descriptors for each of the tracks of data can then be added using the `append,` `insert` and `prepend` methods.

      Parameters:
        `sampleRate` - Sample rate for the content represented by this multiple descriptor.
        `length` - Length of content represented by this multiple descriptor.
      Throws:
        `NullPointerException` - The sample rate argument is `null`.
        `IllegalArgumentException` - The length of the multiple descriptor cannot be a negative value.

  - ### Method Detail

    - #### getFileDescriptors

          @MediaProperty(uuid1=100729092,
                         uuid2=1547,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,4},
                         definedName="FileDescriptors",
                         typeName="FileDescriptorStrongReferenceVector",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=16129,
                         symbol="FileDescriptors")
          public List<AAFFileDescriptor> getFileDescriptors()

      Description copied from interface: `MultipleDescriptor`

      Returns a copy of the list of file descriptors of this multiple descriptor.

      Specified by:
        `getFileDescriptors` in interface `MultipleDescriptor`
      Returns:
        Copy of the list of file descriptors of this multiple descriptor.

    - #### initializeFileDescriptors

          public static final List<AAFFileDescriptor> initializeFileDescriptors()

    - #### appendFileDescriptor

          @MediaListAppend(value="FileDescriptors")
          public void appendFileDescriptor(AAFFileDescriptor fileDescriptor)
                                                                              throws NullPointerException

      Description copied from interface: `MultipleDescriptor`

      Appends a file descriptor to the list of file descriptors of this multiple descriptor. Use this function to add a `file descriptor` to the end of the interleave pattern.

      Specified by:
        `appendFileDescriptor` in interface `MultipleDescriptor`
      Parameters:
        `fileDescriptor` - File descriptor to append to this multiple descriptor.
      Throws:
        `NullPointerException` - The given file descriptor is `null`.

    - #### countFileDescriptors

          @MediaPropertyCount(value="FileDescriptors")
          public int countFileDescriptors()

      Description copied from interface: `MultipleDescriptor`

      Returns the number of file descriptors of this multiple descriptor.

      Specified by:
        `countFileDescriptors` in interface `MultipleDescriptor`
      Returns:
        Number of file descriptors of this multiple descriptor.

    - #### getFileDescriptorAt

          @MediaListGetAt(value="FileDescriptors")
          public AAFFileDescriptor getFileDescriptorAt(int index)
                                                                                         throws IndexOutOfBoundsException

      Description copied from interface: `MultipleDescriptor`

      Returns the file descriptor at the given index through the list of file descriptors of this multiple descriptor.

      Specified by:
        `getFileDescriptorAt` in interface `MultipleDescriptor`
      Parameters:
        `index` - Index of the file descriptor to retrieve.
      Returns:
        File descriptor at the given index.
      Throws:
        `IndexOutOfBoundsException` - The given index is outside the acceptable range for the current list of file descriptors.

    - #### insertFileDescriptorAt

          @MediaListInsertAt(value="FileDescriptors")
          public void insertFileDescriptorAt(int index,
                                                                                         AAFFileDescriptor fileDescriptor)
                                                                                  throws NullPointerException,
                                                                                         IndexOutOfBoundsException

      Description copied from interface: `MultipleDescriptor`

      Insert a file descriptor into the list of file descriptors of this multiple descriptor at the given index. Other indices will be adjusted upwards to accommodate the new item.

      Specified by:
        `insertFileDescriptorAt` in interface `MultipleDescriptor`
      Parameters:
        `index` - Index at which the given file descriptor is to be inserted.
        `fileDescriptor` - File descriptor to insert.
      Throws:
        `NullPointerException` - The file descriptor argument is `null`.
        `IndexOutOfBoundsException` - The given index is outside the acceptable range for the current list of file descriptors.

    - #### prependFileDescriptor

          @MediaListPrepend(value="FileDescriptors")
          public void prependFileDescriptor(AAFFileDescriptor fileDescriptor)
                                                                                throws NullPointerException

      Description copied from interface: `MultipleDescriptor`

      Prepends a file descriptor to the list of file descriptors of this multiple essence descriptor. Use this method to add a `file descriptor` to to the beginning of the interleave pattern.

      Specified by:
        `prependFileDescriptor` in interface `MultipleDescriptor`
      Parameters:
        `fileDescriptor` - File descriptor to prepend to this multiple descriptor.
      Throws:
        `NullPointerException` - The file descriptor argument is `null`.

    - #### removeFileDescriptorAt

          @MediaListRemoveAt(value="FileDescriptors")
          public void removeFileDescriptorAt(int index)
                                                                                  throws IndexOutOfBoundsException

      Description copied from interface: `MultipleDescriptor`

      Removes the file descriptor at the given index from the list of file descriptors of this multiple descriptor. Indices of other items in the list will be adjusted to a lower value to fill the gap left after the removal.

      Specified by:
        `removeFileDescriptorAt` in interface `MultipleDescriptor`
      Parameters:
        `index` - Index of the file descriptor to remove.
      Throws:
        `IndexOutOfBoundsException` - The given index is outside the acceptable range for the current list of file descriptors.
      See Also:
        `TypeDefinitions.FileDescriptorStrongReferenceVector`

    - #### clearFileDescriptors

          @MediaPropertyClear(value="FileDescriptors")
          public void clearFileDescriptors()

    - #### clone

          public MultipleDescriptor 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 `AAFFileDescriptor`
      Specified by:
        `clone` in interface `EssenceDescriptor`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `MultipleDescriptor`
      Overrides:
        `clone` in class `AAFFileDescriptorImpl`
      Returns:
        Cloned copy of this interchange object.

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