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

tv.amwa.maj.industry

## Class Warehouse

- java.lang.Object
- - tv.amwa.maj.industry.Warehouse

-     public final class Warehouse
      extends Object

  Warehouse with a dynamic inventory of classes, types, definitions and extendible enumeration items. The warehouse is the place to come looking for any weak referenced item, by name or identification, known to the virtual machine containing the class. Also, new items can be added to the inventory of the warehouse at runtime, enabling dynamic and loosely-coupled use of the API.

  The warehouse is not the place to come to make new values or instantiate objects, or to manipulate and test values. Use the forge to make new things and the media engine to change them.

  To find something in the inventory of the warehouse, use:

  - media classes - Look for a class definition by its Java interface, implementing class, name, Java class name or identification with `lookForClass(Class)` / `lookForClass(String)` / `lookForClass(AUID)`. Note that property definitions are accessible as part of the class that they are a member of.
  - media types - Look for a type definition by its name or identification with `lookForType(String)` / `lookForType(AUID)`.
  - definitions - Look for a definition by its Java interface/implementation or name and the definition name or identification with `lookup(Class, String)` / `lookup(Class, AUID)` / `lookup(String, String)` / `lookup(String, AUID)`.
  - extendible enumerations - Look for an extendible enumeration by its name with `lookupExtendibleEnumeration(String)` or use other methods to query details of the elements of an extendible enumeration: `extendibleEnumerationName(AUID)`, `extendibleEnumerationElementName(AUID)`, `extendibleEnumerationElementValue(String)`, `extendibleEnumerationFullName(AUID)`.

  To register to items onto the inventory of the warehouse, use:

  - media classes - The `lookForClass(Class)` and `lookForClass(String)` methods will automatically register an unknown class specified using an appropriately annotated Java class.
  - media types - Use `register(TypeDefinition, String, String)` or add a collection of type definitions from static values of a class using `registerTypes(Class, String, String)`.
  - definitions - Use `register(DefinitionObject)`.
  - extendible enumerations - Add new extendible enumerations element by element using `registerExtendibleEnumerationElement(String, String, AUID)` or from static values of a class with extendible enumeration item annotations using `registerExtendibleEnumerationElements(Class)`.

  To query the current inventory of the warehouse, lists and counts of the various names and types of item are provided:

  - media classes - `getClassInventory()` and `countClassDefinitions()`.
  - media types - `getTypeInventory()`, `getTypeDefinitions()` and `countTypeDefinitions()`.
  - definitions - Generic methods `count(Class)` and `inventory(Class)`.
  - extendible enumerations - `getExtendibleEnumerationInventory()` and `countExtendibleEnumerations()`.
  See Also:
    `TypeDefinitions`, `Dictionary`, `TypeDefinitionExtendibleEnumeration`, `ExtendibleEnumerationItem`, `MediaClass`, `ClassDefinition`, `TypeDefinition`

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `clear()`
    `static <T extends DefinitionObject> int` | `count(Class<T> definitionType)` Counts the number of definitions in the inventory of the given definition type.
    `static int` | `countClassDefinitions()` Count of the number of different kinds of class in this warehouse.
    `static int` | `countExtendibleEnumerations()` Returns the number of extendible enumerations known in the inventory of this warehouse.
    `static int` | `countTypeDefinitions()` Count of the number of different type definitions in this warehouse.
    `static String` | `extendibleEnumerationElementName(AUID elementValue)` Returns the element name of an extendible enumeration item from its element value.
    `static AUID` | `extendibleEnumerationElementValue(String fullElementName)` Looks up the full name of an enumeration element value in the warehouse inventory by its full name, including enumeration name and element name.
    `static String` | `extendibleEnumerationFullName(AUID elementValue)` Looks up the full name of an enumeration element in the warehouse inventory by its element value identifications.
    `static String` | `extendibleEnumerationName(AUID elementValue)` Returns the enumeration name of an extendible enumeration item from its element value.
    `static Collection<ClassDefinition>` | `getClassDefinitions()`
    `static Collection<String>` | `getClassInventory()` Returns a collection of all classes known in this warehouse, by name.
    `static Collection<String>` | `getExtendibleEnumerationInventory()` Returns a collection of all extendible enumerations known in the inventory for this warehouse, by name.
    `static Collection<TypeDefinition>` | `getTypeDefinitions()` Returns a collection containing all the different kinds of type definitions in this warehouse.
    `static Collection<String>` | `getTypeInventory()` Returns a collection of all types in the inventory of this warehouse, by name.
    `static <T extends DefinitionObject> Collection<String>` | `inventory(Class<T> definitionType)` Returns a collection of the names of the definitions of the given definition type.
    `static boolean` | `isKnownProperty(PropertyDefinition property)`
    `static String` | `javaClassAlias(String aafName)` Transform an AAF class name into its Java equivalent name.
    `static ClassDefinition` | `lookForClass(AUID identification)` Looks up and returns the class definition in this warehouse with the given identification.
    `static ClassDefinition` | `lookForClass(Class<?> mediaClass)` For any given Java class, this method finds the corresponding media class definition or creates it if it does not yet exist within the current Java virtual machine.
    `static ClassDefinition` | `lookForClass(String name)` Finds and returns a class definition for the given media class name.
    `static PropertyDefinition` | `lookForProperty(AUID propertyID)` Look for a property in the warehouse by its unique identifier.
    `static TypeDefinition` | `lookForType(AUID identification)` Finds the type definition with the given AUID identification from the warehouse inventory.
    `static TypeDefinition` | `lookForType(String typeName)` Finds the type definition for the given name from the warehouse inventory.
    `static <T extends DefinitionObject> T` | `lookup(Class<T> definitionType, AUID definitionID)` Looks up a definition by its type and its identification in the inventory of the warehouse.
    `static <T extends DefinitionObject> T` | `lookup(Class<T> definitionType, String definitionName)` Looks up a definition by its type and its name in the inventory of the warehouse.
    `static <T extends DefinitionObject> T` | `lookup(String definitionTypeName, AUID definitionID)` Looks up a definition by its type name and its identification in the inventory of the warehouse.
    `static <T extends DefinitionObject> T` | `lookup(String definitionTypeName, String definitionName)` Looks up a definition by its type name and its name in the inventory of the warehouse.
    `static SortedMap<String,AUID>` | `lookupExtendibleEnumeration(String extendibleEnumerationName)` Returns a sorted map representation of an extendible enumeration from the name of an extendible enumeration in the inventory of this warehouse.
    `static ExtensionScheme` | `lookupExtensionScheme(AUID extensionSchemeID)`
    `static ExtensionScheme` | `lookupExtensionScheme(String extensionSchemeIdentifier)`
    `static void` | `register(ClassDefinition classDefinition)`
    `static Boolean` | `register(DefinitionObject definition)` Registers the given definition with the inventory of this warehouse.
    `static void` | `register(ExtensionScheme extensionScheme)`
    `static void` | `register(PropertyDefinition propertyDefinition)`
    `static void` | `register(TypeDefinition typeDefinition, String namespace, String prefix)` Add or replace a given type definition in this warehouse.
    `static boolean` | `registerExtendibleEnumerationElement(String extendibleEnumerationName, String elementName, AUID elementValue)` Add an element to an extendible enumeration in the inventory of this warehouse.
    `static int` | `registerExtendibleEnumerationElements(Class<?> extendibleEnumerationClass)` Scan the given class for AUID values annotated as the definitions of extendible enumeration values.
    `static void` | `registerTypes(Class<?> typeClass, String namespace, String prefix)` Looks through the given class for public static fields of `type definitions` and adds these to the warehouse inventory.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### clear

          public static final void clear()

    - #### lookForClass

          public static final ClassDefinition lookForClass(Class<?> mediaClass)
                                                    throws NullPointerException,
                                                           IllegalArgumentException

      For any given Java class, this method finds the corresponding media class definition or creates it if it does not yet exist 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 stored in the warehouse inventory, a 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:
        `mediaClass` - Java class to find the media class definition of.
      Returns:
        Media 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:
        `MediaClass`, `MediaProperty`, `MediaEngine.initializeAAF()`, `MediaEngine.getClassDefinition(MetadataObject)`

    - #### register

          public static final void register(ClassDefinition classDefinition)
                                     throws NullPointerException

      Throws:
        `NullPointerException`

    - #### lookForClass

          public static final ClassDefinition lookForClass(String name)
                                                    throws NullPointerException,
                                                           IllegalArgumentException

      Finds and returns a class definition for the given media class name. Firstly, the search takes place using the class name specified in the AAF object specification and then by using a Java class name.

      The search order used by this method is:

      1. Is the name an alias used in Java for an AAF class name in the specification? In which case, substitute the given Java-like name with the AAF alias. Look for the class in the current cache and, if present, return it.
      2. If the given class name already contains a path separator, use it directly for a call to `Class.forName(String)` followed by `lookForClass(Class)` with the result. If the given class name represents an interface, an attempt is made to find the implementation by naming convention. Return the value.
      3. If the class name contains no path separator character, prepend MAJ API package names to the front of it and call `Class.forName(String)` followed by `lookForClass(Class)` with the result. Return the value.

      Once the class has been located and linked into the running virtual machine, the `lookForClass(Class)` method is called.

      Parameters:
        `name` - Name of the class definition to find, specified using a name from the AAF object specification, a MAJ API class name or a fully qualified java class name.
      Returns:
        Class definition for the given name.
      Throws:
        `NullPointerException` - The given class name is `null`.
        `IllegalArgumentException` - The given class name could not be resolved to an AAF class.
      See Also:
        `Class.forName(java.lang.String)`

    - #### getClassInventory

          public static final Collection<String> getClassInventory()

      Returns a collection of all classes known in this warehouse, by name.

      Note this methods excludes some classes registered only for the mechanics of reading and writing MXF files.

      Returns:
        Collection of all classes known in this warehouse, by name.
      See Also:
        `countClassDefinitions()`

    - #### getClassDefinitions

          public static final Collection<ClassDefinition> getClassDefinitions()

    - #### countClassDefinitions

          public static final int countClassDefinitions()

      Count of the number of different kinds of class in this warehouse.

      Note that this method includes a count of classes registered for the mechanics of reading and writing MXF files. To exclude these from the count, use:

      `getClassInventory()``.size()`
      Returns:
        Count of the number of different kinds of class in this warehouse.
      See Also:
        `getClassInventory()`

    - #### lookForClass

          public static final ClassDefinition lookForClass(AUID identification)
                                                    throws NullPointerException

      Looks up and returns the class definition in this warehouse with the given identification. If no class definition with the given identification can be found, a value of `null` is returned.

      Parameters:
        `identification` - Identifier for the class.
      Returns:
        Instance of class definition representing the class.
      Throws:
        `NullPointerException` - Cannot resolve a registered class definition using a `null` value.

    - #### lookup

          public static final <T extends DefinitionObject> T lookup(Class<T> definitionType,
                                                                    String definitionName)
                                                             throws NullPointerException

      Looks up a definition by its type and its name in the inventory of the warehouse. The definition only has to be known to the Java local machine and is not necessarily stored in an AAF dictionary.

      For example, to find the correct kind of data definition for a picture, call:

      `DataDefinition pictureData = Warehouse.lookup(DataDefinition.class, "Picture");`

      Type Parameters:
        `T` - All kinds of definition objects.
      Parameters:
        `definitionType` - Specific kind of definition required.
        `definitionName` - Name of the definition of the given kind to find.
      Returns:
        Definition corresponding to the given type and name, or `null` if the definition name is not known for the given type.
      Throws:
        `NullPointerException` - One or both of the given definition type or definition name is/are `null`.
      See Also:
        `lookup(Class, AUID)`, `lookup(String, AUID)`, `lookup(String, String)`, `WeakReference`, `Dictionary`

    - #### lookup

          public static final <T extends DefinitionObject> T lookup(Class<T> definitionType,
                                                                    AUID definitionID)
                                                             throws NullPointerException

      Looks up a definition by its type and its identification in the inventory of the warehouse. The definition only has to be known to the Java local machine and is not necessarily stored in an AAF dictionary.

      For example, to find the correct kind of data definition for a picture, call:

           DataDefinition pictureData = Warehouse.lookup(
                   tv.amwa.maj.model.DataDefinition.class,
                   Forge.parseAUID("urn:smpte:ul:060x0e2b34.04010101.01030202.01000000"));

      Type Parameters:
        `T` - All kinds of definition objects.
      Parameters:
        `definitionType` - Specific kind of definition required.
        `definitionID` - Identification of the definition of the given kind to find.
      Returns:
        Definition corresponding to the given type and identification, or `null` if the definition name is not known for the given type.
      Throws:
        `NullPointerException` - One or both of the given definition type or definition name is/are `null`.
      See Also:
        `lookup(Class, String)`, `lookup(String, AUID)`, `lookup(String, String)`, `WeakReference`, `Dictionary`

    - #### lookup

          public static final <T extends DefinitionObject> T lookup(String definitionTypeName,
                                                                    String definitionName)
                                                             throws NullPointerException,
                                                                    IllegalArgumentException

      Looks up a definition by its type name and its name in the inventory of the warehouse. The definition only has to be known to the Java local machine and is not necessarily stored in an AAF dictionary.

      For example, to find the correct kind of data definition for a picture, call:

      `DataDefinition pictureData = Warehouse.lookup("DataDefinition", "Picture");`

      Type Parameters:
        `T` - All kinds of definition objects.
      Parameters:
        `definitionTypeName` - Name of the specific kind of definition required.
        `definitionName` - Name of the definition of the given kind to find.
      Returns:
        Definition corresponding to the given type name and name, or `null` if the definition name is not known for the given type.
      Throws:
        `NullPointerException` - One or both of the given definition type or definition name is/are `null`.
        `IllegalArgumentException` - The given type name does not match one knwon in the class inventory or is not a kind of definition.
      See Also:
        `lookup(Class, AUID)`, `lookup(String, AUID)`, `lookup(Class, String)`, `WeakReference`, `Dictionary`

    - #### lookup

          public static final <T extends DefinitionObject> T lookup(String definitionTypeName,
                                                                    AUID definitionID)
                                                             throws NullPointerException,
                                                                    IllegalArgumentException

      Looks up a definition by its type name and its identification in the inventory of the warehouse. The definition only has to be known to the Java local machine and is not necessarily stored in an AAF dictionary.

      For example, to find the correct kind of data definition for a picture, call:

           DataDefinition pictureData = Warehouse.lookup(
                   "DataDefinition",
                   Forge.parseAUID("urn:smpte:ul:060x0e2b34.04010101.01030202.01000000"));

      Type Parameters:
        `T` - All kinds of definition objects.
      Parameters:
        `definitionTypeName` - Name of the specific kind of definition required.
        `definitionID` - Identification of the definition of the given kind to find.
      Returns:
        Definition corresponding to the given type name and identification, or `null` if the definition name is not known for the given type.
      Throws:
        `NullPointerException` - One or both of the given definition type name or definition identification is/are `null`.
        `IllegalArgumentException`
      See Also:
        `lookup(Class, String)`, `lookup(Class, AUID)`, `lookup(String, String)`, `WeakReference`, `Dictionary`

    - #### register

          public static final Boolean register(DefinitionObject definition)
                                        throws NullPointerException

      Registers the given definition with the inventory of this warehouse.

      Parameters:
        `definition` - Definition to be placed onto the warehouse inventory.
      Returns:
        `true` if the registration is successful, `false` if the definition is already registered and `null` if an error occurred and the registration failed.
      Throws:
        `NullPointerException` - The given definition is `null`.
      See Also:
        `lookup(Class, String)`, `lookup(Class, AUID)`

    - #### count

          public static final <T extends DefinitionObject> int count(Class<T> definitionType)
                                                              throws NullPointerException

      Counts the number of definitions in the inventory of the given definition type.

      Type Parameters:
        `T` - All kinds of definition types.
      Parameters:
        `definitionType` - Definition type to count the number of known definitions for.
      Returns:
        Number of definitions in the inventory, or zero if the definition type is not known.
      Throws:
        `NullPointerException` - The given definition type is `null`.
      See Also:
        `countClassDefinitions()`, `countTypeDefinitions()`, `countExtendibleEnumerations()`, `inventory(Class)`

    - #### inventory

          public static final <T extends DefinitionObject> Collection<String> inventory(Class<T> definitionType)
                                                                                 throws NullPointerException

      Returns a collection of the names of the definitions of the given definition type.

      Type Parameters:
        `T` - All kinds of definition types.
      Parameters:
        `definitionType` - Definition type to list the elements of.
      Returns:
        List of the names of the definitions of the given type, which is empty is the type is known and no definitions are registered and `null` if the type is not known.
      Throws:
        `NullPointerException` - The given definition type is `null`.
      See Also:
        `getTypeInventory()`, `getClassInventory()`, `getExtendibleEnumerationInventory()`, `count(Class)`

    - #### registerTypes

          public static final void registerTypes(Class<?> typeClass,
                                                 String namespace,
                                                 String prefix)
                                          throws NullPointerException

      Looks through the given class for public static fields of `type definitions` and adds these to the warehouse inventory.

      This method picks out static fields in the given class and adds them to the cache of known types in this class. Here is an example of the declaration of a UInt8 value:

             public final static TypeDefinitionInteger UInt8 = new TypeDefinitionInteger(
               new AUID(0x01010100, (short) 0x0000, (short) 0x0000,
                        new byte[] { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01 } ),
               "UInt8", (byte) 1, false);

      Parameters:
        `typeClass` - Class to check for static type definition instances.
        `namespace` - Namespace in which the type definition is defined.
        `prefix` - Preferred prefix for symbols in the given namespace.
      Throws:
        `NullPointerException` - The given class is `null`.
      See Also:
        `register(TypeDefinition, String, String)`, `lookForType(AUID)`, `lookForType(String)`, `MetaDefinition.getNamespace()`, `MetaDefinition.getPrefix()`

    - #### lookForType

          public static final TypeDefinition lookForType(String typeName)
                                                  throws NullPointerException

      Finds the type definition for the given name from the warehouse inventory. Type definition names are the same as used in the AAF specification, reference implementation meta dictionary or SMPTE type dictionary, for example:

      - `UInt32` is a unique name;
      - `Int8Array` is a unique name;
      - `TypeDefinitionWeakReferenceVector` returns the same type as:
        - `WeakReferenceVector of TypeDefinition` and
        - `WeakReferenceVector<TypeDefinition>`;
      - `CompositionPackageStrongReference` returns the same type as:
        - `StrongReference to CompositionPackage` and
        - `StrongReference<CompositionPackage>`

      If a corresponding type cannot be found, this method returns `null`.

      Parameters:
        `typeName` - Name of the type definition to check for.
      Returns:
        Type definition corresponding to the given name.
      Throws:
        `NullPointerException` - The given type name is `null`.
      See Also:
        `lookForClass(AUID)`, `getTypeInventory()`

    - #### lookForType

          public static final TypeDefinition lookForType(AUID identification)
                                                  throws NullPointerException

      Finds the type definition with the given AUID identification from the warehouse inventory. If a type definition matching the given identification cannot be found, `null` is returned.

      Parameters:
        `identification` - AUID to use to lookup a type definition.
      Returns:
        Type definition matching the identification.
      Throws:
        `NullPointerException` - The given type identifier is `null`.
      See Also:
        `lookForType(String)`, `getTypeInventory()`

    - #### countTypeDefinitions

          public static int countTypeDefinitions()

      Count of the number of different type definitions in this warehouse.

      Returns:
        Number of different type definitions in this warehouse.
      See Also:
        `getTypeDefinitions()`, `getTypeInventory()`, `countClassDefinitions()`

    - #### register

          public static final void register(TypeDefinition typeDefinition,
                                            String namespace,
                                            String prefix)
                                     throws NullPointerException

      Add or replace a given type definition in this warehouse.

      Parameters:
        `typeDefinition` - Type definition to add to the warehouse.
        `namespace` - Namespace in which the type definition is defined.
        `prefix` - Preferred prefix for symbols in the given namespace.
      Throws:
        `NullPointerException` - Cannot add a type to the warehouse using a `null` value.
      See Also:
        `registerTypes(Class, String, String)`, `MetaDefinition.getNamespace()`, `MetaDefinition.getPrefix()`

    - #### getTypeInventory

          public static final Collection<String> getTypeInventory()

      Returns a collection of all types in the inventory of this warehouse, by name.

      Returns:
        Collection of all types in the inventory of this warehouse, by name.
      See Also:
        `getClassInventory()`, `getExtendibleEnumerationInventory()`, `getTypeDefinitions()`, `countTypeDefinitions()`

    - #### getTypeDefinitions

          public static final Collection<TypeDefinition> getTypeDefinitions()

      Returns a collection containing all the different kinds of type definitions in this warehouse.

      Returns:
        Collection of all different kinds of type definitions in this warehouse.
      See Also:
        `countTypeDefinitions()`, `getTypeInventory()`

    - #### registerExtendibleEnumerationElements

          public static final int registerExtendibleEnumerationElements(Class<?> extendibleEnumerationClass)
                                                                 throws NullPointerException,
                                                                        IllegalArgumentException

      Scan the given class for AUID values annotated as the definitions of extendible enumeration values. Any values find are added to the inventory of the warehouse for use by applications sharing the same Java virtual machine.

      To create an extendible enumeration element in MAJ, you can write an interface with a set of static AUID values and annotate these as follows:

            @ExtendibleEnumerationItem(target = "OperationCategory")
            public final static AUID Effect = Forge.makeAUID(
                    0x0d010102, (short) 0x0101, (short) 0x0100,
                    new byte[] { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01 });

      Parameters:
        `extendibleEnumerationClass` - Class or interface containing extendible enumeration element definitions.
      Returns:
        The number of elements added by this operation. A value of zero may indicate an underlying problem.
      Throws:
        `NullPointerException` - The given class to add extendible enumeration values from is `null`.
        `IllegalArgumentException` - Unable to access the annotations of the given class.
      See Also:
        `ExtendibleEnumerationItem`, `TypeDefinitionExtendibleEnumeration`, `OperationCategoryType`, `registerExtendibleEnumerationElement(String, String, AUID)`, `lookupExtendibleEnumeration(String)`

    - #### registerExtendibleEnumerationElement

          public static final boolean registerExtendibleEnumerationElement(String extendibleEnumerationName,
                                                                           String elementName,
                                                                           AUID elementValue)
                                                                    throws NullPointerException,
                                                                           IllegalArgumentException

      Add an element to an extendible enumeration in the inventory of this warehouse. The element is added by the name of the extendible enumeration to which it is to be added, the element's name and the element's identification.

      The value will overwrite previous values known in the inventory. The behaviour will be to degrade gracefully, with the possibility of two names resolving to one identification.

      Parameters:
        `extendibleEnumerationName` - Name of the extendible enumeration to which the element is to be added. If no such enumeration is known, one will be created.
        `elementName` - Name of the new element to add to the inventory.
        `elementValue` - Identification of the new element to add to the inventory.
      Returns:
        Is the element replacing an element that is already present, either by key or value? A value of `true` indicates a replacement and may result in an undesirable side effect.
      Throws:
        `NullPointerException` - One or more of the arguments in `null`.
        `IllegalArgumentException` - The given element value is already in use for a different extendible enumeration.
      See Also:
        `TypeDefinitionExtendibleEnumeration`, `registerExtendibleEnumerationElements(Class)`, `ExtendibleEnumerationItem`

    - #### lookupExtendibleEnumeration

          public static final SortedMap<String,AUID> lookupExtendibleEnumeration(String extendibleEnumerationName)
                                                                          throws NullPointerException

      Returns a sorted map representation of an extendible enumeration from the name of an extendible enumeration in the inventory of this warehouse.

      Parameters:
        `extendibleEnumerationName` - Name of an extendible enumeration that should be in the inventory of this warehouse.
      Returns:
        Sorted map of element names to element values for this extendible enumeration, or `null` if no such extendible enumeration is found in the inventory.
      Throws:
        `NullPointerException` - The given extendible enumeration name is `null`.
      See Also:
        `registerExtendibleEnumerationElements(Class)`, `registerExtendibleEnumerationElement(String, String, AUID)`, `extendibleEnumerationElementName(AUID)`, `extendibleEnumerationFullName(AUID)`, `extendibleEnumerationElementValue(String)`, `extendibleEnumerationName(AUID)`

    - #### extendibleEnumerationFullName

          public static final String extendibleEnumerationFullName(AUID elementValue)
                                                            throws NullPointerException

      Looks up the full name of an enumeration element in the warehouse inventory by its element value identifications. The name is of the form:

      <enumeration_name`>_<`element_name>

      This form is commonly used by XML representation of AAF and can be converted back to an element value using `extendibleEnumerationElementValue(String)`.

      Parameters:
        `elementValue` - Value of the extendible enumeration full name to lookup in the inventory.
      Returns:
        Full name of the enumeration element represented by the given element value, or `null` if the element value is not in the inventory.
      Throws:
        `NullPointerException` - The given element value is `null`.
      See Also:
        `extendibleEnumerationElementValue(String)`, `lookupExtendibleEnumeration(String)`

    - #### extendibleEnumerationElementValue

          public static final AUID extendibleEnumerationElementValue(String fullElementName)
                                                              throws NullPointerException

      Looks up the full name of an enumeration element value in the warehouse inventory by its full name, including enumeration name and element name. The name should be of the form:

      <enumeration_name`>_<`element_name>

      This full name form is commonly use by XML representations of AAF and can be converted back to a string form using `extendibleEnumerationFullName(AUID)`.

      Parameters:
        `fullElementName` - Full name of the element value to look up in the inventory.
      Returns:
        Element value identification for the given full name, or `null` if the name is not known in the inventory.
      Throws:
        `NullPointerException` - The given full element name is `null`.
      See Also:
        `extendibleEnumerationElementValue(String)`, `lookupExtendibleEnumeration(String)`

    - #### extendibleEnumerationName

          public static final String extendibleEnumerationName(AUID elementValue)
                                                        throws NullPointerException

      Returns the enumeration name of an extendible enumeration item from its element value. The element name part is not included.

      Parameters:
        `elementValue` - Element value identification to find the corresponding enumeration name for.
      Returns:
        Extendible enumeration name for the given element value, or `null` if no element of the given element identification is known in the inventory.
      Throws:
        `NullPointerException` - Cannot find an extendible enumeration name from a `null` element value.
      See Also:
        `extendibleEnumerationFullName(AUID)`, `extendibleEnumerationElementName(AUID)`

    - #### extendibleEnumerationElementName

          public static final String extendibleEnumerationElementName(AUID elementValue)
                                                               throws NullPointerException

      Returns the element name of an extendible enumeration item from its element value. The enumeration name part is not included.

      Parameters:
        `elementValue` - Element value identification to find the corresponding element name for.
      Returns:
        Element name for the given element value, or `null` if no element of the given element identification is known in the inventory.
      Throws:
        `NullPointerException` - Cannot find an element name from a `null` element value.
      See Also:
        `extendibleEnumerationName(AUID)`, `extendibleEnumerationFullName(AUID)`

    - #### getExtendibleEnumerationInventory

          public static final Collection<String> getExtendibleEnumerationInventory()

      Returns a collection of all extendible enumerations known in the inventory for this warehouse, by name.

      Returns:
        Collection of all extendible enumerations known in the inventory for this warehouse, by name.
      See Also:
        `getClassInventory()`, `getTypeInventory()`, `lookupExtendibleEnumeration(String)`, `countExtendibleEnumerations()`

    - #### countExtendibleEnumerations

          public static final int countExtendibleEnumerations()

      Returns the number of extendible enumerations known in the inventory of this warehouse.

      Returns:
        Number of extendible enumerations known in the inventory of this warehouse.
      See Also:
        `getExtendibleEnumerationInventory()`, `countClassDefinitions()`, `countTypeDefinitions()`

    - #### javaClassAlias

          public static final String javaClassAlias(String aafName)

      Transform an AAF class name into its Java equivalent name. For example, the AAF class called FileDescriptor is known as AAFFileDescriptor in Java. Most names are the same and passed through this method unchanged, as are `null` values.

      Parameters:
        `aafName` - Name of the class to check for an alias of.
      Returns:
        Corresponding name as used in Java.
      See Also:
        `MetaDefinition.getName()`

    - #### lookForProperty

          public static final PropertyDefinition lookForProperty(AUID propertyID)
                                                          throws NullPointerException

      Look for a property in the warehouse by its unique identifier.

      To look for a property by its name or local identification number, use `ClassDefinition.lookupPropertyDefinition(String)` and `ClassDefinition.lookupPropertyDefinition(short)` respectively.

      Parameters:
        `propertyID` - Unique identifier of a property to check for in the warehouse.
      Returns:
        Property with the given unique identifier, or `null` if the property cannot be found.
      Throws:
        `NullPointerException` - Cannot look for a property using a `null` identifier.
      See Also:
        `ClassDefinition.lookupPropertyDefinition(AUID)`, `lookForClass(AUID)`, `lookForClass(Class)`, `lookForClass(String)`

    - #### register

          public static final void register(PropertyDefinition propertyDefinition)
                                     throws NullPointerException

      Throws:
        `NullPointerException`

    - #### isKnownProperty

          public static final boolean isKnownProperty(PropertyDefinition property)

    - #### register

          public static final void register(ExtensionScheme extensionScheme)
                                     throws NullPointerException

      Throws:
        `NullPointerException`

    - #### lookupExtensionScheme

          public static final ExtensionScheme lookupExtensionScheme(AUID extensionSchemeID)
                                                             throws NullPointerException

      Throws:
        `NullPointerException`

    - #### lookupExtensionScheme

          public static final ExtensionScheme lookupExtensionScheme(String extensionSchemeIdentifier)
                                                             throws NullPointerException

      Throws:
        `NullPointerException`

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