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

tv.amwa.maj.model

## Interface CompositionPackage

- All Superinterfaces:
    InterchangeObject, MediaEntity, MetadataObject, Package, WeakReferenceTarget
  All Known Subinterfaces:
    QCompositionPackage
  All Known Implementing Classes:
    CompositionPackageImpl

      public interface CompositionPackage
      extends Package

  Specifies a material object that describes how to combine content data elements into a sequence, how to modify content data elements, and how to synchronize content data elements.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompositionPackage` | `clone()` Create a cloned copy of this composition package.
    `PackageID` | `getCompositionRendering()` Returns the package id of a rendering of this composition package, which specifies a mixdown of the composition.
    `DefaultFade` | `getDefaultFade()` Returns the default fade for this composition package, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties.
    `Rational` | `getDefaultFadeEditUnit()` Returns the edit units used to specify the default fade length of this composition package.
    `long` | `getDefaultFadeLength()` Returns the length of this default audio fade of this composition package, measured in the fade's edit units.
    `FadeType` | `getDefaultFadeType()` Returns the type of the default audio fade for this composition package.
    `void` | `setCompositionRendering(PackageID packageID)` Set the package id of a rendering of this composition package, which specifies a mixdown of the composition.
    `void` | `setDefaultFade(DefaultFade defaultFade)` Sets the default fade properties for this composition package, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties.
    `void` | `setDefaultFade(long fadeLength, FadeType fadeType, Rational fadeEditUnit)` Sets the default fade properties of this composition package, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties.

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

      `appendNewEventTrack, appendNewStaticTrack, appendNewTimelineTrack, appendPackageAttribute, appendPackageAttribute, appendPackageKLVData, appendPackageTrack, appendPackageUserComment, appendPackageUserComment, changeReference, clearPackageAttributes, clearPackageKLVData, clearPackageTracks, clearPackageUserComments, cloneExternal, copy, countPackageAttributes, countPackageKLVData, countPackageTracks, countPackageUserComments, getCreationTime, getPackageAttributes, getPackageID, getPackageKLVData, getPackageLastModified, getPackageName, getPackageTrackAt, getPackageTracks, getPackageUsage, getPackageUserComments, insertPackageTrackAt, lookupPackageTrack, offsetToPackageTimecode, prependPackageTrack, removePackageAttribute, removePackageKLVData, removePackageTrackAt, removePackageUserComment, setCreationTime, setPackageID, setPackageLastModified, setPackageName, setPackageUsage`

    - ### 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.industry.WeakReferenceTarget

      `getAUID, getWeakTargetReference`

- - ### Method Detail

    - #### getDefaultFade

          DefaultFade getDefaultFade()
                              throws PropertyNotPresentException

      Returns the default fade for this composition package, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties. The default fade properties are optional.

      Returns:
        Default fade for the composition.
      Throws:
        `PropertyNotPresentException` - The optional default fade properties are not present in this composition package.
      See Also:
        `getDefaultFadeEditUnit()`, `getDefaultFadeLength()`, `getDefaultFadeType()`

    - #### setDefaultFade

          void setDefaultFade(@LengthType
                              long fadeLength,
                              FadeType fadeType,
                              Rational fadeEditUnit)
                       throws BadLengthException

      Sets the default fade properties of this composition package, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties. The default fade properties are optional and can be omitted by calling this method with `null` for either the fade type or fade edit unit properties.

      Parameters:
        `fadeLength` - Default fade length for the fade.
        `fadeType` - Default fade type for the fade.
        `fadeEditUnit` - Default fade edit unit for the fade.
      Throws:
        `BadLengthException` - Fade length is negative.

    - #### setDefaultFade

          void setDefaultFade(DefaultFade defaultFade)

      Sets the default fade properties for this composition package, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties. The default fade properties are optional and can be omitted by calling this method with `null`.

      Parameters:
        `defaultFade` - Default fade properties for this composition package.

    - #### getDefaultFadeEditUnit

          Rational getDefaultFadeEditUnit()
                                   throws PropertyNotPresentException

      Returns the edit units used to specify the default fade length of this composition package.

      Returns:
        Edit units used to specify the fade length.
      Throws:
        `PropertyNotPresentException`
      See Also:
        `getDefaultFade()`

    - #### getDefaultFadeLength

          @LengthType
          long getDefaultFadeLength()
                                         throws PropertyNotPresentException

      Returns the length of this default audio fade of this composition package, measured in the fade's edit units.

      Returns:
        Length of the default audio fade.
      Throws:
        `PropertyNotPresentException`
      See Also:
        `getDefaultFadeEditUnit()`, `getDefaultFade()`

    - #### getDefaultFadeType

          FadeType getDefaultFadeType()
                               throws PropertyNotPresentException

      Returns the type of the default audio fade for this composition package.

      Returns:
        Type of this default audio fade.
      Throws:
        `PropertyNotPresentException`
      See Also:
        `getDefaultFade()`

    - #### setCompositionRendering

          void setCompositionRendering(PackageID packageID)

      Set the package id of a rendering of this composition package, which specifies a mixdown of the composition. The start of the mixdown and the start of the composition are assumed to be co-timed. Set the rendering to `null` to omit this optional property.

      Parameters:
        `packageID` - Package id for a rendering of this composition package.

    - #### getCompositionRendering

          PackageID getCompositionRendering()
                                     throws PropertyNotPresentException

      Returns the package id of a rendering of this composition package, which specifies a mixdown of the composition. The start of the mixdown and the start of the composition are assumed to be co-timed.

      Returns:
        package id of a rendering of the composition.
      Throws:
        `PropertyNotPresentException` - The optional rendering property is not present in this composition package.

    - #### clone

          CompositionPackage clone()

      Create a cloned copy of this composition package.

      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `Package`
      Returns:
        Cloned copy of this composition package.

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