@MediaClass(uuid1=218169601, uuid2=518, uuid3=0, uuid4={6,14,43,52,2,6,1,1}, definedName="TypeDefinitionWeakObjectReference", description="The TypeDefinitionWeakObjectReference class defines a property type that defines an object relationship where the target of the weak reference is referenced by the object with the property with the TypeDefinitionWeakObjectReference type.", symbol="TypeDefinitionWeakObjectReference") public final class TypeDefinitionWeakObjectReferenceImpl extends TypeDefinitionObjectReferenceImpl implements TypeDefinitionWeakObjectReference, Serializable, Cloneable
Implements the definition of a property type that defines an object relationship where the target of the weak reference is referenced by the object with the property with the TypeDefinitionWeakObjectReference type.
TypeDefinitionObjectReferenceImpl.ObjectReferenceValue, TypeDefinitionObjectReferenceImpl.UnresolvedReferenceValueSingletonTypeDefinitionImpl.SingletonMethodBagTypeDefinitionImpl.PropertyValueImplAAF_METADICT_NAMESPACE, AAF_METADICT_PREFIX, AAF_XML_NAMESPACE, AAF_XML_PREFIX, ApplicationPluginObjectID, ApplicationPluginsID, MAX_NUM_RGBA_COMPS, MemberOfID, ObjectClassID, ParentClassID, PropertiesID, XMLClassIDAsAttributeName| Constructor and Description |
|---|
TypeDefinitionWeakObjectReferenceImpl(AUID identification,
String typeName,
ClassDefinition objectType,
AUID[] targetSet)
Creates and initializes a weak object reference type definition, which defines a property
type that defines an object relationship where the target of the weak reference is referenced
by the object with the property.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendMetadictXML(Node metadict,
String namespace,
String prefix)
Append an XML representation of this meta definition to the given XML node.
|
TypeDefinitionWeakObjectReference |
clone()
Create a cloned copy of this meta definition.
|
PropertyValue |
createValue(Object javaValue)
Create a property value from the given Java object.
|
ClassDefinition |
getReferencedType() |
AUID[] |
getTargetSet()
Returns the target set of the reference type that provides the path
from the root of an AAF file to a string referenced set than can be used
to resolve a weak reference of this type.
|
TypeCategory |
getTypeCategory()
Returns the type category to which this type definition belongs, which
corresponds to its sub interface.
|
static AUID[] |
initializeTargetSet() |
static ClassDefinition |
initializeWeakReferencedType() |
void |
setReferencedType(ClassDefinition referencedType) |
void |
setTargetSet(AUID[] targetSet) |
createFromBytes, getLocalReference, getObject, getObjectType, lengthAsBytes, setObject, writeAsBytessetPropertyValuegetNamespace, getPrefix, getPropertyValue, initalizeTypeNameMap, nameToAAFName, resolveReferences, writeAsStructuredStorageBytesaafNameToName, appendXMLChildren, deepEquals, equals, getAAFNamesInUse, getAliases, getAUID, getComment, getDescription, getIdentification, getName, getSymbol, getWeakTargetReference, hashCode, initializeMetaDefinitionIdentification, initializeMetaDefinitionName, setAAFNamesInUse, setAliases, setDescription, setIdentification, setName, setNamespace, setPrefix, setSymbol, toStringgetObject, getObjectType, setObjectcreateFromBytes, getPropertyValue, lengthAsBytes, resolveReferences, setPropertyValue, writeAsBytes, writeAsStructuredStorageBytesdeepEquals, equals, getAAFNamesInUse, getAliases, getAUID, getDescription, getName, getNamespace, getPrefix, getSymbol, hashCode, setAAFNamesInUse, setDescription, setName, setNamespace, setPrefix, setSymbol, toStringgetWeakTargetReferenceappendXMLChildren, getCommentpublic TypeDefinitionWeakObjectReferenceImpl(AUID identification, @AAFString String typeName, ClassDefinition objectType, AUID[] targetSet) throws NullPointerException
Creates and initializes a weak object reference type definition, which defines a property
type that defines an object relationship where the target of the weak reference is referenced
by the object with the property. Only objects that define a unique identification
(AUID or
package id) can be the targets of weak object
references. An object can be the target of one or more than one weak references.
The targetSet parameter points to an array of
property definition AUIDs that indicate the location of the property
containing the target of the weak reference. The AUIDs indicate the
containment path to the target property, starting at the root preface object.
For example, if the containment hierarchy is:
Preface->A->B->CAUID corresponds to
the preface's property that contains object A; the second
AUID corresponds to object A's
property which contains object B; and the third
AUID corresponds
to object B's property C that contans the target of this weak reference.
If any intermediate property is a vector or set, all
objects in that vector or set are searched for the target.
Note that the final AUID must
correspond to a property that is currently set.
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
Warehouse.lookForType(String) or
Warehouse.lookForType(tv.amwa.maj.record.AUID)
respectively.
identification - AUID to be used to identify this type.typeName - Friendly name of the type definition.objectType - Class definition of objects that the reference is permitted
to reference. The referenced object may also belong to a subclass of the
referenced class.targetSet - List of property definition ids that indicate where
the target of the reference is to be found.NullPointerException - One or more of the identification, object type or target
set arguments is null and all are required.@MediaProperty(uuid1=100729095, uuid2=2560, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="WeakReferencedType", aliases="ReferencedType", typeName="ClassDefinitionWeakReference", optional=false, uniqueIdentifier=false, pid=18, symbol="WeakReferencedType") public ClassDefinition getReferencedType()
@MediaPropertySetter(value="WeakReferencedType") public void setReferencedType(ClassDefinition referencedType)
public static final ClassDefinition initializeWeakReferencedType()
@MediaProperty(uuid1=50397699, uuid2=2816, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="TargetSet", aliases={"ReferenceTargetSet","TargetList"}, typeName="AUIDArray", optional=false, uniqueIdentifier=false, pid=19, symbol="TargetSet") public AUID[] getTargetSet()
TypeDefinitionWeakObjectReferenceReturns the target set of the reference type that provides the path from the root of an AAF file to a string referenced set than can be used to resolve a weak reference of this type.
getTargetSet in interface TypeDefinitionWeakObjectReference@MediaPropertySetter(value="TargetSet") public void setTargetSet(AUID[] targetSet) throws NullPointerException
NullPointerExceptionpublic static final AUID[] initializeTargetSet()
public PropertyValue createValue(Object javaValue) throws ClassCastException
TypeDefinitionImplCreate 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 TypeDefinitioncreateValue in interface TypeDefinitionObjectReferencecreateValue in class TypeDefinitionObjectReferenceImpljavaValue - 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.TypeDefinitionObjectReference.setObject(PropertyValue, Object)public TypeCategory getTypeCategory()
TypeDefinitionReturns 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 TypeDefinitiongetTypeCategory in class TypeDefinitionImplTypeCategorypublic void appendMetadictXML(Node metadict, String namespace, String prefix)
MetaDefinitionAppend an XML representation of this meta definition to the given XML node.
appendMetadictXML in interface MetaDefinitionappendMetadictXML in class MetaDefinitionImplmetadict - Meta dictionary node to append a description of this node to.CommonConstants.AAF_METADICT_NAMESPACEpublic TypeDefinitionWeakObjectReference clone()
MetaDefinitionCreate a cloned copy of this meta definition.
clone in interface MetaDefinitionclone in interface TypeDefinitionclone in interface TypeDefinitionObjectReferenceclone in interface TypeDefinitionWeakObjectReferenceclone in class TypeDefinitionObjectReferenceImpl(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.