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

tv.amwa.maj.meta.impl

## Class ClassDefinitionImpl

- java.lang.Object
- - tv.amwa.maj.meta.impl.MetaDefinitionImpl
  - - tv.amwa.maj.meta.impl.ClassDefinitionImpl

- All Implemented Interfaces:
    Serializable, Cloneable, CommonConstants, MetadataObject, WeakReferenceTarget, XMLSerializable, ClassDefinition, MetaDefinition, DefinitionType

      @MediaClass(uuid1=218169601,
                  uuid2=513,
                  uuid3=0,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="ClassDefinition",
                  description="The ClassDefinition class is used to programatically represent the class hierarchy defined in the AAF object specification.",
                  symbol="ClassDefinition")
      public final class ClassDefinitionImpl
      extends MetaDefinitionImpl
      implements ClassDefinition, Serializable, XMLSerializable, WeakReferenceTarget, CommonConstants, Cloneable

  Implementation of the definition of an AAF class.

  See Also:
    `TypeDefinitions.ClassDefinitionWeakReference`, `TypeDefinitions.ClassDefinitionStrongReference`, `TypeDefinitions.ClassDefinitionStrongReferenceSet`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface tv.amwa.maj.constant.CommonConstants

      `AAF_METADICT_NAMESPACE, AAF_METADICT_PREFIX, AAF_XML_NAMESPACE, AAF_XML_PREFIX, ApplicationPluginObjectID, ApplicationPluginsID, MAX_NUM_RGBA_COMPS, MemberOfID, ObjectClassID, ParentClassID, PropertiesID, XMLClassIDAsAttributeName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassDefinitionImpl(AUID identification, String className, ClassDefinition parentClass, boolean isConcrete)` Creates and initializes a class definition object that inherits from the given parent class.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyDefinition(PropertyDefinition propertyDefinition)`
    `void` | `appendMetadictXML(Node metadict, String namespace, String prefix)` Append an XML representation of this meta definition to the given XML node.
    `void` | `clearPropertyDefinitions()`
    `ClassDefinition` | `clone()` Create a cloned copy of this meta definition.
    `boolean` | `containsPropertyDefinition(PropertyDefinition propertyDefinition)`
    `static int` | `countClassDefinitions()`
    `int` | `countProperties(MetadataObject metadataObject)` Returns the number of properties currently present in the given metadata object, including all required properties.
    `int` | `countPropertyDefinitions()` Returns number of property definitions in this class.
    `MetadataObject` | `createInstance()` Creates an instance of this class and returns it, or `null` if the instantiation failed.
    `static ClassDefinition` | `forAUID(AUID identification)`
    `static ClassDefinition` | `forClass(Class<?> aafClass)` For any given Java class, this method finds the corresponding AAF class definition or creates it if it does not yet exists within the current Java virtual machine.
    `Set<PropertyDefinition>` | `getAllPropertyDefinitions()` Returns all AAF property definitions attached directly to the current class and its ancestors.
    `static Collection<ClassDefinition>` | `getClassDefinitions()`
    `String` | `getComment()` Include a comment when serializing a value to XML.
    `EmitXMLClassIDAs` | `getEmitXMLClassIDAs()` Determines how the identifier of the class should be serialized to XML.
    `boolean` | `getIsConcrete()`
    `String` | `getJavaClassName()`
    `Class<?>` | `getJavaImplementation()` Returns the Java class implementation associated with the defined class.
    `String` | `getNamespace()` Returns the namespace in which the subject of this meta definition is defined.
    `ClassDefinition` | `getParent()` Gets the Parent class for this class definition.
    `String` | `getPrefix()` Returns the namespace prefix to use when serializing a value of the subject of this meta definition to XML.
    `SortedMap<? extends PropertyDefinition,? extends PropertyValue>` | `getProperties(MetadataObject metadataObject)` Returns the set of properties of the given object, where each property contains its property definition and current value.
    `Set<PropertyDefinition>` | `getPropertyDefinitions()` Returns the AAF property definitions attached directly to the current class.
    `PropertyDefinition` | `getUniqueIdentifierProperty()` Returns the property definition corresponding to this class' unique identifier.
    `PropertyValue` | `getUniqueIdentifierValue(MetadataObject uniquelyIdentifiedObject)` Returns the current value of the unique identifier for a value of a type defined by this class definition.
    `String` | `getWeakTargetReference()` Provides a name that can be used to make a weak object reference to an instance of the implementing class.
    `static PropertyDefinition` | `globalPropertyIDLookup(AUID propertyID)`
    `static void` | `initalizeClassNameMap()`
    `static boolean` | `initializeIsConcrete()`
    `ClassDefinition` | `initializeParentClass()`
    `boolean` | `isConcrete()` Returns `true` if the defined class can be instantiated; returns `false` otherwise.
    `static boolean` | `isKnownProperty(PropertyDefinition property)`
    `boolean` | `isRoot()` Returns `true` if the defined class is the base of the inheritance hierarchy; returns `false` otherwise.
    `boolean` | `isUniquelyIdentified()` Returns `true` if the defined class is uniquely identified, which means that it has a single property that is a unique identifier for any given instance.
    `PropertyDefinition` | `lookupPropertyDefinition(AUID propertyID)` Looks up and returns the property definition corresponding to the given AUID in the set of properties defined for this class.
    `PropertyDefinition` | `lookupPropertyDefinition(short propertyTag)` Looks up and returns the property definition corresponding to the given short tag in the set of all properties defined for this class.
    `PropertyDefinition` | `lookupPropertyDefinition(String propertyName)` Looks up and returns the property definition corresponding to the given name in the set of all properties defined for this class.
    `String` | `nameToAAFName(String name)`
    `PropertyDefinition` | `registerNewPropertyDefinition(AUID identification, String name, String[] aliases, String symbol, String typeName, boolean isOptional, boolean isUniqueIdentifier, Short pid)` Creates a new property definition and registers it in this class definition.
    `PropertyDefinition` | `registerOptionalPropertyDefinition(AUID identification, String name, String[] aliases, String symbol, String typeName)` Creates a new property definition and registers it in this class definition.
    `void` | `removePropertyDefinition(PropertyDefinition propertyDefinition)`
    `void` | `setIsConcrete(boolean concrete)`
    `void` | `setJavaImplementation(Class<?> javaImplementation)` Sets the Java class implementation associated with the defined class.
    `void` | `setParent(ClassDefinition parent)`

    - ### Methods inherited from class tv.amwa.maj.meta.impl.MetaDefinitionImpl

      `aafNameToName, appendXMLChildren, deepEquals, equals, getAAFNamesInUse, getAliases, getAUID, getDescription, getIdentification, getName, getSymbol, hashCode, initializeMetaDefinitionIdentification, initializeMetaDefinitionName, setAAFNamesInUse, setAliases, setDescription, setIdentification, setName, setNamespace, setPrefix, setSymbol, toString`

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

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

    - ### Methods inherited from interface tv.amwa.maj.meta.ClassDefinition

      `getSymbol`

    - ### Methods inherited from interface tv.amwa.maj.meta.MetaDefinition

      `deepEquals, equals, getAAFNamesInUse, getAliases, getAUID, getDescription, getName, hashCode, setAAFNamesInUse, setDescription, setName, setNamespace, setPrefix, setSymbol, toString`

    - ### Methods inherited from interface tv.amwa.maj.io.xml.XMLSerializable

      `appendXMLChildren`

- - ### Constructor Detail

    - #### ClassDefinitionImpl

          public ClassDefinitionImpl(AUID identification,
                                     String className,
                                     ClassDefinition parentClass,
                                     boolean isConcrete)
                              throws NullPointerException

      Creates and initializes a class definition object that inherits from the given parent class. If the is concrete property is set to `true`, objects of this class can be instantiated; otherwise, it will be illegal to instantiate such objects.

      When creating the class implementation, it is advisable to set the Java class implementation of the given definition using `setJavaImplementation(Class)`.

      Parameters:
        `identification` - Identification of the new class definition.
        `className` - Friendly name of the new class definition.
        `parentClass` - Specifies the parent of the class being defined from which this class inherits. If set to `null`, the new definition is assumed to be for a root class.
        `isConcrete` - Can objects of this class be instantiated?
      Throws:
        `NullPointerException` - The identification argument is `null`.

  - ### Method Detail

    - #### initalizeClassNameMap

          public static final void initalizeClassNameMap()

    - #### forClass

          public static final ClassDefinition forClass(Class<?> aafClass)
                                                throws NullPointerException,
                                                       IllegalArgumentException

      For any given Java class, this method finds the corresponding AAF class definition or creates it if it does not yet exists within the current Java virtual machine. The creation of class definitions is done by lazy evaluation as required using Java reflection and annotations. All generated values are cached in a local, static hashtable so that once generated, the work is not repeated.

      The values returned by this method are only as good as the annotations provided with the sourcecode, as labelled using `MediaClass` and `MediaProperty`. If an `MediaClass` annotation is not present in the given class, an `IllegalArgumentException` is thrown. Any problems found with the `MediaProperty` annotations, such as two properties having the same name, will also result in an `IllegalArgumentException`.

      Parameters:
        `aafClass` - Java class to find the AAF class definition of.
      Returns:
        AAF class definition associated with the given Java class.
      Throws:
        `NullPointerException` - The given Java class is `null`.
        `IllegalArgumentException` - The given Java class is not annotated with `MediaClass` or the `MediaProperty` annotations contain errors.
      See Also:
        `tv.amwa.maj.industry.ClassDefinitionWarehouse`

    - #### countPropertyDefinitions

          @MediaPropertyCount(value="Properties")
          public int countPropertyDefinitions()

      Description copied from interface: `ClassDefinition`

      Returns number of property definitions in this class.

      Specified by:
        `countPropertyDefinitions` in interface `ClassDefinition`
      Returns:
        Number of properties contained in this class definition.

    - #### clearPropertyDefinitions

          @MediaPropertyClear(value="Properties")
          public void clearPropertyDefinitions()

    - #### createInstance

          public MetadataObject createInstance()

      Description copied from interface: `ClassDefinition`

      Creates an instance of this class and returns it, or `null` if the instantiation failed. This method is not the recommended way of creating objects in the MAJ API as the values of the class will not be initialized to sensible values. To create implementations of the objects safely, use the make methods of the media engine instead.

      This method is provided for implementations of file reading mechanisms that need to create uninitialized objects before setting all required properties from the input stream.

      Specified by:
        `createInstance` in interface `ClassDefinition`
      Returns:
        An instance object defined by this class definition, or `null` if the instantiation failed.
      See Also:
        `Forge.make(Class, Object...)`

    - #### getJavaClassName

          public String getJavaClassName()
                                  throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### getJavaImplementation

          public Class<?> getJavaImplementation()
                                         throws PropertyNotPresentException

      Description copied from interface: `ClassDefinition`

      Returns the Java class implementation associated with the defined class.

      Specified by:
        `getJavaImplementation` in interface `ClassDefinition`
      Returns:
        Java class implementation associated with this AAF class definition.
      Throws:
        `PropertyNotPresentException` - The optional java implementation property is not present in this AAF class definition.
      See Also:
        `MediaClass`, `Warehouse.lookForClass(Class)`

    - #### setJavaImplementation

          public void setJavaImplementation(Class<?> javaImplementation)

      Description copied from interface: `ClassDefinition`

      Sets the Java class implementation associated with the defined class.

      Specified by:
        `setJavaImplementation` in interface `ClassDefinition`
      Parameters:
        `javaImplementation` - Java class implementation associated with this AAF class definition.
      See Also:
        `MediaClass`, `Warehouse.lookForClass(Class)`

    - #### getParent

          @MediaProperty(uuid1=100729095,
                         uuid2=256,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="ParentClass",
                         typeName="ClassDefinitionWeakReference",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=8,
                         symbol="ParentClass")
          public ClassDefinition getParent()

      Description copied from interface: `ClassDefinition`

      Gets the Parent class for this class definition. If there is no parent then `null` is returned. The only classes which have no parent will be `InterchangeObject` and `MetaDefinition`. These classes return themselves as their own parents to indicate that they are the root of the type hierarchy.

      Specified by:
        `getParent` in interface `ClassDefinition`
      Returns:
        Parent class of this class definition, this class if it is the root of the class hierarchy or `null` if no parent class has been defined.

    - #### setParent

          @MediaPropertySetter(value="ParentClass")
          public void setParent(ClassDefinition parent)
                                                                   throws NullPointerException

      Throws:
        `NullPointerException`

    - #### initializeParentClass

          public ClassDefinition initializeParentClass()

    - #### getPropertyDefinitions

          @MediaProperty(uuid1=100729095,
                         uuid2=512,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="Properties",
                         typeName="PropertyDefinitionStrongReferenceSet",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=9,
                         symbol="Properties")
          public Set<PropertyDefinition> getPropertyDefinitions()

      Description copied from interface: `ClassDefinition`

      Returns the AAF property definitions attached directly to the current class.

      Specified by:
        `getPropertyDefinitions` in interface `ClassDefinition`
      Returns:
        Shallow copy of the set of property definitions that define the properties for this class.
      See Also:
        `ClassDefinition.getAllPropertyDefinitions()`, `TypeDefinitions.PropertyDefinitionStrongReferenceSet`

    - #### addPropertyDefinition

          @MediaSetAdd(value="Properties")
          public void addPropertyDefinition(PropertyDefinition propertyDefinition)
                                                                      throws NullPointerException

      Throws:
        `NullPointerException`

    - #### containsPropertyDefinition

          @MediaPropertyContains(value="Properties")
          public boolean containsPropertyDefinition(PropertyDefinition propertyDefinition)
                                                                                        throws NullPointerException

      Throws:
        `NullPointerException`

    - #### removePropertyDefinition

          @MediaPropertyRemove(value="Properties")
          public void removePropertyDefinition(PropertyDefinition propertyDefinition)
                                                                                 throws NullPointerException

      Throws:
        `NullPointerException`

    - #### getUniqueIdentifierProperty

          public PropertyDefinition getUniqueIdentifierProperty()

      Description copied from interface: `ClassDefinition`

      Returns the property definition corresponding to this class' unique identifier.

      Specified by:
        `getUniqueIdentifierProperty` in interface `ClassDefinition`
      Returns:
        The unique identifier of this class definition, or `null` if the class does not have a unique identifier property definition.
      See Also:
        `ClassDefinition.isUniquelyIdentified()`, `PropertyDefinition.getIsUniqueIdentifier()`, `ClassDefinition.getUniqueIdentifierValue(MetadataObject)`

    - #### isConcrete

          public boolean isConcrete()

      Description copied from interface: `ClassDefinition`

      Returns `true` if the defined class can be instantiated; returns `false` otherwise. If the class is not concrete, then it is abstract and implemented by an abstract Java class in the MAJ API. Any object in an AAF file that belongs to an abstract class shall also belong to a concrete subclass of the abstract class.

      Specified by:
        `isConcrete` in interface `ClassDefinition`
      Returns:
        Can the defined class be instantiated?

    - #### getIsConcrete

          @MediaProperty(uuid1=100729095,
                         uuid2=768,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="IsConcrete",
                         typeName="Boolean",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=10,
                         symbol="IsConcrete")
          public boolean getIsConcrete()

    - #### setIsConcrete

          @MediaPropertySetter(value="IsConcrete")
          public void setIsConcrete(boolean concrete)

    - #### initializeIsConcrete

          public static final boolean initializeIsConcrete()

    - #### isRoot

          public boolean isRoot()

      Description copied from interface: `ClassDefinition`

      Returns `true` if the defined class is the base of the inheritance hierarchy; returns `false` otherwise.

      Specified by:
        `isRoot` in interface `ClassDefinition`
      Returns:
        Is this a root (base) class?

    - #### isUniquelyIdentified

          public boolean isUniquelyIdentified()

      Description copied from interface: `ClassDefinition`

      Returns `true` if the defined class is uniquely identified, which means that it has a single property that is a unique identifier for any given instance.

      Specified by:
        `isUniquelyIdentified` in interface `ClassDefinition`
      Returns:
        Is this a uniquely identified class?
      See Also:
        `ClassDefinition.getUniqueIdentifierProperty()`, `PropertyDefinition.getIsUniqueIdentifier()`, `ClassDefinition.getUniqueIdentifierValue(MetadataObject)`

    - #### lookupPropertyDefinition

          public PropertyDefinition lookupPropertyDefinition(AUID propertyID)
                                                      throws NullPointerException,
                                                             BadParameterException

      Description copied from interface: `ClassDefinition`

      Looks up and returns the property definition corresponding to the given AUID in the set of properties defined for this class.

      Specified by:
        `lookupPropertyDefinition` in interface `ClassDefinition`
      Parameters:
        `propertyID` - AUID identifying the property to look up.
      Returns:
        Property definition with the given identifier.
      Throws:
        `NullPointerException` - The given property identifier is `null`.
        `BadParameterException` - The given property identifier is not registered as a property definition for this class.
      See Also:
        `ClassDefinition.lookupPropertyDefinition(String)`, `ClassDefinition.lookupPropertyDefinition(short)`, `ClassDefinition.getAllPropertyDefinitions()`, `TypeDefinitions.PropertyDefinitionWeakReference`

    - #### lookupPropertyDefinition

          public PropertyDefinition lookupPropertyDefinition(String propertyName)
                                                      throws NullPointerException,
                                                             BadParameterException

      Description copied from interface: `ClassDefinition`

      Looks up and returns the property definition corresponding to the given name in the set of all properties defined for this class. The name may be either the property's defined name, symbol name or one of its aliases.

      Specified by:
        `lookupPropertyDefinition` in interface `ClassDefinition`
      Parameters:
        `propertyName` - String identifying the property to look up.
      Returns:
        Property definition with the given identifier.
      Throws:
        `NullPointerException` - The given property identifier is `null`.
        `BadParameterException` - The given property identifier is not registered as a property definition for this class.
      See Also:
        `ClassDefinition.lookupPropertyDefinition(AUID)`, `ClassDefinition.lookupPropertyDefinition(String)`, `ClassDefinition.getAllPropertyDefinitions()`

    - #### lookupPropertyDefinition

          public PropertyDefinition lookupPropertyDefinition(short propertyTag)
                                                      throws BadParameterException

      Description copied from interface: `ClassDefinition`

      Looks up and returns the property definition corresponding to the given short tag in the set of all properties defined for this class.

      Note that not all properties have defined tags, also known as local identification, and tags can be generated automatically when required.

      Specified by:
        `lookupPropertyDefinition` in interface `ClassDefinition`
      Parameters:
        `propertyTag` - Short identifier for the property to look up.
      Returns:
        Property definition with the given identifier.
      Throws:
        `BadParameterException` - The given property identifier is not registered as a property definition for this class.
      See Also:
        `ClassDefinition.lookupPropertyDefinition(AUID)`, `ClassDefinition.lookupPropertyDefinition(String)`, `ClassDefinition.getAllPropertyDefinitions()`

    - #### globalPropertyIDLookup

          public static final PropertyDefinition globalPropertyIDLookup(AUID propertyID)

    - #### registerNewPropertyDefinition

          public PropertyDefinition registerNewPropertyDefinition(AUID identification,
                                                                  String name,
                                                                  String[] aliases,
                                                                  String symbol,
                                                                  String typeName,
                                                                  boolean isOptional,
                                                                  boolean isUniqueIdentifier,
                                                                  Short pid)
                                                           throws NullPointerException,
                                                                  AlreadyUniquelyIdentifiedException,
                                                                  ObjectAlreadyAttachedException

      Description copied from interface: `ClassDefinition`

      Creates a new property definition and registers it in this class definition. The new property definition is returned.

      Note that it is illegal to add mandatory properties to an existing (registered) class. This method will allow adding either optional or mandatory properties to a class, but they must be added to a class which has not yet been registered in the dictionary. If this class has already been registered, it is possible to add optional properties, but not through this method. Optional properties added to an existing (registered) class are not supported dynamically in the MAJ API.

      Specified by:
        `registerNewPropertyDefinition` in interface `ClassDefinition`
      Parameters:
        `identification` - AUID to be used to identify this property.
        `name` - Name of the new property.
        `aliases` - A set of additional names that can be used to identify the property.
        `symbol` - Registered data symbol for the property.
        `typeName` - Name of the type of value represented by the new property.
        `isOptional` - True if new property is to be optional.
        `isUniqueIdentifier` - True if new property is to be the unique identifier of the class.
        `pid` - Short tag used to identify the property, or `null` if it is not known.
      Returns:
        The newly created property definition.
      Throws:
        `NullPointerException` - One of the name or type definition arguments is null.
        `AlreadyUniquelyIdentifiedException` - This class already has a unique identifier property.
        `ObjectAlreadyAttachedException` - A property with the given identifier has already been registered.
      See Also:
        `MetaDictionary.getClassDefinitions()`, `PropertyDefinition`, `ClassDefinition.registerOptionalPropertyDefinition(AUID, String, String[], String, String)`

    - #### registerOptionalPropertyDefinition

          public PropertyDefinition registerOptionalPropertyDefinition(AUID identification,
                                                                       String name,
                                                                       String[] aliases,
                                                                       String symbol,
                                                                       String typeName)
                                                                throws NullPointerException,
                                                                       ObjectAlreadyAttachedException

      Description copied from interface: `ClassDefinition`

      Creates a new property definition and registers it in this class definition. The new property definition is returned.

      Note that it is illegal to add mandatory properties to an already existing (registered) class. It is assumed that this property is being added to a class which is already registered. If so, it must be optional and this method will declare it so. If it is wished to add a mandatory property, that may be done through the `registerNewPropertyDefinition()` method, but that must be called on a class which is not yet registered.

      Specified by:
        `registerOptionalPropertyDefinition` in interface `ClassDefinition`
      Parameters:
        `identification` - AUID to be used to identify this property.
        `name` - Name of the new property.
        `aliases` - A set of additional names that can be used to identify the property.
        `symbol` - Registered data symbol for the property.
        `typeName` - Name of the type of value represented by the new property.
      Returns:
        Newly created property definition.
      Throws:
        `NullPointerException` - Name or typeDef argument is null.
        `ObjectAlreadyAttachedException` - The given property identifier has already been registered.
      See Also:
        `ClassDefinition.registerNewPropertyDefinition(AUID, String, String[], String, String, boolean, boolean, Short)`

    - #### getComment

          public String getComment()

      Description copied from interface: `XMLSerializable`

      Include a comment when serializing a value to XML. The comment will be inserted as the first child node of the element representing the class.

      Specified by:
        `getComment` in interface `XMLSerializable`
      Overrides:
        `getComment` in class `MetaDefinitionImpl`
      Returns:
        Comment to add as the first child node of the element representing this class.

    - #### forAUID

          public static final ClassDefinition forAUID(AUID identification)

    - #### getAllPropertyDefinitions

          public Set<PropertyDefinition> getAllPropertyDefinitions()

      Description copied from interface: `ClassDefinition`

      Returns all AAF property definitions attached directly to the current class and its ancestors.

      Specified by:
        `getAllPropertyDefinitions` in interface `ClassDefinition`
      Returns:
        The set of property definitions that define the properties for this class and all of its ancestors.
      See Also:
        `ClassDefinition.getPropertyDefinitions()`, `ClassDefinition.getProperties(MetadataObject)`

    - #### countProperties

          public int countProperties(MetadataObject metadataObject)
                              throws NullPointerException,
                                     IllegalArgumentException

      Description copied from interface: `ClassDefinition`

      Returns the number of properties currently present in the given metadata object, including all required properties.

      Specified by:
        `countProperties` in interface `ClassDefinition`
      Parameters:
        `metadataObject` - Object of this class to count the number of present properties.
      Returns:
        Number of properties present for the given metadata object.
      Throws:
        `NullPointerException` - The metadata object is `null`.
        `IllegalArgumentException` - The metadata object is not an instance of this class.

    - #### isKnownProperty

          public static final boolean isKnownProperty(PropertyDefinition property)

    - #### getProperties

          public SortedMap<? extends PropertyDefinition,? extends PropertyValue> getProperties(MetadataObject metadataObject)

      Description copied from interface: `ClassDefinition`

      Returns the set of properties of the given object, where each property contains its property definition and current value. The set contains both required properties and optional properties that are currently present.

      Specified by:
        `getProperties` in interface `ClassDefinition`
      Parameters:
        `metadataObject` - Object of this class to retrieve the properties for.
      Returns:
        Iterator over the set of properties of this interchange object.

    - #### getNamespace

          public String getNamespace()

      Description copied from interface: `MetaDefinition`

      Returns the namespace in which the subject of this meta definition is defined.

      Specified by:
        `getNamespace` in interface `MetaDefinition`
      Overrides:
        `getNamespace` in class `MetaDefinitionImpl`
      Returns:
        Namespace in which the subject of this meta definition is defined.
      See Also:
        `MediaProperty.namespace()`, `MediaClass.namespace()`, `ExtensionScheme.getSchemeURI()`

    - #### getPrefix

          public String getPrefix()

      Description copied from interface: `MetaDefinition`

      Returns the namespace prefix to use when serializing a value of the subject of this meta definition to XML.

      Specified by:
        `getPrefix` in interface `MetaDefinition`
      Overrides:
        `getPrefix` in class `MetaDefinitionImpl`
      Returns:
        Namespace prefix to use when serializing a value of the subject of this meta definition to XML.
      See Also:
        `MediaProperty.prefix()`, `MediaClass.prefix()`

    - #### getEmitXMLClassIDAs

          public EmitXMLClassIDAs getEmitXMLClassIDAs()

      Description copied from interface: `ClassDefinition`

      Determines how the identifier of the class should be serialized to XML. For more details, see the description of the emit XML class ID as enumeration.

      Specified by:
        `getEmitXMLClassIDAs` in interface `ClassDefinition`
      Returns:
        How should the identifier of the class should be serialized to XML?
      See Also:
        `MediaClass.emitXMLClassID()`, `CommonConstants.XMLClassIDAsAttributeName`

    - #### getWeakTargetReference

          public String getWeakTargetReference()

      Description copied from interface: `WeakReferenceTarget`

      Provides a name that can be used to make a weak object reference to an instance of the implementing class.

      Specified by:
        `getWeakTargetReference` in interface `WeakReferenceTarget`
      Overrides:
        `getWeakTargetReference` in class `MetaDefinitionImpl`
      Returns:
        A name to use to make weak reference to this object.

    - #### getUniqueIdentifierValue

          public PropertyValue getUniqueIdentifierValue(MetadataObject uniquelyIdentifiedObject)
                                                 throws NullPointerException,
                                                        IllegalArgumentException

      Description copied from interface: `ClassDefinition`

      Returns the current value of the unique identifier for a value of a type defined by this class definition. The class must have a unique identifier for this method to by successful.

      Specified by:
        `getUniqueIdentifierValue` in interface `ClassDefinition`
      Parameters:
        `uniquelyIdentifiedObject` - Object to find the unique identifier for.
      Returns:
        Value of the unique identifier.
      Throws:
        `NullPointerException` - Cannot find the unique identifier for a `null` value.
        `IllegalArgumentException` - The given object does not have a unique identifier property.
      See Also:
        `ClassDefinition.isUniquelyIdentified()`, `ClassDefinition.getUniqueIdentifierProperty()`

    - #### countClassDefinitions

          public static final int countClassDefinitions()

    - #### getClassDefinitions

          public static final Collection<ClassDefinition> getClassDefinitions()

    - #### nameToAAFName

          public String nameToAAFName(String name)

      Overrides:
        `nameToAAFName` in class `MetaDefinitionImpl`

    - #### appendMetadictXML

          public void appendMetadictXML(Node metadict,
                                        String namespace,
                                        String prefix)

      Description copied from interface: `MetaDefinition`

      Append an XML representation of this meta definition to the given XML node.

      Specified by:
        `appendMetadictXML` in interface `MetaDefinition`
      Overrides:
        `appendMetadictXML` in class `MetaDefinitionImpl`
      Parameters:
        `metadict` - Meta dictionary node to append a description of this node to.
      See Also:
        `CommonConstants.AAF_METADICT_NAMESPACE`

    - #### clone

          public ClassDefinition clone()

      Description copied from interface: `MetaDefinition`

      Create a cloned copy of this meta definition.

      Specified by:
        `clone` in interface `ClassDefinition`
      Specified by:
        `clone` in interface `MetaDefinition`
      Overrides:
        `clone` in class `MetaDefinitionImpl`
      Returns:
        Cloned copy of this meta definition.

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