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

tv.amwa.maj.io.xml

## Class MetaDictionaryGenerator

- java.lang.Object
- - tv.amwa.maj.io.xml.MetaDictionaryGenerator

- All Implemented Interfaces:
    CommonConstants

      public class MetaDictionaryGenerator
      extends Object
      implements CommonConstants

  Generate a Reg-XML compliant meta dictionary for either the baseline AAF model or an extension data model.

  See Also:
    `XSDGenerator`

- - ### Field Summary

    - ### Fields inherited from interface tv.amwa.maj.constant.CommonConstants

      `AAF_METADICT_NAMESPACE, AAF_METADICT_PREFIX, AAF_XML_NAMESPACE, AAF_XML_PREFIX, ApplicationPluginObjectID, ApplicationPluginsID, MAX_NUM_RGBA_COMPS, MemberOfID, ObjectClassID, ParentClassID, PropertiesID, XMLClassIDAsAttributeName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MetaDictionaryGenerator()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DocumentFragment` | `generateBaselineDictionary()`
    `static String` | `generateBaselineDictionaryAsAString()`
    `static DocumentFragment` | `generateMetaDictionary(Collection<ClassDefinition> classes, AUID schemeID, String schemeURI, String preferredPrefix, String description, String localNamespace, String localPrefix)` Generates an XML meta dictionary description from the given set of baseline class definitions and extension class definitions.
    `static DocumentFragment` | `generateMetaDictionary(Collection<ClassDefinition> classes, AUID schemeID, String schemeURI, String preferredPrefix, String description, String localNamespace, String localPrefix, String rootElement, String rootObject)`
    `static String` | `generateMetaDictionaryAsAString(Collection<ClassDefinition> classes, AUID schemeID, String schemeURI, String preferredPrefix, String description, String localNamespace, String localPrefix)`
    `static String` | `generateMetaDictionaryAsAString(Collection<ClassDefinition> classes, AUID schemeID, String schemeURI, String preferredPrefix, String description, String localNamespace, String localPrefix, String rootElement, String rootObject)`
    `static void` | `main(String[] args)`

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

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

- - ### Constructor Detail

    - #### MetaDictionaryGenerator

          public MetaDictionaryGenerator()

  - ### Method Detail

    - #### generateBaselineDictionary

          public static final DocumentFragment generateBaselineDictionary()

    - #### generateBaselineDictionaryAsAString

          public static final String generateBaselineDictionaryAsAString()

    - #### generateMetaDictionary

          public static final DocumentFragment generateMetaDictionary(Collection<ClassDefinition> classes,
                                                                      AUID schemeID,
                                                                      String schemeURI,
                                                                      String preferredPrefix,
                                                                      String description,
                                                                      String localNamespace,
                                                                      String localPrefix)
                                                               throws NullPointerException

      Generates an XML meta dictionary description from the given set of baseline class definitions and extension class definitions. Each class definition is searched to find the required property definitions and type definitions. Only required meta definitions for the given classes are included.

      The extension element will only include meta definitions that are not already covered in the baseline set. The include baseline property will include the both the baseline and extensions in the result if set to `true` (AAF-style) or only the extensions if set to `false` (MXF- and Registered Data XML-style).

      Symbol space and description properties are optional for baseline and extension sections. If no extensions are present, extension identification and extension symbol space parameters are not required.

      Parameters:
        `baselineClasses` - Collection of baseline classes.
        `extensionClasses` - Collection of extensions.
        `baselineIdentification` - Identification for the baseline meta dictionary.
        `baselineSymbolSpace` - Namespace for the symbols defined in the baseline meta dictionary.
        `baselinePreferredPrefix` - An optional preferred prefix to use for elements in the baseline symbol space.
        `baselineDescription` - An optional description of the baseline meta dictionary.
        `extensionIdentification` - Extension classes to use to generate the extension section of the meta dictionary.
        `extensionSymbolSpace` - Namespace for the symbols defined in the extension meta dictionary.
        `extensionPreferredPrefix` - An optional preferred prefix to use for elements in the extension symbol space.
        `extensionDescription` - An optional description of the extension meta dictionary.
        `includeBaseline` - Should the baseline be assumed or included in the meta dictionary?
      Returns:
        XML representation of a meta dictionary for the given classes.
      Throws:
        `NullPointerException` - One or more of the required properties is `null`.
      See Also:
        `CommonConstants.AAF_METADICT_NAMESPACE`, `AAFSpecifiedClasses`

    - #### generateMetaDictionary

          public static final DocumentFragment generateMetaDictionary(Collection<ClassDefinition> classes,
                                                                      AUID schemeID,
                                                                      String schemeURI,
                                                                      String preferredPrefix,
                                                                      String description,
                                                                      String localNamespace,
                                                                      String localPrefix,
                                                                      String rootElement,
                                                                      String rootObject)
                                                               throws NullPointerException

      Throws:
        `NullPointerException`

    - #### generateMetaDictionaryAsAString

          public static final String generateMetaDictionaryAsAString(Collection<ClassDefinition> classes,
                                                                     AUID schemeID,
                                                                     String schemeURI,
                                                                     String preferredPrefix,
                                                                     String description,
                                                                     String localNamespace,
                                                                     String localPrefix,
                                                                     String rootElement,
                                                                     String rootObject)
                                                              throws NullPointerException

      Throws:
        `NullPointerException`

    - #### generateMetaDictionaryAsAString

          public static final String generateMetaDictionaryAsAString(Collection<ClassDefinition> classes,
                                                                     AUID schemeID,
                                                                     String schemeURI,
                                                                     String preferredPrefix,
                                                                     String description,
                                                                     String localNamespace,
                                                                     String localPrefix)
                                                              throws NullPointerException

      Throws:
        `NullPointerException`

    - #### main

          public static final void main(String[] args)

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