Media Authoring
with Java API

tv.amwa.maj.iface
Interface TypeDefinitionRename

All Superinterfaces:
MetaDefinition, TypeDefinition
All Known Implementing Classes:
TypeDefinitionRename

public interface TypeDefinitionRename
extends TypeDefinition

Specifies the definition a property type that has the same structure and representation as its underlying type but has a different meaning.

An example of a rename type is the position type, which is used as another name for a 64-bit signed integer value (Int64).

Author:
Richard Cartwright
See Also:
makeTypeDefinitionRename(), TypeCategory.Rename

Method Summary
 PropertyValue createValueFromBaseValue(PropertyValue propertyValue)
          Returns a property value defined by this rename type definition containing, wrapping the given property value.
 TypeDefinition getBaseType()
          Returns the type definition of the base type for which this rename type definition is an alias.
 PropertyValue getBaseValue(PropertyValue propertyValue)
          Returns a property value of the base type, unwrapping the the given property value that is defined by this rename type definition.
 
Methods inherited from interface tv.amwa.maj.iface.TypeDefinition
createValue, getTypeCategory
 
Methods inherited from interface tv.amwa.maj.iface.MetaDefinition
getAUID, getDescription, getName, setDescription, setName
 

Method Detail

getBaseType

TypeDefinition getBaseType()

Returns the type definition of the base type for which this rename type definition is an alias. The base type is also known as the renamed type.

Returns:
Base type for this rename type definition.

getBaseValue

PropertyValue getBaseValue(PropertyValue propertyValue)
                           throws NullPointerException,
                                  IllegalPropertyValueException

Returns a property value of the base type, unwrapping the the given property value that is defined by this rename type definition.

Note that the value returned may contain a reference to the same internal value as the given property value and this data is not necessarily a new copy.

Parameters:
propertyValue - Property value defined by the rename type definition.
Returns:
Equivalent property value defined by the base type definition.
Throws:
NullPointerException - The given property value is null.
IllegalPropertyValueException - The given property value is not compatible with this rename type definition.
See Also:
getBaseType()

createValueFromBaseValue

PropertyValue createValueFromBaseValue(PropertyValue propertyValue)
                                       throws NullPointerException,
                                              IllegalPropertyValueException

Returns a property value defined by this rename type definition containing, wrapping the given property value. The given property value shall be of the same type as the underlying base type of the rename type definition, as returned by getBaseType().

Note that the value returned may contain a reference to the same internal value as the given property value and this data is not necessarily a new copy.

Parameters:
propertyValue - Property value of the base type to create a new property value of this rename type from.
Returns:
New property value created from the given property value of this type.
Throws:
NullPointerException - The given property value is null.
IllegalPropertyValueException - The given property value is not compatible with the base type of this rename type definition.

Media Authoring
with Java API

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