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

tv.amwa.maj.meta

## Interface ExtensionScheme

- All Superinterfaces:
    MetadataObject, WeakReferenceTarget
  All Known Implementing Classes:
    ExtensionSchemeImpl

      public interface ExtensionScheme
      extends MetadataObject, WeakReferenceTarget

  Groups together a collection of meta definitions for an extension to a file and provides a globally unique identifier for the collection.

  An MXF file may contain any number of Extension Scheme objects.

  An extension scheme may be used as part of an application metadata plugin or descriptive framework.

  See Also:
    `MetaDefinition`, `ApplicationPluginObject`, `DescriptiveFramework`, `Root.getRootExtensions()`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMetaDefinition(MetaDefinition metaDefinition)` Add a meta definition to the set of definitions that form this extension scheme.
    `void` | `clearMetaDefinitions()` Clear all the meta definitions from this extensions scheme, omitting this optional property.
    `ExtensionScheme` | `clone()` Create a cloned copy of this extension scheme.
    `boolean` | `containsMetaDefinition(AUID metaDefinitionID)` Determines whether the given identifier is for a meta definition that is present within those that make up this extension scheme.
    `boolean` | `containsMetaDefinition(MetaDefinition metaDefinition)` Determines whether the given meta definition is present within those that make up this extension scheme.
    `boolean` | `containsMetaDefinition(String metaDefinitionName)` Determines whether the given name is for a meta definition that is present within those that make up this extension scheme.
    `int` | `countMetaDefinitions()` Count the number of meta definitions in this extensions scheme.
    `String` | `getExtensionDescription()` Returns the description of the extension scheme.
    `Set<MetaDefinition>` | `getMetaDefinitions()` Returns the set of meta definitions that form the extensions scheme.
    `String` | `getPreferredPrefix()` Returns the preferred namespace tag when SMPTE Reg-XML encoding is used.
    `AUID` | `getSchemeID()` Returns the globally unique identification of the extension scheme.
    `String` | `getSchemeURI()` Returns the namespace URI for the extension scheme.
    `MetaDefinition` | `lookupMetaDefinition(AUID metaDefinitionID)` Lookup a meta definition within this extension scheme by its identifier.
    `MetaDefinition` | `lookupMetaDefinition(String metaDefinitionName)` Lookup a meta definition within this extension scheme by its name.
    `AUID` | `lookupMetaDefinitionIdentifier(String metaDefinitionName)` Lookup the identifier of a meta definition in this extension scheme from its name.
    `boolean` | `removeMetaDefinition(AUID metaDefinitionID)` Remove the identified meta definition from those that make up this extension scheme.
    `boolean` | `removeMetaDefinition(MetaDefinition metaDefinition)` Remove the given meta definition from those that make up this extension scheme.
    `void` | `setExtensionDescription(String extensionDescription)` Sets the description of the extension scheme.
    `void` | `setPreferredPrefix(String preferredPrefix)` Sets the preferred namespace tag when SMPTE Reg-XML encoding is used.
    `void` | `setSchemeID(AUID schemeID)` Sets the globally unique identification of the extensions scheme.
    `void` | `setSchemeURI(String schemeURI)` Sets the namespace URI for the extension scheme.

    - ### Methods inherited from interface tv.amwa.maj.industry.WeakReferenceTarget

      `getAUID, getWeakTargetReference`

- - ### Method Detail

    - #### getSchemeID

          AUID getSchemeID()

      Returns the globally unique identification of the extension scheme.

      Returns:
        Globally unique identification of the extensions scheme.
      See Also:
        `getSchemeURI()`, `ApplicationPluginObject.getApplicationScheme()`, `Preface.getApplicationSchemes()`, `Preface.getDescriptiveSchemes()`

    - #### setSchemeID

          void setSchemeID(AUID schemeID)
                    throws NullPointerException

      Sets the globally unique identification of the extensions scheme. An extension scheme may be used as part of an application metadata plugin or descriptive framework.

      Parameters:
        `schemeID` - Globally unique identification of the extensions scheme.
      Throws:
        `NullPointerException` - Cannot set the scheme identifier using a `null` value.
      See Also:
        `setSchemeURI(String)`, `tv.amwa.maj.model.ApplicationPluginObject#setApplicationScheme(AUID)`, `Preface.getApplicationSchemes()`, `Preface.getDescriptiveSchemes()`

    - #### getSchemeURI

          String getSchemeURI()

      Returns the namespace URI for the extension scheme.

      Returns:
        Namespace URI for the extension scheme.
      See Also:
        `getSchemeID()`, `MetaDefinition.getNamespace()`, `MediaClass.namespace()`, `MediaProperty.namespace()`

    - #### setSchemeURI

          void setSchemeURI(String schemeURI)
                     throws NullPointerException

      Sets the namespace URI for the extension scheme.

      Parameters:
        `schemeURI` - Namespace URI for the extension scheme.
      Throws:
        `NullPointerException` - Cannot set the scheme identifier using a `null` value.
      See Also:
        `setSchemeID(AUID)`, `MetaDefinition.setNamespace(String)`, `MediaClass.namespace()`, `MediaProperty.namespace()`

    - #### getPreferredPrefix

          String getPreferredPrefix()
                             throws PropertyNotPresentException

      Returns the preferred namespace tag when SMPTE Reg-XML encoding is used. This is an optional property.

      Returns:
        Preferred namespace tag when SMPTE Reg-XML encoding is used.
      Throws:
        `PropertyNotPresentException` - The optional preferred prefix property is not present for this extension scheme.
      See Also:
        `getSchemeURI()`, `MetaDefinition.getPrefix()`, `MediaClass.prefix()`, `MediaProperty.prefix()`

    - #### setPreferredPrefix

          void setPreferredPrefix(String preferredPrefix)

      Sets the preferred namespace tag when SMPTE Reg-XML encoding is used. Set this optional property to `null` to omit it.

      Parameters:
        `preferredPrefix` - Preferred namespace tag when SMPTE Reg-XML encoding is used.
      See Also:
        `setSchemeURI(String)`, `MediaClass.prefix()`, `MediaProperty.prefix()`

    - #### getExtensionDescription

          String getExtensionDescription()
                                  throws PropertyNotPresentException

      Returns the description of the extension scheme. This is an optional property.

      Returns:
        Description of the extension scheme.
      Throws:
        `PropertyNotPresentException` - The optional description property of the extension scheme is not present.

    - #### setExtensionDescription

          void setExtensionDescription(String extensionDescription)

      Sets the description of the extension scheme. Set this optional property to `null` to omit it.

      Parameters:
        `extensionDescription` - Description of the extension scheme.

    - #### getMetaDefinitions

          Set<MetaDefinition> getMetaDefinitions()
                                          throws PropertyNotPresentException

      Returns the set of meta definitions that form the extensions scheme. The meta definitions are the class definitions, property definitions and type definitions that define extensions classes and properties for use in:

      - descriptive frameworks;
      - descriptive objects;
      - application plugin objects;
      - application referenced objects.

      This is an optional property, although omitting it and defining an empty scheme would not make much sense.

      Returns:
        Set of meta definitions that form the extensions scheme.
      Throws:
        `PropertyNotPresentException` - The optional meta definitions property is not present for this extension scheme.

    - #### addMetaDefinition

          void addMetaDefinition(MetaDefinition metaDefinition)
                          throws NullPointerException

      Add a meta definition to the set of definitions that form this extension scheme.

      Parameters:
        `metaDefinition` - Meta definition to add to the scheme.
      Throws:
        `NullPointerException` - Cannot use a `null` value to add to the set of meta definitions.
      See Also:
        `getMetaDefinitions()`

    - #### lookupMetaDefinition

          MetaDefinition lookupMetaDefinition(AUID metaDefinitionID)
                                       throws NullPointerException

      Lookup a meta definition within this extension scheme by its identifier.

      Parameters:
        `metaDefinitionID` - Identifier of the meta definition to find in the extension scheme.
      Returns:
        Meta definition with the given identifier, or `null` if no matching meta definition could be found.
      Throws:
        `NullPointerException` - Cannot look for a meta definition using a `null` value.
      See Also:
        `lookupMetaDefinition(String)`, `lookupMetaDefinitionIdentifier(String)`, `getMetaDefinitions()`

    - #### lookupMetaDefinition

          MetaDefinition lookupMetaDefinition(String metaDefinitionName)
                                       throws NullPointerException

      Lookup a meta definition within this extension scheme by its name.

      Parameters:
        `metaDefinitionName` - Name of the meta definition to find in the extension scheme.
      Returns:
        Meta definition with the given name, or `null` if no matching meta definition could be found.
      Throws:
        `NullPointerException` - Cannot look for a meta definition using a `null` value.
      See Also:
        `lookupMetaDefinition(AUID)`, `lookupMetaDefinitionIdentifier(String)`, `getMetaDefinitions()`

    - #### lookupMetaDefinitionIdentifier

          AUID lookupMetaDefinitionIdentifier(String metaDefinitionName)
                                       throws NullPointerException

      Lookup the identifier of a meta definition in this extension scheme from its name.

      Parameters:
        `metaDefinitionName` - Name of the meta definition to find in the extension scheme.
      Returns:
        Identifier of the named meta definition.
      Throws:
        `NullPointerException` - Cannot look for a meta definition using a `null` value.
      See Also:
        `lookupMetaDefinition(AUID)`, `lookupMetaDefinition(String)`, `getMetaDefinitions()`

    - #### containsMetaDefinition

          boolean containsMetaDefinition(MetaDefinition metaDefinition)
                                  throws NullPointerException

      Determines whether the given meta definition is present within those that make up this extension scheme.

      Parameters:
        `metaDefinition` - Meta definition to check for.
      Returns:
        Is the meta definition defined by this extension scheme?
      Throws:
        `NullPointerException` - Cannot use a `null` value to check for a meta definition.
      See Also:
        `containsMetaDefinition(AUID)`, `containsMetaDefinition(String)`, `getMetaDefinitions()`

    - #### containsMetaDefinition

          boolean containsMetaDefinition(AUID metaDefinitionID)
                                  throws NullPointerException

      Determines whether the given identifier is for a meta definition that is present within those that make up this extension scheme.

      Parameters:
        `metaDefinition` - Identifier of the meta definition to check for.
      Returns:
        Is the identified meta definition defined by this extension scheme?
      Throws:
        `NullPointerException` - Cannot use a `null` value to check for a meta definition.
      See Also:
        `containsMetaDefinition(MetaDefinition)`, `containsMetaDefinition(String)`, `getMetaDefinitions()`

    - #### containsMetaDefinition

          boolean containsMetaDefinition(String metaDefinitionName)
                                  throws NullPointerException

      Determines whether the given name is for a meta definition that is present within those that make up this extension scheme.

      Parameters:
        `metaDefinition` - Name of the meta definition to check for.
      Returns:
        Is the named meta definition defined by this extension scheme?
      Throws:
        `NullPointerException` - Cannot use a `null` value to check for a meta definition.
      See Also:
        `containsMetaDefinition(MetaDefinition)`, `containsMetaDefinition(AUID)`, `getMetaDefinitions()`

    - #### clearMetaDefinitions

          void clearMetaDefinitions()

      Clear all the meta definitions from this extensions scheme, omitting this optional property.

      See Also:
        `getMetaDefinitions()`

    - #### countMetaDefinitions

          int countMetaDefinitions()

      Count the number of meta definitions in this extensions scheme.

      Returns:
        Number of meta definitions in this extensions scheme.
      See Also:
        `getMetaDefinitions()`

    - #### removeMetaDefinition

          boolean removeMetaDefinition(MetaDefinition metaDefinition)
                                throws NullPointerException

      Remove the given meta definition from those that make up this extension scheme.

      Parameters:
        `metaDefinition` - Meta definition to remove.
      Returns:
        Was the meta definition successfully removed from the set? Returns `false` if the meta definition was not part of this extension scheme.
      Throws:
        `NullPointerException` - Cannot remove a meta definition using a `null` value.
      See Also:
        `removeMetaDefinition(AUID)`, `getMetaDefinitions()`

    - #### removeMetaDefinition

          boolean removeMetaDefinition(AUID metaDefinitionID)
                                throws NullPointerException

      Remove the identified meta definition from those that make up this extension scheme.

      Parameters:
        `metaDefinition` - Identifier of the meta definition to remove.
      Returns:
        Was the meta definition successfully removed from the set? Returns `false` if the meta definition was not part of this extension scheme.
      Throws:
        `NullPointerException` - Cannot remove a meta definition using a `null` value.
      See Also:
        `removeMetaDefinition(MetaDefinition)`, `getMetaDefinitions()`

    - #### clone

          ExtensionScheme clone()

      Create a cloned copy of this extension scheme.

      Returns:
        Cloned copy of this extension scheme.

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