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

tv.amwa.maj.model.impl

## Class AAFFileDescriptorImpl

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

- All Implemented Interfaces:
    Serializable, Cloneable, QAAFFileDescriptor, MediaEntity, MetadataObject, AAFFileDescriptor, EssenceDescriptor, InterchangeObject
  Direct Known Subclasses:
    AIFCDescriptorImpl, DataEssenceDescriptorImpl, HTMLDescriptorImpl, MultipleDescriptorImpl, PictureDescriptorImpl, PolyFileDescriptorImpl, SoundDescriptorImpl, TIFFDescriptorImpl, WAVEDescriptorImpl

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=9472,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="FileDescriptor",
                  aliases="AAFFileDescriptor",
                  description="The FileDescriptor class describes an essence source that is directly manipulated by an AAF application.",
                  symbol="FileDescriptor",
                  isConcrete=false)
      public class AAFFileDescriptorImpl
      extends EssenceDescriptorImpl
      implements AAFFileDescriptor, QAAFFileDescriptor, Serializable, Cloneable

  Implements a file descriptor that describes an essence source that is directly manipulated by an AAF application.

  See Also:
    `TypeDefinitions.FileDescriptorStrongReference`, `TypeDefinitions.FileDescriptorStrongReferenceVector`, Serialized Form

- - ### Field Summary

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

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AAFFileDescriptorImpl()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AAFFileDescriptor` | `clone()` Create a cloned copy of this interchange object.
    `boolean` | `describesStaticEssence()` Determines whether this file descriptor describes static or time-varying essence.
    `CodecDefinition` | `getCodec()` Returns the codec of the described file, which identifies the mechanism used to compress and uncompress samples of essence or used to convert samples of essence from one format to another.
    `ContainerDefinition` | `getContainerFormat()` Returns the file format of the described file, which identifies the container mechanism used to store the essence.
    `long` | `getEssenceLength()` Returns the length of the essence in sample units.
    `int` | `getLinkedTrackID()` Returns the linked track id of this file descriptor, which specifies which track of the associated source package this descriptor describes when the source package is described by a multiple descriptor.
    `Rational` | `getSampleRate()` Returns the sample rate of the essence.
    `String` | `getSampleRateString()`
    `int` | `getTwentyFourBitAudio()`
    `static long` | `initializeEssenceLength()`
    `static Rational` | `initializeSampleRate()`
    `void` | `setCodec(CodecDefinition codec)` Set the codec of the described file, which identifies the mechanism used to compress and uncompress samples of essence or used to convert samples of essence from one format to another.
    `void` | `setContainerFormat(ContainerDefinition format)` Specifies the file format of the described file, which identifies the container mechanism used to store the essence.
    `void` | `setDescribesStaticEssence()` Sets this file descriptor so that it describes static essence.
    `void` | `setDescribesTimeVaryingEssence(Rational sampleRate, long length)` Sets this file descriptor so that it describes time varying essence.
    `void` | `setEssenceLength(Long essenceLength)` Sets the length of the essence in sample units.
    `void` | `setEssenceLengthFromStream(long essenceLength)`
    `void` | `setLinkedTrackID(Integer linkedTrackID)` Set the linked track id of this file descriptor, which specifies which track of the associated source package this descriptor describes when the source package is described by a multiple descriptor.
    `void` | `setSampleRate(Rational rate)` Sets sample rate of the essence.
    `void` | `setSampleRateFromStream(Rational rate)`
    `void` | `setSampleRateString(String sampleRate)`
    `void` | `setTwentyFourBitAudio(Integer twentyFourBitAudio)`

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

    - #### AAFFileDescriptorImpl

          public AAFFileDescriptorImpl()

  - ### Method Detail

    - #### getCodec

          @MediaProperty(uuid1=100729092,
                         uuid2=259,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="Codec",
                         aliases={"CodecDefinition","FileDescriptorCodecDefinition"},
                         typeName="CodecDefinitionWeakReference",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=12293,
                         symbol="Codec")
          public CodecDefinition getCodec()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      throws PropertyNotPresentException

      Description copied from interface: `AAFFileDescriptor`

      Returns the codec of the described file, which identifies the mechanism used to compress and uncompress samples of essence or used to convert samples of essence from one format to another.

      Specified by:
        `getCodec` in interface `AAFFileDescriptor`
      Returns:
        Codec used to make the file.
      Throws:
        `PropertyNotPresentException` - The optional codec definition property is not present for this file descriptor.
      See Also:
        `TypeDefinitions.CodecDefinitionWeakReference`

    - #### setCodec

          @MediaPropertySetter(value="Codec")
          public void setCodec(CodecDefinition codec)

      Description copied from interface: `AAFFileDescriptor`

      Set the codec of the described file, which identifies the mechanism used to compress and uncompress samples of essence or used to convert samples of essence from one format to another.

      Specified by:
        `setCodec` in interface `AAFFileDescriptor`
      Parameters:
        `codec` - Codec that was used for the file.
      See Also:
        `CodecConstant`

    - #### getContainerFormat

          @MediaProperty(uuid1=100729092,
                         uuid2=258,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         aliases="EssenceContainer",
                         definedName="ContainerFormat",
                         typeName="ContainerDefinitionWeakReference",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=12292,
                         symbol="ContainerFormat")
          public ContainerDefinition getContainerFormat()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                           throws PropertyNotPresentException

      Description copied from interface: `AAFFileDescriptor`

      Returns the file format of the described file, which identifies the container mechanism used to store the essence.

      The container format is defined as an optional property but version 1.1 of the AAF object specification requires it to be specified for each file. However, file descriptors created with tools supporting earlier versions of the AAF specification may omit the property, in which case a `PropertyNotPresentException` is thrown.

      Specified by:
        `getContainerFormat` in interface `AAFFileDescriptor`
      Returns:
        File format of the described file.
      Throws:
        `PropertyNotPresentException` - The (rarely) optional container format property is not present in this file descriptor.
      See Also:
        `TypeDefinitions.ContainerDefinitionWeakReference`

    - #### setContainerFormat

          @MediaPropertySetter(value="ContainerFormat")
          public void setContainerFormat(ContainerDefinition format)

      Description copied from interface: `AAFFileDescriptor`

      Specifies the file format of the described file, which identifies the container mechanism used to store the essence.

      The container format is defined as an optional property but version 1.1 of the AAF object specification requires it to be specified for each file. The property can be omitted by setting its value to `null` for compatibility with older versions of the specification.

      Specified by:
        `setContainerFormat` in interface `AAFFileDescriptor`
      Parameters:
        `format` - File format to set for this file descriptor.
      See Also:
        `ContainerConstant`

    - #### getEssenceLength

          @MediaProperty(uuid1=67502338,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,1},
                         definedName="EssenceLength",
                         aliases={"Length","FileDescriptorLength"},
                         typeName="LengthType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=12290,
                         symbol="EssenceLength")
          public long getEssenceLength()
                                                                                                                                                                                                                                                                                                                                                                                                                                            throws BadPropertyException,
                                                                                                                                                                                                                                                                                                                                                                                                                                                   PropertyNotPresentException

      Description copied from interface: `AAFFileDescriptor`

      Returns the length of the essence in sample units. Set this optional property to `null` to omit it.

      Note that the sample rate is defined in MXF in terms of the number of addressable units, so for PCM audio this is one unit per audio sample and for MPEG audio this is one unit per frame.

      Specified by:
        `getEssenceLength` in interface `AAFFileDescriptor`
      Returns:
        Length of essence in samples.
      Throws:
        `BadPropertyException` - The length property is not present as this file descriptor describes static essence.
        `PropertyNotPresentException` - The optional essence length property is not present for this file descriptor.

    - #### setEssenceLength

          public void setEssenceLength(Long essenceLength)
                                throws BadPropertyException,
                                       BadLengthException

      Description copied from interface: `AAFFileDescriptor`

      Sets the length of the essence in sample units. This is an optional property that should only be set when the encoder knows the value.

      Note that the sample rate is defined in MXF in terms of the number of addressable units, so for PCM audio this is one unit per audio sample and for MPEG audio this is one unit per frame.

      Specified by:
        `setEssenceLength` in interface `AAFFileDescriptor`
      Parameters:
        `essenceLength` - Length of the essence in samples.
      Throws:
        `BadPropertyException` - The length property is not present as this file descriptor describes static essence.
        `BadLengthException` - The length of the described material is negative.

    - #### setEssenceLengthFromStream

          @MediaPropertySetter(value="EssenceLength")
          public void setEssenceLengthFromStream(long essenceLength)
                                                                                      throws BadLengthException

      Throws:
        `BadLengthException`

    - #### initializeEssenceLength

          public static final long initializeEssenceLength()

    - #### getSampleRate

          @MediaProperty(uuid1=67502337,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,1},
                         definedName="SampleRate",
                         aliases="FileDescriptorSampleRate",
                         typeName="Rational",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=12289,
                         symbol="SampleRate")
          public Rational getSampleRate()
                                                                                                                                                                                                                                                                                                                                                                                                                               throws BadPropertyException

      Description copied from interface: `AAFFileDescriptor`

      Returns the sample rate of the essence.

      The MXF specification further defines this to be the rate of the addressable units in the stream. For PCM audio, this is the same as the audio sampling rate. For MPEG audio, this is the same as the audio frame rate (e.g. AAC-encoding of 48kHz audio has 1024 samples per frame, so the rate is 48000/1024).

      Specified by:
        `getSampleRate` in interface `AAFFileDescriptor`
      Returns:
        Sample rate of the essence.
      Throws:
        `BadPropertyException` - The sample rate property is not present as this file descriptor describes static essence.

    - #### setSampleRate

          public void setSampleRate(Rational rate)
                             throws NullPointerException,
                                    BadPropertyException

      Description copied from interface: `AAFFileDescriptor`

      Sets sample rate of the essence.

      The MXF specification further defines this to be the rate of the addressable units in the stream. For PCM audio, this is the same as the audio sampling rate, for MPEG audio this is the same as the audio frame rate (e.g. AAC audio has 1024 samples per frame, so the rate is 48000/1024).

      Specified by:
        `setSampleRate` in interface `AAFFileDescriptor`
      Parameters:
        `rate` - Sample rate of the essence.
      Throws:
        `NullPointerException` - The given sample rate is `null`.
        `BadPropertyException` - The sample rate property is not present as this file descriptor describes static essence.

    - #### initializeSampleRate

          public static final Rational initializeSampleRate()

    - #### setSampleRateFromStream

          @MediaPropertySetter(value="SampleRate")
          public void setSampleRateFromStream(Rational rate)

    - #### describesStaticEssence

          public boolean describesStaticEssence()

      Determines whether this file descriptor describes static or time-varying essence. This method returns `true` if static essence is described and `false` if time-varying essence is described. If the file descriptor describes static essence then the `sample rate` and `length` properties are not present.

      Returns:
        Does this file descriptor describe static essence?

    - #### setDescribesStaticEssence

          public void setDescribesStaticEssence()

      Sets this file descriptor so that it describes static essence.

    - #### setDescribesTimeVaryingEssence

          public void setDescribesTimeVaryingEssence(Rational sampleRate,
                                                     long length)
                                              throws NullPointerException,
                                                     BadLengthException

      Sets this file descriptor so that it describes time varying essence. In this state, the `sample rate` and `length` properties are required and so must be provided to the call to this method.

      Parameters:
        `sampleRate` - Sample rate for this file descriptor.
        `length` - Length of the material represented by this file descriptor.
      Throws:
        `NullPointerException` - Argument is null.
        `BadLengthException` - The length of the described material is negative.

    - #### getLinkedTrackID

          @MediaProperty(uuid1=100729091,
                         uuid2=1280,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,5},
                         definedName="LinkedTrackID",
                         aliases="LinkedSlotID",
                         typeName="UInt32",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=12294,
                         symbol="LinkedTrackID")
          public int getLinkedTrackID()
                                                                                                                                                                                                                                                                                                                                                                                                                        throws PropertyNotPresentException

      Description copied from interface: `AAFFileDescriptor`

      Returns the linked track id of this file descriptor, which specifies which track of the associated source package this descriptor describes when the source package is described by a multiple descriptor. This is an optional property.

      Specified by:
        `getLinkedTrackID` in interface `AAFFileDescriptor`
      Returns:
        Linked track id of this file descriptor.
      Throws:
        `PropertyNotPresentException` - The optional linked track id property is not present in this file descriptor.

    - #### setLinkedTrackID

          @MediaPropertySetter(value="LinkedTrackID")
          public void setLinkedTrackID(Integer linkedTrackID)
                                                                            throws IllegalArgumentException

      Description copied from interface: `AAFFileDescriptor`

      Set the linked track id of this file descriptor, which specifies which track of the associated source package this descriptor describes when the source package is described by a multiple descriptor. In this case, this file descriptor is one of the collection of file descriptors that are part of a multiple descriptor, as returned by `MultipleDescriptor.getFileDescriptors()`. If this file descriptor is not part of a multiple descriptor collection, set this optional property to `null` to omit it.

      Specified by:
        `setLinkedTrackID` in interface `AAFFileDescriptor`
      Parameters:
        `linkedTrackID` - Linked track id of this file descriptor.
      Throws:
        `IllegalArgumentException` - The linked track id is negative.

    - #### getTwentyFourBitAudio

          @MediaProperty(uuid1=2078938896,
                         uuid2=-9719,
                         uuid3=18915,
                         uuid4={-98,120,-3,45,-85,22,110,-94},
                         definedName="24 bit audio",
                         symbol="_24_bit_audio",
                         aliases={"_4_bit_audio","_24_bit_audio","twentyFourBitAudio"},
                         typeName="Int32",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
           @Int32
          public int getTwentyFourBitAudio()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    throws PropertyNotPresentException

      Specified by:
        `getTwentyFourBitAudio` in interface `QAAFFileDescriptor`
      Throws:
        `PropertyNotPresentException`

    - #### setTwentyFourBitAudio

          @MediaPropertySetter(value="24 bit audio")
          public void setTwentyFourBitAudio(@Int32
                                                                                       Integer twentyFourBitAudio)

      Specified by:
        `setTwentyFourBitAudio` in interface `QAAFFileDescriptor`

    - #### clone

          public AAFFileDescriptor 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`
      Overrides:
        `clone` in class `EssenceDescriptorImpl`
      Returns:
        Cloned copy of this interchange object.

    - #### getSampleRateString

          public String getSampleRateString()

    - #### setSampleRateString

          public void setSampleRateString(String sampleRate)

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