public interface Package extends InterchangeObject, WeakReferenceTarget
Specifies a package, which can describe a composition, essence, or physical media. A package has a unique identifier and consists of metadata.
| Modifier and Type | Method and Description |
|---|---|
EventTrack |
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.
|
StaticTrack |
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.
|
TimelineTrack |
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 packageTrack)
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 |
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 package.
|
Package |
cloneExternal(Depend resolveDependencies,
IncludedMedia includedMedia,
AAFFile clonedFile)
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 destinationPackageName)
Creates and returns a new copy of this package in the same
AAF file.
|
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).
|
TimeStamp |
getCreationTime()
Returns the creation time of this package, which is the date and time when this package
was originally created.
|
List<? extends 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.
|
List<? extends 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 |
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<? extends Track> |
getPackageTracks()
Return the list of tracks contained in this
package.
|
AUID |
getPackageUsage()
Returns the usage of this package.
|
List<? extends 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).
|
void |
insertPackageTrackAt(int index,
Track packageTrack)
Inserts the given track into the list of tracks
contained in this package at the given index.
|
Track |
lookupPackageTrack(int trackId)
|
TimecodeValue |
offsetToPackageTimecode(Segment timecodeSegment,
long offset)
Calculates the timecode at the given offset into the given timecode segment.
|
void |
prependPackageTrack(Track packageTrack)
Prepends the given track to the list of tracks
contained in this package.
|
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 |
setCreationTime(TimeStamp creationTime)
Sets the creation time of this package, which is the date and time when this package
was originally created.
|
void |
setPackageID(PackageID packageId)
Sets the unique (package identifier)
for this package.
|
void |
setPackageLastModified(TimeStamp lastModified)
Sets the modification time for this package, which is the date and time when this
package was last modified.
|
void |
setPackageName(String name)
Sets the name of this package, as displayed to the end user.
|
void |
setPackageUsage(AUID packageUsage)
Sets this package's usage.
|
addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toStringgetPersistentID, setPersistentIndexgetAUID, getWeakTargetReference@PackageIDType PackageID getPackageID()
Returns the unique (package identifier) for this package.
void setPackageID(@PackageIDType PackageID packageId) throws NullPointerException
Sets the unique (package identifier) for this package.
packageId - New package identifier to set for this package.NullPointerException - The given package identifier is null.Forge.makePackageID(byte[], byte, byte, byte, byte, AUID)void setPackageName(@AAFString String name)
Sets the name of this package, as displayed to the end user. Set this optional
property to null to omit it.
name - Name of this package.@AAFString String getPackageName() throws PropertyNotPresentException
Returns the name of this package, as displayed to the end user. This is an optional property.
PropertyNotPresentException - The optional name property is not present in
this package.@NumTracks int countPackageTracks()
Returns the number of tracks contained in this package.
void appendPackageTrack(Track packageTrack) throws NullPointerException, TrackExistsException
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.
packageTrack - Track to append to the list of tracks described by this package.NullPointerException - The given track is null.TrackExistsException - A track with the same track id as the given track
is already present in this package.void prependPackageTrack(Track packageTrack) throws NullPointerException, TrackExistsException
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.
packageTrack - Track to prepend to the list of tracks described by this package.NullPointerException - The given track is null.TrackExistsException - A track with the same track id as the given track
is already present in this package.void insertPackageTrackAt(@UInt32 int index, Track packageTrack) throws NullPointerException, IndexOutOfBoundsException, TrackExistsException
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.
index - Index where the track is to be inserted.packageTrack - Track to be inserted into the list contained in this package.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.void removePackageTrackAt(@UInt32 int index) throws IndexOutOfBoundsException
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.
index - Index of the track to be removed from the list of tracks of this package.IndexOutOfBoundsException - Index is outside the acceptable range
for the list of tracks contained in this package.Track getPackageTrackAt(@UInt32 int index) throws IndexOutOfBoundsException
Returns the track at the given index through the list of tracks contained in this package.
index - Index of track to be returned.IndexOutOfBoundsException - Index is outside the acceptable range
for the list of tracks contained in this package.List<? extends Track> getPackageTracks()
Return the list of tracks contained in this package.
TypeDefinitions.TrackStrongReferenceVectorTimeStamp getPackageLastModified()
Returns the modification time for this package, which is the date and time when this package was last modified.
void setPackageLastModified(TimeStamp lastModified) throws NullPointerException
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.
lastModified - Modification time to set for this package.NullPointerException - The given modification time is null.Forge.now(),
Forge.makeTimeStamp(java.util.Calendar)TimeStamp getCreationTime()
Returns the creation time of this package, which is the date and time when this package was originally created.
void setCreationTime(TimeStamp creationTime) throws NullPointerException
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.
creationTime - The creation time for this package.NullPointerException - The given creation time is null.Forge.now(),
Forge.makeTimeStamp(java.util.Calendar)void appendPackageUserComment(@AAFString String category, @AAFString String comment) throws NullPointerException
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.
category - The name associated with the new comment to create.comment - The corresponding value, or description, of the new comment.NullPointerException - One or both of the name and/or value values is/are null.void appendPackageUserComment(TaggedValue packageUserComment) throws NullPointerException
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).
packageUserComment - User comment to append to the collection of user comments of this component.NullPointerException - The given user comment value is null.TaggedValueDefinition@UInt32 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).
void clearPackageUserComments()
Clears the list of user comments attached to this package, omitting this optional property.
void clearPackageTracks()
Clears the list of package tracks attached to this package.
List<? extends TaggedValue> getPackageUserComments() throws PropertyNotPresentException
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.
PropertyNotPresentException - No optional user comments are present for this package.TypeDefinitions.TaggedValueStrongReferenceVectorvoid removePackageUserComment(TaggedValue packageUserComment) throws NullPointerException, PropertyNotPresentException, ObjectNotFoundException
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).
packageUserComment - User comment to remove from the collection of this package.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.TimelineTrack appendNewTimelineTrack(Rational editRate, Segment segment, @TrackID int trackId, @AAFString String trackName, @PositionType long origin) throws NullPointerException, IllegalArgumentException, TrackExistsException
Creates and returns a new timeline track with the given property values, as well as appending it to this package.
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.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.TimecodeValue offsetToPackageTimecode(Segment timecodeSegment, @PositionType long offset) throws NullPointerException, TimecodeNotFoundException
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.
timecodeSegment - 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.NullPointerException - The given timecode segment is null.TimecodeNotFoundException - A timecode track was not found in this
package.Track lookupPackageTrack(@TrackID int trackId) throws TrackNotFoundException
trackId - The requested track id from the list of tracks of this package.TrackNotFoundException - A track with the given track id was not found in
this package.void changeReference(PackageID oldPackageId, PackageID newPackageId) throws NullPointerException
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.
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.NullPointerException - One or both of the given package ids is/are null.SourceReferenceSegment.getSourcePackageID()Package cloneExternal(Depend resolveDependencies, IncludedMedia includedMedia, AAFFile clonedFile) throws NullPointerException
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.
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.clonedFile - File in which to create the cloned package.NullPointerException - One or more of the given arguments is/are null
and all are required.Package copy(@AAFString String destinationPackageName) throws NullPointerException
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.
destinationPackageName - Name for the newly created, copied version of this package.NullPointerException - The given destination name for the new package is
null.void appendPackageKLVData(KLVData packageKLVData) throws NullPointerException
Appends an existing user KLV data item to the collection of KLV data items contained in this package.
packageKLVData - KLV data item to add to the collection of data items contained in
this package.NullPointerException - The given KLV data item is null.KLVDataDefinition@UInt32 int countPackageKLVData()
Returns the total number of KLV data items in the collection of KLV data items contained in this package.
void clearPackageKLVData()
Clears the list of KLV data items of this package, omitting this optional property.
List<? extends KLVData> getPackageKLVData() throws PropertyNotPresentException
Returns the collection of KLV data items contained in this package. This is an optional property.
PropertyNotPresentException - No KLV data values are present for this package.TypeDefinitions.KLVDataStrongReferenceVectorvoid removePackageKLVData(KLVData packageKLVData) throws NullPointerException, PropertyNotPresentException, ObjectNotFoundException
Removes the given item of KLV data from the collection of KLV data items of this package.
packageKLVData - KLV data to remove from the set of KLV data of this package.NullPointerException - Argument is null.PropertyNotPresentException - No KLV data is present for this package.ObjectNotFoundException - The given KLV data object could not be
found in the collection of KLV data items for this package.void appendPackageAttribute(@AAFString String name, @AAFString String value) throws NullPointerException
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.
name - Name of the new attribute.value - Value of the new attribute.NullPointerException - One or both of the arguments is/are null.appendPackageAttribute(TaggedValue)void appendPackageAttribute(TaggedValue packageAttribute) throws NullPointerException
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).
packageAttribute - Attribute to append to the collection of attributes contained in this
package.NullPointerException - The given attribute is null.appendPackageAttribute(String, String)@UInt32 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).
void clearPackageAttributes()
Clears the list of package attributes of this package, omitting this optional property.
List<? extends TaggedValue> getPackageAttributes() throws PropertyNotPresentException
Returns the collection of attributes contained in this package, which specify attributes that are under the control of the application (for example filter control).
PropertyNotPresentException - No attributes are present for this package.TypeDefinitions.TaggedValueStrongReferenceVectorvoid removePackageAttribute(TaggedValue packageAttribute) throws NullPointerException, PropertyNotPresentException, ObjectNotFoundException
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).
packageAttribute - Attribute to remove from the collection of attributes contained in
this package.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.void setPackageUsage(AUID packageUsage) throws NullPointerException
Sets this package's usage.
Possible values include:
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.
packageUsage - This package's usage code.NullPointerException - The given usage is null.UsageType,
TypeDefinitions.UsageTypeAUID getPackageUsage() throws PropertyNotPresentException
Returns the usage of this package. This is an optional property.
The built-in usage codes are specified in the AAF edit protocol.
PropertyNotPresentException - The optional usage code property is not
present in this package.UsageType,
TypeDefinitions.UsageTypeStaticTrack appendNewStaticTrack(Segment segment, @TrackID int trackId, @AAFString String trackName) throws NullPointerException, IllegalArgumentException, TrackExistsException
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.
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.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.appendPackageTrack(Track)EventTrack appendNewEventTrack(Rational editRate, Segment segment, @TrackID int trackId, @AAFString String trackName) throws NullPointerException, IllegalArgumentException, TrackExistsException
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.
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.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.appendPackageTrack(Track)Package clone()
Create a cloned copy of this package.
clone in interface InterchangeObjectclone in interface MediaEntity(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.