|
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.TypeDefinitionExtendibleEnumeration
@AAFClass(uuid1=218169601,
uuid2=544,
uuid3=0,
uuid4={6,14,43,52,2,6,1,1},
definedName="TypeDefinitionExtendibleEnumeration",
description="The TypeDefinitionExtendibleEnumeration class defines a property type that can have one of an extendible set of AUID values.")
public final class TypeDefinitionExtendibleEnumeration
Implements the definition of a property type that can have one of an extendible set of AUID values.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
| Nested Class Summary | |
|---|---|
static class |
TypeDefinitionExtendibleEnumeration.ElementXMLHandler
|
static class |
TypeDefinitionExtendibleEnumeration.ExtendibleEnumerationValue
|
static class |
TypeDefinitionExtendibleEnumeration.XMLHandler
|
| Constructor Summary | |
|---|---|
TypeDefinitionExtendibleEnumeration(AUID identification,
String typeName,
SortedMap<String,AUID> elements)
Creates and initializes the new extensible enumeration type definition, which defines a property type that can have one of an extendible set of AUID values. |
|
| Method Summary | |
|---|---|
void |
appendElement(AUID value,
String name)
Appends the given element, a name and AUID pair, to this extendible enumeration type definition. |
void |
appendXMLChildren(Node parent)
Append child elements to the given parent node to serialize the value of an object to an XML fragment. |
int |
countElements()
Returns the number of enumeration elements of this extendible enumeration type definition. |
PropertyValue |
createValue(Object javaValue)
Create a property value from the given Java object. |
PropertyValue |
createValueFromName(String name)
Creates a property value defined by this extendible enumeration type definition using the given name. |
boolean |
deepEquals(Object o)
Check to see if this definition is equal to the given object by comparing each property. |
AUID |
getAUIDFromName(String name)
Returns the identifier of the enumeration element associated with the given name, as defined by this extendible enumeration type definition. |
AUID |
getAUIDValue(PropertyValue enumerationProperty)
Returns the AUID value associated with the given extendible enumeration property value according to this extendible enumeration type definition. |
String |
getElementName(int index)
Returns the name of the enumeration element at the given index in the list of elements of this extendible enumeration type definition. |
String[] |
getElementNames()
|
AUID |
getElementValue(int index)
Returns the AUID value for the enumeration element at the given index of in the list of elements of this extendible enumeration type definition. |
AUID[] |
getElementValues()
|
String |
getNameFromAUID(AUID value)
Returns the name of the enumeration element associated with the given AUID value, as defined by this extendible enumeration type definition. |
String |
getNameFromValue(PropertyValue enumerationProperty)
Returns the name associated with the given property value, as defined by this extendible enumeration type definition. |
TypeCategory |
getTypeCategory()
Returns the type category to which this type definition belongs, which corresponds to its sub interface. |
void |
setAUIDValue(PropertyValue enumerationProperty,
AUID value)
Sets the value of the given extendible enumeration property value to the given AUID that identifies an element of this extendible enumeration type definition. |
void |
setPropertiesFromInterface(TypeDefinitionExtendibleEnumeration 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 TypeDefinitionExtendibleEnumeration OperationCategoryType
public static final TypeDefinitionExtendibleEnumeration TransferCharacteristicType
public static final TypeDefinitionExtendibleEnumeration PluginCategoryType
public static final TypeDefinitionExtendibleEnumeration UsageType
public static final TypeDefinitionExtendibleEnumeration ColorPrimariesType
public static final TypeDefinitionExtendibleEnumeration CodingEquationsType
| Constructor Detail |
|---|
public TypeDefinitionExtendibleEnumeration(AUID identification,
@AAFString
String typeName,
SortedMap<String,AUID> elements)
throws NullPointerException,
DuplicateException
Creates and initializes the new extensible enumeration type definition, which
defines a property type that can have one of an extendible set of AUID values. The
initial set of (possibly empty) elements must be provided as a map from element name to
AUID. Further enumeration elements can then be specified using the
appendElement(AUID, String)
method.
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 type definition.elements - Map containing element names and the AUIDs they map to.
NullPointerException - One or more of the arguments is null.
DuplicateException - The given representation of an extendible enumeration
contains duplicate AUID values.ExtendibleEnumerationWarehouse,
ExtendibleEnumerationItem| Method Detail |
|---|
public final void setPropertiesFromInterface(TypeDefinitionExtendibleEnumeration castFrom)
MetaDefinition.setPropertiesFromInterface(tv.amwa.maj.iface.MetaDefinition)
@AAFProperty(uuid1=50397699,
uuid2=1792,
uuid3=0,
uuid4={6,14,43,52,1,1,1,2},
definedName="ElementNames",
typeName="StringArray",
optional=false,
uniqueIdentifier=false,
pid=31)
public String[] getElementNames()
@AAFProperty(uuid1=50397699,
uuid2=2048,
uuid3=0,
uuid4={6,14,43,52,1,1,1,2},
definedName="ElementValues",
typeName="AUIDArray",
optional=false,
uniqueIdentifier=false,
pid=32)
public AUID[] getElementValues()
public void appendElement(AUID value,
String name)
throws NullPointerException,
DuplicateException
TypeDefinitionExtendibleEnumerationAppends the given element, a name and AUID pair, to this extendible enumeration type definition.
appendElement in interface TypeDefinitionExtendibleEnumerationvalue - AUID for the new enumeration element to append.name - Name for the new enumeration element to append.
NullPointerException - One or both of the arguments is/are null.
DuplicateException - Appending the given enumeration element
would introduce a duplicate value and/or duplicate name.public int countElements()
TypeDefinitionExtendibleEnumerationReturns the number of enumeration elements of this extendible enumeration type definition.
countElements in interface TypeDefinitionExtendibleEnumeration
public PropertyValue createValueFromName(String name)
throws NullPointerException,
InvalidParameterException
TypeDefinitionExtendibleEnumerationCreates a property value defined by this extendible enumeration type definition using the given name. The name is checked to see that it is in the list of names defining elements of this enumeration.
createValueFromName in interface TypeDefinitionExtendibleEnumerationname - Name to use to create a new extendible enumeration
property value.
NullPointerException - The given name is null.
InvalidParameterException - The given name does not match an element
of this extendible enumeration type definition.TypeDefinitionExtendibleEnumeration.setAUIDValue(PropertyValue, AUID)
public AUID getAUIDValue(PropertyValue enumerationProperty)
throws NullPointerException,
IllegalPropertyValueException
TypeDefinitionExtendibleEnumerationReturns the AUID value associated with the given extendible enumeration property value according to this extendible enumeration type definition.
getAUIDValue in interface TypeDefinitionExtendibleEnumerationenumerationProperty - Extensible enumeration property value
to find the associated AUID value for.
NullPointerException - The given extendible enumeration property value
is null.
IllegalPropertyValueException - The given property value is not
defined by this extendible enumeration type definition.TypeDefinitionExtendibleEnumeration.getNameFromAUID(AUID),
TypeDefinitionExtendibleEnumeration.getAUIDFromName(String)
public String getElementName(int index)
throws IndexOutOfBoundsException
TypeDefinitionExtendibleEnumerationReturns the name of the enumeration element at the given index in the list of elements of this extendible enumeration type definition.
getElementName in interface TypeDefinitionExtendibleEnumerationindex - Index of the required name.
IndexOutOfBoundsException - The given index is outside
the acceptable range for this extendible enumeration type
definition.
public AUID getElementValue(int index)
throws IndexOutOfBoundsException
TypeDefinitionExtendibleEnumerationReturns the AUID value for the enumeration element at the given index of in the list of elements of this extendible enumeration type definition.
getElementValue in interface TypeDefinitionExtendibleEnumerationindex - Index of the required AUID value.
IndexOutOfBoundsException - The given index is outside
the acceptable range for the list of elements of this extendible enumeration type
definition.
public AUID getAUIDFromName(String name)
throws NullPointerException,
BadParameterException
TypeDefinitionExtendibleEnumerationReturns the identifier of the enumeration element associated with the given name, as defined by this extendible enumeration type definition.
getAUIDFromName in interface TypeDefinitionExtendibleEnumerationname - Name to use to lookup the element identifier.
NullPointerException - The given element name is null.
BadParameterException - The given element name is not known
for in the list of values of this extendible enumeration type
definition.TypeDefinitionExtendibleEnumeration.getNameFromAUID(AUID)
public String getNameFromAUID(AUID value)
throws NullPointerException,
BadParameterException
TypeDefinitionExtendibleEnumerationReturns the name of the enumeration element associated with the given AUID value, as defined by this extendible enumeration type definition.
getNameFromAUID in interface TypeDefinitionExtendibleEnumerationvalue - Value to use to lookup the element name.
NullPointerException - The given identifier is null.
BadParameterException - The given value is not found
in the list of values of this extendible enumeration type
definition.TypeDefinitionExtendibleEnumeration.getAUIDFromName(String)
public String getNameFromValue(PropertyValue enumerationProperty)
throws NullPointerException,
IllegalPropertyValueException
TypeDefinitionExtendibleEnumerationReturns the name associated with the given property value, as defined by this extendible enumeration type definition.
getNameFromValue in interface TypeDefinitionExtendibleEnumerationenumerationProperty - Property value to lookup the name of.
NullPointerException - The given extendible enumeration property value is
null.
IllegalPropertyValueException - The given property value is not
defined by this extendible enumeration type definition.
public void setAUIDValue(PropertyValue enumerationProperty,
AUID value)
throws NullPointerException,
IllegalPropertyValueException,
BadParameterException
TypeDefinitionExtendibleEnumerationSets the value of the given extendible enumeration property value to the given AUID that identifies an element of this extendible enumeration type definition.
setAUIDValue in interface TypeDefinitionExtendibleEnumerationenumerationProperty - Extensible enumeration property value
to change.value - New value to set the given property value to.
NullPointerException - One or both of the arguments is/are null.
IllegalPropertyValueException - The given property value is not
defined by this extendible enumeration type definition.
BadParameterException - The given enumeration value identifier does not identifiy
an element of this extendible enumeration type.TypeDefinitionExtendibleEnumeration.getNameFromAUID(AUID),
TypeDefinitionExtendibleEnumeration.getAUIDFromName(String),
TypeDefinitionExtendibleEnumeration.createValueFromName(String)
public PropertyValue createValue(Object javaValue)
throws ClassCastException
TypeDefinitionCreate 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 TypeDefinitioncreateValue in class TypeDefinitionjavaValue - 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()
TypeDefinitionReturns 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 TypeDefinitiongetTypeCategory in class TypeDefinitionTypeCategorypublic final boolean deepEquals(Object o)
MetaDefinitionCheck 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 MetaDefinitiono - Object to compare to this definition.
public void appendXMLChildren(Node parent)
XMLSerializableAppend 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 XMLSerializableappendXMLChildren in class MetaDefinitionparent - XML parent element to append child nodes to.
|
Media Authoring with Java API |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||