@MediaClass(uuid1=218169601, uuid2=257, uuid3=6144, uuid4={6,14,43,52,2,6,1,1}, definedName="ContentStorage", description="The ContentStorage class has the Package and EssenceData objects.", symbol="ContentStorage") public class ContentStorageImpl extends InterchangeObjectImpl implements ContentStorage, Serializable, XMLSerializable, Cloneable
Implements storage for content that has package and essence data within it. An AAF file shall have exactly one content storage.
ObjectClassPropertyID| Constructor and Description |
|---|
ContentStorageImpl() |
ContentStorageImpl(Set<Package> packages,
Set<EssenceData> essenceData)
Creates and initializes a content storage object, which has the
package and
essence data objects of an AAF persistent unit. |
| Modifier and Type | Method and Description |
|---|---|
void |
addEssenceDataObject(EssenceData essenceDataObject)
Adds the given essence data item to the set of those stored
in this content storage..
|
void |
addPackage(Package packageToAdd)
Adds the given package to the set of packages in this content storage.
|
void |
clearEssenceDataObjects() |
void |
clearPackages() |
ContentStorage |
clone()
Create a cloned copy of this interchange object.
|
boolean |
containsPackage(Package packageToCheck) |
int |
countEssenceDataObjects()
Returns the total number of essence data items
in this content storage.
|
int |
countPackages()
Returns the total number of packages in this content storage.
|
int |
countPackages(PackageKind packageKind)
Find the number of matches for the given package kind
stored in this content storage.
|
Set<EssenceData> |
enumEssenceDataObjects()
Returns the complete set of essence data contained within this content
storage object.
|
Set<Package> |
enumPackages() |
String |
getComment()
Include a comment when serializing a value to XML.
|
Set<EssenceData> |
getEssenceDataObjects()
Returns the complete set of essence data contained within this content
storage object.
|
Set<EssenceData> |
getEssenceDataObjects(CriteriaType mediaCriteria)
Returns the set of essence data contained within this content
storage object, filtered according to the media criteria provided.
|
Set<Package> |
getPackages()
Returns a set of all packages stored in this content storage.
|
Set<Package> |
getPackages(SearchCriteria searchCriteria)
Returns a set of packages from this content storage according
to a given search criteria.
|
static Set<Package> |
initializePackages() |
boolean |
isEssenceDataObjectPresent(EssenceData essenceData) |
boolean |
isEssenceDataPresent(PackageID filePackageID)
Returns
true if essence data identified by the given
package id is contained in this content storage. |
EssenceData |
lookupEssenceDataObject(PackageID packageID)
Looks up and returns an essence data item stored in this content storage
that matches the given package id.
|
Package |
lookupPackage(PackageID packageID)
Returns the package that matches the given package id
from the set of packages in this content storage.
|
void |
removeEssenceDataObject(EssenceData essenceDataObject)
Removes the given essence data item from the set stored in
this content storage.
|
void |
removePackage(Package packageToRemove)
Removes the given package from the set stored in this content storage.
|
addApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toStringaddApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toStringgetPersistentID, setPersistentIndexappendXMLChildrenpublic ContentStorageImpl()
public ContentStorageImpl(Set<Package> packages, Set<EssenceData> essenceData) throws NullPointerException
Creates and initializes a content storage object, which has the package and
essence data objects of an AAF persistent unit. An AAF persistent unit
shall have exactly one content storage object.
packages - Set of all packages 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 packages or essence data items are in storage.@MediaSetAdd(value="EssenceDataObjects") public void addEssenceDataObject(EssenceData essenceDataObject) throws DuplicatePackageIDException, NullPointerException
ContentStorageAdds the given essence data item to the set of those stored in this content storage..
addEssenceDataObject in interface ContentStorageessenceDataObject - Essence data object to add to those stored in this content storage.DuplicatePackageIDException - The given package has already been added.
The validation is done by comparing package ids, which should be unique amongst all essence
data in a content storage unit.NullPointerException - The given essence data item is null.EssenceData.getLinkedPackageID()@MediaSetAdd(value="Packages") public void addPackage(Package packageToAdd) throws NullPointerException, DuplicatePackageIDException
ContentStorageAdds the given package to the set of packages in this content storage.
addPackage in interface ContentStoragepackageToAdd - Package to add to this content storage.NullPointerException - The given package is null.DuplicatePackageIDException - The given package is already contained in this content
storage.@MediaPropertyContains(value="Packages") public boolean containsPackage(Package packageToCheck)
@MediaPropertyCount(value="EssenceDataObjects") public int countEssenceDataObjects()
ContentStorageReturns the total number of essence data items in this content storage.
countEssenceDataObjects in interface ContentStorage@MediaPropertyCount(value="Packages") public int countPackages()
ContentStorageReturns the total number of packages in this content storage.
countPackages in interface ContentStorageContentStorage.countPackages(PackageKind)public int countPackages(PackageKind packageKind) throws NullPointerException
ContentStorageFind the number of matches for the given package kind stored in this content storage.
countPackages in interface ContentStoragepackageKind - The kind of package to count.NullPointerException - The given package kind is null.ContentStorage.countPackages()@MediaProperty(uuid1=100729092, uuid2=1282, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="EssenceDataObjects", aliases={"EssenceData","ContentStorageEssenceData"}, typeName="EssenceDataStrongReferenceSet", optional=true, uniqueIdentifier=false, pid=6402, symbol="EssenceDataObjects") public Set<EssenceData> enumEssenceDataObjects() throws PropertyNotPresentException
ContentStorageReturns the complete set of essence data contained within this content storage object. Essence data does not have to be carried in the same container as the metadata, so this is an optional property.
Calling this method produces the same result as calling getEssenceData(CriteriaType.AnyRepresentation).
enumEssenceDataObjects in interface ContentStoragePropertyNotPresentException - No essence data objects are present in this content storage.ContentStorage.getEssenceDataObjects(),
Preface.enumEssenceData(),
TypeDefinitions.EssenceDataStrongReferenceSetpublic Set<EssenceData> getEssenceDataObjects() throws PropertyNotPresentException
ContentStorageReturns the complete set of essence data contained within this content storage object. Essence data does not have to be carried in the same container as the metadata, so this is an optional property.
Calling this method produces the same result as calling getEssenceData(CriteriaType.AnyRepresentation).
getEssenceDataObjects in interface ContentStoragePropertyNotPresentException - No essence data objects are present in this content storage.ContentStorage.getEssenceDataObjects(CriteriaType),
ContentStorage.enumEssenceDataObjects(),
Preface.enumEssenceData(),
TypeDefinitions.EssenceDataStrongReferenceSetpublic Set<EssenceData> getEssenceDataObjects(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.
getEssenceDataObjects in interface ContentStoragemediaCriteria - Criteria to use to select the required essence data.NullPointerExceptionContentStorage.enumEssenceDataObjects(),
Preface.getEssenceData(CriteriaType),
TypeDefinitions.EssenceDataStrongReferenceSetpublic EssenceData lookupEssenceDataObject(PackageID packageID) throws NullPointerException, PackageNotFoundException
ContentStorageLooks up and returns an essence data item stored in this content storage that matches the given package id.
lookupEssenceDataObject in interface ContentStoragepackageID - The package id identifying the essence data stored in this content storage.NullPointerException - The given essece data package id is null.PackageNotFoundException - The requested essence data was not found stored in this content
storage.@MediaProperty(uuid1=100729092, uuid2=1281, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="Packages", aliases="Mobs", typeName="PackageStrongReferenceSet", optional=false, uniqueIdentifier=false, pid=6401, symbol="Packages") public Set<Package> getPackages()
ContentStorageReturns a set of all packages stored in this content storage.
getPackages in interface ContentStorageContentStorage.getPackages(SearchCriteria),
Preface.getPackages(SearchCriteria)public Set<Package> getPackages(SearchCriteria searchCriteria)
ContentStorageReturns a set of packages from this content storage according
to a given search criteria. If the
search criteria is null then all of the packages in storage are returned.
getPackages in interface ContentStoragesearchCriteria - Search criteria to filter the set of stored packages of this content
storage with.SearchCriteria,
Preface.getPackages(SearchCriteria),
TypeDefinitions.PackageStrongReferenceSet@MediaPropertyContains(value="EssenceDataObjects") public boolean isEssenceDataObjectPresent(EssenceData essenceData)
public boolean isEssenceDataPresent(PackageID filePackageID) throws NullPointerException
ContentStorageReturns true if essence data identified by the given
package id is contained in this content storage.
isEssenceDataPresent in interface ContentStoragefilePackageID - Identifier of the essence data to check for within this content storage.NullPointerException - One or more of the arguments in null.public Package lookupPackage(PackageID packageID) throws NullPointerException, PackageNotFoundException
ContentStorageReturns the package that matches the given package id from the set of packages in this content storage.
lookupPackage in interface ContentStoragepackageID - The identifier of the package to find in this content storage.NullPointerException - The given package identifier is null.PackageNotFoundException - The requested package is not stored in this content storage.@MediaPropertyRemove(value="EssenceDataObjects") public void removeEssenceDataObject(EssenceData essenceDataObject) throws NullPointerException, EssenceNotFoundException
ContentStorageRemoves the given essence data item from the set stored in this content storage.
removeEssenceDataObject in interface ContentStorageessenceDataObject - 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.@MediaPropertyRemove(value="Packages") public void removePackage(Package packageToRemove) throws NullPointerException, PackageNotFoundException
ContentStorageRemoves the given package from the set stored in this content storage.
removePackage in interface ContentStoragepackageToRemove - Package to remove from this content storage.NullPointerException - The given package to remove is null.PackageNotFoundException - The given package is not current contained in this content storage.@MediaPropertyClear(value="Packages") public void clearPackages()
@MediaPropertyClear(value="EssenceDataObjects") public void clearEssenceDataObjects()
public ContentStorage clone()
InterchangeObjectCreate a cloned copy of this interchange object.
clone in interface MediaEntityclone in interface ContentStorageclone in interface InterchangeObjectclone in class InterchangeObjectImplpublic String getComment()
XMLSerializableInclude a comment when serializing a value to XML. The comment will be inserted as the first child node of the element representing the class.
getComment in interface XMLSerializablegetComment in class InterchangeObjectImpl(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.