|
Media Authoring with Java API |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objecttv.amwa.maj.entity.InterchangeObject
tv.amwa.maj.entity.ContentStorage
@AAFClass(uuid1=218169601,
uuid2=257,
uuid3=6144,
uuid4={6,14,43,52,2,6,1,1},
definedName="ContentStorage",
description="The ContentStorage class has the Mob and EssenceData objects.")
public class ContentStorage
Implements storage for content that has mob and essence data within it. An AAF file shall have exactly one content storage.
THE COMMENTS IN THIS CLASS ARE INCOMPLETE.
| Nested Class Summary | |
|---|---|
static class |
ContentStorage.EssenceDataXMLHandler
|
static class |
ContentStorage.MobsXMLHandler
|
static class |
ContentStorage.XMLHandler
|
| Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject |
|---|
InterchangeObject.InterchangeObjectXMLHandler |
| Field Summary | |
|---|---|
static String |
CONTENTSTORAGE_TAG
|
| Constructor Summary | |
|---|---|
ContentStorage(Set<Mob> mobs,
Set<EssenceData> essenceData)
Creates and initializes a content storage object, which has the mob and
essence data objects of an AAF persistent unit. |
|
| Method Summary | |
|---|---|
void |
addEssenceData(EssenceData essenceData)
Adds the given essence data item to the set of those stored in this content storage.. |
void |
addMob(Mob mob)
Adds the given mob to the set of mobs in this content storage. |
void |
appendXMLChildren(Node parent)
Append child elements to the given parent node to serialize the value of an object to an XML fragment. |
ContentStorage |
clone()
Creates a cloned copy of this entity. |
int |
countEssenceData()
Returns the total number of essence data items in this content storage. |
int |
countMobs(MobKind mobKind)
Find the number of matches for the given mob kind stored in this content storage. |
Set<EssenceData> |
enumEssenceData()
Returns the complete set of essence data contained within this content storage object. |
boolean |
equals(Object o)
Two content storage instances are equals if and only if their set of mobs are the same size and contains the same items and the set of essence data is the same size and contains the same items. |
Set<EssenceData> |
getEssenceData(CriteriaType mediaCriteria)
Returns the set of essence data contained within this content storage object, filtered according to the media criteria provided. |
Set<Mob> |
getMobs(SearchCriteria searchCriteria)
Returns a set of mobs from this content storage according to a given search criteria. |
int |
hashCode()
Computes a hash code value based on the generated identifier for this class. |
boolean |
isEssenceDataPresent(MobID fileMobID)
Returns true if essence data identified by the given
mob id is contained in this content storage. |
EssenceData |
lookupEssenceData(MobID mobID)
Looks up and returns an essence data item stored in this content storage that matches the given mob id. |
Mob |
lookupMob(MobID mobID)
Returns the mob that matches the given mob id from the set of mobs in this content storage. |
void |
removeEssenceData(EssenceData essenceData)
Removes the given essence data item from the set stored in this content storage. |
void |
removeMob(Mob mob)
Removes the given mob from the set stored in this content storage. |
void |
setPropertiesFromInterface(ContentStorage castFrom)
|
| 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 |
| Methods inherited from interface tv.amwa.maj.entity.MAJCommon |
|---|
toString |
| Field Detail |
|---|
public static final String CONTENTSTORAGE_TAG
| Constructor Detail |
|---|
public ContentStorage(Set<Mob> mobs,
Set<EssenceData> essenceData)
throws NullPointerException
Creates and initializes a content storage object, which has the mob and
essence data objects of an AAF persistent unit. An AAF persistent unit
shall have exactly one content storage object.
mobs - Set of all mobs to place into the new content storage.essenceData - Set of all essence data objects to place into the new content storage.
NullPointerException - One or both of the sets are null. Use empty
sets to indicate no mobs or essence data items are in storage.| Method Detail |
|---|
public final void setPropertiesFromInterface(ContentStorage castFrom)
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)
public void addEssenceData(EssenceData essenceData)
throws DuplicateMobIDException,
NullPointerException
ContentStorageAdds the given essence data item to the set of those stored in this content storage..
addEssenceData in interface ContentStorageessenceData - Essence data object to add to those stored in this content storage.
DuplicateMobIDException - The given mob has already been added.
The validation is done by comparing mob ids, which should be unique amongst all essence
data in a content storage unit.
NullPointerException - The given essence data item is null.EssenceData.getFileMobID()
public void addMob(Mob mob)
throws NullPointerException,
DuplicateMobIDException
ContentStorageAdds the given mob to the set of mobs in this content storage.
addMob in interface ContentStoragemob - Mob to add to this content storage.
NullPointerException - The given mob is null.
DuplicateMobIDException - The given mob is already contained in this content
storage.public int countEssenceData()
ContentStorageReturns the total number of essence data items in this content storage.
countEssenceData in interface ContentStorage
public int countMobs(MobKind mobKind)
throws NullPointerException
ContentStorageFind the number of matches for the given mob kind stored in this content storage.
countMobs in interface ContentStoragemobKind - The kind of mob to count.
NullPointerException - The given mob kind is null.public Set<EssenceData> enumEssenceData()
ContentStorageReturns the complete set of essence data contained within this content storage object.
Calling this method produces the same result as calling getEssenceData(CriteriaType.AnyRepresentation).
enumEssenceData in interface ContentStorageHeader.enumEssenceData()
@AAFProperty(uuid1=100729092,
uuid2=1282,
uuid3=0,
uuid4={6,14,43,52,1,1,1,2},
definedName="EssenceData",
typeName="StrongReferenceSet of EssenceData",
optional=true,
uniqueIdentifier=false,
pid=6402)
public Set<EssenceData> getEssenceData(CriteriaType mediaCriteria)
throws NullPointerException
ContentStorageReturns the set of essence data contained within this content storage object, filtered according to the media criteria provided.
If the mediaCriteria is set to CriteriaType.AnyRepresentation, all
essence data is returned.
getEssenceData in interface ContentStoragemediaCriteria - Criteria to use to select the required essence data.
NullPointerExceptionContentStorage.enumEssenceData(),
Header.getEssenceData(CriteriaType)
public EssenceData lookupEssenceData(MobID mobID)
throws NullPointerException,
MobNotFoundException
ContentStorageLooks up and returns an essence data item stored in this content storage that matches the given mob id.
lookupEssenceData in interface ContentStoragemobID - The mob id identifying the essence data stored in this content storage.
NullPointerException - The given essece data mob id is null.
MobNotFoundException - The requested essence data was not found stored in this content
storage.
@AAFProperty(uuid1=100729092,
uuid2=1281,
uuid3=0,
uuid4={6,14,43,52,1,1,1,2},
definedName="Mobs",
typeName="StrongReferenceSet of Mob",
optional=false,
uniqueIdentifier=false,
pid=6401)
public Set<Mob> getMobs(SearchCriteria searchCriteria)
ContentStorageReturns a set of mobs from this content storage according
to a given search criteria. If the
search criteria is null then all of the mobs in storage are returned.
getMobs in interface ContentStoragesearchCriteria - Search criteria to filter the set of stored mobs of this content
storage with.
SearchCriteria,
Header.getMobs(SearchCriteria)
public boolean isEssenceDataPresent(MobID fileMobID)
throws NullPointerException
ContentStorageReturns true if essence data identified by the given
mob id is contained in this content storage.
isEssenceDataPresent in interface ContentStoragefileMobID - Identifier of the essence data to check for within this content storage.
NullPointerException - One or more of the arguments in null.
public Mob lookupMob(MobID mobID)
throws NullPointerException,
MobNotFoundException
ContentStorageReturns the mob that matches the given mob id from the set of mobs in this content storage.
lookupMob in interface ContentStoragemobID - The identifier of the mob to find in this content storage.
NullPointerException - The given mob identifier is null.
MobNotFoundException - The requested mob is not stored in this content storage.
public void removeEssenceData(EssenceData essenceData)
throws NullPointerException,
EssenceNotFoundException
ContentStorageRemoves the given essence data item from the set stored in this content storage.
removeEssenceData in interface ContentStorageessenceData - Essence data to remove from this content storage.
NullPointerException - The given essence data item is null.
EssenceNotFoundException - The given essence data item is not currently contained in
this content storage.
public void removeMob(Mob mob)
throws NullPointerException,
MobNotFoundException
ContentStorageRemoves the given mob from the set stored in this content storage.
removeMob in interface ContentStoragemob - Mob to remove from this content storage.
NullPointerException - The given mob to remove is null.
MobNotFoundException - The given mob is not current contained in this content storage.public int hashCode()
Computes a hash code value based on the generated identifier for this class.
hashCode in interface MAJCommonhashCode in class ObjectObject.hashCode()public boolean equals(Object o)
Two content storage instances are equals if and only if their set of mobs are the same size and contains the same items and the set of essence data is the same size and contains the same items. Equality is checked through the use of mob ids only.
equals in interface MAJCommonequals in class Objecto - Object to test for equality with.
Object.equals(java.lang.Object)public ContentStorage clone()
MAJCommonCreates 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.
clone in interface MAJCommonclone in class ObjectObject.clone()public void appendXMLChildren(Node parent)
XMLSerializableAppend 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.
appendXMLChildren in interface XMLSerializableappendXMLChildren in class InterchangeObjectparent - XML parent element to append child nodes to.
|
Media Authoring with Java API |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||