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

tv.amwa.maj.model.impl

## Class PackageImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.PackageImpl

- All Implemented Interfaces:
    Serializable, Cloneable, MediaEntity, MetadataObject, WeakReferenceTarget, InterchangeObject, Package
  Direct Known Subclasses:
    CompositionPackageImpl, MaterialPackageImpl, SourcePackageImpl

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=13312,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="Package",
                  aliases="Mob",
                  description="Specifies a package, which can describe a composition, essence, or physical media.",
                  symbol="Package",
                  isConcrete=false)
      public class PackageImpl
      extends InterchangeObjectImpl
      implements Package, Package, Serializable, Cloneable

  Implements a package, which can describe a composition, essence, or physical media. A package has a unique identifier and consists of metadata.

  See Also:
    `TypeDefinitions.PackageWeakReference`, `TypeDefinitions.PackageStrongReference`, `TypeDefinitions.PackageStrongReferenceSet`, Serialized Form

- - ### Field Summary

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

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PackageImpl()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendMobAttributeItem(TaggedValue mobAttributeItem)`
    `EventTrackImpl` | `appendNewEventTrack(Rational editRate, Segment segment, int trackID, String trackName)` Creates and returns a new event track with the given edit rate, as well as appending it to the list of tracks of this package.
    `StaticTrackImpl` | `appendNewStaticTrack(Segment segment, int trackID, String trackName)` Creates and returns a new static track with the given property values, as well as appending it to the list of tracks of this package.
    `TimelineTrackImpl` | `appendNewTimelineTrack(Rational editRate, Segment segment, int trackID, String trackName, long origin)` Creates and returns a new timeline track with the given property values, as well as appending it to this package.
    `void` | `appendPackageAttribute(String name, String value)` Create and append a new attribute to the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).
    `void` | `appendPackageAttribute(TaggedValue packageAttribute)` Appends an existing attribute to the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).
    `void` | `appendPackageKLVData(KLVData packageKLVdata)` Appends an existing user KLV data item to the collection of KLV data items contained in this package.
    `void` | `appendPackageTrack(Track track)` Appends the given tracks to the list contained in this package.
    `void` | `appendPackageUserComment(String category, String comment)` Creates a user-defined comment and adds it to the collection of comments of this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
    `void` | `appendPackageUserComment(TaggedValue packageUserComment)` Append a user comment defined by an existing tagged value to the collection of user comments of this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
    `void` | `changeReference(PackageID oldPackageID, PackageID newPackageID)` Finds all source clips in this package that refer to the specified old package and changes the references to point to the newly specified package.
    `void` | `clearMobAttributeList()`
    `void` | `clearPackageAttributes()` Clears the list of package attributes of this package, omitting this optional property.
    `void` | `clearPackageKLVData()` Clears the list of KLV data items of this package, omitting this optional property.
    `void` | `clearPackageTracks()` Clears the list of package tracks attached to this package.
    `void` | `clearPackageUserComments()` Clears the list of user comments attached to this package, omitting this optional property.
    `Package` | `clone()` Create a cloned copy of this interchange object.
    `Package` | `cloneExternal(Depend resolveDependencies, IncludedMedia includedMedia, AAFFile file)` Clones this package, and optionally all dependent packages, to a package that can be used in an external file, keeping the same package id.
    `Package` | `copy(String destMobName)` Creates and returns a new copy of this package in the same AAF file.
    `int` | `countMobAttributeList()`
    `int` | `countPackageAttributes()` Returns the number of attributes in the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).
    `int` | `countPackageKLVData()` Returns the total number of KLV data items in the collection of KLV data items contained in this package.
    `int` | `countPackageTracks()` Returns the number of tracks contained in this package.
    `int` | `countPackageUserComments()` Returns the total number of user comments attached to this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
    `AUID` | `getAUID()` TODO
    `boolean` | `getConvertFrameRate()`
    `TimeStamp` | `getCreationTime()` Returns the creation time of this package, which is the date and time when this package was originally created.
    `String` | `getCreationTimeString()`
    `TaggedValue` | `getMobAttributeItemAt(int index)`
    `List<TaggedValue>` | `getMobAttributeList()`
    `List<TaggedValue>` | `getPackageAttributes()` Returns the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).
    `PackageID` | `getPackageID()` Returns the unique (package identifier) for this package.
    `String` | `getPackageIDString()`
    `List<KLVData>` | `getPackageKLVData()` Returns the collection of KLV data items contained in this package.
    `TimeStamp` | `getPackageLastModified()` Returns the modification time for this package, which is the date and time when this package was last modified.
    `String` | `getPackageLastModifiedString()`
    `String` | `getPackageName()` Returns the name of this package, as displayed to the end user.
    `Track` | `getPackageTrackAt(int index)` Returns the track at the given index through the list of tracks contained in this package.
    `List<Track>` | `getPackageTracks()` Return the list of tracks contained in this package.
    `AUID` | `getPackageUsage()` Returns the usage of this package.
    `String` | `getPackageUsageString()`
    `List<TaggedValue>` | `getPackageUserComments()` Returns the collection of all user comments attached to this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
    `long` | `getSubclipBegin()`
    `long` | `getSubclipFullLength()`
    `String` | `getWeakTargetReference()` Provides a name that can be used to make a weak object reference to an instance of the implementing class.
    `static TimeStamp` | `initializeCreationTime()`
    `static PackageID` | `initializePackageID()`
    `static TimeStamp` | `initializePackageLastModified()`
    `static List<Track>` | `initializePackageTracks()`
    `void` | `insertMobAttributeItem(int index, TaggedValue mobAttributeItem)`
    `void` | `insertPackageTrackAt(int index, Track track)` Inserts the given track into the list of tracks contained in this package at the given index.
    `Track` | `lookupPackageTrack(int trackID)` Finds and returns the track with the associated track id from the list of tracks for this package.
    `TimecodeValueImpl` | `offsetToPackageTimecode(Segment tcSeg, long offset)` Calculates the timecode at the given offset into the given timecode segment.
    `void` | `prependMobAttributeItem(TaggedValue mobAttributeItem)`
    `void` | `prependPackageAttribute(TaggedValue packageAttribute)`
    `void` | `prependPackageKLVData(KLVData packageKLVdata)`
    `void` | `prependPackageTrack(Track track)` Prepends the given track to the list of tracks contained in this package.
    `void` | `prependPackageUserComment(TaggedValue comment)`
    `void` | `removeMobAttributeItemAt(int index)`
    `void` | `removePackageAttribute(TaggedValue packageAttribute)` Removes the given attribute from the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).
    `void` | `removePackageKLVData(KLVData packageKLVdata)` Removes the given item of KLV data from the collection of KLV data items of this package.
    `void` | `removePackageTrackAt(int index)` Removes the track at the given index from the list of tracks contained in this package.
    `void` | `removePackageUserComment(TaggedValue packageUserComment)` Removes the given user comment from the collection of user comments of this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
    `void` | `setConvertFrameRate(Boolean convertFrameRate)`
    `void` | `setCreationTime(TimeStamp createTime)` Sets the creation time of this package, which is the date and time when this package was originally created.
    `void` | `setCreationTimeString(String creationTime)`
    `void` | `setPackageID(PackageID packageID)` Sets the unique (package identifier) for this package.
    `void` | `setPackageIDString(String packageID)`
    `void` | `setPackageLastModified(TimeStamp modTime)` Sets the modification time for this package, which is the date and time when this package was last modified.
    `void` | `setPackageLastModifiedString(String packageLastModified)`
    `void` | `setPackageName(String packageName)` Sets the name of this package, as displayed to the end user.
    `void` | `setPackageUsage(AUID packageUsage)` Sets this package's usage.
    `void` | `setPackageUsageString(String packageUsage)`
    `void` | `setSubclipBegin(Long subclipBegin)`
    `void` | `setSubclipFullLength(Long subclipFullLength)`

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

      `addApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getComment, 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.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

    - #### PackageImpl

          public PackageImpl()

  - ### Method Detail

    - #### getPackageAttributes

          @MediaProperty(uuid1=50397712,
                         uuid2=1792,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,7},
                         definedName="PackageAttributes",
                         aliases={"Attributes","MobAttributes"},
                         typeName="TaggedValueStrongReferenceVector",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=17417,
                         symbol="PackageAttributes")
          public List<TaggedValue> getPackageAttributes()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           throws PropertyNotPresentException

      Description copied from interface: `Package`

      Returns the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).

      Specified by:
        `getPackageAttributes` in interface `Package`
      Returns:
        Shallow copy of the collection of attributes contained in this package.
      Throws:
        `PropertyNotPresentException` - No attributes are present for this package.
      See Also:
        `TypeDefinitions.TaggedValueStrongReferenceVector`

    - #### appendPackageAttribute

          public void appendPackageAttribute(String name,
                                             String value)
                                      throws NullPointerException

      Description copied from interface: `Package`

      Create and append a new attribute to the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).

      This method creates a new tagged value, initializes it with the specified attribute name/value pair, and appends it to the attribute collection.

      Specified by:
        `appendPackageAttribute` in interface `Package`
      Parameters:
        `name` - Name of the new attribute.
        `value` - Value of the new attribute.
      Throws:
        `NullPointerException` - One or both of the arguments is/are `null`.
      See Also:
        `Package.appendPackageAttribute(TaggedValue)`

    - #### appendPackageAttribute

          @MediaListAppend(value="PackageAttributes")
          public void appendPackageAttribute(TaggedValue packageAttribute)
                                                                                  throws NullPointerException

      Description copied from interface: `Package`

      Appends an existing attribute to the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).

      Specified by:
        `appendPackageAttribute` in interface `Package`
      Parameters:
        `packageAttribute` - Attribute to append to the collection of attributes contained in this package.
      Throws:
        `NullPointerException` - The given attribute is `null`.
      See Also:
        `Package.appendPackageAttribute(String, String)`

    - #### prependPackageAttribute

          @MediaListPrepend(value="PackageAttributes")
          public void prependPackageAttribute(TaggedValue packageAttribute)
                                                                                    throws NullPointerException

      Throws:
        `NullPointerException`

    - #### countPackageAttributes

          @MediaPropertyCount(value="PackageAttributes")
          public int countPackageAttributes()

      Description copied from interface: `Package`

      Returns the number of attributes in the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).

      Specified by:
        `countPackageAttributes` in interface `Package`
      Returns:
        Number of attributes in the collection of attributes contained in this package.

    - #### clearPackageAttributes

          @MediaPropertyClear(value="PackageAttributes")
          public void clearPackageAttributes()

      Description copied from interface: `Package`

      Clears the list of package attributes of this package, omitting this optional property.

      Specified by:
        `clearPackageAttributes` in interface `Package`

    - #### removePackageAttribute

          @MediaPropertyRemove(value="PackageAttributes")
          public void removePackageAttribute(TaggedValue packageAttribute)
                                                                                      throws NullPointerException,
                                                                                             PropertyNotPresentException,
                                                                                             ObjectNotFoundException

      Description copied from interface: `Package`

      Removes the given attribute from the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).

      Specified by:
        `removePackageAttribute` in interface `Package`
      Parameters:
        `packageAttribute` - Attribute to remove from the collection of attributes contained in this package.
      Throws:
        `NullPointerException` - The given attribute is `null`.
        `PropertyNotPresentException` - No attributes are present for this package.
        `ObjectNotFoundException` - The given attribute could not be found in collection of attributes contained in this package.

    - #### getPackageUserComments

          @MediaProperty(uuid1=50462978,
                         uuid2=3072,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="PackageUserComments",
                         aliases={"UserComments","MobUserComments"},
                         typeName="TaggedValueStrongReferenceVector",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=17414,
                         symbol="PackageUserComments")
          public List<TaggedValue> getPackageUserComments()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     throws PropertyNotPresentException

      Description copied from interface: `Package`

      Returns the collection of all user comments attached to this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns). This is an optional property.

      Specified by:
        `getPackageUserComments` in interface `Package`
      Returns:
        Shallow copy of the collection of all comments attached to this package.
      Throws:
        `PropertyNotPresentException` - No optional user comments are present for this package.
      See Also:
        `TypeDefinitions.TaggedValueStrongReferenceVector`

    - #### appendPackageUserComment

          public void appendPackageUserComment(String category,
                                               String comment)
                                        throws NullPointerException

      Description copied from interface: `Package`

      Creates a user-defined comment and adds it to the collection of comments of this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

      This method creates a new tagged value, initializes it with the specified comment name/value pair, and appends it to the comment collection.

      Specified by:
        `appendPackageUserComment` in interface `Package`
      Parameters:
        `category` - The name associated with the new comment to create.
        `comment` - The corresponding value, or description, of the new comment.
      Throws:
        `NullPointerException` - One or both of the name and/or value values is/are `null`.

    - #### appendPackageUserComment

          @MediaListAppend(value="PackageUserComments")
          public void appendPackageUserComment(TaggedValue packageUserComment)
                                                                                      throws NullPointerException

      Description copied from interface: `Package`

      Append a user comment defined by an existing tagged value to the collection of user comments of this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

      Specified by:
        `appendPackageUserComment` in interface `Package`
      Parameters:
        `packageUserComment` - User comment to append to the collection of user comments of this component.
      Throws:
        `NullPointerException` - The given user comment value is `null`.
      See Also:
        `TaggedValueDefinition`

    - #### prependPackageUserComment

          @MediaListPrepend(value="PackageUserComments")
          public void prependPackageUserComment(TaggedValue comment)
                                                                                        throws NullPointerException

      Throws:
        `NullPointerException`

    - #### countPackageUserComments

          @MediaPropertyCount(value="PackageUserComments")
          public int countPackageUserComments()

      Description copied from interface: `Package`

      Returns the total number of user comments attached to this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

      Specified by:
        `countPackageUserComments` in interface `Package`
      Returns:
        Total number of comments attached to this package.

    - #### clearPackageUserComments

          @MediaPropertyClear(value="PackageUserComments")
          public void clearPackageUserComments()

      Description copied from interface: `Package`

      Clears the list of user comments attached to this package, omitting this optional property.

      Specified by:
        `clearPackageUserComments` in interface `Package`

    - #### removePackageUserComment

          @MediaPropertyRemove(value="PackageUserComments")
          public void removePackageUserComment(TaggedValue packageUserComment)
                                                                                          throws NullPointerException,
                                                                                                 PropertyNotPresentException,
                                                                                                 ObjectNotFoundException

      Description copied from interface: `Package`

      Removes the given user comment from the collection of user comments of this package, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

      Specified by:
        `removePackageUserComment` in interface `Package`
      Parameters:
        `packageUserComment` - User comment to remove from the collection of this package.
      Throws:
        `NullPointerException` - The given tagged value user comment is `null`.
        `PropertyNotPresentException` - No user comments are present for this package.
        `ObjectNotFoundException` - The given comment is not in the collection of user comments of this package.

    - #### getPackageKLVData

          @MediaProperty(uuid1=50397712,
                         uuid2=768,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="PackageKLVData",
                         aliases={"MobKLVData","KLVData"},
                         typeName="KLVDataStrongReferenceVector",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=17415,
                         symbol="PackageKLVData")
          public List<KLVData> getPackageKLVData()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                   throws PropertyNotPresentException

      Description copied from interface: `Package`

      Returns the collection of KLV data items contained in this package. This is an optional property.

      Specified by:
        `getPackageKLVData` in interface `Package`
      Returns:
        Shallow copy of the collection of KLV data items contained in this package.
      Throws:
        `PropertyNotPresentException` - No KLV data values are present for this package.
      See Also:
        `TypeDefinitions.KLVDataStrongReferenceVector`

    - #### appendPackageKLVData

          @MediaListAppend(value="PackageKLVData")
          public void appendPackageKLVData(KLVData packageKLVdata)
                                                                             throws NullPointerException

      Description copied from interface: `Package`

      Appends an existing user KLV data item to the collection of KLV data items contained in this package.

      Specified by:
        `appendPackageKLVData` in interface `Package`
      Parameters:
        `packageKLVdata` - KLV data item to add to the collection of data items contained in this package.
      Throws:
        `NullPointerException` - The given KLV data item is `null`.
      See Also:
        `KLVDataDefinition`

    - #### prependPackageKLVData

          @MediaListPrepend(value="PackageKLVData")
          public void prependPackageKLVData(KLVData packageKLVdata)
                                                                               throws NullPointerException

      Throws:
        `NullPointerException`

    - #### countPackageKLVData

          @MediaPropertyCount(value="PackageKLVData")
          public int countPackageKLVData()

      Description copied from interface: `Package`

      Returns the total number of KLV data items in the collection of KLV data items contained in this package.

      Specified by:
        `countPackageKLVData` in interface `Package`
      Returns:
        Total number of KLV data items contained in this package.

    - #### clearPackageKLVData

          @MediaPropertyClear(value="PackageKLVData")
          public void clearPackageKLVData()

      Description copied from interface: `Package`

      Clears the list of KLV data items of this package, omitting this optional property.

      Specified by:
        `clearPackageKLVData` in interface `Package`

    - #### removePackageKLVData

          @MediaPropertyRemove(value="PackageKLVData")
          public void removePackageKLVData(KLVData packageKLVdata)
                                                                                 throws NullPointerException,
                                                                                        ObjectNotFoundException

      Description copied from interface: `Package`

      Removes the given item of KLV data from the collection of KLV data items of this package.

      Specified by:
        `removePackageKLVData` in interface `Package`
      Parameters:
        `packageKLVdata` - KLV data to remove from the set of KLV data of this package.
      Throws:
        `NullPointerException` - Argument is `null`.
        `ObjectNotFoundException` - The given KLV data object could not be found in the collection of KLV data items for this package.

    - #### getPackageTracks

          @MediaProperty(uuid1=100729092,
                         uuid2=1541,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="PackageTracks",
                         aliases={"Slots","MobSlots"},
                         typeName="TrackStrongReferenceVector",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=17411,
                         symbol="PackageTracks")
          public List<Track> getPackageTracks()

      Description copied from interface: `Package`

      Return the list of tracks contained in this package.

      Specified by:
        `getPackageTracks` in interface `Package`
      Returns:
        Shallow copy of the list of tracks contained in this package.
      See Also:
        `TypeDefinitions.TrackStrongReferenceVector`

    - #### initializePackageTracks

          public static final List<Track> initializePackageTracks()

    - #### appendNewEventTrack

          public EventTrackImpl appendNewEventTrack(Rational editRate,
                                                    Segment segment,
                                                    int trackID,
                                                    String trackName)
                                             throws NullPointerException,
                                                    IllegalArgumentException,
                                                    TrackExistsException

      Description copied from interface: `Package`

      Creates and returns a new event track with the given edit rate, as well as appending it to the list of tracks of this package.

      Specified by:
        `appendNewEventTrack` in interface `Package`
      Parameters:
        `editRate` - Edit rate property for the new event track.
        `segment` - Segment for the new event track.
        `trackID` - Track ID for the new event track.
        `trackName` - Name for the new event track, or `null` to omit this optional property.
      Returns:
        The newly created event track, which is also appended as a track to the list of tracks of this package.
      Throws:
        `NullPointerException` - One or both of the edit rate and/or segment arguments is `null`.
        `IllegalArgumentException` - The track id is negative or the given segment is not valid according to the conditional rules for event track.
        `TrackExistsException` - A track with the given track id is already present in this package.
      See Also:
        `Package.appendPackageTrack(Track)`

    - #### appendNewStaticTrack

          public StaticTrackImpl appendNewStaticTrack(Segment segment,
                                                      int trackID,
                                                      String trackName)
                                               throws NullPointerException,
                                                      IllegalArgumentException,
                                                      TrackExistsException

      Description copied from interface: `Package`

      Creates and returns a new static track with the given property values, as well as appending it to the list of tracks of this package.

      Specified by:
        `appendNewStaticTrack` in interface `Package`
      Parameters:
        `segment` - Segment to use to create a new static track.
        `trackID` - Track id to assign to the new static track.
        `trackName` - Name for the new static track, or `null` to omit this optional property.
      Returns:
        Newly created static track, which is also appended to the list of tracks of this package.
      Throws:
        `NullPointerException` - The given segment is `null`.
        `IllegalArgumentException` - The given track id is negative.
        `TrackExistsException` - A track with the given track id is already present in this package.
      See Also:
        `Package.appendPackageTrack(Track)`

    - #### appendNewTimelineTrack

          public TimelineTrackImpl appendNewTimelineTrack(Rational editRate,
                                                          Segment segment,
                                                          @TrackID
                                                          int trackID,
                                                          String trackName,
                                                          long origin)
                                                   throws NullPointerException,
                                                          IllegalArgumentException,
                                                          TrackExistsException

      Description copied from interface: `Package`

      Creates and returns a new timeline track with the given property values, as well as appending it to this package.

      Specified by:
        `appendNewTimelineTrack` in interface `Package`
      Parameters:
        `editRate` - Units of time for the new timeline track.
        `segment` - Value for the new timeline track.
        `trackID` - Integer to be used to refer to the track.
        `trackName` - Name of the new timeline track, or `null` to omit this optional property.
        `origin` - Specifies the offset used to resolve source clip references to source material in the new timeline track, measured in according to the edit rate of the new track. A positive value means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.
      Returns:
        The newly created timeline tracl, which is also appended to the list of tracks of this package.
      Throws:
        `NullPointerException` - One or more of the arguments is `null`.
        `IllegalArgumentException` - The given track id is negative.
        `TrackExistsException` - The given track id is already used to to identify a track in this package.

    - #### appendPackageTrack

          @MediaListAppend(value="PackageTracks")
          public void appendPackageTrack(Track track)
                                                                          throws NullPointerException,
                                                                                 TrackExistsException

      Description copied from interface: `Package`

      Appends the given tracks to the list contained in this package. Note that the index of a package track in the list of package tracks is not the same as its track id.

      Specified by:
        `appendPackageTrack` in interface `Package`
      Parameters:
        `track` - Track to append to the list of tracks described by this package.
      Throws:
        `NullPointerException` - The given track is `null`.
        `TrackExistsException` - A track with the same track id as the given track is already present in this package.

    - #### countPackageTracks

          @MediaPropertyCount(value="PackageTracks")
          public int countPackageTracks()

      Description copied from interface: `Package`

      Returns the number of tracks contained in this package.

      Specified by:
        `countPackageTracks` in interface `Package`
      Returns:
        Number of tracks contained by this package.

    - #### getPackageTrackAt

          @MediaListGetAt(value="PackageTracks")
          public Track getPackageTrackAt(int index)
                                                                         throws IndexOutOfBoundsException

      Description copied from interface: `Package`

      Returns the track at the given index through the list of tracks contained in this package.

      Specified by:
        `getPackageTrackAt` in interface `Package`
      Parameters:
        `index` - Index of track to be returned.
      Returns:
        Track at the specified index through the list of this package.
      Throws:
        `IndexOutOfBoundsException` - Index is outside the acceptable range for the list of tracks contained in this package.

    - #### insertPackageTrackAt

          @MediaListInsertAt(value="PackageTracks")
          public void insertPackageTrackAt(int index,
                                                                                     Track track)
                                                                              throws NullPointerException,
                                                                                     IndexOutOfBoundsException,
                                                                                     TrackExistsException

      Description copied from interface: `Package`

      Inserts the given track into the list of tracks contained in this package at the given index. All existing tracks at the given and higher index will be moved up by one index to accommodate the new track. Note that the index of a track in the list of tracks is not the same as its track id.

      Specified by:
        `insertPackageTrackAt` in interface `Package`
      Parameters:
        `index` - Index where the track is to be inserted.
        `track` - Track to be inserted into the list contained in this package.
      Throws:
        `NullPointerException` - The given track is `null`.
        `IndexOutOfBoundsException` - Index is outside the acceptable range for the list of tracks contained in this package.
        `TrackExistsException` - A track with the same track id as the given track is already present in this package.

    - #### lookupPackageTrack

          public Track lookupPackageTrack(int trackID)
                                   throws TrackNotFoundException

      Description copied from interface: `Package`

      Finds and returns the track with the associated track id from the list of tracks for this package.

      Specified by:
        `lookupPackageTrack` in interface `Package`
      Parameters:
        `trackID` - The requested track id from the list of tracks of this package.
      Returns:
        Matching track.
      Throws:
        `TrackNotFoundException` - A track with the given track id was not found in this package.

    - #### prependPackageTrack

          @MediaListPrepend(value="PackageTracks")
          public void prependPackageTrack(Track track)
                                                                            throws NullPointerException,
                                                                                   TrackExistsException

      Description copied from interface: `Package`

      Prepends the given track to the list of tracks contained in this package. Note that the index of a package track in the list of tracks is not the same as its track id.

      Specified by:
        `prependPackageTrack` in interface `Package`
      Parameters:
        `track` - Track to prepend to the list of tracks described by this package.
      Throws:
        `NullPointerException` - The given track is `null`.
        `TrackExistsException` - A track with the same track id as the given track is already present in this package.

    - #### removePackageTrackAt

          @MediaListRemoveAt(value="PackageTracks")
          public void removePackageTrackAt(int index)
                                                                              throws IndexOutOfBoundsException

      Description copied from interface: `Package`

      Removes the track at the given index from the list of tracks contained in this package. All existing tracks at indices higher than the given index will be moved on one index to accommodate.

      Specified by:
        `removePackageTrackAt` in interface `Package`
      Parameters:
        `index` - Index of the track to be removed from the list of tracks of this package.
      Throws:
        `IndexOutOfBoundsException` - Index is outside the acceptable range for the list of tracks contained in this package.

    - #### clearPackageTracks

          @MediaPropertyClear(value="PackageTracks")
          public void clearPackageTracks()

      Description copied from interface: `Package`

      Clears the list of package tracks attached to this package.

      Specified by:
        `clearPackageTracks` in interface `Package`

    - #### getCreationTime

          @MediaProperty(uuid1=117571856,
                         uuid2=259,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="CreationTime",
                         aliases={"CreateTime","CreationDate"},
                         typeName="TimeStamp",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=17413,
                         symbol="CreationTime")
          public TimeStamp getCreationTime()

      Description copied from interface: `Package`

      Returns the creation time of this package, which is the date and time when this package was originally created.

      Specified by:
        `getCreationTime` in interface `Package`
      Returns:
        Creation time for this package.

    - #### setCreationTime

          @MediaPropertySetter(value="CreationTime")
          public void setCreationTime(TimeStamp createTime)
                                                                          throws NullPointerException

      Description copied from interface: `Package`

      Sets the creation time of this package, which is the date and time when this package was originally created. The creation time is initially set to the time that this package was created. Therefore, this method should only be called to explicitly to change the creation time.

      Specified by:
        `setCreationTime` in interface `Package`
      Parameters:
        `createTime` - The creation time for this package.
      Throws:
        `NullPointerException` - The given creation time is `null`.
      See Also:
        `Forge.now()`, `Forge.makeTimeStamp(java.util.Calendar)`

    - #### initializeCreationTime

          public static final TimeStamp initializeCreationTime()

    - #### getPackageID

          @MediaProperty(uuid1=16848144,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,1},
                         definedName="PackageID",
                         aliases="MobID",
                         typeName="PackageIDType",
                         optional=false,
                         uniqueIdentifier=true,
                         pid=17409,
                         symbol="PackageID")
          public PackageID getPackageID()

      Description copied from interface: `Package`

      Returns the unique (package identifier) for this package.

      Specified by:
        `getPackageID` in interface `Package`
      Returns:
        Unique package id that identifies this package.

    - #### setPackageID

          @MediaPropertySetter(value="PackageID")
          public void setPackageID(PackageID packageID)
                                                                    throws NullPointerException

      Description copied from interface: `Package`

      Sets the unique (package identifier) for this package.

      Specified by:
        `setPackageID` in interface `Package`
      Parameters:
        `packageID` - New package identifier to set for this package.
      Throws:
        `NullPointerException` - The given package identifier is `null`.
      See Also:
        `Forge.makePackageID(byte[], byte, byte, byte, byte, AUID)`

    - #### initializePackageID

          public static final PackageID initializePackageID()

    - #### getPackageLastModified

          @MediaProperty(uuid1=117571856,
                         uuid2=517,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="PackageLastModified",
                         aliases={"LastModified","MobLastModified","ModificationDate"},
                         typeName="TimeStamp",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=17412,
                         symbol="PackageLastModified")
          public TimeStamp getPackageLastModified()

      Description copied from interface: `Package`

      Returns the modification time for this package, which is the date and time when this package was last modified.

      Specified by:
        `getPackageLastModified` in interface `Package`
      Returns:
        Modification time for this package.

    - #### setPackageLastModified

          @MediaPropertySetter(value="PackageLastModified")
          public void setPackageLastModified(TimeStamp modTime)
                                                                                        throws NullPointerException

      Description copied from interface: `Package`

      Sets the modification time for this package, which is the date and time when this package was last modified. The modification time is initially set to the time that this package was created.

      The MAJ API does not maintain the modification time every time that a package is updated. Therefore, this method should be called explicitly to change the modification time for this package.

      Specified by:
        `setPackageLastModified` in interface `Package`
      Parameters:
        `modTime` - Modification time to set for this package.
      Throws:
        `NullPointerException` - The given modification time is `null`.
      See Also:
        `Forge.now()`, `Forge.makeTimeStamp(java.util.Calendar)`

    - #### initializePackageLastModified

          public static final TimeStamp initializePackageLastModified()

    - #### getPackageName

          @MediaProperty(uuid1=16974594,
                         uuid2=256,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,1},
                         definedName="PackageName",
                         aliases={"Name","MobName"},
                         typeName="UTF16String",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=17410,
                         symbol="PackageName")
          public String getPackageName()
                                                                                                                                                                                                                                                                                                                                                                                                                            throws PropertyNotPresentException

      Description copied from interface: `Package`

      Returns the name of this package, as displayed to the end user. This is an optional property.

      Specified by:
        `getPackageName` in interface `Package`
      Returns:
        Name of this package.
      Throws:
        `PropertyNotPresentException` - The optional name property is not present in this package.

    - #### setPackageName

          @MediaPropertySetter(value="PackageName")
          public void setPackageName(String packageName)

      Description copied from interface: `Package`

      Sets the name of this package, as displayed to the end user. Set this optional property to `null` to omit it.

      Specified by:
        `setPackageName` in interface `Package`
      Parameters:
        `packageName` - Name of this package.

    - #### getPackageUsage

          @MediaProperty(uuid1=83951880,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,7},
                         definedName="PackageUsage",
                         aliases="UsageCode",
                         typeName="UsageType",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=17416,
                         symbol="PackageUsage")
          public AUID getPackageUsage()
                                                                                                                                                                                                                                                                                                                                                                                                                  throws PropertyNotPresentException

      Description copied from interface: `Package`

      Returns the usage of this package. This is an optional property.

      The built-in usage codes are specified in the AAF edit protocol.

      Specified by:
        `getPackageUsage` in interface `Package`
      Returns:
        Usage of this package.
      Throws:
        `PropertyNotPresentException` - The optional usage code property is not present in this package.
      See Also:
        `UsageType`, `TypeDefinitions.UsageType`

    - #### setPackageUsage

          @MediaPropertySetter(value="PackageUsage")
          public void setPackageUsage(AUID packageUsage)

      Description copied from interface: `Package`

      Sets this package's usage.

      Possible values include:

      - `UsageType.AdjustedClip`
      - `UsageType.LowerLevel`
      - `UsageType.SubClip`
      - `UsageType.Template`
      - `UsageType.TopLevel`

      Set this optional property to `null` to omit it, which is used to specify that a clip references only file, import, tape or film sources.

      The built-in usage codes are specified in the AAF edit protocol.

      Specified by:
        `setPackageUsage` in interface `Package`
      Parameters:
        `packageUsage` - This package's usage code.
      See Also:
        `UsageType`, `TypeDefinitions.UsageType`

    - #### offsetToPackageTimecode

          public TimecodeValueImpl offsetToPackageTimecode(Segment tcSeg,
                                                           long offset)
                                                    throws NullPointerException,
                                                           TimecodeNotFoundException

      Description copied from interface: `Package`

      Calculates the timecode at the given offset into the given timecode segment. If the given timecode segment is `null`, the method will search for the track containing a timecode segment in this package and will use that instead.

      Specified by:
        `offsetToPackageTimecode` in interface `Package`
      Parameters:
        `tcSeg` - Timecode segment to search for, or `null` to select the one from this package.
        `offset` - Offset into the segment, expressed in edit unit's for the associated track.
      Returns:
        Associated timecode for the given offset.
      Throws:
        `NullPointerException` - The given timecode segment is `null`.
        `TimecodeNotFoundException` - A timecode track was not found in this package.

    - #### changeReference

          public void changeReference(PackageID oldPackageID,
                                      PackageID newPackageID)
                               throws NullPointerException

      Description copied from interface: `Package`

      Finds all source clips in this package that refer to the specified old package and changes the references to point to the newly specified package.

      This method traverses through all the package reference chains of all of the tracks of this package looking for source clips. All source clips that have a source id property that matches the old package id, changes them to the new package id.

      Specified by:
        `changeReference` in interface `Package`
      Parameters:
        `oldPackageID` - Package id to match against the source id property of a source clip.
        `newPackageID` - If a match is found, change the package id of the source clip to the given one.
      Throws:
        `NullPointerException` - One or both of the given package ids is/are `null`.
      See Also:
        `SourceReferenceSegment.getSourcePackageID()`

    - #### cloneExternal

          public Package cloneExternal(Depend resolveDependencies,
                                       IncludedMedia includedMedia,
                                       AAFFile file)

      Description copied from interface: `Package`

      Clones this package, and optionally all dependent packages, to a package that can be used in an external file, keeping the same package id.

      The method clones the specified this package into a new destination package, with the same package id, in the given destination file. If the resolve dependencies flag is set to follow, the method also clones all packages referenced by this package.

      If the include media flag is set, the method also copies the essence data associated with this package and returns the destination package, also cloning all private data. If the media data is not in the file, the function does not attempt to find it in another file and clone it. Both AAF files must be open before you call this function and both must have the same version number.

      Specified by:
        `cloneExternal` in interface `Package`
      Parameters:
        `resolveDependencies` - Sets whether the clone of this package also clones all of its references.
        `includedMedia` - Sets whether any media data included with this package should be copied into the clone or not.
        `file` - File in which to create the cloned package.
      Returns:
        Externally valid cloned version of this package, created according to the given parameters.

    - #### copy

          public Package copy(String destMobName)
                       throws NullPointerException

      Description copied from interface: `Package`

      Creates and returns a new copy of this package in the same AAF file. The method gives the returned new package a new package id and the given name. The method also copies all private data.

      Specified by:
        `copy` in interface `Package`
      Parameters:
        `destMobName` - Name for the newly created, copied version of this package.
      Returns:
        Newly created copy of this package.
      Throws:
        `NullPointerException` - The given destination name for the new package is `null`.

    - #### clone

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

    - #### getConvertFrameRate

          @MediaProperty(uuid1=-735822892,
                         uuid2=322,
                         uuid3=17813,
                         uuid4={-88,-13,-14,-21,-91,66,68,-34},
                         definedName="ConvertFrameRate",
                         typeName="Boolean",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         symbol="ConvertFrameRate",
                         namespace="http://www.amwa.tv/is03/extensions/avid",
                         prefix="avid")
          public boolean getConvertFrameRate()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### setConvertFrameRate

          @MediaPropertySetter(value="ConvertFrameRate")
          public void setConvertFrameRate(Boolean convertFrameRate)

    - #### getMobAttributeList

          @MediaProperty(uuid1=1620410755,
                         uuid2=18353,
                         uuid3=4564,
                         uuid4={-96,28,0,4,-84,-106,-97,80},
                         definedName="MobAttributeList",
                         typeName="TaggedValueStrongReferenceVector",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         symbol="MobAttributeList",
                         namespace="http://www.amwa.tv/is03/extensions/avid",
                         prefix="avid")
          public List<TaggedValue> getMobAttributeList()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### appendMobAttributeItem

          @MediaListAppend(value="MobAttributeList")
          public void appendMobAttributeItem(TaggedValue mobAttributeItem)
                                                                                 throws NullPointerException

      Throws:
        `NullPointerException`

    - #### prependMobAttributeItem

          @MediaListPrepend(value="MobAttributeList")
          public void prependMobAttributeItem(TaggedValue mobAttributeItem)
                                                                                   throws NullPointerException

      Throws:
        `NullPointerException`

    - #### insertMobAttributeItem

          @MediaListInsertAt(value="MobAttributeList")
          public void insertMobAttributeItem(int index,
                                                                                          TaggedValue mobAttributeItem)
                                                                                   throws NullPointerException,
                                                                                          IndexOutOfBoundsException

      Throws:
        `NullPointerException`
        `IndexOutOfBoundsException`

    - #### countMobAttributeList

          @MediaPropertyCount(value="MobAttributeList")
          public int countMobAttributeList()

    - #### clearMobAttributeList

          @MediaPropertyClear(value="MobAttributeList")
          public void clearMobAttributeList()

    - #### getMobAttributeItemAt

          @MediaListGetAt(value="MobAttributeList")
          public TaggedValue getMobAttributeItemAt(int index)
                                                                                      throws IndexOutOfBoundsException

      Throws:
        `IndexOutOfBoundsException`

    - #### removeMobAttributeItemAt

          @MediaListRemoveAt(value="MobAttributeList")
          public void removeMobAttributeItemAt(int index)
                                                                                     throws IndexOutOfBoundsException

      Throws:
        `IndexOutOfBoundsException`

    - #### getSubclipFullLength

          @MediaProperty(uuid1=308461435,
                         uuid2=-798,
                         uuid3=19966,
                         uuid4={-96,-10,-50,-20,4,124,-128,-86},
                         definedName="SubclipFullLength",
                         typeName="Int64",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         symbol="SubclipFullLength1",
                         namespace="http://www.amwa.tv/is03/extensions/avid",
                         prefix="avid")
           @Int64
          public long getSubclipFullLength()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### setSubclipFullLength

          @MediaPropertySetter(value="SubclipFullLength")
          public void setSubclipFullLength(@Int64
                                                                                           Long subclipFullLength)

    - #### getSubclipBegin

          @MediaProperty(uuid1=-1440434601,
                         uuid2=-837,
                         uuid3=18721,
                         uuid4={-107,29,58,32,56,57,103,34},
                         definedName="SubclipBegin",
                         typeName="Int64",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         symbol="SubclipBegin",
                         namespace="http://www.amwa.tv/is03/extensions/avid",
                         prefix="avid")
           @Int64
          public long getSubclipBegin()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### setSubclipBegin

          @MediaPropertySetter(value="SubclipBegin")
          public void setSubclipBegin(@Int64
                                                                                 Long subclipBegin)

    - #### getPackageUsageString

          public String getPackageUsageString()

    - #### setPackageUsageString

          public void setPackageUsageString(String packageUsage)

    - #### getPackageLastModifiedString

          public String getPackageLastModifiedString()

    - #### setPackageLastModifiedString

          public void setPackageLastModifiedString(String packageLastModified)

    - #### getCreationTimeString

          public String getCreationTimeString()

    - #### setCreationTimeString

          public void setCreationTimeString(String creationTime)

    - #### getPackageIDString

          public String getPackageIDString()

    - #### setPackageIDString

          public void setPackageIDString(String packageID)

    - #### getWeakTargetReference

          public String getWeakTargetReference()

      Description copied from interface: `WeakReferenceTarget`

      Provides a name that can be used to make a weak object reference to an instance of the implementing class.

      Specified by:
        `getWeakTargetReference` in interface `WeakReferenceTarget`
      Returns:
        A name to use to make weak reference to this object.

    - #### getAUID

          public AUID getAUID()

      TODO

      Is this the right AUID?

      Specified by:
        `getAUID` in interface `WeakReferenceTarget`
      Returns:
        Unique identifier of the target of the reference.

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