|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeDefinition
Specifies the definition of a property type.
The methods of type definitions allow property values of the given type to be manipulated. The interfaces provided in the MAJ API allow property values to be converted to and from equivalent Java types. Taking the character type definition as an example:
createValueFromChar(char)
converts a value of the Java char
primitive type into a new AAF property value with type definition TypeDefinitionCharacter
. The createValue(Object)
method will do the same for a Character
value.char getCharacter(PropertyValue)
method
retrieves a value of Java char
primitive type from an AAF property value of the correct type.
setCharacter(PropertyValue, char)
method sets an existing character type AAF property value to the given value of the
Java char
primitive type.All other data types have similar methods.
Property
,
PropertyDefinition.getTypeDefinition()
,
PropertyValue.getType()
,
Parameter.getTypeDefinition()
,
InterchangeObject.getProperties()
,
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
,
AAFFactory.typeDefinitionForName(String)
Method Summary | |
---|---|
PropertyValue |
createValue(Object javaValue)
Create a property value of this type from the given Java value. |
TypeCategory |
getTypeCategory()
Returns the type category to which this type definition belongs, which corresponds to its sub interface. |
Methods inherited from interface tv.amwa.maj.iface.MetaDefinition |
---|
getAUID, getDescription, getName, setDescription, setName |
Method Detail |
---|
TypeCategory getTypeCategory()
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
.
TypeCategory
PropertyValue createValue(Object javaValue) throws ClassCastException
Create a property value of this type from the given Java value. Each kind of type definition will do its best to convert the given value to a property value of its type.
javaValue
- Java value to use to create a new property value from.
ClassCastException
- The given java value could not be cast to a
property value of this type.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |