|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Header
Specifies file-wide information and indexes. An AAF file shall have exactly one header object.
When a header is created, the contained dictionary object is automatically created.
makeHeader()
Field Summary | |
---|---|
static int |
OBJECTMODELVERSION_DEFAULT
Default value for the object model version property of a header object which is 1. |
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 identification)
Appends the given identification to the list of identifications of this header, which each identify an application that created or modified the file. |
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<? extends EssenceData> |
enumEssenceData()
Returns a set of all essence data stored in the content storage of this header. |
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<? extends 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 |
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<? extends 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<? extends Mob> |
getMobs(SearchCriteria searchCriteria)
Returns a set of mobs stored in the content storage of this header that match the given search criteria . |
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 |
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 |
updateEssenceContainers()
Ensures that the contents of the essence containers property is in sync with the file's metadata. |
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject |
---|
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue |
Field Detail |
---|
static final int OBJECTMODELVERSION_DEFAULT
Default value for the object model version property of a header object which is 1. This proeprty is automatically maintained and so has no get or set method.
Method Detail |
---|
Mob lookupMob(MobID mobId) throws NullPointerException, MobNotFoundException
Returns the mob that matches the given mob id stored in the content storage of this header.
mobId
- The identifier of the mob to look up in the content storage of this header.
NullPointerException
- The given mob identifier is null
.
MobNotFoundException
- A mob with the given identifier was not found in the content storage of
this header.getContentStorage()
,
ContentStorage.lookupMob(MobID)
@UInt32 int countMobs(MobKind mobKind)
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.
mobKind
- The kind of mobs to count.
getContentStorage()
,
ContentStorage.countMobs(MobKind)
Set<? extends Mob> getMobs(SearchCriteria searchCriteria)
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.
searchCriteria
- Search criteria to use to filter the set of mobs
returned.
null
. The
set does not clone mobs it contains.getContentStorage()
,
ContentStorage.getMobs(SearchCriteria)
void addMob(Mob mob) throws NullPointerException, DuplicateMobIDException
Adds a mob to the content storage of this header.
mob
- Mob to add to the content storage of this header.
NullPointerException
- The given mob is null
.
DuplicateMobIDException
- A mob with the same mob id is already
contained in the content storage of this header.getContentStorage()
,
ContentStorage.addMob(Mob)
void removeMob(Mob mob) throws NullPointerException, MobNotFoundException
Removes the given mob from the content storage of this header.
mob
- Mob to remove from the header.
NullPointerException
- The given mob to remove is null
.
MobNotFoundException
- The given mob is not contained
in the content storage of this header.getContentStorage()
,
ContentStorage.removeMob(Mob)
@UInt32 int countEssenceData()
Returns the total number of essence data items stored in the content storage of this header.
getContentStorage()
,
ContentStorage.countEssenceData()
@Bool boolean isEssenceDataPresent(MobID fileMobId) throws NullPointerException, InvalidParameterException
Returns true
if essence data identified by the
given mob id is present in the content storage of this header.
fileMobId
- Identifier of a file mob that may be present in the content storage of this header.
NullPointerException
- The given mob id is null
.
InvalidParameterException
- The given file mob id does not identify a file source mob.getContentStorage()
,
ContentStorage.isEssenceDataPresent(MobID)
Set<? extends EssenceData> enumEssenceData()
Returns a set of all essence data stored in the content storage of this header.
getEssenceData(CriteriaType)
,
getContentStorage()
,
ContentStorage.enumEssenceData()
Set<? extends EssenceData> getEssenceData(CriteriaType mediaCriteria) throws NullPointerException
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 enumEssenceData()
.
mediaCriteria
- Criteria for selecting essence data from storage.
NullPointerException
enumEssenceData()
,
getContentStorage()
,
ContentStorage.getEssenceData(CriteriaType)
void addEssenceData(EssenceData essenceData) throws DuplicateMobIDException, NullPointerException
Adds an essence data item to the content storage of this header.
essenceData
- Essence data to add to the content storage of this header.
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
.getContentStorage()
,
ContentStorage.addEssenceData(EssenceData)
void removeEssenceData(EssenceData essenceData) throws NullPointerException, EssenceNotFoundException
Removes the given essence data item from the content storage of this header.
essenceData
- Essence data to remove from the content storage of this header.
NullPointerException
- The given essence data item is null
.
EssenceNotFoundException
- The given essence data item is not contained in the
content storage of this header.getContentStorage()
,
ContentStorage.removeEssenceData(EssenceData)
EssenceData lookupEssenceData(MobID mobId) throws NullPointerException, MobNotFoundException
Looks up and returns the essence data that matches the given mob id from the content storage of this header.
mobId
- Identifier for essence data stored in the content storage of this header.
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.getContentStorage()
,
ContentStorage.lookupEssenceData(MobID)
Dictionary getDictionary()
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.
Identification getLastIdentification()
Returns the identification of the last application that modified the file.
Identification lookupIdentification(AUID generation) throws NullPointerException, ObjectNotFoundException
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.
generation
- Unique generation identifier to retrieve from the list of identifications
of this header.
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.@UInt32 int countIdentifications()
Returns the number of identifications in the header, which each identify an application that created or modified the file.
List<? extends Identification> getIdentifications()
Returns the list of identifications contained within this header, which each identify an application that created or modified the file.
void appendIdentification(Identification identification) throws NullPointerException
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.
identification
- Identification to append to the list of identifications of this header.
NullPointerException
- The given identification is null
.Identification getIdentificationAt(@UInt32 int index) throws IndexOutOfBoundsException
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.
index
- 0-based index of the identification to retrieve from the list of identifications
of this header.
IndexOutOfBoundsException
- The given index is outside the acceptable range for the
current list of identifications of this header.ProductVersion getMajApiVersion()
Return the version of the MAJ API currently running on this machine, which implements these interfaces.
getLastIdentification()
,
Identification.getRefImplVersion()
VersionType getFileRevision()
Return the file version property of the header.
TimeStamp getLastModified()
Return the last modified time stamp of this header, which specifies the time and date that this file was last modified.
ContentStorage getContentStorage()
Returns the content storage of this header. This is the Content property of a header.
Mob getPrimaryMob() throws PropertyNotPresentException
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.
PropertyNotPresentException
- Property is not present
in the header.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. Set this optional property to
null
to omit it.
primaryMob
- Primary mob for the file of the header.AUID getOperationalPattern() throws PropertyNotPresentException
Returns the identifier of the MXF operational pattern or AAF protocol that the file of this header complies with. This is an optional property.
PropertyNotPresentException
- Property is not present in the header.OperationalPatternConstant
void setOperationalPattern(AUID operationalPatternId) throws NullPointerException
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.
operationalPatternId
- Operational pattern identifier for the header.
NullPointerException
- The given operational pattern identifier is null
.OperationalPatternConstant
void updateEssenceContainers()
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.
ContainerDefinition
@UInt32 int countEssenceContainers() throws PropertyNotPresentException
Returns the total number of essence containers of this header, which identify the internal essence containers used in the file.
PropertyNotPresentException
- Essence containers are not present
in the file of the header.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.
PropertyNotPresentException
- The optional set of essence containers is not present
for this header.ContainerConstant
,
ContainerDefinition
,
ContainerDefinition.forIdentification(AUID)
@Bool boolean isEssenceContainerPresent(AUID essenceContainerId) throws NullPointerException, PropertyNotPresentException
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.
essenceContainerId
- Identifier of the type of essence container to check for.
NullPointerException
PropertyNotPresentException
- Essence containers are not present in
the property.ContainerConstant
,
ContainerDefinition
,
DefinitionObject.getAUID()
@UInt32 int countDescriptiveSchemes()
Returns the total number of descriptive metadata schemes present for this header, which identify the descriptive metadata schemes used in the file.
Set<AUID> getDescriptiveSchemes() throws PropertyNotPresentException
Returns the set of descriptive schemes of this header, which identify the descriptive metadata schemes used in the file.
PropertyNotPresentException
- The optional set of descriptive metadata schemes is
not present in this header.DescriptiveFramework
,
DescriptiveClip
@Bool boolean isDescriptiveSchemePresent(AUID descriptiveSchemeId) throws NullPointerException, PropertyNotPresentException
Returns true
if the descriptive metadata scheme with
the given identifier is in set of schemes of this header; otherwise false
.
descriptiveSchemeId
- Identifier of the descriptive metadata scheme to check for.
NullPointerException
- The given identifier is null
.
PropertyNotPresentException
- The optional set of descriptive metadata schemes is
not present in this header.DescriptiveFramework
,
DescriptiveClip
void addDescriptiveScheme(AUID descriptiveSchemeId) throws NullPointerException
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.
descriptiveSchemeId
- Descriptive metadata scheme identifier to add to the set of
this header.
NullPointerException
- The given descriptive metadata scheme identifier is null
.DescriptiveFramework
,
DescriptiveClip
void removeDescriptiveScheme(AUID descriptiveSchemeId) throws NullPointerException, InvalidParameterException, PropertyNotPresentException
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
descriptiveSchemeId
- Descriptive metadata scheme identifier to remove from the
set of schemes of this header.
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.DescriptiveFramework
,
DescriptiveClip
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |