Media Authoring
with Java API

tv.amwa.maj.entity
Class ContainerDefinition

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.DefinitionObject
          extended by tv.amwa.maj.entity.ContainerDefinition
All Implemented Interfaces:
Serializable, Cloneable, ContainerConstant, DefinitionType, MAJCommon, ContainerDefinition, DefinitionObject, InterchangeObject, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=8192,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="ContainerDefinition",
          description="The ContainerDefinition class specifies the mechanism used to store essence data.")
public class ContainerDefinition
extends DefinitionObject
implements ContainerDefinition, Serializable, ContainerConstant, Cloneable, MAJCommon

Implements a definition for the mechanism used to store essence data. A container can be either a kind of file, such as an AAF file, or it can be another mechanism for storing essence data.

THE COMMENTS IN THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class ContainerDefinition.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.DefinitionObject
DefinitionObject.DefinitionObjectXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
 
Fields inherited from interface tv.amwa.maj.constant.ContainerConstant
AAF, AAFKLV, AAFMSS, AAFXML, AIFFAIFC, External, JFIF, MXFGC_Avid_DNX_145_1080i, MXFGC_Avid_DNX_145_1080p, MXFGC_Avid_DNX_145_720p, MXFGC_Avid_DNX_220_1080i, MXFGC_Avid_DNX_220_1080p, MXFGC_Avid_DNX_220_720p, MXFGC_Avid_DNX_220X_1080i, MXFGC_Avid_DNX_220X_1080p, MXFGC_Avid_DNX_220X_720p, MXFGC_Avid_DNX_36_1080p, MXFGC_Clipwrapped_AES3_audio_data, MXFGC_Clipwrapped_Alaw_Audio, MXFGC_Clipwrapped_AVCbytestream_VideoStream0_SID, MXFGC_Clipwrapped_Broadcast_Wave_audio_data, MXFGC_Clipwrapped_DVbased_1080x50I_100Mbps, MXFGC_Clipwrapped_DVbased_1080x5994I_100Mbps, MXFGC_Clipwrapped_DVbased_525x5994I_25Mbps, MXFGC_Clipwrapped_DVbased_525x5994I_50Mbps, MXFGC_Clipwrapped_DVbased_625x50I_25Mbps, MXFGC_Clipwrapped_DVbased_625x50I_50Mbps, MXFGC_Clipwrapped_DVbased_720x50P_100Mbps, MXFGC_Clipwrapped_DVbased_720x5994P_100Mbps, MXFGC_Clipwrapped_DVbased_UndefinedSource, MXFGC_Clipwrapped_IECDV_525x5994I_25Mbps, MXFGC_Clipwrapped_IECDV_525x5994I_25Mbps_SMPTE322M, MXFGC_Clipwrapped_IECDV_625x50I_25Mbps, MXFGC_Clipwrapped_IECDV_625x50I_25Mbps_SMPTE322M, MXFGC_Clipwrapped_IECDV_UndefinedSource_25Mbps, MXFGC_Clipwrapped_Uncompressed_525x5994I_720_422, MXFGC_Clipwrapped_Uncompressed_525x5994P_960_422, MXFGC_Clipwrapped_Uncompressed_625x50I_720_422, MXFGC_Clipwrapped_Uncompressed_625x50P_960_422, MXFGC_Clipwrapped_VC1, MXFGC_Clipwrapped_VC3, MXFGC_CustomClosedGOPwrapped_MPEGES_VideoStream1_SID, MXFGC_Customwrapped_Alaw_Audio, MXFGC_Framewrapped_AES3_audio_data, MXFGC_Framewrapped_Alaw_Audio, MXFGC_Framewrapped_Broadcast_Wave_audio_data, MXFGC_Framewrapped_DVbased_1080x50I_100Mbps, MXFGC_Framewrapped_DVbased_1080x5994I_100Mbps, MXFGC_Framewrapped_DVbased_525x5994I_25Mbps, MXFGC_Framewrapped_DVbased_525x5994I_50Mbps, MXFGC_Framewrapped_DVbased_625x50I_25Mbps, MXFGC_Framewrapped_DVbased_625x50I_50Mbps, MXFGC_Framewrapped_DVbased_720x50P_100Mbps, MXFGC_Framewrapped_DVbased_720x5994P_100Mbps, MXFGC_Framewrapped_DVbased_UndefinedSource, MXFGC_Framewrapped_IECDV_525x5994I_25Mbps, MXFGC_Framewrapped_IECDV_525x5994I_25Mbps_SMPTE322M, MXFGC_Framewrapped_IECDV_625x50I_25Mbps, MXFGC_Framewrapped_IECDV_625x50I_25Mbps_SMPTE322M, MXFGC_Framewrapped_IECDV_UndefinedSource_25Mbps, MXFGC_Framewrapped_MPEGES_VideoStream0_SID, MXFGC_Framewrapped_SMPTE_D10_525x5994I_30Mbps_DefinedTemplate, MXFGC_Framewrapped_SMPTE_D10_525x5994I_30Mbps_ExtendedTemplate, MXFGC_Framewrapped_SMPTE_D10_525x5994I_30Mbps_PictureOnly, MXFGC_Framewrapped_SMPTE_D10_525x5994I_40Mbps_DefinedTemplate, MXFGC_Framewrapped_SMPTE_D10_525x5994I_40Mbps_ExtendedTemplate, MXFGC_Framewrapped_SMPTE_D10_525x5994I_40Mbps_PictureOnly, MXFGC_Framewrapped_SMPTE_D10_525x5994I_50Mbps_DefinedTemplate, MXFGC_Framewrapped_SMPTE_D10_525x5994I_50Mbps_ExtendedTemplate, MXFGC_Framewrapped_SMPTE_D10_525x5994I_50Mbps_PictureOnly, MXFGC_Framewrapped_SMPTE_D10_625x50I_30Mbps_DefinedTemplate, MXFGC_Framewrapped_SMPTE_D10_625x50I_30Mbps_ExtendedTemplate, MXFGC_Framewrapped_SMPTE_D10_625x50I_30Mbps_PictureOnly, MXFGC_Framewrapped_SMPTE_D10_625x50I_40Mbps_DefinedTemplate, MXFGC_Framewrapped_SMPTE_D10_625x50I_40Mbps_ExtendedTemplate, MXFGC_Framewrapped_SMPTE_D10_625x50I_40Mbps_PictureOnly, MXFGC_Framewrapped_SMPTE_D10_625x50I_50Mbps_DefinedTemplate, MXFGC_Framewrapped_SMPTE_D10_625x50I_50Mbps_ExtendedTemplate, MXFGC_Framewrapped_SMPTE_D10_625x50I_50Mbps_PictureOnly, MXFGC_Framewrapped_Uncompressed_525x5994I_720_422, MXFGC_Framewrapped_Uncompressed_525x5994P_960_422, MXFGC_Framewrapped_Uncompressed_625x50I_720_422, MXFGC_Framewrapped_Uncompressed_625x50P_960_422, MXFGC_Framewrapped_VC1, MXFGC_Framewrapped_VC3, MXFGC_Generic_Essence_Multiple_Mappings, MXFGC_Linewrapped_Uncompressed_525x5994I_720_422, MXFGC_Linewrapped_Uncompressed_525x5994P_960_422, MXFGC_Linewrapped_Uncompressed_625x50I_720_422, MXFGC_Linewrapped_Uncompressed_625x50P_960_422, OMF, RIFFWAVE
 
Constructor Summary
ContainerDefinition(AUID identification, String name)
          Creates and initializes a container definition, which specifies the mechanism used to store essence data.
 
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.
 ContainerDefinition clone()
          Creates a cloned copy of this entity.
 boolean essenceIsIdentified()
          Returns whether the essence of the defined container is identified, which specifies when true that the container uses the mob id to identify the essence data and that the container may contain multiple essence data objects, each identified by a mob id.
static ContainerDefinition forIdentification(AUID identification)
           
static ContainerDefinition forName(String containerName)
           
 boolean getEssenceIsIdentified()
          Returns whether the essence of the defined container is identified, which specifies when true that the container uses the mob id to identify the essence data and that the container may contain multiple essence data objects, each identified by a mob id.
 String getLocalizedUID()
           
static boolean registerContainerDefinition(ContainerDefinition definedContainer)
           
static int registerContainersFromClass(Class<?> classWithContainers)
           
 void setEssenceIsIdentified(Boolean essenceIsIdentified)
          Sets whether the essence of the defined container is identified, which specifies when true that the container uses the mob id to identify the essence data and that the container may contain multiple essence data objects, each identified by a mob id.
 void setPropertiesFromInterface(ContainerDefinition castFrom)
           
 
Methods inherited from class tv.amwa.maj.entity.DefinitionObject
equals, getAUID, getDescription, getName, hashCode, setDescription, setLocalizedUID, setName
 
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.DefinitionObject
getAUID, getDescription, getName, setDescription, setName
 
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
 

Constructor Detail

ContainerDefinition

public ContainerDefinition(AUID identification,
                           String name)
                    throws NullPointerException

Creates and initializes a container definition, which specifies the mechanism used to store essence data. A container can be either a kind of file, such as an AAF file, or it can be another mechanism for storing essence data. The essence is idenfified flag is initially set to false. Call setEssenceIsIdentified() to change this.

Parameters:
identification - Unique identifier for the new container definition.
name - Display name for new container definition.
Throws:
NullPointerException - Identification argument is null.
Method Detail

registerContainersFromClass

public static final int registerContainersFromClass(Class<?> classWithContainers)
                                             throws NullPointerException
Throws:
NullPointerException

registerContainerDefinition

public static final boolean registerContainerDefinition(ContainerDefinition definedContainer)
                                                 throws NullPointerException
Throws:
NullPointerException

forName

public static final ContainerDefinition forName(String containerName)
                                         throws NullPointerException
Throws:
NullPointerException

forIdentification

public static final ContainerDefinition forIdentification(AUID identification)
                                                   throws NullPointerException
Throws:
NullPointerException

setPropertiesFromInterface

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

essenceIsIdentified

public boolean essenceIsIdentified()
                            throws PropertyNotPresentException
Description copied from interface: ContainerDefinition

Returns whether the essence of the defined container is identified, which specifies when true that the container uses the mob id to identify the essence data and that the container may contain multiple essence data objects, each identified by a mob id. This is an optional property.

Specified by:
essenceIsIdentified in interface ContainerDefinition
Returns:
Is the essence identified?
Throws:
PropertyNotPresentException - The optional essence is identified property is not present in the container definition.

getEssenceIsIdentified

@AAFProperty(uuid1=50397697,
             uuid2=768,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="EssenceIsIdentified",
             typeName="Boolean",
             optional=true,
             uniqueIdentifier=false,
             pid=9217)
public boolean getEssenceIsIdentified()
                               throws PropertyNotPresentException
Description copied from interface: ContainerDefinition

Returns whether the essence of the defined container is identified, which specifies when true that the container uses the mob id to identify the essence data and that the container may contain multiple essence data objects, each identified by a mob id. This is an optional property.

Specified by:
getEssenceIsIdentified in interface ContainerDefinition
Returns:
Is the essence identified?
Throws:
PropertyNotPresentException - The optional essence is identified property is not present in the container definition.

setEssenceIsIdentified

public void setEssenceIsIdentified(Boolean essenceIsIdentified)
Description copied from interface: ContainerDefinition

Sets whether the essence of the defined container is identified, which specifies when true that the container uses the mob id to identify the essence data and that the container may contain multiple essence data objects, each identified by a mob id. To omit this optional property, set its value to null.

Specified by:
setEssenceIsIdentified in interface ContainerDefinition
Parameters:
essenceIsIdentified - Is the essence identified?

clone

public ContainerDefinition 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 DefinitionObject
Returns:
Independent clone of this value, which is a deep copy.
See Also:
Object.clone()

getLocalizedUID

public String getLocalizedUID()
Overrides:
getLocalizedUID in class DefinitionObject

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