tv.amwa.maj.meta (Media Authoring with Java API)
Date: 2016-02-05

# Package tv.amwa.maj.meta

Specifications of all the meta-classes of AAF that provides meta-information about classes, properties and data types.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  ClassDefinition | Specifies the definition of an AAF class.
  ExtensionScheme | Groups together a collection of meta definitions for an extension to a file and provides a globally unique identifier for the collection.
  MetaDefinition | Specifies the definition of a class, type, or property in an AAF file.
  MetaDictionary | Specifies a container for meta definitions.
  PropertyDefinition | Specifies the description of a property allowed for a class.
  PropertyWrapperDefinition | Specifies a globally unique alias for a property that was originally defined to be used in another class.
  Root | Represents the logical association of the definitions of the extensions used in a file with the structural and descriptive metadata in the file.
  TypeDefinition | Specifies the definition of a property type.
  TypeDefinitionCharacter | Specifies the definition of a property type that has a value of a single 2-byte character.
  TypeDefinitionEnumeration | Specifies the definition of a property type that can have one of a set of integer values.
  TypeDefinitionExtendibleEnumeration | Specifies the definition of a property type that can have one of an extendible set of AUID values.
  TypeDefinitionFixedArray | Specifies the definition of a property type that has a fixed number of values of the underlying type.
  TypeDefinitionIndirect | Specifies the definition of property values whose type is specified in each instance.
  TypeDefinitionInteger | Specifies the definition of a property type that is an integer with the specified number of bytes.
  TypeDefinitionObjectReference | Specifies the definition of a property type that defines an object relationship.
  TypeDefinitionOpaque | Specifies the definition of property values whose type is specified in each instance, providing access to data opaque to this API and manipulated directly by an application through a handle.
  TypeDefinitionRecord | Specifies the definition of a property type that consists of an ordered set of fields, where each field has a name and type.
  TypeDefinitionRename | Specifies the definition a property type that has the same structure and representation as its underlying type but has a different meaning.
  TypeDefinitionSet | Specifies the definition of a property type that has a collection of object references to uniquely identified objects.
  TypeDefinitionStream | Specifies the definition of a property type that is stored in a stream and has a value that consists of a varying number of bytes.
  TypeDefinitionString | Specifies the definition of a property type that consists, effectively, of an array of the underlying character or integer type.
  TypeDefinitionStrongObjectReference | Specifies the definition of a property type that defines an object relationship where the target of the strong reference is owned by the object with the property with the strong object reference type.
  TypeDefinitionVariableArray | Specifies the definition of a property type that has a varying number of values of the underlying type.
  TypeDefinitionWeakObjectReference | Specifies 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 weak object reference type.

## Package tv.amwa.maj.meta Description

Specifications of all the meta-classes of AAF that provides meta-information about classes, properties and data types. The classes described may be AAF interchangeable classes, extension metadata classes or entirely unrelated. AAF meta-classes are specified in section 27 of the AAF object specification v1.1. The root class for the definition of meta-classes is `MetaDefinition`, which can also be serialized to an AAF file used as part of a meta dictionary.

The interfaces defined in this package are fundamental to the features of the industry package, including the runtime media engine, warehouse and forge.

## Class and property definitions

Every class is defined by a class definition that includes its position in a class hierarchy (single inheritance), name, identifier and whether it is concrete or abstract. Class definitions in MAJ are generated automatically by registering a Java class with the warehouse using the `lookForClass(Class)` method. The class must be annotated with the `media class annotation`. This allows dynamic runtime extension of the classes supported.

Classes have properties that are defined by property definitions. To access the property definitions for a class, use the `ClassDefinition.getPropertyDefinitions()` and `ClassDefinition.getAllPropertyDefinitions()` methods. To get the values of the properties for a given class, call `getProperties(MetadataObject)`, where the metadata object is the instance to be queried.

## TypeDefinitions

Every property has a data type and the supported data types are defined by type definitions. All type definitions have a name and identifier. Other parameters are type-specific, with over 150 pre-defined for AAF and the ability to add new type definitions to the warehouse.

Every type definition provides methods for mapping from the Java representation of a value to a form suitable for representation as AAF or MXF. In particular, the createValue(Object) method of every type definition is used extensively in the factory methods of the forge. The type mappings supported are described in the documentation for the industry package.

## Property values

A property value is a representation of a value with its type. Many of the methods of the type definitions manipulate property values and will throw a `IllegalPropertyValueException` if an attempt is made to use the methods for a value of the wrong type.

## Heritage

In the C-based API, the class, property and type definitions are available in a file called "`AAFMetaDictionary.h`". This is extracted from a spreadsheet containing equivalent information. The same extraction process is used to generate a large number of header files, such as "`AAFProeprtyDefs.h`". This approach has been replaced in the MAJ API through the use of the `MediaClass` and `MediaProperty` annotations. These annotations have been tested against the same AAF meta dictionary to ensure that they contain the same values, which is what makes the C-based implementation and the MAJ API interoperable.

Many of the methods of the meta-classes were originally specified for the C-based reference implementation and have been translated using the same process described for the interchangeable classes.

See Also:
  `MediaEngine`, `Forge`, `Warehouse`, `PropertyValue`

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