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

tv.amwa.maj.util

## Class LookupTable

- java.lang.Object
- - tv.amwa.maj.util.LookupTable

- Deprecated.
  Ongoing maintenance of this class is not expected. The table was created in January 2007 from version 1.1 of the AAF SDK and is not used by any other part of the MAJ API. Developers may find this utility class useful but are advised to check any results that are produced against the current state of the AAF SDK and MAJ API. All type names in section 21 of the AAF object specification version 1.1 are included.

      @Deprecated
      public final class LookupTable
      extends Object

  Static table of mappings from AAF specification data type names to MAJ API Java type names and AAF SDK C type definition names (as defined in file "`AAFTypes.h`"). The table allows the details of the Java representation of an AAF data type to be looked up by defined name or the name of the equivalent structure used in the C-based AAF SDK. The strategy used to represent the AAF data in the MAJ API for each AAF data type is also available, with the exception of `PixelRectangle` and `RationalRectangle`.

  For example, consider the following information about AAF data type `UInt32`:

  - `UInt32` is represented by the Java primitive type `int`, which is returned from the method call `lookupMAJType("UInt32")`.
  - In the interface definitions of the MAJ API, the Java primitive type is labelled with annotation `UInt32` wherever it is used to represent an AAF `UInt32`. This is known as the annotation strategy and can be found with the following method call: `lookupMAJTypeStrategy("UInt32")`.
  - In the C-based AAF SDK, an `UInt32` value is represented by a type definition called "`aafUInt32`". The AAF type name can be discovered by a call to: `lookupAAFTypeForCType("aafUInt32")`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LookupTable.Strategy` Deprecated. Defines the kind of strategy used to represent a particular AAF data type in the MAJ API.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `lookupAAFTypeForCType(String cTypeName)` Deprecated. Find the name of the AAF data type represented by a C type definition in the AAF SDK.
    `static String` | `lookupMAJType(String aafName)` Deprecated. Find the name of the underlying Java type used to represent the given AAF data type in the MAJ API.
    `static String` | `lookupMAJTypeForCType(String cTypeName)` Deprecated. Lookup the underlying Java type representation in the MAJ API for a given C type definition name in the AAF SDK.
    `static LookupTable.Strategy` | `lookupMAJTypeStrategy(String aafName)` Deprecated. Find the strategy used by the MAJ API for the representation of an AAF type from a given AAF type name.

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

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

- - ### Method Detail

    - #### lookupMAJTypeStrategy

          public static final LookupTable.Strategy lookupMAJTypeStrategy(String aafName)
                                                                  throws NullPointerException

      Deprecated.

      Find the strategy used by the MAJ API for the representation of an AAF type from a given AAF type name. This method will try both the given name and the name with "`Type`" appended to the end.

      Parameters:
        `aafName` - Name of AAF data type to check the representation strategy for.
      Returns:
        Strategy used to represent the AAF type, or `null` if the type name is not known in this lookup table.
      Throws:
        `NullPointerException` - The AAF data type name is `null`.

    - #### lookupMAJType

          public static final String lookupMAJType(String aafName)
                                            throws NullPointerException

      Deprecated.

      Find the name of the underlying Java type used to represent the given AAF data type in the MAJ API. his method will try both the given name and the name with "`Type`" appended to the end.

      Parameters:
        `aafName` - Name of AAF data type to find the underlying Java type of its representation for.
      Returns:
        Name of the Java type, a primitive type or interface name, used to represent the given AAF data type, or `null` if the data type could not be found.
      Throws:
        `NullPointerException` - The AAF data type name is `null`.

    - #### lookupAAFTypeForCType

          public static final String lookupAAFTypeForCType(String cTypeName)
                                                    throws NullPointerException

      Deprecated.

      Find the name of the AAF data type represented by a C type definition in the AAF SDK. Type definitions are taken from the file "`AAFTypes.h`". Any of the following extensions will be removed from the name before the lookup operation takes place:

      - `_t`
      - `_e`
      - `_constref`

      Also, the method tries both the given name and the name with "`aaf`" prepended to its start.

      Parameters:
        `cTypeName` - Name of the C type definition to search for.
      Returns:
        Name of the AAF data type represented by the given C type name, or `null` if the given name cannot be found.
      Throws:
        `NullPointerException` - The given C type definition name is `null`.

    - #### lookupMAJTypeForCType

          public static final String lookupMAJTypeForCType(String cTypeName)
                                                    throws NullPointerException

      Deprecated.

      Lookup the underlying Java type representation in the MAJ API for a given C type definition name in the AAF SDK. Type definitions are taken from the file "`AAFTypes.h`". Any of the following extensions will be removed from the name before the lookup operation takes place:

      - `_t`
      - `_e`
      - `_constref`

      Also, the method tries both the given name and the name with "`aaf`" prepended to its start.

      Calling this method is the same as calling `lookupAAFTypeForCType(String)` followed by `lookupMAJType(String)`.

      Parameters:
        `cTypeName` - Name of the C type definition to search for.
      Returns:
        Name of the Java type representing by the given C type name in the MAJ API, or `null` if the given name cannot be found.
      Throws:
        `NullPointerException` - The given C type definition name is `null` or could not be found in this lookup table.

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