TaggedValueImpl (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.model.impl

## Class TaggedValueImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.TaggedValueImpl

- All Implemented Interfaces:
    Serializable, Cloneable, MediaEntity, MetadataObject, InterchangeObject, TaggedValue

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=16128,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="TaggedValue",
                  description="The TaggedValue class specifies a user-defined tag and value.",
                  symbol="TaggedValue")
      public class TaggedValueImpl
      extends InterchangeObjectImpl
      implements TaggedValue, TaggedValue, Serializable, Cloneable

  Implements a user defined tag and value pair.

  See Also:
    `TypeDefinitions.TaggedValueStrongReference`, `TypeDefinitions.TaggedValueStrongReferenceVector`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaggedValueImpl()`
    `TaggedValueImpl(String tag, PropertyValue indirectValue)`
    `TaggedValueImpl(String name, TypeDefinition typeDefinition, Serializable value)` Creates and initializes a new tagged value object, which specifies a user-defined tag and value.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendTaggedValueAttributeItem(TaggedValue taggedValueAttributeItem)`
    `void` | `clearTaggedValueAttributeList()`
    `TaggedValue` | `clone()` Create a cloned copy of this interchange object.
    `int` | `countTaggedValueAttributeList()`
    `TypeDefinition` | `getIndirectTypeDefinition()` Returns the type of the user-defined indirect value.
    `PropertyValue` | `getIndirectValue()` Returns the user-defined value of this tagged value as a property value.
    `byte[]` | `getIndirectValuePersist()`
    `InterchangeObject` | `getPortableObject()`
    `int` | `getPortableObjectClassID()`
    `String` | `getTag()` Returns the tag name property of this tagged value, which is a user-defined tag.
    `TaggedValue` | `getTaggedValueAttributeItemAt(int index)`
    `List<TaggedValue>` | `getTaggedValueAttributeList()`
    `static PropertyValue` | `initializeIndirectValue()`
    `static String` | `initializeTag()`
    `void` | `insertTaggedValueAttributeItem(int index, TaggedValue taggedValueAttributeItem)`
    `void` | `prependTaggedValueAttributeItem(TaggedValue taggedValueAttributeItem)`
    `void` | `removeTaggedValueAttributeItemAt(int index)`
    `void` | `setIndirectValue(PropertyValue indirectValue)` Sets the user-defined indirect value of this tagged value.
    `void` | `setIndirectValuePersist(byte[] indirectBytes)`
    `void` | `setPortableObject(InterchangeObject portableObject)`
    `void` | `setPortableObjectClassID(Integer portableObjectClassID)`
    `void` | `setTag(String tag)`

    - ### Methods inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `addApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getComment, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface tv.amwa.maj.model.InterchangeObject

      `addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toString`

    - ### Methods inherited from interface tv.amwa.maj.industry.MediaEntity

      `getPersistentID, setPersistentIndex`

- - ### Constructor Detail

    - #### TaggedValueImpl

          public TaggedValueImpl()

    - #### TaggedValueImpl

          public TaggedValueImpl(@AAFString
                                 String name,
                                 TypeDefinition typeDefinition,
                                 Serializable value)
                          throws NullPointerException,
                                 ClassCastException

      Creates and initializes a new tagged value object, which specifies a user-defined tag and value.

      Parameters:
        `name` - User defined name (tag) of the tagged value object.
        `typeDefinition` - Type definition of the following value data.
        `value` - Value of the given type.
      Throws:
        `NullPointerException` - One or more of the arguments is null.
        `ClassCastException` - The given value cannot be cast to a value of the given type.

    - #### TaggedValueImpl

          public TaggedValueImpl(@AAFString
                                 String tag,
                                 PropertyValue indirectValue)
                          throws NullPointerException

      Throws:
        `NullPointerException`

  - ### Method Detail

    - #### getIndirectTypeDefinition

          public TypeDefinition getIndirectTypeDefinition()

      Description copied from interface: `TaggedValue`

      Returns the type of the user-defined indirect value.

      Specified by:
        `getIndirectTypeDefinition` in interface `TaggedValue`
      Returns:
        Type definition for this tagged value.
      See Also:
        `TaggedValue.getIndirectValue()`, `TypeDefinitionIndirect`, `TypeDefinitionIndirect.getActualValue(PropertyValue)`, `PropertyValue.getType()`

    - #### getTag

          @MediaProperty(uuid1=50462978,
                         uuid2=2305,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="Tag",
                         aliases={"Name","TaggedValueName"},
                         typeName="UTF16String",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=20481,
                         symbol="Tag")
          public String getTag()

      Description copied from interface: `TaggedValue`

      Returns the tag name property of this tagged value, which is a user-defined tag.

      Specified by:
        `getTag` in interface `TaggedValue`
      Returns:
        Name property of this tagged value.

    - #### setTag

          @MediaPropertySetter(value="Tag")
          public void setTag(String tag)
                                                        throws NullPointerException

      Throws:
        `NullPointerException`

    - #### initializeTag

          public static final String initializeTag()

    - #### getIndirectValue

          @MediaProperty(uuid1=50462978,
                         uuid2=2561,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="IndirectValue",
                         aliases={"Value","TaggedValueValue"},
                         typeName="Indirect",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=20483,
                         symbol="IndirectValue")
          public PropertyValue getIndirectValue()

      Description copied from interface: `TaggedValue`

      Returns the user-defined value of this tagged value as a property value.

      The type of the returned value can be found be calling `PropertyValue.getType()`. Methods of the type definition returned can be used to access the value. Alternatively, you can access the value directly by calling `PropertyValue.getValue()`.

      Specified by:
        `getIndirectValue` in interface `TaggedValue`
      Returns:
        Indirect value of this tagged value.
      See Also:
        `TaggedValue.getIndirectTypeDefinition()`, `TypeDefinitionIndirect`, `TypeDefinitionIndirect.getActualValue(PropertyValue)`, `PropertyValue.getValue()`

    - #### setIndirectValue

          @MediaPropertySetter(value="IndirectValue")
          public void setIndirectValue(PropertyValue indirectValue)
                                                                            throws NullPointerException

      Description copied from interface: `TaggedValue`

      Sets the user-defined indirect value of this tagged value.

      To create an indirect value, use the `createValue()` method of any type definition. Alternatively, you can retrieve the value of any other property using its property definition. To retrieve the property value of a property called foo from an instance called bar:

                ClassDefinition barClassDef =
                    ClassDefinitionWarehouse.forClass(bar.getClass());
                PropertyDefinition fooDefinition =
                    barClassDef.lookupPropertyDefinition("foo");
                PropertyValue fooValue =
                   fooDefinition.getPropertyValue(bar);

      Specified by:
        `setIndirectValue` in interface `TaggedValue`
      Parameters:
        `indirectValue` - Indirect value of this tagged value.
      Throws:
        `NullPointerException` - The given user-defined value is `null`.
      See Also:
        `TypeDefinitionIndirect`, `TypeDefinition.createValue(Object)`, `Warehouse.lookForType(String)`, `PropertyDefinition.getPropertyValue(MetadataObject)`

    - #### initializeIndirectValue

          public static final PropertyValue initializeIndirectValue()

    - #### clone

          public TaggedValue clone()

      Description copied from interface: `InterchangeObject`

      Create a cloned copy of this interchange object.

      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `TaggedValue`
      Overrides:
        `clone` in class `InterchangeObjectImpl`
      Returns:
        Cloned copy of this interchange object.

    - #### getTaggedValueAttributeList

          @MediaProperty(uuid1=1620410757,
                         uuid2=18353,
                         uuid3=4564,
                         uuid4={-96,28,0,4,-84,-106,-97,80},
                         definedName="TaggedValueAttributeList",
                         typeName="TaggedValueStrongReferenceVector",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         symbol="TaggedValueAttributeList",
                         namespace="http://www.amwa.tv/is03/extensions/avid",
                         prefix="avid")
          public List<TaggedValue> getTaggedValueAttributeList()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### appendTaggedValueAttributeItem

          @MediaListAppend(value="TaggedValueAttributeList")
          public void appendTaggedValueAttributeItem(TaggedValue taggedValueAttributeItem)
                                                                                                 throws NullPointerException

      Throws:
        `NullPointerException`

    - #### prependTaggedValueAttributeItem

          @MediaListPrepend(value="TaggedValueAttributeList")
          public void prependTaggedValueAttributeItem(TaggedValue taggedValueAttributeItem)
                                                                                                   throws NullPointerException

      Throws:
        `NullPointerException`

    - #### insertTaggedValueAttributeItem

          @MediaListInsertAt(value="TaggedValueAttributeList")
          public void insertTaggedValueAttributeItem(int index,
                                                                                                          TaggedValue taggedValueAttributeItem)
                                                                                                   throws NullPointerException,
                                                                                                          IndexOutOfBoundsException

      Throws:
        `NullPointerException`
        `IndexOutOfBoundsException`

    - #### countTaggedValueAttributeList

          @MediaPropertyCount(value="TaggedValueAttributeList")
          public int countTaggedValueAttributeList()

    - #### clearTaggedValueAttributeList

          @MediaPropertyClear(value="TaggedValueAttributeList")
          public void clearTaggedValueAttributeList()

    - #### getTaggedValueAttributeItemAt

          @MediaListGetAt(value="TaggedValueAttributeList")
          public TaggedValue getTaggedValueAttributeItemAt(int index)
                                                                                                      throws IndexOutOfBoundsException

      Throws:
        `IndexOutOfBoundsException`

    - #### removeTaggedValueAttributeItemAt

          @MediaListRemoveAt(value="TaggedValueAttributeList")
          public void removeTaggedValueAttributeItemAt(int index)
                                                                                                     throws IndexOutOfBoundsException

      Throws:
        `IndexOutOfBoundsException`

    - #### getPortableObjectClassID

          @UInt32
          public int getPortableObjectClassID()
                                               throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### setPortableObjectClassID

          public void setPortableObjectClassID(@UInt32
                                               Integer portableObjectClassID)
                                        throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### getPortableObject

          public InterchangeObject getPortableObject()
                                              throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### setPortableObject

          public void setPortableObject(InterchangeObject portableObject)

    - #### getIndirectValuePersist

          public byte[] getIndirectValuePersist()
                                         throws NotSerializableException,
                                                NullPointerException,
                                                IllegalPropertyValueException,
                                                InsufficientSpaceException

      Throws:
        `NotSerializableException`
        `NullPointerException`
        `IllegalPropertyValueException`
        `InsufficientSpaceException`

    - #### setIndirectValuePersist

          public void setIndirectValuePersist(byte[] indirectBytes)

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.