Media Authoring
with Java API

tv.amwa.maj.entity
Class CompositionMob

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.Mob
          extended by tv.amwa.maj.entity.CompositionMob
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, CompositionMob, InterchangeObject, Mob, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=13568,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="CompositionMob",
          description="The CompositionMob class specifies how to combine essence elements into a sequence, how to modify essence elements, and how to synchronize essence elements.")
public class CompositionMob
extends Mob
implements CompositionMob, Serializable, Cloneable, MAJCommon

Implements a material object that describes how to combine content data elements into a sequence, how to modify content data elements, and how to synchronize content data elements.

THE COMMENTS IN THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class CompositionMob.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.Mob
Mob.MobAttributesXMLHandler, Mob.MobKLVDataXMLHandler, Mob.MobUserCommentsXMLHandler, Mob.SlotsXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String COMPOSITIONMOB_TAG
           
 
Fields inherited from class tv.amwa.maj.entity.Mob
MOB_ITEM
 
Constructor Summary
CompositionMob(MobID mobID, String name)
          Creates and initializes a composition mob, which specifies how to combine essence elements into a sequence, how to modify essence elements, and how to synchronize essence elements.
 
Method Summary
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 CompositionMob clone()
          Creates a cloned copy of this entity.
 DefaultFade getDefaultFade()
          Returns the default fade for this composition mob, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties.
 Rational getDefaultFadeEditUnit()
           
 long getDefaultFadeLength()
           
 FadeType getDefaultFadeType()
           
 MobID getRendering()
          Returns the mob id of a rendering of this composition mob, which specifies a mixdown of the composition.
 void setDefaultFade(DefaultFade defaultFade)
          Sets the default fade properties for this composition mob, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties.
 void setDefaultFade(long fadeLength, FadeType fadeType, Rational fadeEditUnit)
          Sets the default fade properties of this composition mob, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties.
 void setPropertiesFromInterface(CompositionMob castFrom)
           
 void setRendering(MobID mobID)
          Set the mob id of a rendering of this composition mob, which specifies a mixdown of the composition.
 
Methods inherited from class tv.amwa.maj.entity.Mob
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, appendNewEventSlot, appendNewStaticSlot, appendNewTimelineSlot, appendSlot, changeReference, cloneExternal, copy, countAttributes, countComments, countKLVData, countSlots, equals, getAttributes, getComments, getCreateTime, getKLVData, getMobID, getModTime, getName, getSlotAt, getSlots, getUsageCode, hashCode, insertSlotAt, lookupSlot, offsetToMobTimecode, prependSlot, removeAttribute, removeComment, removeKLVData, removeSlotAt, setCreateTime, setMobID, setModTime, setName, setPropertiesFromInterface, setUsageCode
 
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
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.Mob
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, appendNewEventSlot, appendNewStaticSlot, appendNewTimelineSlot, appendSlot, changeReference, cloneExternal, copy, countAttributes, countComments, countKLVData, countSlots, getAttributes, getComments, getCreateTime, getKLVData, getMobID, getModTime, getName, getSlotAt, getSlots, getUsageCode, insertSlotAt, lookupSlot, offsetToMobTimecode, prependSlot, removeAttribute, removeComment, removeKLVData, removeSlotAt, setCreateTime, setMobID, setModTime, setName, setUsageCode
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 
Methods inherited from interface tv.amwa.maj.entity.MAJCommon
equals, hashCode, toString
 

Field Detail

COMPOSITIONMOB_TAG

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

CompositionMob

public CompositionMob(MobID mobID,
                      @AAFString
                      String name)
               throws NullPointerException

Creates and initializes a composition mob, which specifies how to combine essence elements into a sequence, how to modify essence elements, and how to synchronize essence elements. The required properties of creation time and last modified time will be set automatically to the time of calling this method. These timestamp values can be set manually by calling setCreateTime() and and setModTime().

Parameters:
mobID - Unique material identifier for the new composition mob.
name - Name of the new composition mob.
Throws:
NullPointerException - Unique material identifier argument is null.
Method Detail

setPropertiesFromInterface

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

getDefaultFade

public DefaultFade getDefaultFade()
                           throws PropertyNotPresentException
Description copied from interface: CompositionMob

Returns the default fade for this composition mob, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties. The default fade properties are optional.

Specified by:
getDefaultFade in interface CompositionMob
Returns:
Default fade for the composition.
Throws:
PropertyNotPresentException - The optional default fade properties are not present in this composition mob.

setDefaultFade

public void setDefaultFade(long fadeLength,
                           FadeType fadeType,
                           Rational fadeEditUnit)
                    throws BadLengthException
Description copied from interface: CompositionMob

Sets the default fade properties of this composition mob, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties. The default fade properties are optional and can be omitted by calling this method with null for either the fade type or fade edit unit properties.

Specified by:
setDefaultFade in interface CompositionMob
Parameters:
fadeLength - Default fade length for the fade.
fadeType - Default fade type for the fade.
fadeEditUnit - Default fade edit unit for the fade.
Throws:
BadLengthException - Fade length is negative.

setDefaultFade

public void setDefaultFade(DefaultFade defaultFade)
Description copied from interface: CompositionMob

Sets the default fade properties for this composition mob, which specifies the default fade to be applied to all audio source clips that do not specify their own audio fade properties. The default fade properties are optional and can be omitted by calling this method with null.

Specified by:
setDefaultFade in interface CompositionMob
Parameters:
defaultFade - Default fade properties for this composition mob.
See Also:
DefaultFade.DefaultFade(long, FadeType, Rational)

getDefaultFadeLength

@AAFProperty(uuid1=117572097,
             uuid2=261,
             uuid3=256,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="DefaultFadeLength",
             typeName="LengthType",
             optional=true,
             uniqueIdentifier=false,
             pid=17665)
public long getDefaultFadeLength()
                          throws PropertyNotPresentException
Throws:
PropertyNotPresentException

getDefaultFadeType

@AAFProperty(uuid1=87032321,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="DefFadeType",
             typeName="FadeType",
             optional=true,
             uniqueIdentifier=false,
             pid=17666)
public FadeType getDefaultFadeType()
                            throws PropertyNotPresentException
Throws:
PropertyNotPresentException

getDefaultFadeEditUnit

@AAFProperty(uuid1=87032835,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="DefFadeEditUnit",
             typeName="Rational",
             optional=true,
             uniqueIdentifier=false,
             pid=17667)
public Rational getDefaultFadeEditUnit()
                                throws PropertyNotPresentException
Throws:
PropertyNotPresentException

getRendering

@AAFProperty(uuid1=100729092,
             uuid2=266,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,8},
             definedName="Rendering",
             typeName="MobIDType",
             optional=true,
             uniqueIdentifier=false,
             pid=17668)
public MobID getRendering()
                   throws PropertyNotPresentException
Description copied from interface: CompositionMob

Returns the mob id of a rendering of this composition mob, which specifies a mixdown of the composition. The start of the mixdown and the start of the composition are assumed to be co-timed.

Specified by:
getRendering in interface CompositionMob
Returns:
Mob id of a rendering of the composition.
Throws:
PropertyNotPresentException - The optional rendering property is not present in this composition mob.

setRendering

public void setRendering(MobID mobID)
Description copied from interface: CompositionMob

Set the mob id of a rendering of this composition mob, which specifies a mixdown of the composition. The start of the mixdown and the start of the composition are assumed to be co-timed. Set the rendering to null to omit this optional property.

Specified by:
setRendering in interface CompositionMob
Parameters:
mobID - Mob id for a rendering of this composition mob.

clone

public CompositionMob clone()
Description copied from interface: MAJCommon

Creates a cloned copy of this entity. The clone will be initialized to have the same value as this value but exists independently from then on. Changes to this value will not effect the clone and changes to the clone will not effect this. MAJ API clones are true deep clones with no shared references to areas of memory within the original.

This method does not throw a CloneNotSupportedException as all entity values must implement the Cloneable interface. If a cloning error does occur, a null value will be returned but this is very unlikely to happen.

Specified by:
clone in interface MAJCommon
Overrides:
clone in class Mob
Returns:
Independent clone of this value, which is a deep copy.
See Also:
Object.clone()

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