|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttv.amwa.maj.meta.MetaDefinition
tv.amwa.maj.meta.TypeDefinition
tv.amwa.maj.meta.TypeDefinitionRename
@AAFClass(uuid1=218169601, uuid2=526, uuid3=0, uuid4={6,14,43,52,2,6,1,1}, definedName="TypeDefinitionRename", description="The TypeDefinitionRename class defines a property type that has the same structure and representation as its underlying type but has a different meaning.") public final class TypeDefinitionRename
Implements the definition of a property type that has the same structure and representation as its underlying type but has a different meaning.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
Nested Class Summary | |
---|---|
static class |
TypeDefinitionRename.RenamedValue
|
static class |
TypeDefinitionRename.XMLHandler
|
Field Summary | |
---|---|
static TypeDefinitionRename |
JPEGTableIDType
|
static TypeDefinitionRename |
LengthType
|
static TypeDefinitionRename |
PhaseFrameType
|
static TypeDefinitionRename |
PluginCategoryType
|
static TypeDefinitionRename |
PositionType
|
static TypeDefinitionRename |
TransferCharacteristicType
|
Constructor Summary | |
---|---|
TypeDefinitionRename(AUID identification,
String typeName,
TypeDefinition baseType)
Creates and initializes a renamed type definition, which defines a property type that has the same structure and representation as its underlying type but has a different meaning. |
Method Summary | |
---|---|
void |
appendXMLChildren(Node parent)
Append child elements to the given parent node to serialize the value of an object to an XML fragment. |
PropertyValue |
createValue(Object javaValue)
Create a property value from the given Java object. |
PropertyValue |
createValueFromBaseValue(PropertyValue propertyValue)
Returns a property value defined by this rename type definition containing, wrapping the given property value. |
boolean |
deepEquals(Object o)
Check to see if this definition is equal to the given object by comparing each property. |
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. |
TypeCategory |
getTypeCategory()
Returns the type category to which this type definition belongs, which corresponds to its sub interface. |
boolean |
resolveTheUnresolved(Map<AUID,MetaDefinition> localTypes)
Called after the parsing of an element containing references. |
void |
setPropertiesFromInterface(TypeDefinitionRename castFrom)
|
Methods inherited from class tv.amwa.maj.meta.TypeDefinition |
---|
setPropertiesFromInterface |
Methods inherited from class tv.amwa.maj.meta.MetaDefinition |
---|
castFromInterface, equals, getAUID, getDescription, getIdentification, getName, hashCode, setDescription, setName, setPropertiesFromInterface, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface tv.amwa.maj.iface.MetaDefinition |
---|
getAUID, getDescription, getName, setDescription, setName |
Methods inherited from interface tv.amwa.maj.meta.MAJCommon |
---|
equals, hashCode, toString |
Field Detail |
---|
public static final TypeDefinitionRename PositionType
public static final TypeDefinitionRename LengthType
public static final TypeDefinitionRename JPEGTableIDType
public static final TypeDefinitionRename PhaseFrameType
public static final TypeDefinitionRename TransferCharacteristicType
public static final TypeDefinitionRename PluginCategoryType
Constructor Detail |
---|
public TypeDefinitionRename(AUID identification, @AAFString String typeName, TypeDefinition baseType) throws NullPointerException
Creates and initializes a renamed type definition, which defines a property type that has the same structure and representation as its underlying type but has a different meaning.
identification
- AUID to be used to identify this type.typeName
- Friendly name of the rename type definition.baseType
- Underlying base type this rename type definition is an
alias for.
NullPointerException
- The identification and/or the base type arguments
is/are null
.Method Detail |
---|
public final void setPropertiesFromInterface(TypeDefinitionRename castFrom)
MetaDefinition.setPropertiesFromInterface(tv.amwa.maj.iface.MetaDefinition)
public PropertyValue createValueFromBaseValue(PropertyValue propertyValue) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionRename
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
TypeDefinitionRename.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.
createValueFromBaseValue
in interface TypeDefinitionRename
propertyValue
- Property value of the base type to create a
new property value of this rename type from.
NullPointerException
- The given property value is null
.
IllegalPropertyValueException
- The given property value is not compatible
with the base type of this rename type definition.@AAFProperty(uuid1=100729095, uuid2=4608, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="RenamedType", typeName="WeakReference to TypeDefinition", optional=false, uniqueIdentifier=false, pid=30) public TypeDefinition getBaseType()
TypeDefinitionRename
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.
getBaseType
in interface TypeDefinitionRename
public PropertyValue getBaseValue(PropertyValue propertyValue) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionRename
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.
getBaseValue
in interface TypeDefinitionRename
propertyValue
- Property value defined by the rename type
definition.
NullPointerException
- The given property value is null
.
IllegalPropertyValueException
- The given property value is not
compatible with this rename type definition.TypeDefinitionRename.getBaseType()
public PropertyValue createValue(Object javaValue) throws ClassCastException
TypeDefinition
Create a property value from the given Java object. If the type of
the object is not compatible with this type definition, a ClassCastException
is thrown.
createValue
in interface TypeDefinition
createValue
in class TypeDefinition
javaValue
- Java object to use to create a property value of this type.
ClassCastException
- The given object cannot be cast to a property value with
this type definition.public TypeCategory getTypeCategory()
TypeDefinition
Returns the type category to which this type definition belongs, which
corresponds to its sub interface. For example, TypeCategory.Int
is returned for a TypeDefinitionInteger
.
getTypeCategory
in interface TypeDefinition
getTypeCategory
in class TypeDefinition
TypeCategory
public final boolean deepEquals(Object o)
MetaDefinition
Check to see if this definition is equal to the given object by comparing each
property. The MetaDefinition.equals(Object)
method only checks that the identies of two
definitions are equal, relying on the unqiueness ensured by identity registration.
This method is provided for debugging and validation purposes.
deepEquals
in class MetaDefinition
o
- Object to compare to this definition.
public void appendXMLChildren(Node parent)
XMLSerializable
Append child elements to the given parent node to serialize the value of an object
to an XML fragment. Methods of the XMLBuilder
class are provided to help with this
process.
appendXMLChildren
in interface XMLSerializable
appendXMLChildren
in class MetaDefinition
parent
- XML parent element to append child nodes to.public boolean resolveTheUnresolved(Map<AUID,MetaDefinition> localTypes)
MetaDefinition
Called after the parsing of an element containing references. The references will
be resolved against the glocal TypeDefinitionWarehouse
first and then
against the given map of unregistered type definitions.
localTypes
- Unregistered type definitions to resolve references against.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |