|
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.TypeDefinitionCharacter
@AAFClass(uuid1=218169601, uuid2=547, uuid3=0, uuid4={6,14,43,52,2,6,1,1}, definedName="TypeDefinitionCharacter", description="The TypeDefinitionCharacter class defines a property type that has a value of a single 2-byte character.") public final class TypeDefinitionCharacter
Implements the definition of a property type that has a value of a single 2-byte character.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
Nested Class Summary | |
---|---|
static class |
TypeDefinitionCharacter.CharacterValue
|
static class |
TypeDefinitionCharacter.XMLHandler
|
Field Summary | |
---|---|
static TypeDefinitionCharacter |
Character
|
Constructor Summary | |
---|---|
TypeDefinitionCharacter(AUID identification,
String typeName)
Creates and initializes a new type definition for characters, which defines a property type that has a value of a single 2-byte character like Java's char type. |
Method Summary | |
---|---|
void |
appendXMLChildren(Node parent)
Append child elements to the given parent node to serialize the value of an object to an XML fragment. |
PropertyValue |
createValue(Object javaValue)
Create a property value from the given Java object. |
PropertyValue |
createValueFromCharacter(char character)
Create a new property value of character type from the given single character. |
boolean |
deepEquals(Object o)
Check to see if this definition is equal to the given object by comparing each property. |
char |
getCharacter(PropertyValue characterProperty)
Returns the character that is the value of the given character property value. |
TypeCategory |
getTypeCategory()
Returns the type category to which this type definition belongs, which corresponds to its sub interface. |
void |
setCharacter(PropertyValue characterProperty,
char character)
Sets the given character as the value of the given character property value. |
void |
setPropertiesFromInterface(TypeDefinitionCharacter 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 TypeDefinitionCharacter Character
Constructor Detail |
---|
public TypeDefinitionCharacter(AUID identification, @AAFString String typeName) throws NullPointerException
Creates and initializes a new type definition for characters, which defines a property type that
has a value of a single 2-byte character like Java's char
type.
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 used to identify this type.typeName
- Friendly name used to identify this type.
NullPointerException
- The identification is null
.Method Detail |
---|
public final void setPropertiesFromInterface(TypeDefinitionCharacter castFrom)
MetaDefinition.setPropertiesFromInterface(tv.amwa.maj.iface.MetaDefinition)
public PropertyValue createValueFromCharacter(char character)
TypeDefinitionCharacter
Create a new property value of character type from the given single character.
createValueFromCharacter
in interface TypeDefinitionCharacter
character
- Character to use to create a new property value.
TypeDefinitionCharacter.setCharacter(PropertyValue, char)
public char getCharacter(PropertyValue characterProperty) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionCharacter
Returns the character that is the value of the given character property value.
getCharacter
in interface TypeDefinitionCharacter
characterProperty
- Property value containing the character to
return.
NullPointerException
- The given property value is null
.
IllegalPropertyValueException
- The given property value is not a
character property value.PropertyValue.getType()
public void setCharacter(PropertyValue characterProperty, char character) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionCharacter
Sets the given character as the value of the given character property value.
setCharacter
in interface TypeDefinitionCharacter
characterProperty
- Property value of character type to set
the character for.character
- Character to set as the value of the given property
value.
NullPointerException
- The given character property value is null
.
IllegalPropertyValueException
- The given property value is not a
a character property value.TypeDefinitionCharacter.createValueFromCharacter(char)
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
TypeCategory
public final boolean deepEquals(Object o)
MetaDefinition
Check 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 MetaDefinition
o
- Object to compare to this definition.
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.public void appendXMLChildren(Node parent)
XMLSerializable
Append 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 XMLSerializable
appendXMLChildren
in class MetaDefinition
parent
- 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 |