|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InterchangeObject
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 currently supported by the MAJ API.
Method Summary | |
---|---|
int |
countProperties()
Returns the number of properties currently present in this interchange object. |
PropertyValue |
createOptionalPropertyValue(PropertyDefinition propertyDefinition,
Object initialValue)
Creates and returns a property value according to the given property definition and sets it for this interchange object. |
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. |
ClassDefinition |
getDefinition()
Returns the class definition that identifies the class of this interchange object. |
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. |
Iterator<Property> |
getProperties()
Returns the set of properties of this interchange object, where each property contains its property definition and current value. |
PropertyValue |
getPropertyValue(PropertyDefinition propertyDefinition)
Returns the requested property value of the object. |
boolean |
isGenerationTracked()
Returns true if generations are being tracked by
the object. |
boolean |
isPropertyPresent(PropertyDefinition propertyDefinition)
Returns true if the property identified by the given
property definition is legal and
present; otherwise returns false . |
void |
omitOpionalProperty(PropertyDefinition propertyDefinition)
Omits the given optional property from this interchange object if the property definition is legal, optional and is present. |
void |
setPropertyValue(PropertyDefinition propertyDefinition,
PropertyValue propertyValue)
Sets the value of the given property of this interchange object to the given value. |
Method Detail |
---|
Identification 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 getGenerationAUID() throws InvalidParameterException, 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.
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.getGeneration()
,
Identification.getGenerationAUID()
ClassDefinition getDefinition()
Returns the class definition that identifies the class of this interchange object.
Iterator<Property> getProperties()
Returns the set of properties of this interchange object, where each property contains its property definition and current value. The set contains both optional and required properties and any extended properties if present.
Important note: This is a low-level method that allows direct access to properties. If such access takes place, any semantic checking provided in named property get/set methods of the object is bypassed at the user's own risk.
@UInt32 int countProperties()
Returns the number of properties currently present in this interchange object.
PropertyValue getPropertyValue(PropertyDefinition propertyDefinition) throws NullPointerException, IllegalPropertyException, PropertyNotPresentException
Returns the requested property value of the object. The desired property data is identified by the given property definition.
Important note: This is a low-level method that allows direct access to properties. If such access takes place, any semantic checking provided in named property get/set methods of the object is bypassed at the user's own risk.
propertyDefinition
- Property definition identifying the requested property.
NullPointerException
- The given property definition is null
.
IllegalPropertyException
- The given property is illegal for this
interchange object's class.
PropertyNotPresentException
- The given property is optional, but not
currently present in this instance of the class.void setPropertyValue(PropertyDefinition propertyDefinition, PropertyValue propertyValue) throws NullPointerException, IllegalPropertyException
Sets the value of the given property of this interchange object to the given value. If the selected property is optional but not yet present, this method will make the property present before setting its value.
Important note: This is a low-level method that allows direct access to properties. If such access takes place, any semantic checking such as that which is performed in all other named property get/set methods, is at the user's own risk.
propertyDefinition
- Property definition identifying the property to set.propertyValue
- Value to set for the property.
NullPointerException
- One or both of the arguments is null
.
IllegalPropertyException
- The given property definition defines a property that is
illegal for this object's class.getProperties()
,
getPropertyValue(PropertyDefinition)
,
PropertyDefinition.getTypeDefinition()
,
TypeDefinition.createValue(Object)
@Bool boolean isPropertyPresent(PropertyDefinition propertyDefinition) throws NullPointerException, IllegalPropertyException
Returns true
if the property identified by the given
property definition is legal and
present; otherwise returns false
.
Important note: This is a low-level method that allows direct access to properties. If such access takes place, any semantic checking provided in named property get/set methods of the object is bypassed at the user's own risk.
propertyDefinition
- Property definition identifying an optional property of this
interchange object to test for.
NullPointerException
- The given property definition is null
.
IllegalPropertyException
- The given property is illegal for this
interchange object's class.getDefinition()
,
ClassDefinition.getPropertyDefinitions()
,
getProperties()
void omitOpionalProperty(PropertyDefinition propertyDefinition) throws NullPointerException, IllegalPropertyException
Omits the given optional property from this interchange object if the property definition is legal, optional and is present.
Important note: This is a low-level method that allows direct access to properties. If such access takes place, any semantic checking provided in named property get/set methods of the object is bypassed at the user's own risk.
propertyDefinition
- Property definition identifying the optional property to omit
from this interchange object.
NullPointerException
- The given property definition is null
.
IllegalPropertyException
- The given property definition is illegal for the class
defining this interchange object.getDefinition()
,
ClassDefinition.getPropertyDefinitions()
,
getProperties()
PropertyValue createOptionalPropertyValue(PropertyDefinition propertyDefinition, Object initialValue) throws NullPointerException, IllegalPropertyException, PropertyAlreadyPresentException
Creates and returns a property value according to the given property definition and sets it for this interchange object. The property must be legal for this class and not currently present.
Important note: This is a low-level method that allows direct access to properties. If such access takes place, any semantic checking provided in named property get/set methods of the object is bypassed at the user's own risk.
propertyDefinition
- Property definition identifying the property value to
create.initialValue
- Initial value for the optional property.
NullPointerException
- The given property definition and/or value is/are null
.
IllegalPropertyException
- The given property definition is illegal for this
interchange object's class.
PropertyAlreadyPresentException
- The given property is optional, but
already present in this class.TypeDefinition.createValue(Object)
,
setPropertyValue(PropertyDefinition, PropertyValue)
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 getGenerationAUID()
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
getGenerationAUID()
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 getGenerationAUID()
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.
enableGenerationTracking()
,
disableGenerationTracking()
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |