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 getIndirectValue() and
setIndirectValue(PropertyValue) methods.
A common type for data values is string and
both the package and component interfaces specify
shortcut methods to create string comments and attributes. For example, Package.appendPackageUserComment(String, String)
and Component.appendComponentAttribute(String, String).
TaggedValueDefinition,
Dictionary.getTaggedValueDefinitions(),
Package.getPackageAttributes(),
Package.getPackageUserComments(),
Component.getComponentAttributes(),
Component.getComponentUserComments(),
TypeDefinitions.TaggedValueStrongReference,
TypeDefinitions.TaggedValueStrongReferenceVector| Modifier and Type | Method and Description |
|---|---|
TaggedValue |
clone()
Create a cloned copy of this tagged value.
|
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.
|
String |
getTag()
Returns the tag name property of this tagged value, which is a user-defined tag.
|
void |
setIndirectValue(PropertyValue indirectValue)
Sets the user-defined indirect value of this tagged value.
|
addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toStringgetPersistentID, setPersistentIndex@AAFString String getTag()
Returns the tag name property of this tagged value, which is a user-defined tag.
TypeDefinition getIndirectTypeDefinition()
Returns the type of the user-defined indirect value.
getIndirectValue(),
TypeDefinitionIndirect,
TypeDefinitionIndirect.getActualValue(PropertyValue),
PropertyValue.getType()PropertyValue getIndirectValue()
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().
getIndirectTypeDefinition(),
TypeDefinitionIndirect,
TypeDefinitionIndirect.getActualValue(PropertyValue),
PropertyValue.getValue()void setIndirectValue(PropertyValue indirectValue) throws NullPointerException
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);
indirectValue - Indirect value of this tagged value.NullPointerException - The given user-defined value is null.TypeDefinitionIndirect,
TypeDefinition.createValue(Object),
Warehouse.lookForType(String),
PropertyDefinition.getPropertyValue(MetadataObject)TaggedValue clone()
Create a cloned copy of this tagged value.
clone in interface InterchangeObjectclone in interface MediaEntity(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.