Media Authoring
with Java API

tv.amwa.maj.meta
Class TypeDefinition

java.lang.Object
  extended by tv.amwa.maj.meta.MetaDefinition
      extended by tv.amwa.maj.meta.TypeDefinition
All Implemented Interfaces:
Serializable, DefinitionType, MetaDefinition, TypeDefinition, XMLSerializable, MAJCommon
Direct Known Subclasses:
TypeDefinitionCharacter, TypeDefinitionEnumeration, TypeDefinitionExtendibleEnumeration, TypeDefinitionFixedArray, TypeDefinitionIndirect, TypeDefinitionInteger, TypeDefinitionObjectReference, TypeDefinitionRecord, TypeDefinitionRename, TypeDefinitionSet, TypeDefinitionStream, TypeDefinitionString, TypeDefinitionVariableArray

@AAFClass(uuid1=218169601,
          uuid2=515,
          uuid3=0,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="TypeDefinition",
          description="The TypeDefinition class defines a property type.")
public abstract class TypeDefinition
extends MetaDefinition
implements TypeDefinition, Serializable, MAJCommon

Implements the definition of a property type.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
TypeDefinitionWarehouse, Serialized Form

Constructor Summary
TypeDefinition()
           
 
Method Summary
abstract  PropertyValue createValue(Object javaValue)
          Create a property value from the given Java object.
abstract  TypeCategory getTypeCategory()
          Returns the type category to which this type definition belongs, which corresponds to its sub interface.
 void setPropertiesFromInterface(TypeDefinition castFrom)
           
 
Methods inherited from class tv.amwa.maj.meta.MetaDefinition
appendXMLChildren, castFromInterface, deepEquals, 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
 

Constructor Detail

TypeDefinition

public TypeDefinition()
Method Detail

setPropertiesFromInterface

public final void setPropertiesFromInterface(TypeDefinition castFrom)

getTypeCategory

public abstract TypeCategory getTypeCategory()
Description copied from interface: 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.

Specified by:
getTypeCategory in interface TypeDefinition
Returns:
Type category to which the type definition belongs.
See Also:
TypeCategory

createValue

public abstract PropertyValue createValue(Object javaValue)
                                   throws ClassCastException

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.

Specified by:
createValue in interface TypeDefinition
Parameters:
javaValue - Java object to use to create a property value of this type.
Returns:
Property value representing the given value.
Throws:
ClassCastException - The given object cannot be cast to a property value with this 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.