|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeDefinitionIndirect
Specifies the definition of property values whose type is specified in each instance.
One way to think of property values defined by the indirect property definition is as: a property value with a value that is a property value. One application of a value of indirect type is a tagged value that is used to represent a user comment. Most comments are strings but a comment may take the form of an integer value.
Note that the MAJ API provides a means to serialize data values to and from byte
arrays using Java object serialization. This is an internal mechanism that
is exposed to the application through methods such as getActualData(PropertyValue)
.
The binary format created by the MAJ API is not compatible with that of other
AAF implementations.
makeTypeDefinitionIndirect()
,
TypeCategory.Indirect
,
TaggedValue
,
ConstantValue
,
ControlPoint
Method Summary | |
---|---|
PropertyValue |
createValueFromActualData(TypeDefinition actualType,
byte[] initialData)
Creates and returns an indirect property value from the given type definition and serialized data. |
PropertyValue |
createValueFromActualValue(PropertyValue actualValue)
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. |
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 |
---|
PropertyValue createValueFromActualValue(PropertyValue actualValue) throws NullPointerException, NotSerializableException
Creates and returns an indirect property value that contains the given actual property value.
actualValue
- 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.createValueFromActualData(TypeDefinition, byte[])
,
getActualValue(PropertyValue)
PropertyValue createValueFromActualData(TypeDefinition actualType, @DataBuffer byte[] initialData) throws NullPointerException, BadParameterException, ClassCastException
Creates and returns an indirect property value from the given type definition and serialized data.
actualType
- Type of the actual data to embed within the
new indirect property value.initialData
- 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.createValueFromActualValue(PropertyValue)
PropertyValue getActualValue(PropertyValue indirectProperty) throws NullPointerException, IllegalPropertyValueException, TypeNotFoundException
Returns the actual property value embedded within the given indirect property value.
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.
TypeNotFoundException
- For opaque properties, the type attached
to the value cannot be resolved.@UInt32 int getActualSize(PropertyValue indirectProperty) throws NullPointerException, IllegalPropertyValueException, IOException
Returns the size of the data held by the actual property value embedded within the given indirect property value.
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.getActualData(PropertyValue)
TypeDefinition getActualType(PropertyValue indirectProperty) throws NullPointerException, IllegalPropertyValueException, TypeNotFoundException
Returns the type definition of the property value embedded within
the given property value. This is effectively getActualValue(PropertyValue)
followed by PropertyValue.getType()
.
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.
TypeNotFoundException
- For opaque type definitions, a type
matching the values key cannot be found.getActualValue(PropertyValue)
,
PropertyValue.getType()
byte[] getActualData(PropertyValue indirectProperty) throws NullPointerException, IllegalPropertyValueException, IOException
Returns a copy of the actual data contained in the indirect property value.
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.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |