Media Authoring
with Java API

tv.amwa.maj.entity
Class Mob

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.Mob
All Implemented Interfaces:
Serializable, Cloneable, InterchangeObject, Mob, XMLSerializable
Direct Known Subclasses:
CompositionMob, MasterMob, SourceMob

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=13312,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="Mob",
          description="The Mob class specifies a Mob, which can describe a composition, essence, or physical media.")
public abstract class Mob
extends InterchangeObject
implements Mob, Serializable, Cloneable

Implements a material object (mob), which can describe a composition, essence, or physical media. A mob has a unique identifier and consists of metadata.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class Mob.MobAttributesXMLHandler
           
static class Mob.MobKLVDataXMLHandler
           
static class Mob.MobUserCommentsXMLHandler
           
static class Mob.SlotsXMLHandler
           
static class Mob.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String MOB_ITEM
           
 
Constructor Summary
Mob()
           
 
Method Summary
 void appendAttribute(String name, String value)
          Create and append a new attribute to the collection of attributes contained in this mob, which specify attributes that are under the control of the application (for example filter control).
 void appendAttribute(TaggedValue attribute)
          Appends an existing attribute to the collection of attributes contained in this mob, which specify attributes that are under the control of the application (for example filter control).
 void appendComment(String category, String comment)
          Creates a user-defined comment and adds it to the collection of comments of this mob, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 void appendComment(TaggedValue comment)
          Append a user comment defined by an existing tagged value to the collection of user comments of this mob, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 void appendKLVData(KLVData data)
          Appends an existing user KLV data item to the collection of KLV data items contained in this mob.
 EventMobSlot appendNewEventSlot(Rational editRate, Segment segment, int slotID, String slotName)
          Creates and returns a new event mob slot with the given edit rate, as well as appending it to the list of slots of this mob.
 StaticMobSlot appendNewStaticSlot(Segment segment, int slotID, String slotName)
          Creates and returns a new static mob slot with the given property values, as well as appending it to the list of slots of this mob.
 TimelineMobSlot appendNewTimelineSlot(Rational editRate, Segment segment, int slotId, String slotName, long origin)
          Creates and returns a new timeline mob slot with the given property values, as well as appending it to this mob.
 void appendSlot(MobSlot slot)
          Appends the given mob slot to the list contained in this mob.
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 void changeReference(MobID oldMobID, MobID newMobID)
          Finds all source clips in this mob that refer to the specified old mob and changes the references to point to the newly specified mob.
 Mob clone()
           
 Mob cloneExternal(Depend resolveDependencies, IncludedMedia includedMedia, AAFFile file)
          Clones this mob, and optionally all dependent mobs, to a mob that can be used in an external file, keeping the same mob id.
 Mob copy(String destMobName)
          Creates and returns a new copy of this mob in the same AAF file.
 int countAttributes()
          Returns the number of attributes in the collection of attributes contained in this mob, which specify attributes that are under the control of the application (for example filter control).
 int countComments()
          Returns the total number of user comments attached to this mob, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 int countKLVData()
          Returns the total number of KLV data items in the collection of KLV data items contained in this mob.
 int countSlots()
          Returns the number of mob slots contained in this mob.
 boolean equals(Object o)
           
 List<TaggedValue> getAttributes()
          Returns the collection of attributes contained in this mob, which specify attributes that are under the control of the application (for example filter control).
 List<TaggedValue> getComments()
          Returns the collection of all comments attached to this mob, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 TimeStamp getCreateTime()
          Returns the creation time of this mob, which is the date and time when this mob was originally created.
 List<KLVData> getKLVData()
          Returns the collection of KLV data items contained in this mob.
 MobID getMobID()
          Returns the unique mob identifier (MobID) for this mob.
 TimeStamp getModTime()
          Returns the modification time for this mob, which is the date and time when this mob was last modified.
 String getName()
          Returns the name of this mob, as displayed to the end user.
 MobSlot getSlotAt(int index)
          Returns the mob slot at the given index through the list of mobs contained in this mob.
 List<MobSlot> getSlots()
          Return the list of mob slots contained in this mob.
 AUID getUsageCode()
          Returns the usage code for this mob, which specifies how this mob is used.
 int hashCode()
           
 void insertSlotAt(int index, MobSlot slot)
          Inserts the given mob slot into the list of slots contained in this mob at the given index.
 MobSlot lookupSlot(int slotId)
          Finds and returns the mob slot with the associated slot id from the list of slots for this mob.
 TimecodeValue offsetToMobTimecode(Segment tcSeg, long offset)
          Calculates the timecode at the given offset into the given timecode segment.
 void prependSlot(MobSlot slot)
          Prepends the given mob slot to the list contained in this mob.
 void removeAttribute(TaggedValue attribute)
          Removes the given attribute from the collection of attributes contained in this mob, which specify attributes that are under the control of the application (for example filter control).
 void removeComment(TaggedValue comment)
          Removes the given user comment from the collection of user comments of this mob, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 void removeKLVData(KLVData data)
          Removes the given item of KLV data from the collection of KLV data items of this mob.
 void removeSlotAt(int index)
          Removes the mob slot at the given index from the list of slots contained in this mob.
 void setCreateTime(TimeStamp createTime)
          Sets the creation time of this mob, which is the date and time when this mob was originally created.
 void setMobID(MobID mobId)
          Sets the unique mob identifier (MobID) for this mob.
 void setModTime(TimeStamp modTime)
          Sets the modification time for this mob, which is the date and time when this mob was last modified.
 void setName(String name)
          Sets the name of this mob, as displayed to the end user.
 void setPropertiesFromInterface(Mob castFrom)
           
 void setUsageCode(AUID usageCode)
          Sets this mob's usage code, which specifies how this mob is used.
 
Methods inherited from class tv.amwa.maj.entity.InterchangeObject
castFromInterface, countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, registerImplementation, setPropertiesFromInterface, setPropertyValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 

Field Detail

MOB_ITEM

public static final String MOB_ITEM
See Also:
Constant Field Values
Constructor Detail

Mob

public Mob()
Method Detail

setPropertiesFromInterface

public final void setPropertiesFromInterface(Mob castFrom)
See Also:
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)

getAttributes

@AAFProperty(uuid1=50397712,
             uuid2=1792,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,7},
             definedName="Attributes",
             typeName="StrongReferenceVector of TaggedValue",
             optional=true,
             uniqueIdentifier=false,
             pid=17417)
public List<TaggedValue> getAttributes()
Description copied from interface: Mob

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

Specified by:
getAttributes in interface Mob
Returns:
Shallow copy of the collection of attributes contained in this mob.

appendAttribute

public void appendAttribute(String name,
                            String value)
                     throws NullPointerException
Description copied from interface: Mob

Create and append a new attribute to the collection of attributes contained in this mob, 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:
appendAttribute in interface Mob
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:
Mob.appendAttribute(TaggedValue)

appendAttribute

public void appendAttribute(TaggedValue attribute)
                     throws NullPointerException
Description copied from interface: Mob

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

Specified by:
appendAttribute in interface Mob
Parameters:
attribute - Attribute to append to the collection of attributes contained in this mob.
Throws:
NullPointerException - The given attribute is null.
See Also:
makeTaggedValue(), Mob.appendAttribute(String, String)

countAttributes

public int countAttributes()
Description copied from interface: Mob

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

Specified by:
countAttributes in interface Mob
Returns:
Number of attributes in the collection of attributes contained in this mob.

removeAttribute

public void removeAttribute(TaggedValue attribute)
                     throws NullPointerException,
                            ObjectNotFoundException
Description copied from interface: Mob

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

Specified by:
removeAttribute in interface Mob
Parameters:
attribute - Attribute to remove from the collection of attributes contained in this mob.
Throws:
NullPointerException - The given attribute is null.
ObjectNotFoundException - The given attribute could not be found in collection of attributes contained in this mob.

getComments

@AAFProperty(uuid1=50462978,
             uuid2=3072,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="UserComments",
             typeName="StrongReferenceVector of TaggedValue",
             optional=true,
             uniqueIdentifier=false,
             pid=17414)
public List<TaggedValue> getComments()
Description copied from interface: Mob

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

Specified by:
getComments in interface Mob
Returns:
Shallow copy of the collection of all comments attached to this mob.

appendComment

public void appendComment(String category,
                          String comment)
                   throws NullPointerException
Description copied from interface: Mob

Creates a user-defined comment and adds it to the collection of comments of this mob, 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:
appendComment in interface Mob
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.
See Also:
makeTaggedValue()

appendComment

public void appendComment(TaggedValue comment)
                   throws NullPointerException
Description copied from interface: Mob

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

Specified by:
appendComment in interface Mob
Parameters:
comment - User comment to append to the collection of user comments of this component.
Throws:
NullPointerException - The given user comment value is null.
See Also:
makeTaggedValue(), TaggedValueDefinition

countComments

public int countComments()
Description copied from interface: Mob

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

Specified by:
countComments in interface Mob
Returns:
Total number of comments attached to this mob.

removeComment

public void removeComment(TaggedValue comment)
                   throws NullPointerException,
                          ObjectNotFoundException
Description copied from interface: Mob

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

Specified by:
removeComment in interface Mob
Parameters:
comment - User comment to remove from the collection of this mob.
Throws:
NullPointerException - The given tagged value user comment is null.
ObjectNotFoundException - The given comment is not in the collection of user comments of this mob.

getKLVData

@AAFProperty(uuid1=50397712,
             uuid2=768,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="KLVData",
             typeName="StrongReferenceVector of KLVData",
             optional=true,
             uniqueIdentifier=false,
             pid=17415)
public List<KLVData> getKLVData()
Description copied from interface: Mob

Returns the collection of KLV data items contained in this mob.

Specified by:
getKLVData in interface Mob
Returns:
Shallow copy of the collection of KLV data items contained in this mob.

appendKLVData

public void appendKLVData(KLVData data)
                   throws NullPointerException
Description copied from interface: Mob

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

Specified by:
appendKLVData in interface Mob
Parameters:
data - KLV data item to add to the collection of data items contained in this mob.
Throws:
NullPointerException - The given KLV data item is null.
See Also:
makeKLVData(), KLVDataDefinition

countKLVData

public int countKLVData()
Description copied from interface: Mob

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

Specified by:
countKLVData in interface Mob
Returns:
Total number of KLV data items contained in this mob.

removeKLVData

public void removeKLVData(KLVData data)
                   throws NullPointerException,
                          ObjectNotFoundException
Description copied from interface: Mob

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

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

getSlots

@AAFProperty(uuid1=100729092,
             uuid2=1541,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Slots",
             typeName="StrongReferenceVector of MobSlot",
             optional=false,
             uniqueIdentifier=false,
             pid=17411)
public List<MobSlot> getSlots()
Description copied from interface: Mob

Return the list of mob slots contained in this mob.

Specified by:
getSlots in interface Mob
Returns:
Shallow copy of the list of mob slots contained in this mob.

appendNewEventSlot

public EventMobSlot appendNewEventSlot(Rational editRate,
                                       Segment segment,
                                       int slotID,
                                       String slotName)
                                throws NullPointerException,
                                       IllegalArgumentException,
                                       SlotExistsException
Description copied from interface: Mob

Creates and returns a new event mob slot with the given edit rate, as well as appending it to the list of slots of this mob.

Specified by:
appendNewEventSlot in interface Mob
Parameters:
editRate - Edit rate property for the new event mob slot.
segment - Segment for the new event mob slot.
slotID - Slot ID for the new event mob slot.
slotName - Name for the new event mob slot, or null to omit this optional property.
Returns:
The newly created event mob slot, which is also appended as a slot to the list of slots of this mob.
Throws:
NullPointerException - One or both of the edit rate and/or segment arguments is null.
IllegalArgumentException - The slot id is negative or the given segment is not valid according to the conditional rules for event mob slots.
SlotExistsException - A mob slot with the given slot id is already present in this mob.
See Also:
Mob.appendSlot(MobSlot), makeEventMobSlot()

appendNewStaticSlot

public StaticMobSlot appendNewStaticSlot(Segment segment,
                                         int slotID,
                                         String slotName)
                                  throws NullPointerException,
                                         IllegalArgumentException,
                                         SlotExistsException
Description copied from interface: Mob

Creates and returns a new static mob slot with the given property values, as well as appending it to the list of slots of this mob.

Specified by:
appendNewStaticSlot in interface Mob
Parameters:
segment - Segment to use to create a new static mob slot.
slotID - Slot id to assign to the new static mob slot.
slotName - Name for the new static mob slot, or null to omit this optional property.
Returns:
Newly created static mob slot, which is also appended to the list of mob slots of this mob.
Throws:
NullPointerException - The given segment is null.
IllegalArgumentException - The given slot id is negative.
SlotExistsException - A mob slot with the given slot id is already present in this mob.
See Also:
Mob.appendSlot(MobSlot), makeStaticMobSlot()

appendNewTimelineSlot

public TimelineMobSlot appendNewTimelineSlot(Rational editRate,
                                             Segment segment,
                                             @SlotID
                                             int slotId,
                                             String slotName,
                                             long origin)
                                      throws NullPointerException,
                                             IllegalArgumentException,
                                             SlotExistsException
Description copied from interface: Mob

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

Specified by:
appendNewTimelineSlot in interface Mob
Parameters:
editRate - Units of time for the new timeline mob slot.
segment - Value for the new timeline mob slot.
slotId - Integer to be used to refer to the mob slot.
slotName - Name of the new timeline mob slot, or null to omit this optional property.
origin - Specifies the offset used to resolve source clip references to source material in the new timeline mob slot, measured in according to the edit rate of the new slot. 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 mob slot, which is also appended to the list of mob slots of this mob.
Throws:
NullPointerException - One or more of the arguments is null.
IllegalArgumentException - The given slot id is negative.
SlotExistsException - The given slot is already used to to identify a slot in this mob.

appendSlot

public void appendSlot(MobSlot slot)
                throws NullPointerException,
                       SlotExistsException
Description copied from interface: Mob

Appends the given mob slot to the list contained in this mob. Note that the index of a mob slot in the list of mob slots is not the same as its slot id.

Specified by:
appendSlot in interface Mob
Parameters:
slot - Mob slot to append to the list of slots contained in this mob.
Throws:
NullPointerException - The given mob slot is null.
SlotExistsException - A mob slot with the same slot id as the given mob slot is already present in this mob.

countSlots

public int countSlots()
Description copied from interface: Mob

Returns the number of mob slots contained in this mob.

Specified by:
countSlots in interface Mob
Returns:
Number of slots contained by this mob.

getSlotAt

public MobSlot getSlotAt(int index)
                  throws IndexOutOfBoundsException
Description copied from interface: Mob

Returns the mob slot at the given index through the list of mobs contained in this mob.

Specified by:
getSlotAt in interface Mob
Parameters:
index - Index of mob slot to be returned.
Returns:
Mob slot at the specified index through the list of this mob.
Throws:
IndexOutOfBoundsException - Index is outside the acceptable range for the list of mob slots contained in this mob.

insertSlotAt

public void insertSlotAt(int index,
                         MobSlot slot)
                  throws NullPointerException,
                         IndexOutOfBoundsException,
                         SlotExistsException
Description copied from interface: Mob

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

Specified by:
insertSlotAt in interface Mob
Parameters:
index - Index where the mob slot is to be inserted.
slot - Mob slot to be inserted into the list contained in this mob.
Throws:
NullPointerException - The given mob slot is null.
IndexOutOfBoundsException - Index is outside the acceptable range for the list of mob slots contained in this mob.
SlotExistsException - A mob slot with the same slot id as the given mob slot is already present in this mob.

lookupSlot

public MobSlot lookupSlot(int slotId)
                   throws SlotNotFoundException
Description copied from interface: Mob

Finds and returns the mob slot with the associated slot id from the list of slots for this mob.

Specified by:
lookupSlot in interface Mob
Parameters:
slotId - The requested slot id from the list of slots of this mob.
Returns:
Matching mob slot.
Throws:
SlotNotFoundException - A mob slot with the given slot id was not found in this mob.

prependSlot

public void prependSlot(MobSlot slot)
                 throws NullPointerException,
                        SlotExistsException
Description copied from interface: Mob

Prepends the given mob slot to the list contained in this mob. Note that the index of a mob slot in the list of mob slots is not the same as its slot id.

Specified by:
prependSlot in interface Mob
Parameters:
slot - Mob slot to prepend to the list of slots contained in this mob.
Throws:
NullPointerException - The given mob slot is null.
SlotExistsException - A mob slot with the same slot id as the given mob slot is already present in this mob.

removeSlotAt

public void removeSlotAt(int index)
                  throws IndexOutOfBoundsException
Description copied from interface: Mob

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

Specified by:
removeSlotAt in interface Mob
Parameters:
index - Index of mob slot to be removed from the list of slots of this mob.
Throws:
IndexOutOfBoundsException - Index is outside the acceptable range for the list of mob slots contained in this mob.

getCreateTime

@AAFProperty(uuid1=117571856,
             uuid2=259,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="CreationTime",
             typeName="TimeStamp",
             optional=false,
             uniqueIdentifier=false,
             pid=17413)
public TimeStamp getCreateTime()
Description copied from interface: Mob

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

Specified by:
getCreateTime in interface Mob
Returns:
Creation time for this mob.

setCreateTime

public void setCreateTime(TimeStamp createTime)
                   throws NullPointerException
Description copied from interface: Mob

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

Specified by:
setCreateTime in interface Mob
Parameters:
createTime - The creation time for this mob.
Throws:
NullPointerException - The given creation time is null.
See Also:
TimeStamp.TimeStamp(), TimeStamp.TimeStamp(java.util.Calendar)

getMobID

@AAFProperty(uuid1=16848144,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="MobID",
             typeName="MobIDType",
             optional=false,
             uniqueIdentifier=true,
             pid=17409)
public MobID getMobID()
Description copied from interface: Mob

Returns the unique mob identifier (MobID) for this mob.

Specified by:
getMobID in interface Mob
Returns:
Unique mob id that identifies this mob.

setMobID

public void setMobID(MobID mobId)
              throws NullPointerException
Description copied from interface: Mob

Sets the unique mob identifier (MobID) for this mob.

Specified by:
setMobID in interface Mob
Parameters:
mobId - New mob identifier to set for this mob.
Throws:
NullPointerException - The given mob identifier is null.
See Also:
umidFactory()

getModTime

@AAFProperty(uuid1=117571856,
             uuid2=517,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="LastModified",
             typeName="TimeStamp",
             optional=false,
             uniqueIdentifier=false,
             pid=17412)
public TimeStamp getModTime()
Description copied from interface: Mob

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

Specified by:
getModTime in interface Mob
Returns:
Modification time for this mob.

setModTime

public void setModTime(TimeStamp modTime)
                throws NullPointerException
Description copied from interface: Mob

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

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

Specified by:
setModTime in interface Mob
Parameters:
modTime - Modification time to set for this mob.
Throws:
NullPointerException - The given modification time is null.
See Also:
TimeStamp.TimeStamp(), TimeStamp.TimeStamp(java.util.Calendar)

getName

@AAFProperty(uuid1=16974594,
             uuid2=256,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="Name",
             typeName="String",
             optional=true,
             uniqueIdentifier=false,
             pid=17410)
public String getName()
               throws PropertyNotPresentException
Description copied from interface: Mob

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

Specified by:
getName in interface Mob
Returns:
Name of this mob.
Throws:
PropertyNotPresentException - The optional name property is not present in this mob.

setName

public void setName(String name)
Description copied from interface: Mob

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

Specified by:
setName in interface Mob
Parameters:
name - Name of this mob.

getUsageCode

@AAFProperty(uuid1=83951880,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,7},
             definedName="UsageCode",
             typeName="UsageType",
             optional=true,
             uniqueIdentifier=false,
             pid=17416)
public AUID getUsageCode()
                  throws PropertyNotPresentException
Description copied from interface: Mob

Returns the usage code for this mob, which specifies how this mob is used.

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

Specified by:
getUsageCode in interface Mob
Returns:
Usage code for this mob.
Throws:
PropertyNotPresentException - The optional usage code property is not present in this mob.
See Also:
UsageType, TypeDefinitionExtendibleEnumeration.UsageType

setUsageCode

public void setUsageCode(AUID usageCode)
Description copied from interface: Mob

Sets this mob's usage code, which specifies how this mob is used.

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.

Specified by:
setUsageCode in interface Mob
Parameters:
usageCode - This mob's usage code.
See Also:
UsageType, TypeDefinitionExtendibleEnumeration.UsageType

offsetToMobTimecode

public TimecodeValue offsetToMobTimecode(Segment tcSeg,
                                         long offset)
                                  throws NullPointerException,
                                         TimecodeNotFoundException
Description copied from interface: Mob

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 slot containing a timecode segment in this mob and will use that instead.

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

changeReference

public void changeReference(MobID oldMobID,
                            MobID newMobID)
                     throws NullPointerException
Description copied from interface: Mob

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

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

Specified by:
changeReference in interface Mob
Parameters:
oldMobID - Mob id to match against the source id property of a source clip.
newMobID - If a match is found, change the mob id of the source clip to the given one.
Throws:
NullPointerException - One or both of the given mob ids is/are null.
See Also:
SourceReferenceSegment.getSourceID()

cloneExternal

public Mob cloneExternal(Depend resolveDependencies,
                         IncludedMedia includedMedia,
                         AAFFile file)
Description copied from interface: Mob

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

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

If the include media flag is set, the method also copies the essence data associated with this mob and returns the destination mob, 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 Mob
Parameters:
resolveDependencies - Sets whether the clone of this mob also clones all of its references.
includedMedia - Sets whether any media data included with this mob should be copied into the clone or not.
file - File in which to create the cloned mob.
Returns:
Externally valid cloned version of this mob, created according to the given parameters.

copy

public Mob copy(String destMobName)
         throws NullPointerException
Description copied from interface: Mob

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

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

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public Mob clone()
Overrides:
clone in class Object

appendXMLChildren

public void appendXMLChildren(Node parent)
Description copied from interface: XMLSerializable

Append child elements to the given parent node to serialize the value of an object to an XML fragment. Methods of the XMLBuilder class are provided to help with this process.

Specified by:
appendXMLChildren in interface XMLSerializable
Overrides:
appendXMLChildren in class InterchangeObject
Parameters:
parent - XML parent element to append child nodes to.

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.