Media Authoring
with Java API

tv.amwa.maj.iface
Interface TaggedValue

All Superinterfaces:
InterchangeObject
All Known Implementing Classes:
TaggedValue

public interface TaggedValue
extends InterchangeObject

Specifies a user defined tag and value pair.

The value is of indirect type and the MAJ API provides methods that map values from Java objects to and from indirect type values. These mechanisms are hidden behind the getValue() and setValue(Object) methods.

A common type for data values is string and both the mob and component interfaces specify shortcut methods to create string comments and attributes. For example, Mob.appendComment(String, String) and Component.appendAttribute(String, String).

Author:
Richard Cartwright
See Also:
makeTaggedValue(), TaggedValueDefinition, Dictionary.getTaggedValueDefinitions(), Mob.getAttributes(), Mob.getComments(), Component.getAttributes(), Component.getComments()

Method Summary
 String getName()
          Returns the name property of this tagged value, which is a user-defined tag.
 TypeDefinition getTypeDefinition()
          Returns the type of the user-defined value.
 Object getValue()
          Returns the user-defined value of this tagged value.
 void setValue(Object value)
          Sets the user-defined value of this tagged value, which must be compatible with the value's type definition.
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 

Method Detail

getName

@AAFString
String getName()

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

Returns:
Name property of this tagged value.

getTypeDefinition

TypeDefinition getTypeDefinition()

Returns the type of the user-defined value.

Returns:
Type definition for this tagged value.
See Also:
getValue(), TypeDefinitionIndirect, TypeDefinitionIndirect.getActualValue(PropertyValue), PropertyValue.getType()

getValue

Object getValue()

Returns the user-defined value of this tagged value.

Returns:
Value of this tagged value.
See Also:
getTypeDefinition(), TypeDefinitionIndirect, TypeDefinitionIndirect.getActualValue(PropertyValue), PropertyValue.getValue()

setValue

void setValue(Object value)
              throws NullPointerException

Sets the user-defined value of this tagged value, which must be compatible with the value's type definition.

Parameters:
value - Data value of this tagged value.
Throws:
NullPointerException - The given user-defined value is null.
ClassCastException - The given value cannot be cast to a value of the type definition for this tagged value.
See Also:
TypeDefinitionIndirect, TypeDefinition.createValue(Object), TypeDefinitionIndirect

Media Authoring
with Java API

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