|
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.TypeDefinitionSet
@AAFClass(uuid1=218169601, uuid2=522, uuid3=0, uuid4={6,14,43,52,2,6,1,1}, definedName="TypeDefinitionSet", description="The TypeDefinitionSet class defines a property type that has a collection of object references to uniquely identified objects. The order of the objects has no meaning.") public final class TypeDefinitionSet
Implements the definition of a property type that has a collection of object references to uniquely identified objects. The order of the objects has no meaning.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
Nested Class Summary | |
---|---|
static class |
TypeDefinitionSet.SetValue
|
static class |
TypeDefinitionSet.XMLHandler
|
Constructor Summary | |
---|---|
TypeDefinitionSet(AUID identification,
String typeName,
TypeDefinitionObjectReference elementType)
Creates and initializes the set type definition, which defines a property type that has a collection of object references to uniquely identified objects. |
Method Summary | |
---|---|
void |
addElement(PropertyValue setPropertyValue,
PropertyValue elementPropertyValue)
Adds the given element to the given set, which is represented by the given property value of this set 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. |
boolean |
containsElement(PropertyValue setPropertyValue,
PropertyValue elementPropertyValue)
Returns true if the given element is contained in
the given set; otherwise false . |
PropertyValue |
createEmptySet()
Create a property value with an empty set, ready to hold property values of this type definitions element type. |
PropertyValue |
createValue(Object javaValue)
Create a property value from the given Java object. |
boolean |
deepEquals(Object o)
Check to see if this definition is equal to the given object by comparing each property. |
int |
getCount(PropertyValue setPropertyValue)
Returns the number of elements in the given set, or -1 if the set is null . |
Set<PropertyValue> |
getElements(PropertyValue setPropertyValue)
Returns a copy of the set of all the elements in the given set property value. |
TypeDefinitionObjectReference |
getElementType()
Returns the type of elements referenced from the defined set. |
TypeCategory |
getTypeCategory()
Returns the type category to which this type definition belongs, which corresponds to its sub interface. |
void |
removeElement(PropertyValue setPropertyValue,
PropertyValue elementPropertyValue)
Removes the given element from the given set, which is represented by the given property value of this set type definition. |
void |
setPropertiesFromInterface(TypeDefinitionSet 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 TypeDefinitionVariableArray AUIDSet
public static final TypeDefinitionVariableArray UInt32Set
public static final TypeDefinitionSet ClassDefinitionStrongReference
public static final TypeDefinitionSet CodecDefinitionStrongReference
public static final TypeDefinitionSet ContainerDefinitionStrongReference
public static final TypeDefinitionSet DataDefinitionStrongReference
public static final TypeDefinitionSet EssenceDataStrongReference
public static final TypeDefinitionSet InterpolationDefinitionStrongReference
public static final TypeDefinitionSet MobStrongReference
public static final TypeDefinitionSet OperationDefinitionStrongReference
public static final TypeDefinitionSet ParameterDefinitionStrongReference
public static final TypeDefinitionSet PluginDefinitionStrongReference
public static final TypeDefinitionSet PropertyDefinitionStrongReference
public static final TypeDefinitionSet TypeDefinitionStrongReference
public static final TypeDefinitionSet KLVDataDefinitionStrongReference
public static final TypeDefinitionSet TaggedValueDefinitionStrongReference
public static final TypeDefinitionSet DataDefinitionWeakReference
public static final TypeDefinitionSet ParameterDefinitionWeakReference
public static final TypeDefinitionSet PluginDefinitionWeakReference
public static final TypeDefinitionSet PropertyDefinitionWeakReference
public static final TypeDefinitionSet DescriptiveObjectStrongReference
Constructor Detail |
---|
public TypeDefinitionSet(AUID identification, @AAFString String typeName, TypeDefinitionObjectReference elementType) throws NullPointerException
Creates and initializes the set type definition, which defines a property type that has a collection of object references to uniquely identified objects. The order of the objects has no meaning.
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 of set.typeName
- Friendly name for this type definition.elementType
- Type definition of each element contained in this set.
NullPointerException
- The identification and/or element type arguments is/are
null
.Method Detail |
---|
public final void setPropertiesFromInterface(TypeDefinitionSet castFrom)
MetaDefinition.setPropertiesFromInterface(tv.amwa.maj.iface.MetaDefinition)
public void addElement(PropertyValue setPropertyValue, PropertyValue elementPropertyValue) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionSet
Adds the given element to the given set, which is represented by the given property value of this set type definition.
addElement
in interface TypeDefinitionSet
setPropertyValue
- Set to add the given element to.elementPropertyValue
- Element to add to the given set.
NullPointerException
- One or both of the arguments is/are null
.
IllegalPropertyValueException
- The type of the given property value
does not match this set type definition.public boolean containsElement(PropertyValue setPropertyValue, PropertyValue elementPropertyValue) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionSet
Returns true
if the given element is contained in
the given set; otherwise false
. The set to test membership for is
represented by the given property value of this set type definition.
containsElement
in interface TypeDefinitionSet
setPropertyValue
- Set to check for the given element.elementPropertyValue
- Element to check for in the given set.
NullPointerException
- One or both of the arguments is/are null
.
IllegalPropertyValueException
- The type of the given property value does
not match this set type definition.public int getCount(PropertyValue setPropertyValue) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionSet
Returns the number of elements in the given set, or -1
if the set is null
. The set to count the members for is
represented by the given property value of this set type definition.
getCount
in interface TypeDefinitionSet
setPropertyValue
- Property value containing a set.
NullPointerException
- The given set property value is null
.
IllegalPropertyValueException
- The type of the given property value
does not match this set type definition.@AAFProperty(uuid1=100729095, uuid2=3584, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="ElementType", typeName="WeakReference to TypeDefinition", optional=false, uniqueIdentifier=false, pid=26) public TypeDefinitionObjectReference getElementType()
TypeDefinitionSet
Returns the type of elements referenced from the defined set.
getElementType
in interface TypeDefinitionSet
TypeDefinitionObjectReference.getObjectType()
public Set<PropertyValue> getElements(PropertyValue setPropertyValue) throws NullPointerException, IllegalPropertyValueException
TypeDefinitionSet
Returns a copy of the set of all the elements in the given set property value.
getElements
in interface TypeDefinitionSet
setPropertyValue
- Property value to read and returns the elements
for.
NullPointerException
- The given set property value is null
.
IllegalPropertyValueException
- The type of the given argument does not
match this set type definition.public void removeElement(PropertyValue setPropertyValue, PropertyValue elementPropertyValue) throws NullPointerException, IllegalPropertyValueException, BadTypeException, ObjectNotFoundException
TypeDefinitionSet
Removes the given element from the given set, which is represented by the given property value of this set type definition.
removeElement
in interface TypeDefinitionSet
setPropertyValue
- Set to remove the given element from.elementPropertyValue
- Element to remove from the given set.
NullPointerException
- One or both of the arguments is/are null
.
IllegalPropertyValueException
- The type of the given property value
does not match this set type definition.
BadTypeException
- The type of the given element for removal does
not match the element type of this set type definition.
ObjectNotFoundException
- The given element to remove cannot
be found in the given set property value.public PropertyValue createEmptySet()
TypeDefinitionSet
Create a property value with an empty set, ready to hold property values
of this type definitions element type. Call
TypeDefinitionSet.addElement(PropertyValue, PropertyValue)
to add elements to this
set.
createEmptySet
in interface TypeDefinitionSet
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 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 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 |