Media Authoring
with Java API

tv.amwa.maj.entity
Class Header

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

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=12032,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="Header",
          description="The Header class provides file-wide information and indexes.")
public class Header
extends InterchangeObject
implements Header, Serializable, Cloneable, MAJCommon

Implements file-wide information and indexes. An AAF file shall have exactly one header object.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class Header.ContentXMLHandler
           
static class Header.DescriptiveSchemesXMLHandler
           
static class Header.HeaderDictionaryXMLHandler
           
static class Header.IdentificationListXMLHandler
           
static class Header.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String HEADER_TAG
           
 
Fields inherited from interface tv.amwa.maj.iface.Header
OBJECTMODELVERSION_DEFAULT
 
Constructor Summary
Header()
          Creates and initializes a header object, the root object of any AAF persistent unit such as a file or database representation.
 
Method Summary
 void addDescriptiveScheme(AUID descriptiveSchemeID)
          Adds the given descriptive metadata scheme identifier to the set of schemes of this header, which identify the descriptive metadata schemes used in the file.
 void addEssenceData(EssenceData essenceData)
          Adds an essence data item to the content storage of this header.
 void addMob(Mob mob)
          Adds a mob to the content storage of this header.
 void appendIdentification(Identification ident)
          Appends the given identification to the list of identifications of this header, which each identify an application that created or modified the file.
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 Header clone()
          Creates a cloned copy of this entity.
 int countDescriptiveSchemes()
          Returns the total number of descriptive metadata schemes present for this header, which identify the descriptive metadata schemes used in the file.
 int countEssenceContainers()
          Returns the total number of essence containers of this header, which identify the internal essence containers used in the file.
 int countEssenceData()
          Returns the total number of essence data items stored in the content storage of this header.
 int countIdentifications()
          Returns the number of identifications in the header, which each identify an application that created or modified the file.
 int countMobs(MobKind mobKind)
          Returns the number of matches for the given mob kind within the content storage of this header.
 Set<EssenceData> enumEssenceData()
          Returns a set of all essence data stored in the content storage of this header.
 ByteOrder getByteOrder()
           
 ContentStorage getContentStorage()
          Returns the content storage of this header.
 Set<AUID> getDescriptiveSchemes()
          Returns the set of descriptive schemes of this header, which identify the descriptive metadata schemes used in the file.
 Dictionary getDictionary()
          Returns the dictionary of this header, which contains all the definitions of the file.
 Set<AUID> getEssenceContainers()
          Returns the set of essence containers of this header, which identify the internal essence containers used in the file.
 Set<EssenceData> getEssenceData(CriteriaType mediaCriteria)
          Returns a set of essence data from the content storage of this header that matches the given media criteria.
 VersionType getFileRevision()
          Return the file version property of the header.
 Identification getGeneration()
          Gets the generation of this object, which identifies when this object was created or last modified.
 AUID getGenerationAUID()
          Shortcut to get the AUID of the identification representing this object's generation.
 Identification getIdentificationAt(int index)
          Retrieves the identification at the given index through the list of identifications of this header, which each identify an application that created or modified the file.
 List<Identification> getIdentifications()
          Returns the list of identifications contained within this header, which each identify an application that created or modified the file.
 Identification getLastIdentification()
          Returns the identification of the last application that modified the file.
 TimeStamp getLastModified()
          Return the last modified time stamp of this header, which specifies the time and date that this file was last modified.
 ProductVersion getMajApiVersion()
          Return the version of the MAJ API currently running on this machine, which implements these interfaces.
 Set<Mob> getMobs(SearchCriteria searchCriteria)
          Returns a set of mobs stored in the content storage of this header that match the given search criteria.
 int getObjectModelVersion()
           
 AUID getOperationalPattern()
          Returns the identifier of the MXF operational pattern or AAF protocol that the file of this header complies with.
 Mob getPrimaryMob()
          Returns the primary mob for the file of this header, which specifies the mob that the application treats as the default.
 boolean isDescriptiveSchemePresent(AUID descriptiveSchemeId)
          Returns true if the descriptive metadata scheme with the given identifier is in set of schemes of this header; otherwise false.
 boolean isEssenceContainerPresent(AUID essenceContainerID)
          Returns true if the essence containers with the given identifier is present for this header; otherwise false.
 boolean isEssenceDataPresent(MobID fileMobID)
          Returns true if essence data identified by the given mob id is present in the content storage of this header.
 EssenceData lookupEssenceData(MobID mobID)
          Looks up and returns the essence data that matches the given mob id from the content storage of this header.
 Identification lookupIdentification(AUID generation)
          Returns the identification that matches the given generation identifier from the list of identifications of applications that created or modified the file of this header.
 Mob lookupMob(MobID mobID)
          Returns the mob that matches the given mob id stored in the content storage of this header.
 void removeDescriptiveScheme(AUID descriptiveSchemeID)
          Removes the given descriptive metadata scheme identifier from the set of schemes of this header, which identify the descriptive metadata schemes used in the file.
 void removeEssenceData(EssenceData essenceData)
          Removes the given essence data item from the content storage of this header.
 void removeMob(Mob mob)
          Removes the given mob from the content storage of this header.
 void setObjectModelVersion(Integer objectModelVersion)
           
 void setOperationalPattern(AUID operationalPatternID)
          Sets the MXF operational pattern or AAF protocol that the file of this header complies with.
 void setPrimaryMob(Mob primaryMob)
          Sets the primary mob for the file of the header, which specifies the mob that the application treats as the default.
 void setPropertiesFromInterface(Header castFrom)
           
 void updateEssenceContainers()
          Ensures that the contents of the essence containers property is in sync with the file's metadata.
 
Methods inherited from class tv.amwa.maj.entity.InterchangeObject
castFromInterface, countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, registerImplementation, setPropertiesFromInterface, setPropertyValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 
Methods inherited from interface tv.amwa.maj.entity.MAJCommon
equals, hashCode, toString
 

Field Detail

HEADER_TAG

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

Header

public Header()

Creates and initializes a header object, the root object of any AAF persistent unit such as a file or database representation.

Method Detail

setPropertiesFromInterface

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

addDescriptiveScheme

public void addDescriptiveScheme(AUID descriptiveSchemeID)
                          throws NullPointerException
Description copied from interface: Header

Adds the given descriptive metadata scheme identifier to the set of schemes of this header, which identify the descriptive metadata schemes used in the file. If the optional set of descriptive metadata schemes property is omitted, it will become present after successful completion of this method.

Specified by:
addDescriptiveScheme in interface Header
Parameters:
descriptiveSchemeID - Descriptive metadata scheme identifier to add to the set of this header.
Throws:
NullPointerException - The given descriptive metadata scheme identifier is null.
See Also:
DescriptiveFramework, DescriptiveClip

addEssenceData

public void addEssenceData(EssenceData essenceData)
                    throws DuplicateMobIDException,
                           NullPointerException
Description copied from interface: Header

Adds an essence data item to the content storage of this header.

Specified by:
addEssenceData in interface Header
Parameters:
essenceData - Essence data to add to the content storage of this header.
Throws:
DuplicateMobIDException - Essence data with the same mob id is already contained in the content storage of this header.
NullPointerException - The given essence data item is null.
See Also:
Header.getContentStorage(), ContentStorage.addEssenceData(EssenceData)

addMob

public void addMob(Mob mob)
            throws NullPointerException,
                   DuplicateMobIDException
Description copied from interface: Header

Adds a mob to the content storage of this header.

Specified by:
addMob in interface Header
Parameters:
mob - Mob to add to the content storage of this header.
Throws:
NullPointerException - The given mob is null.
DuplicateMobIDException - A mob with the same mob id is already contained in the content storage of this header.
See Also:
Header.getContentStorage(), ContentStorage.addMob(Mob)

appendIdentification

public void appendIdentification(Identification ident)
                          throws NullPointerException
Description copied from interface: Header

Appends the given identification to the list of identifications of this header, which each identify an application that created or modified the file. The identification at the end of the list should represent the most recent application to modify the file. This method does not attempt to identify duplicate identifications, so it will succeed even if an identical identification is already contained in the list.

Specified by:
appendIdentification in interface Header
Parameters:
ident - Identification to append to the list of identifications of this header.
Throws:
NullPointerException - The given identification is null.

countDescriptiveSchemes

public int countDescriptiveSchemes()
Description copied from interface: Header

Returns the total number of descriptive metadata schemes present for this header, which identify the descriptive metadata schemes used in the file.

Specified by:
countDescriptiveSchemes in interface Header
Returns:
Total number of descriptive schemes present in the file of this header.

countEssenceContainers

public int countEssenceContainers()
                           throws PropertyNotPresentException
Description copied from interface: Header

Returns the total number of essence containers of this header, which identify the internal essence containers used in the file.

Specified by:
countEssenceContainers in interface Header
Returns:
Total number of essence containers present in the file of the header.
Throws:
PropertyNotPresentException - Essence containers are not present in the file of the header.

countEssenceData

public int countEssenceData()
Description copied from interface: Header

Returns the total number of essence data items stored in the content storage of this header.

Specified by:
countEssenceData in interface Header
Returns:
Total number of essence data items stored in the content storage of this header.
See Also:
Header.getContentStorage(), ContentStorage.countEssenceData()

countIdentifications

public int countIdentifications()
Description copied from interface: Header

Returns the number of identifications in the header, which each identify an application that created or modified the file.

Specified by:
countIdentifications in interface Header
Returns:
Number of identifications in the list of identifications of this header.

countMobs

public int countMobs(MobKind mobKind)
              throws NullPointerException
Description copied from interface: Header

Returns the number of matches for the given mob kind within the content storage of this header. Use MobKind.AllMob to count the total number of mobs.

Specified by:
countMobs in interface Header
Parameters:
mobKind - The kind of mobs to count.
Returns:
Total number of mobs matching the given mob kind in the content storage of this header.
Throws:
NullPointerException
See Also:
Header.getContentStorage(), ContentStorage.countMobs(MobKind)

enumEssenceData

public Set<EssenceData> enumEssenceData()
Description copied from interface: Header

Returns a set of all essence data stored in the content storage of this header.

Specified by:
enumEssenceData in interface Header
Returns:
Shallow copy of the set of all essence data stored in the content storage of this header.
See Also:
Header.getEssenceData(CriteriaType), Header.getContentStorage(), ContentStorage.enumEssenceData()

getContentStorage

@AAFProperty(uuid1=100729092,
             uuid2=513,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Content",
             typeName="StrongReference to ContentStorage",
             optional=false,
             uniqueIdentifier=false,
             pid=15107)
public ContentStorage getContentStorage()
Description copied from interface: Header

Returns the content storage of this header. This is the Content property of a header.

Specified by:
getContentStorage in interface Header
Returns:
Content storage of this object.

getDescriptiveSchemes

@AAFProperty(uuid1=16908816,
             uuid2=514,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="DescriptiveSchemes",
             typeName="AUIDSet",
             optional=true,
             uniqueIdentifier=false,
             pid=15115)
public Set<AUID> getDescriptiveSchemes()
                                throws PropertyNotPresentException
Description copied from interface: Header

Returns the set of descriptive schemes of this header, which identify the descriptive metadata schemes used in the file.

Specified by:
getDescriptiveSchemes in interface Header
Returns:
Copy of the identifiers of the descriptive schemes of this header.
Throws:
PropertyNotPresentException - The optional set of descriptive metadata schemes is not present in this header.
See Also:
DescriptiveFramework, DescriptiveClip

getEssenceContainers

@AAFProperty(uuid1=16908816,
             uuid2=513,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="EssenceContainers",
             typeName="AUIDSet",
             optional=true,
             uniqueIdentifier=false,
             pid=15114)
public Set<AUID> getEssenceContainers()
                               throws PropertyNotPresentException

Returns the set of essence containers of this header, which identify the internal essence containers used in the file. This is an optional property that is automatically maintained.

This implementation does not throw PropertyNotPresentException. An empty set is returned if the list of essence containers does not yet contain any items.

Specified by:
getEssenceContainers in interface Header
Returns:
Copy of the identifiers for the internal essence containers of this header. The identifiers are cloned.
Throws:
PropertyNotPresentException - The optional set of essence containers is not present for this header.
See Also:
ContainerConstant, ContainerDefinition, ContainerDefinition.forIdentification(AUID)

getEssenceData

public Set<EssenceData> getEssenceData(CriteriaType mediaCriteria)
                                throws NullPointerException
Description copied from interface: Header

Returns a set of essence data from the content storage of this header that matches the given media criteria. If the media criteria is CriteriaType.AnyRepresentation then all essence data that is stored in the content storage of this header is included, producing the same result as calling Header.enumEssenceData().

Specified by:
getEssenceData in interface Header
Parameters:
mediaCriteria - Criteria for selecting essence data from storage.
Returns:
Set of essence data matching the criteria that is stored in the content storage of this header. Note that the essence data items are not cloned.
Throws:
NullPointerException
See Also:
Header.enumEssenceData(), Header.getContentStorage(), ContentStorage.getEssenceData(CriteriaType)

getFileRevision

@AAFProperty(uuid1=50397697,
             uuid2=1280,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Version",
             typeName="VersionType",
             optional=false,
             uniqueIdentifier=false,
             pid=15109)
public VersionType getFileRevision()
Description copied from interface: Header

Return the file version property of the header.

Specified by:
getFileRevision in interface Header
Returns:
File version.

getIdentificationAt

public Identification getIdentificationAt(int index)
                                   throws IndexOutOfBoundsException
Description copied from interface: Header

Retrieves the identification at the given index through the list of identifications of this header, which each identify an application that created or modified the file.

Specified by:
getIdentificationAt in interface Header
Parameters:
index - 0-based index of the identification to retrieve from the list of identifications of this header.
Returns:
Identification at the given index.
Throws:
IndexOutOfBoundsException - The given index is outside the acceptable range for the current list of identifications of this header.

getIdentifications

@AAFProperty(uuid1=100729092,
             uuid2=1540,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="IdentificationList",
             typeName="StrongReferenceVector of Identification",
             optional=false,
             uniqueIdentifier=false,
             pid=15110)
public List<Identification> getIdentifications()
Description copied from interface: Header

Returns the list of identifications contained within this header, which each identify an application that created or modified the file.

Specified by:
getIdentifications in interface Header
Returns:
Shallow copy of the list of identifications in this header.

getLastIdentification

public Identification getLastIdentification()
Description copied from interface: Header

Returns the identification of the last application that modified the file.

Specified by:
getLastIdentification in interface Header
Returns:
Identification of last application that modified the file.

getLastModified

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

Return the last modified time stamp of this header, which specifies the time and date that this file was last modified.

Specified by:
getLastModified in interface Header
Returns:
Last modification time stamp.

getMobs

public Set<Mob> getMobs(SearchCriteria searchCriteria)
Description copied from interface: Header

Returns a set of mobs stored in the content storage of this header that match the given search criteria. If the search criteria is null, all mobs are returned.

Specified by:
getMobs in interface Header
Parameters:
searchCriteria - Search criteria to use to filter the set of mobs returned.
Returns:
Set of mobs matching the search criteria, or the set of all mobs if the search criteria was null. The set does not clone mobs it contains.
See Also:
Header.getContentStorage(), ContentStorage.getMobs(SearchCriteria)

getOperationalPattern

@AAFProperty(uuid1=16908803,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="OperationalPattern",
             typeName="AUID",
             optional=true,
             uniqueIdentifier=false,
             pid=15113)
public AUID getOperationalPattern()
                           throws PropertyNotPresentException
Description copied from interface: Header

Returns the identifier of the MXF operational pattern or AAF protocol that the file of this header complies with. This is an optional property.

Specified by:
getOperationalPattern in interface Header
Returns:
Operational pattern that the file of this header complies with.
Throws:
PropertyNotPresentException - Property is not present in the header.
See Also:
OperationalPatternConstant

setOperationalPattern

public void setOperationalPattern(AUID operationalPatternID)
                           throws NullPointerException
Description copied from interface: Header

Sets the MXF operational pattern or AAF protocol that the file of this header complies with. Set this optional property to null to omit it.

Specified by:
setOperationalPattern in interface Header
Parameters:
operationalPatternID - Operational pattern identifier for the header.
Throws:
NullPointerException - The given operational pattern identifier is null.
See Also:
OperationalPatternConstant

getPrimaryMob

public Mob getPrimaryMob()
                  throws PropertyNotPresentException
Description copied from interface: Header

Returns the primary mob for the file of this header, which specifies the mob that the application treats as the default. This is an optional property.

Specified by:
getPrimaryMob in interface Header
Returns:
Primary mob for this header.
Throws:
PropertyNotPresentException - Property is not present in the header.

setPrimaryMob

public void setPrimaryMob(Mob primaryMob)
Description copied from interface: Header

Sets the primary mob for the file of the header, which specifies the mob that the application treats as the default. Set this optional property to null to omit it.

Specified by:
setPrimaryMob in interface Header
Parameters:
primaryMob - Primary mob for the file of the header.

getMajApiVersion

public ProductVersion getMajApiVersion()
Description copied from interface: Header

Return the version of the MAJ API currently running on this machine, which implements these interfaces.

Specified by:
getMajApiVersion in interface Header
Returns:
MAJ API version.
See Also:
Header.getLastIdentification(), Identification.getRefImplVersion()

isDescriptiveSchemePresent

public boolean isDescriptiveSchemePresent(AUID descriptiveSchemeId)
                                   throws NullPointerException,
                                          PropertyNotPresentException
Description copied from interface: Header

Returns true if the descriptive metadata scheme with the given identifier is in set of schemes of this header; otherwise false.

Specified by:
isDescriptiveSchemePresent in interface Header
Parameters:
descriptiveSchemeId - Identifier of the descriptive metadata scheme to check for.
Returns:
Does the given identifier match that of a descriptive metadata scheme in this header?
Throws:
NullPointerException - The given identifier is null.
PropertyNotPresentException - The optional set of descriptive metadata schemes is not present in this header.
See Also:
DescriptiveFramework, DescriptiveClip

isEssenceContainerPresent

public boolean isEssenceContainerPresent(AUID essenceContainerID)
                                  throws NullPointerException,
                                         PropertyNotPresentException
Description copied from interface: Header

Returns true if the essence containers with the given identifier is present for this header; otherwise false. The set of essence containers identify the internal essence containers used in the file. The essence containers property of a header is optional.

Specified by:
isEssenceContainerPresent in interface Header
Parameters:
essenceContainerID - Identifier of the type of essence container to check for.
Returns:
Is the given essence container identifier in this header?
Throws:
NullPointerException
PropertyNotPresentException - Essence containers are not present in the property.
See Also:
ContainerConstant, ContainerDefinition, DefinitionObject.getAUID()

isEssenceDataPresent

public boolean isEssenceDataPresent(MobID fileMobID)
                             throws NullPointerException,
                                    InvalidParameterException
Description copied from interface: Header

Returns true if essence data identified by the given mob id is present in the content storage of this header.

Specified by:
isEssenceDataPresent in interface Header
Parameters:
fileMobID - Identifier of a file mob that may be present in the content storage of this header.
Returns:
Does the given mob id match that of an essence data item stored in thie content storage of this header?
Throws:
NullPointerException - The given mob id is null.
InvalidParameterException - The given file mob id does not identify a file source mob.
See Also:
Header.getContentStorage(), ContentStorage.isEssenceDataPresent(MobID)

lookupEssenceData

public EssenceData lookupEssenceData(MobID mobID)
                              throws NullPointerException,
                                     MobNotFoundException
Description copied from interface: Header

Looks up and returns the essence data that matches the given mob id from the content storage of this header.

Specified by:
lookupEssenceData in interface Header
Parameters:
mobID - Identifier for essence data stored in the content storage of this header.
Returns:
Essence data stored in the content storage of this header with the given mob id.
Throws:
NullPointerException - The given mob id is null.
MobNotFoundException - Essence data identified with the given mob id is not stored in the content storage of the header.
See Also:
Header.getContentStorage(), ContentStorage.lookupEssenceData(MobID)

lookupIdentification

public Identification lookupIdentification(AUID generation)
                                    throws NullPointerException,
                                           ObjectNotFoundException
Description copied from interface: Header

Returns the identification that matches the given generation identifier from the list of identifications of applications that created or modified the file of this header.

Specified by:
lookupIdentification in interface Header
Parameters:
generation - Unique generation identifier to retrieve from the list of identifications of this header.
Returns:
Identification with the given identifier from the list of identifications of this header.
Throws:
NullPointerException - The given generation identifier is null.
ObjectNotFoundException - An identification with the given identifier was not found in the list of identifications of this header.

lookupMob

public Mob lookupMob(MobID mobID)
              throws NullPointerException,
                     MobNotFoundException
Description copied from interface: Header

Returns the mob that matches the given mob id stored in the content storage of this header.

Specified by:
lookupMob in interface Header
Parameters:
mobID - The identifier of the mob to look up in the content storage of this header.
Returns:
The mob from the storage with the matching identifier.
Throws:
NullPointerException - The given mob identifier is null.
MobNotFoundException - A mob with the given identifier was not found in the content storage of this header.
See Also:
Header.getContentStorage(), ContentStorage.lookupMob(MobID)

removeDescriptiveScheme

public void removeDescriptiveScheme(AUID descriptiveSchemeID)
                             throws NullPointerException,
                                    InvalidParameterException,
                                    PropertyNotPresentException
Description copied from interface: Header

Removes the given descriptive metadata scheme identifier from the set of schemes of this header, which identify the descriptive metadata schemes used in the file. If the

Specified by:
removeDescriptiveScheme in interface Header
Parameters:
descriptiveSchemeID - Descriptive metadata scheme identifier to remove from the set of schemes of this header.
Throws:
NullPointerException - The given scheme identifier is null.
InvalidParameterException - The given descriptive scheme identifier is not present in the list of schemes of this header.
PropertyNotPresentException - The optional set of descriptive metadata schemes property is not present in this header.
See Also:
DescriptiveFramework, DescriptiveClip

removeEssenceData

public void removeEssenceData(EssenceData essenceData)
                       throws NullPointerException,
                              EssenceNotFoundException
Description copied from interface: Header

Removes the given essence data item from the content storage of this header.

Specified by:
removeEssenceData in interface Header
Parameters:
essenceData - Essence data to remove from the content storage of this header.
Throws:
NullPointerException - The given essence data item is null.
EssenceNotFoundException - The given essence data item is not contained in the content storage of this header.
See Also:
Header.getContentStorage(), ContentStorage.removeEssenceData(EssenceData)

removeMob

public void removeMob(Mob mob)
               throws NullPointerException,
                      MobNotFoundException
Description copied from interface: Header

Removes the given mob from the content storage of this header.

Specified by:
removeMob in interface Header
Parameters:
mob - Mob to remove from the header.
Throws:
NullPointerException - The given mob to remove is null.
MobNotFoundException - The given mob is not contained in the content storage of this header.
See Also:
Header.getContentStorage(), ContentStorage.removeMob(Mob)

updateEssenceContainers

public void updateEssenceContainers()
Description copied from interface: Header

Ensures that the contents of the essence containers property is in sync with the file's metadata. If this method succeeds, the essence containers property will contain identifiers of all container definitions referenced by source mobs in the file of the header.

If the property isn't present it will be created. It is recommended that this method is called before any other of the methods affecting the essence containers can be called.

Specified by:
updateEssenceContainers in interface Header
See Also:
ContainerDefinition

getGeneration

public Identification getGeneration()
                             throws InvalidParameterException,
                                    ObjectNotAttachedException
Description copied from interface: InterchangeObject

Gets the generation of this object, which identifies when this object was created or last modified.

This method will succeed if generation tracking is enabled for this object. Call InterchangeObject.enableGenerationTracking() and InterchangeObject.disableGenerationTracking() to control generation tracking for this object. Call InterchangeObject.isGenerationTracked() to determine if generation tracking is currently enabled for this object.

Specified by:
getGeneration in interface InterchangeObject
Overrides:
getGeneration in class InterchangeObject
Returns:
Identification for when this object was last modified.
Throws:
InvalidParameterException - Generation tracking is not enabled for this object.
ObjectNotAttachedException - This object is not attached to a file from which generation information can be obtained.

getGenerationAUID

public AUID getGenerationAUID()
Description copied from interface: InterchangeObject

Shortcut to get the AUID of the identification representing this object's generation.

This method will succeed if generation tracking is enabled for this object. Call InterchangeObject.enableGenerationTracking() and InterchangeObject.disableGenerationTracking() to control generation tracking for this object. Call InterchangeObject.isGenerationTracked() to determine if generation tracking is currently enabled for this object.

Specified by:
getGenerationAUID in interface InterchangeObject
Overrides:
getGenerationAUID in class InterchangeObject
Returns:
AUID of the identification representing this object's generation.
See Also:
InterchangeObject.getGeneration(), Identification.getGenerationAUID()

getByteOrder

@AAFProperty(uuid1=50397697,
             uuid2=512,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="ByteOrder",
             typeName="Int16",
             optional=false,
             uniqueIdentifier=false,
             pid=15105)
public ByteOrder getByteOrder()

getDictionary

@AAFProperty(uuid1=100729092,
             uuid2=514,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Dictionary",
             typeName="StrongReference to Dictionary",
             optional=false,
             uniqueIdentifier=false,
             pid=15108)
public Dictionary getDictionary()
Description copied from interface: Header

Returns the dictionary of this header, which contains all the definitions of the file. The dictionary is automatically created when the header object is created.

Specified by:
getDictionary in interface Header
Returns:
AAF dictionary of the header.

getObjectModelVersion

@AAFProperty(uuid1=50397697,
             uuid2=1024,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="ObjectModelVersion",
             typeName="UInt32",
             optional=true,
             uniqueIdentifier=false,
             pid=15111)
public int getObjectModelVersion()

setObjectModelVersion

public void setObjectModelVersion(Integer objectModelVersion)

clone

public Header 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 Object
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 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.