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

# Package tv.amwa.maj.util

Static utility methods and generators used internally by the MAJ API that may also be useful to applications using the API.

See: Description

- Class Summary
  Class | Description
  --- | ---
  AutoGeneration | Generate Java classes, interfaces and tests from meta dictionary extension descriptions.
  ExtensionSchemeGenerator |
  GenerationCore | Shared utilities for parsing meta dictionary XML files and building generators, such as the extension generator and the test generator.
  LookupTable | Deprecated Ongoing maintenance of this class is not expected.
  RP224ToJava | Convert a CSV export of the RP224 SMPTE Labels Registry spreadsheet to a Java interface.
  TestGeneration | Generates JUnit tests from a meta dictionary file, designed to exercise all aspects of a Java implementation of the elements defined in that dictionary.
  TestUtilities |
  Utilities | Static utilities shared by more than one class in the MAJ API and that may be of use more generally.

- Enum Summary
  Enum | Description
  --- | ---
  LookupTable.Strategy | Defines the kind of strategy used to represent a particular AAF data type in the MAJ API.

## Package tv.amwa.maj.util Description

Static utility methods and generators used internally by the MAJ API that may also be useful to applications using the API. Also included in this package is a lookup table mapping AAF type names to their respective Java type names and a description of the four strategies used to achieve this mapping.

## External generators

The auto and test generators are provided as bootstrap facilities for the MAJ API as independent code from the core API. This is deliberate so the code generation and testing is not polluted by implicit behaviour of the API being tested.

### Auto generation

The MAJ auto generator takes the XML description of a meta dictionary and generates source code for classes and interfaces that, when compiled, can be used to extend the runtime data model supported by MAJ.

### Test generation

The MAJ test generator takes the XML description of a meta dictionary and generates JUnit tests for all the expected classes and interfaces that it describes. The test generator has been used to generate over 25,000 tests for the MAJ API baseline AAF data model.

## Internal generators

Other generation capability is provided within the core API as it can be assumed that the data model is clean and safe once the external tests have been run. These include:

- Generation of a meta dictionary from in-memory definitions;
- Generation of JPA-compliant persistent mappings.

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