|
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.TypeDefinitionIndirect
@AAFClass(uuid1=218169601, uuid2=545, uuid3=0, uuid4={6,14,43,52,2,6,1,1}, definedName="TypeDefinitionIndirect", description="The TypeDefinitionIndirect class defines a property type that has a value whose type is specified in each instance.") public class TypeDefinitionIndirect
TODO comments
Nested Class Summary | |
---|---|
static class |
TypeDefinitionIndirect.IndirectValue
|
static class |
TypeDefinitionIndirect.XMLHandler
|
Field Summary | |
---|---|
static TypeDefinitionIndirect |
Indirect
|
Constructor Summary | |
---|---|
TypeDefinitionIndirect(AUID identification,
String typeName)
Creates and initializes a new indirect type definition, which defines a property type that has a value whose type is specified in each instance. |
Method Summary | |
---|---|
void |
appendXMLChildren(Node parent)
|
PropertyValue |
createValue(Object javaValue)
Create a property value from the given Java object. |
PropertyValue |
createValueFromActualData(TypeDefinition actualType,
byte[] initData)
Creates and returns an indirect property value from the given type definition and serialized data. |
PropertyValue |
createValueFromActualValue(PropertyValue indirectProperty)
Creates and returns an indirect property value that contains the given actual property value. |
byte[] |
getActualData(PropertyValue indirectProperty)
Returns a copy of the actual data contained in the indirect property value. |
int |
getActualSize(PropertyValue indirectProperty)
Returns the size of the data held by the actual property value embedded within the given indirect property value. |
TypeDefinition |
getActualType(PropertyValue indirectProperty)
Returns the type definition of the property value embedded within the given property value. |
PropertyValue |
getActualValue(PropertyValue indirectProperty)
Returns the actual property value embedded within the given indirect property value. |
TypeCategory |
getTypeCategory()
Returns the type category to which this type definition belongs, which corresponds to its sub interface. |
void |
setPropertiesFromInterface(TypeDefinitionIndirect castFrom)
|
Methods inherited from class tv.amwa.maj.meta.TypeDefinition |
---|
setPropertiesFromInterface |
Methods inherited from class tv.amwa.maj.meta.MetaDefinition |
---|
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 |
Field Detail |
---|
public static final TypeDefinitionIndirect Indirect
Constructor Detail |
---|
public TypeDefinitionIndirect(AUID identification, @AAFString String typeName) throws NullPointerException
Creates and initializes a new indirect type definition, which defines a property type that has a value whose type is specified in each instance.
Creating new and unregistered type definitions is not recommended as this may cause
interoperability issues with other systems. The official registry of type definitions
is available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the AAF 1.1 object
specification can be accessed by name and identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
identification
- AUID to be used to identify this type.typeName
- Friendly name of the new indirect type definition.
NullPointerException
- The identification argument is null
.Method Detail |
---|
public final void setPropertiesFromInterface(TypeDefinitionIndirect castFrom)
MetaDefinition.setPropertiesFromInterface(tv.amwa.maj.iface.MetaDefinition)
public PropertyValue createValueFromActualData(TypeDefinition actualType, byte[] initData) throws NullPointerException, BadParameterException, ClassCastException
TypeDefinitionIndirect
Creates and returns an indirect property value from the given type definition and serialized data.
createValueFromActualData
in interface TypeDefinitionIndirect
actualType
- Type of the actual data to embed within the
new indirect property value.initData
- Data to use to create the new indirect property
value of the given type.
NullPointerException
- One or more of the arguments is null
.
BadParameterException
- An error occurred when reading the given
byte array.
ClassCastException
- The type of the data does not match the
given type definition.TypeDefinitionIndirect.createValueFromActualData(tv.amwa.maj.iface.TypeDefinition, byte[])
public PropertyValue createValueFromActualValue(PropertyValue indirectProperty) throws NullPointerException, NotSerializableException
TypeDefinitionIndirect
Creates and returns an indirect property value that contains the given actual property value.
createValueFromActualValue
in interface TypeDefinitionIndirect
indirectProperty
- Actual value to embed into the new indirect
property value.
NullPointerException
- The given original property value is null
.
NotSerializableException
- For creating opaque type values, the
given property value cannot be serialized to a stream of opaque bytes.TypeDefinitionIndirect.createValueFromActualValue(tv.amwa.maj.iface.PropertyValue)
public byte[] getActualData(PropertyValue indirectProperty) throws NullPointerException, IllegalPropertyValueException, IOException
TypeDefinitionIndirect
Returns a copy of the actual data contained in the indirect property value.
getActualData
in interface TypeDefinitionIndirect
indirectProperty
- Property value containing an actual value.
NullPointerException
- The given indirect property value is null
.
IllegalPropertyValueException
- The given property value is not
defined by an indirect type definition.
IOException
- An error occurred white trying to write the
property's value to a byte array.TypeDefinitionIndirect.getActualData(tv.amwa.maj.iface.PropertyValue)
public int getActualSize(PropertyValue indirectProperty) throws NullPointerException, IllegalPropertyValueException, IOException
TypeDefinitionIndirect
Returns the size of the data held by the actual property value embedded within the given indirect property value.
getActualSize
in interface TypeDefinitionIndirect
indirectProperty
- Property value containing an actual value.
NullPointerException
- The given indirect property value is null
.
IllegalPropertyValueException
- The given property value is not
defined by an indirect type definition.
IOException
- An error occurred white trying to write the
property's value to a byte array.TypeDefinitionIndirect.getActualSize(tv.amwa.maj.iface.PropertyValue)
public TypeDefinition getActualType(PropertyValue indirectProperty) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionIndirect
Returns the type definition of the property value embedded within
the given property value. This is effectively TypeDefinitionIndirect.getActualValue(PropertyValue)
followed by PropertyValue.getType()
.
getActualType
in interface TypeDefinitionIndirect
indirectProperty
- Property value containing an actual property
value to determine the type of.
NullPointerException
- The given indirect property value is null
.
IllegalPropertyValueException
- The given property value is not
defined by an indirect type definition.TypeDefinitionIndirect.getActualType(tv.amwa.maj.iface.PropertyValue)
public PropertyValue getActualValue(PropertyValue indirectProperty) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionIndirect
Returns the actual property value embedded within the given indirect property value.
getActualValue
in interface TypeDefinitionIndirect
indirectProperty
- Property value containing the embedded actual
value to return.
NullPointerException
- The given indirect property value is null
.
IllegalPropertyValueException
- The given property value is not
defined by an indirect type definition.TypeDefinitionIndirect.getActualValue(tv.amwa.maj.iface.PropertyValue)
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.TypeDefinition.createValue(java.lang.Object)
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
TypeDefinition.getTypeCategory()
public void appendXMLChildren(Node parent)
appendXMLChildren
in interface XMLSerializable
appendXMLChildren
in class MetaDefinition
parent
-
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |