public interface InterchangeObject extends MediaEntity
Specifies the root class for all AAF persistent classes. All classes defined in an AAF file shall be sub-classes of interchange object with the exception of the meta definition classes.
In addition to methods which all clients can use, it provides methods for direct property access which should not be used unless the client programmer is aware of the liabilities. Note that extending the set of optional properties of a class is not fully supported in the current implementation of the MAJ API.
Note that generation tracking is not automatically supported by the MAJ API.
| Modifier and Type | Method and Description |
|---|---|
void |
addApplicationPlugin(ApplicationPluginObject applicationPlugin)
Add an application metadata plugin
so as to this object to enhance its application-specific description.
|
void |
clearApplicationPlugins()
Clear the set of application metadata plugins, omitting the optional property.
|
InterchangeObject |
clone()
Create a cloned copy of this interchange object.
|
boolean |
containsApplicationPlugin(ApplicationPluginObject applicationPlugin)
Determines whether the given application metadata plugin
instance is attached to this interchange object.
|
boolean |
containsApplicationPlugin(AUID applicationPluginInstanceID)
Determines whether the given identifier for a
application metadata plugin instance is attached to
this interchange object.
|
int |
countApplicationPlugins()
Returns the number of application metadata plugins attached
to this interchange object.
|
boolean |
deepEquals(Object o)
Tests if this interchangeable object is equal to the given object by
comparing every property and the properties of any referenced values.
|
void |
disableGenerationTracking()
Calling this method will cause generation tracking to be disabled
for the object.
|
void |
enableGenerationTracking()
Calling this method will cause generation tracking to be enabled
for the object.
|
boolean |
equals(Object o)
Tests if this interchangeable object is equal to the given object by
comparing unique identifiers where available, or property-by-property if not.
|
Set<ApplicationPluginObject> |
getApplicationPlugins()
Returns the set of application metadata plugins
attached to this interchange object, where each attached object contains application-specific
description.
|
Identification |
getGeneration()
Gets the generation of this object, which identifies when this object was created
or last modified.
|
AUID |
getLinkedGenerationID()
Shortcut to get the AUID of the identification
representing this object's generation.
|
ClassDefinition |
getObjectClass()
Returns the class definition that identifies the class
of this interchange object.
|
boolean |
isGenerationTracked()
Returns
true if generations are being tracked by
the object. |
boolean |
removeApplicationPlugin(ApplicationPluginObject applicationPlugin)
Remove the given application metadata plugin from the set
of application plugins attached to this interchange object.
|
boolean |
removeApplicationPlugin(AUID applicationPluginInstanceID)
Remove the application metadata plugin with the given
identifier from the set of application plugins attached to this interchange object.
|
void |
setLinkedGenerationID(AUID linkedGenerationID)
Sets the linked generation identification for this object that represents this
object's generation.
|
void |
setObjectClass(ClassDefinition objectClass)
Sets the class definition that identifies the class
of this interchange object.
|
String |
toString()
Provides an XML representation of this value.
|
getPersistentID, setPersistentIndexIdentification getGeneration() throws InvalidParameterException, ObjectNotAttachedException
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 enableGenerationTracking() and
disableGenerationTracking() to control generation tracking for
this object. Call isGenerationTracked() to determine if
generation tracking is currently enabled for this object.
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.AUID getLinkedGenerationID() throws PropertyNotPresentException, ObjectNotAttachedException
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 enableGenerationTracking() and
disableGenerationTracking() to control generation tracking for
this object. Call isGenerationTracked() to determine if
generation tracking is currently enabled for this object.
PropertyNotPresent - Generation tracking is not enabled for
this object and so this optional property is omitted.ObjectNotAttachedException - This object is not attached to a file
from which generation information can be obtained.PropertyNotPresentExceptiongetGeneration(),
getLinkedGenerationID()void setLinkedGenerationID(AUID linkedGenerationID)
Sets the linked generation identification for this object that represents this object's generation. In a file, all objects added or modified at the same time have the same generation identification and that generation is described by an identification.
Passing a null value into to this method will omit the linked
generation property and disable generation tracking. Passing in a nil value will
indicate that this object is not attached to a file where its identification can
be resolved. Passing in a non-nil value will enable generation tracking and
a means to resolve the identification should be provided.
linkedGenerationID - Linked generation identification for this interchangeable
object.getLinkedGenerationID(),
getGeneration(),
getLinkedGenerationID(),
Preface.getIdentifications()ClassDefinition getObjectClass()
Returns the class definition that identifies the class of this interchange object.
MediaEngine.getClassDefinition(tv.amwa.maj.industry.MetadataObject),
TypeDefinitions.ClassDefinitionWeakReferencevoid setObjectClass(ClassDefinition objectClass)
Sets the class definition that identifies the class of this interchange object.
Setting this property used by application metadata plugins to indicate the defined class of an extension to this class. In this case, the base class property can be used to hold the identifier of this class.
objectClass - Class definition that describes this object instance.ExtensionScheme.getMetaDefinitions(),
ApplicationObject.getBaseClass()void enableGenerationTracking()
Calling this method will cause generation tracking to be enabled
for the object. Generation information will then be available
through the getGeneration() and getLinkedGenerationID()
methods.
Calling the disableGenerationTracking() method will disable
generation tracking for this object.
Generation tracking is disabled by default.
void disableGenerationTracking()
Calling this method will cause generation tracking to be disabled
for the object. Generation information will then not be
available through the getGeneration() and
getLinkedGenerationID() methods.
Calling the enableGenerationTracking() method will enable
generation tracking for this object.
Generation tracking is disabled by default.
@Bool boolean isGenerationTracked()
Returns true if generations are being tracked by
the object. A value of true indicates that generation
information will be available through the getGeneration()
and getLinkedGenerationID() methods.
Calling the enableGenerationTracking() method will enable
generation tracking for this object; calling the
disableGenerationTracking() method will disable generation
tracking for this object.
Generation tracking is disabled by default.
Set<ApplicationPluginObject> getApplicationPlugins() throws PropertyNotPresentException
Returns the set of application metadata plugins attached to this interchange object, where each attached object contains application-specific description. This is an optional property.
PropertyNotPresentException - The optional application plugins
extension is not present for this interchange object.Root.getRootExtensions(),
ApplicationPluginObject.getApplicationScheme()void addApplicationPlugin(ApplicationPluginObject applicationPlugin) throws NullPointerException
Add an application metadata plugin so as to this object to enhance its application-specific description.
applicationPlugin - Application plugin object to add to the set
of application plugins.NullPointerException - Cannot add a null application plugin
object to the set of plugins.getApplicationPlugins()boolean containsApplicationPlugin(ApplicationPluginObject applicationPlugin) throws NullPointerException
Determines whether the given application metadata plugin instance is attached to this interchange object.
applicationPlugin - Application plugin object to check for.NullPointerException - Cannot check for attachment using a null value.containsApplicationPlugin(AUID),
getApplicationPlugins()boolean containsApplicationPlugin(AUID applicationPluginInstanceID) throws NullPointerException
Determines whether the given identifier for a application metadata plugin instance is attached to this interchange object.
applicationPluginInstanceID - Identifier for the application plugin object to check for.NullPointerException - Cannot check for attachment using a null value for an
identifier.containsApplicationPlugin(ApplicationPluginObject),
getApplicationPlugins()void clearApplicationPlugins()
Clear the set of application metadata plugins, omitting the optional property.
getApplicationPlugins()int countApplicationPlugins()
Returns the number of application metadata plugins attached to this interchange object.
getApplicationPlugins()boolean removeApplicationPlugin(ApplicationPluginObject applicationPlugin) throws NullPointerException
Remove the given application metadata plugin from the set of application plugins attached to this interchange object.
applicationPlugin - Application plugin object to remove.false is
returned if the plugin object was not already attached.NullPointerException - Cannot remove an application metadata plugin object using a null
value.getApplicationPlugins()boolean removeApplicationPlugin(AUID applicationPluginInstanceID) throws NullPointerException
Remove the application metadata plugin with the given identifier from the set of application plugins attached to this interchange object.
applicationPluginInstanceID - Identifier of this application plugin object to remove.false is
returned if the plugin object was not already attached.NullPointerException - Cannot remove an application metadata plugin object using a null
identifier.getApplicationPlugins()boolean deepEquals(Object o)
Tests if this interchangeable object is equal to the given object by comparing every property and the properties of any referenced values. Two objects are equal if and only if the following conditions are all met:
null;The main difference between this method and equals(Object) is that this
method compares every property, even when a unique identifier is provided.
o - Object to test deep equality with this one.equals(Object),
MediaEngine.deepEquals(tv.amwa.maj.industry.MetadataObject, Object)String toString()
Provides an XML representation of this value. This value is useful for debugging and understanding the internal structure of an item of media.
Note that this interface does not guarantee to provide valid XML. Use
XMLBuilder.toXML(tv.amwa.maj.industry.MetadataObject) for this.
toString in class ObjectXMLBuilder.toXML(tv.amwa.maj.industry.MetadataObject),
MediaEngine.toString(tv.amwa.maj.industry.MetadataObject)boolean equals(Object o)
Tests if this interchangeable object is equal to the given object by comparing unique identifiers where available, or property-by-property if not. Two objects are equal if and only if the following conditions are all met:
null;Object.equals(Object);For a property-by-property comparison of each value, use deepEquals(Object).
equals in class Objecto - Object to test equality with this one.deepEquals(Object),
MediaEngine.equals(tv.amwa.maj.industry.MetadataObject, Object),
Object.equals(Object)InterchangeObject clone()
Create a cloned copy of this interchange object.
clone in interface MediaEntity(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.