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

tv.amwa.maj.model.impl

## Class SourceClipImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.ComponentImpl
    - - tv.amwa.maj.model.impl.SegmentImpl
      - - tv.amwa.maj.model.impl.SourceReferenceSegmentImpl
        - - tv.amwa.maj.model.impl.SourceClipImpl

- All Implemented Interfaces:
    Serializable, Cloneable, QComponent, QSegment, QSourceClip, MediaEntity, MetadataObject, Component, InterchangeObject, Segment, SourceClip, SourceReferenceSegment
  Direct Known Subclasses:
    DescriptiveClipImpl

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=4352,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="SourceClip",
                  description="The SourceClip class represents the essence and identifies the source of the essence.",
                  symbol="SourceClip")
      public class SourceClipImpl
      extends SourceReferenceSegmentImpl
      implements SourceClip, QSourceClip, Serializable, Cloneable

  Implements 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.

  See Also:
    `TypeDefinitions.SourceClipStrongReference`, Serialized Form

- - ### Field Summary

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

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SourceClipImpl()`
    `SourceClipImpl(DataDefinition dataDefinition, long length, SourceReferenceValue sourceReference)` Creates and initializes a new source clip, which represents an item of essence and identifies the source of the essence.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `SourceClip` | `clone()` Create a cloned copy of this interchange object.
    `FadeImpl` | `getFade()` Deprecated.
    `long` | `getFadeInLength()` Deprecated.
    `FadeType` | `getFadeInType()` Deprecated.
    `long` | `getFadeOutLength()` Deprecated.
    `FadeType` | `getFadeOutType()` Deprecated.
    `Stream` | `getRushBlob()`
    `int` | `getRushChannelMask()`
    `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.
    `void` | `setFade(long fadeInLength, FadeType fadeInType, long fadeOutLength, FadeType fadeOutType)` Deprecated.
    `void` | `setFadeInLength(Long fadeInLength)` Deprecated.
    `void` | `setFadeInType(FadeType fadeInType)` Deprecated.
    `void` | `setFadeOutLength(Long fadeOutLength)` Deprecated.
    `void` | `setFadeOutType(FadeType fadeOutType)` Deprecated.
    `void` | `setRushBlob(Stream rushBlob)`
    `void` | `setRushChannelMask(Integer rushChannelMask)`
    `void` | `setSourceReference(SourceReferenceValue sourceReference)` Sets the source reference of this source clip.
    `void` | `setStartPosition(Long startPosition)` 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 class tv.amwa.maj.model.impl.SourceReferenceSegmentImpl

      `clearChannelIDs, clearMonoSourceTrackIDs, getChannelIDs, getChannelIDsSize, getMonoSourceTrackIDs, getMonoSourceTrackIDsSize, getSourcePackageID, getSourcePackageIDString, getSourceTrackID, initializeSourceTrackID, setChannelIDs, setMonoSourceTrackIDs, setSourcePackageID, setSourcePackageIDString, setSourceTrackID`

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

      `generateSequence, getCutPoint, getKeyOffset, getPackLayerKeyIndicator, getSegmentBlob, getTrackBlob, getTrackKeyRenderSequence, getTrackName, getTrackRenderSequence, segmentOffsetToTC, segmentTCToOffset, setCutPoint, setKeyOffset, setPackLayerKeyIndicator, setSegmentBlob, setTrackBlob, setTrackKeyRenderSequence, setTrackName, setTrackRenderSequence`

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

      `appendComponentAttribute, appendComponentAttribute, appendComponentKLVData, appendComponentUserComment, appendComponentUserComment, clearComponentAttributes, clearComponentKLVData, clearComponentUserComments, countComponentAttributes, countComponentKLVData, countComponentUserComments, getComment, getComponentAttributes, getComponentDataDefinition, getComponentKLVData, getComponentLength, getComponentUserComments, getEditName, getJupiterClipOffset, getJupiterID, getLengthPresent, initializeComponentDataDefinition, prependComponentAttribute, prependComponentKLVData, prependComponentUserComment, removeComponentAttribute, removeComponentKLVData, removeComponentUserComment, setComponentDataDefinition, setComponentLength, setComponentLengthFromStream, setEditName, setJupiterClipOffset, setJupiterID, setLengthPresent`

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

- - ### Constructor Detail

    - #### SourceClipImpl

          public SourceClipImpl()

    - #### SourceClipImpl

          public SourceClipImpl(DataDefinition dataDefinition,
                                long length,
                                SourceReferenceValue sourceReference)
                         throws NullPointerException,
                                BadLengthException

      Creates and initializes a new source clip, which represents an item of essence and identifies the source of the essence.

      Parameters:
        `dataDefinition` - Kind of data represented by this component.
        `length` - Length of the source clip component.
        `sourceReference` - Reference to the source clip.
      Throws:
        `NullPointerException` - The data definition and/or source reference arguments are `null`.
        `BadLengthException` - The length of the component must be non-negative.

  - ### Method Detail

    - #### getSourceReference

          public SourceReferenceValue getSourceReference()

      Description copied from interface: `SourceClip`

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

      Specified by:
        `getSourceReference` in interface `SourceClip`
      Returns:
        Source reference of this source clip.
      See Also:
        `SourceReferenceValue.isContextual()`, `SourceReferenceValue.isOriginalSource()`, `SourceReferenceValue.getStartPosition()`

    - #### setSourceReference

          public void setSourceReference(SourceReferenceValue sourceReference)
                                  throws NullPointerException

      Description copied from interface: `SourceClip`

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

      Specified by:
        `setSourceReference` in interface `SourceClip`
      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)`

    - #### resolveRef

          public Package resolveRef()
                             throws PackageNotFoundException

      Description copied from interface: `SourceClip`

      Returns the package that this source clip references.

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

    - #### setFade

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

      Deprecated.
      Description copied from interface: `SourceClip`

      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.

      Specified by:
        `setFade` in interface `SourceClip`
      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`, `SourceClip.setFade(tv.amwa.maj.union.Fade)`

    - #### getFade

          @Deprecated
          public FadeImpl getFade()

      Deprecated.
      Description copied from interface: `SourceClip`

      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.

      Specified by:
        `getFade` in interface `SourceClip`
      Returns:
        Fade information for this source clip.
      See Also:
        `SourceClip.getFadeInLength()`, `SourceClip.getFadeInType()`, `SourceClip.getFadeOutLength()`, `SourceClip.getFadeOutType()`

    - #### setFade

          @Deprecated
          public void setFade(Fade fade)
                                   throws NullPointerException

      Deprecated.
      Description copied from interface: `SourceClip`

      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.

      Specified by:
        `setFade` in interface `SourceClip`
      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`, `SourceClip.setFade(long, FadeType, long, FadeType)`

    - #### getFadeInLength

          @MediaProperty(uuid1=117572097,
                         uuid2=261,
                         uuid3=512,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="FadeInLength",
                         typeName="LengthType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=4610,
                         symbol="FadeInLength")
           @Deprecated
          public long getFadeInLength()
                                                                                                                                                                                                                                                                                                                                                                                                throws PropertyNotPresentException

      Deprecated.
      Description copied from interface: `SourceClip`

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

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

    - #### setFadeInLength

          @Deprecated
           @MediaPropertySetter(value="FadeInLength")
          public void setFadeInLength(Long fadeInLength)

      Deprecated.

    - #### getFadeInType

          @MediaProperty(uuid1=87033089,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,1},
                         definedName="FadeInType",
                         typeName="FadeType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=4611,
                         symbol="FadeInType")
           @Deprecated
          public FadeType getFadeInType()
                                                                                                                                                                                                                                                                                                                                                                                       throws PropertyNotPresentException

      Deprecated.
      Description copied from interface: `SourceClip`

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

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

    - #### setFadeInType

          @Deprecated
           @MediaPropertySetter(value="FadeInType")
          public void setFadeInType(FadeType fadeInType)

      Deprecated.

    - #### getFadeOutLength

          @MediaProperty(uuid1=117572097,
                         uuid2=261,
                         uuid3=768,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="FadeOutLength",
                         typeName="LengthType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=4612,
                         symbol="FadeOutLength")
           @Deprecated
          public long getFadeOutLength()
                                                                                                                                                                                                                                                                                                                                                                                                   throws PropertyNotPresentException

      Deprecated.
      Description copied from interface: `SourceClip`

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

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

    - #### setFadeOutLength

          @Deprecated
           @MediaPropertySetter(value="FadeOutLength")
          public void setFadeOutLength(Long fadeOutLength)

      Deprecated.

    - #### getFadeOutType

          @MediaProperty(uuid1=87033090,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,1},
                         definedName="FadeOutType",
                         typeName="FadeType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=4613,
                         symbol="FadeOutType")
           @Deprecated
          public FadeType getFadeOutType()
                                                                                                                                                                                                                                                                                                                                                                                          throws PropertyNotPresentException

      Deprecated.
      Description copied from interface: `SourceClip`

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

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

    - #### setFadeOutType

          @Deprecated
           @MediaPropertySetter(value="FadeOutType")
          public void setFadeOutType(FadeType fadeOutType)

      Deprecated.

    - #### getStartPosition

          @MediaProperty(uuid1=117571843,
                         uuid2=260,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="StartPosition",
                         aliases="StartTime",
                         typeName="PositionType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=4609,
                         symbol="StartPosition")
          public long getStartPosition()
                                                                                                                                                                                                                                                                                                                                                                                                                          throws PropertyNotPresentException

      Description copied from interface: `SourceClip`

      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.

      Specified by:
        `getStartPosition` in interface `SourceClip`
      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

          @MediaPropertySetter(value="StartPosition")
          public void setStartPosition(Long startPosition)

      Description copied from interface: `SourceClip`

      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.

      Specified by:
        `setStartPosition` in interface `SourceClip`
      Parameters:
        `startPosition` - Position offset from the origin of the referenced content.

    - #### getRushChannelMask

          @MediaProperty(uuid1=296928023,
                         uuid2=-30424,
                         uuid3=18850,
                         uuid4={-81,101,102,97,80,-44,66,-93},
                         definedName="Rush channel mask",
                         symbol="Rush_channel_mask",
                         aliases="Rush_channel_mask",
                         typeName="UInt32",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
           @UInt32
          public int getRushChannelMask()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          throws PropertyNotPresentException

      Specified by:
        `getRushChannelMask` in interface `QSourceClip`
      Throws:
        `PropertyNotPresentException`

    - #### setRushChannelMask

          @MediaPropertySetter(value="Rush channel mask")
          public void setRushChannelMask(@UInt32
                                                                                         Integer rushChannelMask)
                                                                                  throws IllegalArgumentException

      Specified by:
        `setRushChannelMask` in interface `QSourceClip`
      Throws:
        `IllegalArgumentException`

    - #### getRushBlob

          @MediaProperty(uuid1=120384408,
                         uuid2=6707,
                         uuid3=16557,
                         uuid4={-98,-25,31,-128,-92,124,56,103},
                         definedName="Rush blob",
                         symbol="Rush_blob",
                         aliases="Rush_blob",
                         typeName="Stream",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
          public Stream getRushBlob()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     throws PropertyNotPresentException

      Specified by:
        `getRushBlob` in interface `QSourceClip`
      Throws:
        `PropertyNotPresentException`

    - #### setRushBlob

          @MediaPropertySetter(value="Rush blob")
          public void setRushBlob(Stream rushBlob)

      Specified by:
        `setRushBlob` in interface `QSourceClip`

    - #### clone

          public SourceClip 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 `Component`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `Segment`
      Specified by:
        `clone` in interface `SourceClip`
      Specified by:
        `clone` in interface `SourceReferenceSegment`
      Overrides:
        `clone` in class `SourceReferenceSegmentImpl`
      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.