Media Authoring
with Java API

tv.amwa.maj.util
Class LookupTable

java.lang.Object
  extended by tv.amwa.maj.util.LookupTable

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:

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.

Author:
Richard Cartwright

Nested Class Summary
static class LookupTable.Strategy
           Defines the kind of strategy used to represent a particular AAF data type in the MAJ API.
 
Method Summary
static String lookupAAFTypeForCType(String cTypeName)
           Find the name of the AAF data type represented by a C type definition in the AAF SDK.
static String lookupMAJType(String aafName)
           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)
           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)
           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

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

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

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:

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

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:

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.

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.