Media Authoring
with Java API

tv.amwa.maj.entity
Class TaggedValueDefinition

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.DefinitionObject
          extended by tv.amwa.maj.entity.TaggedValueDefinition
All Implemented Interfaces:
Serializable, Cloneable, DefinitionType, MAJCommon, DefinitionObject, InterchangeObject, TaggedValueDefinition, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=19456,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="TaggedValueDefinition",
          description="The TaggedValueDefinition class documents the TaggedValue objects used in the file.")
public class TaggedValueDefinition
extends DefinitionObject
implements TaggedValueDefinition, Serializable, Cloneable, MAJCommon

Implements the documentation of tagged values used in a file. The name of the definition is the same as the name of the tagged value it documents. The description of the definition provides the documentation.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class TaggedValueDefinition.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.DefinitionObject
DefinitionObject.DefinitionObjectXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Constructor Summary
TaggedValueDefinition(AUID identification, String name)
          Creates and initialize all the fields of a tagged value definition, which documents the tagged value objects used in the file.
 
Method Summary
 void addParentProperty(PropertyDefinition parentProperty)
          Add a parent property to the list of parent properties of this tagged value definition, which specify which properties specify tagged values of this kind.
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 TaggedValueDefinition clone()
          Creates a cloned copy of this entity.
 int countParentProperties()
          Returns the number of parent properties of this tagged value definition, which specify which properties specify tagged values of this kind.
 Set<PropertyDefinition> getParentProperties()
          Returns the set of parent property definitions of this tagged value definition, which specify which properties specify tagged values of this kind.
 void removeParentProperty(PropertyDefinition parentProperty)
          Removes the given parent property from the list of parent properties of this tagged value definition, which specify which properties specify tagged values of this type.
 void setPropertiesFromInterface(TaggedValueDefinition castFrom)
           
 
Methods inherited from class tv.amwa.maj.entity.DefinitionObject
equals, getAUID, getDescription, getLocalizedUID, getName, hashCode, setDescription, setLocalizedUID, setName
 
Methods inherited from class tv.amwa.maj.entity.InterchangeObject
castFromInterface, countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, registerImplementation, setPropertiesFromInterface, setPropertyValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.DefinitionObject
getAUID, getDescription, getName, setDescription, setName
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 
Methods inherited from interface tv.amwa.maj.entity.MAJCommon
equals, hashCode, toString
 

Constructor Detail

TaggedValueDefinition

public TaggedValueDefinition(AUID identification,
                             @AAFString
                             String name)
                      throws NullPointerException

Creates and initialize all the fields of a tagged value definition, which documents the tagged value objects used in the file.

Parameters:
identification - Unique identifier for the new tagged value definition object.
name - Display name of the new tagged value definition object.
Throws:
NullPointerException - One or both of the arguments is/are null.
Method Detail

setPropertiesFromInterface

public final void setPropertiesFromInterface(TaggedValueDefinition castFrom)
See Also:
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)

addParentProperty

public void addParentProperty(PropertyDefinition parentProperty)
                       throws NullPointerException
Description copied from interface: TaggedValueDefinition

Add a parent property to the list of parent properties of this tagged value definition, which specify which properties specify tagged values of this kind. For example, mob user comments or component attributes.

This is an extended optional property. If this property is omitted, a successful call to this method will make it present.

Specified by:
addParentProperty in interface TaggedValueDefinition
Parameters:
parentProperty - Parent property to add to the list of parent properties of the tagged value definition.
Throws:
NullPointerException - The given parent property is null.

countParentProperties

public int countParentProperties()
                          throws PropertyNotPresentException
Description copied from interface: TaggedValueDefinition

Returns the number of parent properties of this tagged value definition, which specify which properties specify tagged values of this kind. For example, mob user comments or component attributes. This is an extended optional property.

Specified by:
countParentProperties in interface TaggedValueDefinition
Returns:
Number of parent properties of this tagged value definition.
Throws:
PropertyNotPresentException - The optional parent properties property is not present in this tagged value definition.

getParentProperties

public Set<PropertyDefinition> getParentProperties()
                                            throws PropertyNotPresentException
Description copied from interface: TaggedValueDefinition

Returns the set of parent property definitions of this tagged value definition, which specify which properties specify tagged values of this kind. For example, mob user comments or component attributes. This is an extended optional property.

Specified by:
getParentProperties in interface TaggedValueDefinition
Returns:
Shallow copy of the set of parent property definitions of this tagged value definition.
Throws:
PropertyNotPresentException - The optional parent properties property is not present in this tagged value definition.

removeParentProperty

public void removeParentProperty(PropertyDefinition parentProperty)
                          throws NullPointerException,
                                 NoMoreObjectsException,
                                 PropertyNotPresentException
Description copied from interface: TaggedValueDefinition

Removes the given parent property from the list of parent properties of this tagged value definition, which specify which properties specify tagged values of this type. For example, mob user comments or component attributes. This is an extended optional property. Removing the last parent property from the set will omit the property.

Specified by:
removeParentProperty in interface TaggedValueDefinition
Parameters:
parentProperty - Property definition to remove from the list of parent properties of this tagged value definition.
Throws:
NullPointerException - The given parent property to remove is not present in the set of parent properties of this tagged value definition.
NoMoreObjectsException - The property definition is not in the set of parent property definitions of this tagged value definition.
PropertyNotPresentException - The optional parent properties property is not present in this tagged value definition.

clone

public TaggedValueDefinition clone()
Description copied from interface: MAJCommon

Creates a cloned copy of this entity. The clone will be initialized to have the same value as this value but exists independently from then on. Changes to this value will not effect the clone and changes to the clone will not effect this. MAJ API clones are true deep clones with no shared references to areas of memory within the original.

This method does not throw a CloneNotSupportedException as all entity values must implement the Cloneable interface. If a cloning error does occur, a null value will be returned but this is very unlikely to happen.

Specified by:
clone in interface MAJCommon
Overrides:
clone in class DefinitionObject
Returns:
Independent clone of this value, which is a deep copy.
See Also:
Object.clone()

appendXMLChildren

public void appendXMLChildren(Node parent)
Description copied from interface: 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.

Specified by:
appendXMLChildren in interface XMLSerializable
Overrides:
appendXMLChildren in class DefinitionObject
Parameters:
parent - XML parent element to append child nodes to.

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.