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

tv.amwa.maj.model

## Interface SourceClip

- All Superinterfaces:
    Component, InterchangeObject, MediaEntity, MetadataObject, Segment, SourceReferenceSegment
  All Known Subinterfaces:
    DescriptiveClip, QSourceClip
  All Known Implementing Classes:
    DescriptiveClipImpl, SourceClipImpl

      public interface SourceClip
      extends SourceReferenceSegment

  Specifies a representation of essence and identifies the source of the essence. This interface uses the source reference values to manage the properties of a source clip.

  Source clips can by explicit, in context or indicating that the package in which the clip is contained is the original source. For more information, see the `Forge.originalSource()` and `Forge.inContextReference(int, Long)` methods.

  See Also:
    `SourceReferenceValue`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `SourceClip` | `clone()` Create a cloned copy of this source clip.
    `Fade` | `getFade()` Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.
    `long` | `getFadeInLength()` Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.
    `FadeType` | `getFadeInType()` Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.
    `long` | `getFadeOutLength()` Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.
    `FadeType` | `getFadeOutType()` Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.
    `SourceReferenceValue` | `getSourceReference()` The method returns the source reference of this source clip.
    `long` | `getStartPosition()` Returns the position offset from the origin of the referenced package's track in edit units determined by the source clip's context.
    `Package` | `resolveRef()` Returns the package that this source clip references.
    `void` | `setFade(Fade fade)` Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.
    `void` | `setFade(long fadeInLength, FadeType fadeInType, long fadeOutLength, FadeType fadeOutType)` Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.
    `void` | `setSourceReference(SourceReferenceValue sourceReference)` Sets the source reference of this source clip.
    `void` | `setStartPosition(Long setStartPosition)` Sets the position offset from the origin of the referenced package's track in edit units determined by the source clip's context.

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

      `getChannelIDs, getChannelIDsSize, getMonoSourceTrackIDs, getMonoSourceTrackIDsSize, getSourcePackageID, getSourceTrackID, setChannelIDs, setMonoSourceTrackIDs, setSourcePackageID, setSourceTrackID`

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

      `generateSequence, segmentOffsetToTC, segmentTCToOffset`

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

      `appendComponentAttribute, appendComponentAttribute, appendComponentKLVData, appendComponentUserComment, appendComponentUserComment, clearComponentAttributes, clearComponentKLVData, clearComponentUserComments, countComponentAttributes, countComponentKLVData, countComponentUserComments, getComponentAttributes, getComponentDataDefinition, getComponentKLVData, getComponentLength, getComponentUserComments, getLengthPresent, removeComponentAttribute, removeComponentKLVData, removeComponentUserComment, setComponentDataDefinition, setComponentLength, setLengthPresent`

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

    - #### getFade

          @Deprecated
          Fade getFade()

      Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.

      This method returns the optional fade information for this source clip. This function only applies to audio source clips. Length units are specified by the containing package track's edit rate.

      Returns:
        Fade information for this source clip.
      See Also:
        `getFadeInLength()`, `getFadeInType()`, `getFadeOutLength()`, `getFadeOutType()`

    - #### getFadeInLength

          @Deprecated
           @LengthType
          long getFadeInLength()
                                                 throws PropertyNotPresentException

      Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.

      Returns the fade in length of the fade. This is an optional property.

      Returns:
        Fade in length of the fade.
      Throws:
        `PropertyNotPresentException` - This optional property is not present in the fade.
      See Also:
        `getFade()`, `Fade`

    - #### getFadeInType

          @Deprecated
          FadeType getFadeInType()
                                      throws PropertyNotPresentException

      Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.

      Returns the fade in type of the fade. This is an optional property.

      Returns:
        Fade in type of the fade.
      Throws:
        `PropertyNotPresentException` - This optional property is not present in the fade.
      See Also:
        `getFade()`, `Fade`

    - #### getFadeOutLength

          @Deprecated
           @LengthType
          long getFadeOutLength()
                                                  throws PropertyNotPresentException

      Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.

      Returns the fade out length of the fade. This is an optional property.

      Returns:
        Fade out length of the fade.
      Throws:
        `PropertyNotPresentException` - This optional property is not present in the fade.
      See Also:
        `getFade()`, `Fade`

    - #### getFadeOutType

          @Deprecated
          FadeType getFadeOutType()
                                       throws PropertyNotPresentException

      Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.

      Returns the fade out type of the fade. This is an optional property.

      Returns:
        Fade out type for the fade.
      Throws:
        `PropertyNotPresentException` - This optional property is not present in the fade.
      See Also:
        `getFade()`, `Fade`

    - #### resolveRef

          Package resolveRef()
                      throws PackageNotFoundException

      Returns the package that this source clip references.

      Returns:
        Package that the source clip references.
      Throws:
        `PackageNotFoundException` - The source reference of this source clip could not be resolved to a package.

    - #### getSourceReference

          SourceReferenceValue getSourceReference()

      The method returns the source reference of this source clip. The source reference includes the start position property of this source clip.

      Returns:
        Source reference of this source clip.
      See Also:
        `SourceReferenceValue.isContextual()`, `SourceReferenceValue.isOriginalSource()`, `SourceReferenceValue.getStartPosition()`

    - #### setFade

          @Deprecated
          void setFade(@LengthType
                                   long fadeInLength,
                                   FadeType fadeInType,
                                   @LengthType
                                   long fadeOutLength,
                                   FadeType fadeOutType)
                            throws BadLengthException

      Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.

      Sets the optional fade properties of this source clip. The fade properties only apply to a source clip of data definition (or convertible to a data definition) of type sound. All arguments should be specified. Length units are specified by the containing track's edit rate.

      Parameters:
        `fadeInLength` - Fade in length for the source clip.
        `fadeInType` - Fade in type for the source clip.
        `fadeOutLength` - Fade out length for the source clip.
        `fadeOutType` - Fade out type for the source clip.
      Throws:
        `BadLengthException` - One or both of the length parameters of the fade is/are negative.
      See Also:
        `Component.getComponentDataDefinition()`, `DataDefinitionConstant.Sound`, `setFade(tv.amwa.maj.union.Fade)`

    - #### setFade

          @Deprecated
          void setFade(Fade fade)
                            throws NullPointerException

      Deprecated. The fade properties of a source clip are deprecated in the AAF specification. Use a transition with an appropriate effect instead.

      Sets the optional fade properties of this source clip from a set of fade properties. The fade properties only apply to a source clip of data definition (or convertible to a data definition) of type sound. Length units are specified by the containing track's edit rate.

      Parameters:
        `fade` - Parameters of a fade for this source clip.
      Throws:
        `NullPointerException` - The given set of fade properties is `null`.
      See Also:
        `Component.getComponentDataDefinition()`, `DataDefinitionConstant.Sound`, `setFade(long, FadeType, long, FadeType)`

    - #### setSourceReference

          void setSourceReference(SourceReferenceValue sourceReference)
                           throws NullPointerException

      Sets the source reference of this source clip. The source reference includes the start time property of this source clip.

      Parameters:
        `sourceReference` - Source reference of this source clip.
      Throws:
        `NullPointerException` - The given source reference is `null`.
      See Also:
        `Forge.originalSource()`, `Forge.inContextReference(int)`, `Forge.inContextReference(int, Long)`, `Forge.makeReference(tv.amwa.maj.record.PackageID, int, Long)`

    - #### getStartPosition

          @PositionType
          long getStartPosition()
                                       throws PropertyNotPresentException

      Returns the position offset from the origin of the referenced package's track in edit units determined by the source clip's context. If the source package identifier of this value is the zero package id, then the start position shall also be set to 0.

      Returns:
        Position offset from the origin of the referenced content.
      Throws:
        `PropertyNotPresentException` - The optional start time property is not present, indicating that the reference is in the context of a static track rather than a timeline track or event track.

    - #### setStartPosition

          void setStartPosition(@PositionType
                                Long setStartPosition)

      Sets the position offset from the origin of the referenced package's track in edit units determined by the source clip's context. If the source package identifier of this value is the zero package id, then the start position shall also be set to 0. Set this optional property to `null` to omit it.

      Parameters:
        `setStartPosition` - Position offset from the origin of the referenced content.

    - #### clone

          SourceClip clone()

      Create a cloned copy of this source clip.

      Specified by:
        `clone` in interface `Component`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `Segment`
      Specified by:
        `clone` in interface `SourceReferenceSegment`
      Returns:
        Cloned copy of this source clip.

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