Media Authoring
with Java API

tv.amwa.maj.iface
Interface TypeDefinitionObjectReference

All Superinterfaces:
MetaDefinition, TypeDefinition
All Known Subinterfaces:
TypeDefinitionStrongObjectReference, TypeDefinitionWeakObjectReference
All Known Implementing Classes:
TypeDefinitionObjectReference, TypeDefinitionObjectReference.TypeDefinitionObjectReferenceUnresolved, TypeDefinitionStrongObjectReference, TypeDefinitionWeakObjectReference

public interface TypeDefinitionObjectReference
extends TypeDefinition

Specifies the definition of a property type that defines an object relationship.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
TypeDefinitionStrongObjectReference, TypeDefinitionWeakObjectReference

Method Summary
 PropertyValue createValue(Object object)
          Creates and returns a new object reference property value to reference the given object.
 Object getObject(PropertyValue propertyValue)
          Returns the object referenced by the given object reference property value.
 ClassDefinition getObjectType()
          Returns the class definition representing the class of objects to which this object reference type definition can refer.
 void setObject(PropertyValue propertyValue, Object object)
          Sets the given object as the target of the given object reference property value.
 
Methods inherited from interface tv.amwa.maj.iface.TypeDefinition
getTypeCategory
 
Methods inherited from interface tv.amwa.maj.iface.MetaDefinition
getAUID, getDescription, getName, setDescription, setName
 

Method Detail

getObjectType

ClassDefinition getObjectType()

Returns the class definition representing the class of objects to which this object reference type definition can refer. The returned definition is the least-derived type that it is permissible to represent, in other words the type definition can represent objects of the given class and any of its sub-classes.

Returns:
Class definition representing the class of objects to which property values of the object reference type can refer.

createValue

PropertyValue createValue(Object object)
                          throws NullPointerException,
                                 ClassCastException

Creates and returns a new object reference property value to reference the given object.

Specified by:
createValue in interface TypeDefinition
Parameters:
object - Object to use to create an object reference property value.
Returns:
Newly created object reference property value that references the given object.
Throws:
NullPointerException - The given object is null.
ClassCastException - The given object cannot be cast to one compatible with the permissible classes, as returned by getObjectType().
See Also:
setObject(PropertyValue, Object)

getObject

Object getObject(PropertyValue propertyValue)
                 throws NullPointerException,
                        IllegalPropertyValueException

Returns the object referenced by the given object reference property value.

Parameters:
propertyValue - Property value form which the value is to be read.
Throws:
NullPointerException - The given property value containing a reference is null.
IllegalPropertyValueException - The given property value is not defined by this object reference type.

setObject

void setObject(PropertyValue propertyValue,
               Object object)
               throws NullPointerException,
                      IllegalPropertyValueException,
                      ClassCastException

Sets the given object as the target of the given object reference property value.

Parameters:
propertyValue - Property value containing the object reference to be set.
object - Target of the object reference to set for the given property value.
Throws:
NullPointerException - Argument is null.
IllegalPropertyValueException - The given property value is not defined by this object reference type.
ClassCastException - The given object cannot be cast to one compatible with the permissible classes, as returned by getObjectType().
See Also:
createValue(Object)

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.