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

tv.amwa.maj.meta.impl

## Class ExtensionSchemeImpl

- java.lang.Object
- - tv.amwa.maj.meta.impl.ExtensionSchemeImpl

- All Implemented Interfaces:
    Serializable, Cloneable, MetadataObject, WeakReferenceTarget, ExtensionScheme

      @MediaClass(uuid1=218169601,
                  uuid2=550,
                  uuid3=0,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="ExtensionScheme",
                  symbol="ExtensionScheme",
                  description="Groups together a collection of meta definitions for an extension to a file and provides a globally unique identifier for the collection.",
                  namespace="http://www.smpte-ra.org/schemas/2001-2/2007/aaf",
                  prefix="aaf")
      public class ExtensionSchemeImpl
      extends Object
      implements ExtensionScheme, Cloneable, Serializable, MetadataObject, WeakReferenceTarget

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtensionSchemeImpl()`

  - ### Method Summary

    All Methods Instance Methods Concrete 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.
    `boolean` | `deepEquals(Object o)`
    `boolean` | `equals(Object o)`
    `AUID` | `getAUID()` Returns the unique identifier of the target of the reference.
    `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.
    `String` | `getWeakTargetReference()` Provides a name that can be used to make a weak object reference to an instance of the implementing class.
    `int` | `hashCode()`
    `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.
    `String` | `toString()`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ExtensionSchemeImpl

          public ExtensionSchemeImpl()

  - ### Method Detail

    - #### getSchemeID

          @MediaProperty(uuid1=100729095,
                         uuid2=6912,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,13},
                         definedName="SchemeID",
                         aliases="ExtensionSchemeID",
                         typeName="AUID",
                         optional=false,
                         uniqueIdentifier=true,
                         pid=36,
                         symbol="SchemeID",
                         description="Globally unique identification of the extension scheme.")
          public AUID getSchemeID()

      Description copied from interface: `ExtensionScheme`

      Returns the globally unique identification of the extension scheme.

      Specified by:
        `getSchemeID` in interface `ExtensionScheme`
      Returns:
        Globally unique identification of the extensions scheme.
      See Also:
        `ExtensionScheme.getSchemeURI()`, `ApplicationPluginObject.getApplicationScheme()`, `Preface.getApplicationSchemes()`, `Preface.getDescriptiveSchemes()`

    - #### setSchemeID

          @MediaPropertySetter(value="SchemeID")
          public void setSchemeID(AUID schemeID)
                                                                  throws NullPointerException

      Description copied from interface: `ExtensionScheme`

      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.

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

    - #### getAUID

          public AUID getAUID()

      Description copied from interface: `WeakReferenceTarget`

      Returns the unique identifier of the target of the reference.

      Specified by:
        `getAUID` in interface `WeakReferenceTarget`
      Returns:
        Unique identifier of the target of the reference.

    - #### getSchemeURI

          @MediaProperty(uuid1=100729095,
                         uuid2=7168,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,13},
                         definedName="SchemeURI",
                         aliases={"ExtensionSchemeURI","SymbolSpaceURI","ExtensionSymbolSpaceURI"},
                         typeName="UTF16String",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=37,
                         symbol="SchemeURI",
                         description="Namespace URI for the extension scheme.")
          public String getSchemeURI()

      Description copied from interface: `ExtensionScheme`

      Returns the namespace URI for the extension scheme.

      Specified by:
        `getSchemeURI` in interface `ExtensionScheme`
      Returns:
        Namespace URI for the extension scheme.
      See Also:
        `ExtensionScheme.getSchemeID()`, `MetaDefinition.getNamespace()`, `MediaClass.namespace()`, `MediaProperty.namespace()`

    - #### setSchemeURI

          @MediaPropertySetter(value="SchemeURI")
          public void setSchemeURI(String schemeURI)
                                                                    throws NullPointerException

      Description copied from interface: `ExtensionScheme`

      Sets the namespace URI for the extension scheme.

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

    - #### getPreferredPrefix

          @MediaProperty(uuid1=100729095,
                         uuid2=7424,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,13},
                         definedName="PreferredPrefix",
                         typeName="UTF16String",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=38,
                         symbol="PreferredPrefix",
                         description="Preferred namespace tag when SMPTE Reg-XML encoding is used.")
          public String getPreferredPrefix()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        throws PropertyNotPresentException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `getPreferredPrefix` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.getSchemeURI()`, `MetaDefinition.getPrefix()`, `MediaClass.prefix()`, `MediaProperty.prefix()`

    - #### setPreferredPrefix

          @MediaPropertySetter(value="PreferredPrefix")
          public void setPreferredPrefix(String preferredPrefix)

      Description copied from interface: `ExtensionScheme`

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

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

    - #### getExtensionDescription

          @MediaProperty(uuid1=100729095,
                         uuid2=7680,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,13},
                         definedName="ExtensionDescription",
                         aliases="Description",
                         typeName="UTF16String",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=39,
                         symbol="ExtensionDescription",
                         description="Description of the extension scheme.")
          public String getExtensionDescription()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     throws PropertyNotPresentException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `getExtensionDescription` in interface `ExtensionScheme`
      Returns:
        Description of the extension scheme.
      Throws:
        `PropertyNotPresentException` - The optional description property of the extension scheme is not present.

    - #### setExtensionDescription

          @MediaPropertySetter(value="ExtensionDescription")
          public void setExtensionDescription(String extensionDescription)

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `setExtensionDescription` in interface `ExtensionScheme`
      Parameters:
        `extensionDescription` - Description of the extension scheme.

    - #### getMetaDefinitions

          @MediaProperty(uuid1=100729095,
                         uuid2=7936,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,13},
                         definedName="MetaDefinitions",
                         typeName="MetaDefinitionStrongReferenceSet",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=40,
                         symbol="MetaDefinitions",
                         description="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 and application referenced objects.")
          public Set<MetaDefinition> getMetaDefinitions()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      throws PropertyNotPresentException

      Description copied from interface: `ExtensionScheme`

      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.

      Specified by:
        `getMetaDefinitions` in interface `ExtensionScheme`
      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

          @MediaSetAdd(value="MetaDefinitions")
          public void addMetaDefinition(MetaDefinition metaDefinition)
                                                                       throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `addMetaDefinition` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.getMetaDefinitions()`

    - #### clearMetaDefinitions

          @MediaPropertyClear(value="MetaDefinitions")
          public void clearMetaDefinitions()

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `clearMetaDefinitions` in interface `ExtensionScheme`
      See Also:
        `ExtensionScheme.getMetaDefinitions()`

    - #### containsMetaDefinition

          @MediaPropertyContains(value="MetaDefinitions")
          public boolean containsMetaDefinition(MetaDefinition metaDefinition)
                                                                                         throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `containsMetaDefinition` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.containsMetaDefinition(AUID)`, `ExtensionScheme.containsMetaDefinition(String)`, `ExtensionScheme.getMetaDefinitions()`

    - #### containsMetaDefinition

          public boolean containsMetaDefinition(AUID metaDefinitionID)
                                         throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `containsMetaDefinition` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.containsMetaDefinition(MetaDefinition)`, `ExtensionScheme.containsMetaDefinition(String)`, `ExtensionScheme.getMetaDefinitions()`

    - #### containsMetaDefinition

          public boolean containsMetaDefinition(String metaDefinitionName)
                                         throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `containsMetaDefinition` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.containsMetaDefinition(MetaDefinition)`, `ExtensionScheme.containsMetaDefinition(AUID)`, `ExtensionScheme.getMetaDefinitions()`

    - #### lookupMetaDefinition

          public MetaDefinition lookupMetaDefinition(AUID metaDefinitionID)
                                              throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `lookupMetaDefinition` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.lookupMetaDefinition(String)`, `ExtensionScheme.lookupMetaDefinitionIdentifier(String)`, `ExtensionScheme.getMetaDefinitions()`

    - #### lookupMetaDefinition

          public MetaDefinition lookupMetaDefinition(String metaDefinitionName)
                                              throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `lookupMetaDefinition` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.lookupMetaDefinition(AUID)`, `ExtensionScheme.lookupMetaDefinitionIdentifier(String)`, `ExtensionScheme.getMetaDefinitions()`

    - #### lookupMetaDefinitionIdentifier

          public AUID lookupMetaDefinitionIdentifier(String metaDefinitionName)
                                              throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `lookupMetaDefinitionIdentifier` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.lookupMetaDefinition(AUID)`, `ExtensionScheme.lookupMetaDefinition(String)`, `ExtensionScheme.getMetaDefinitions()`

    - #### countMetaDefinitions

          @MediaPropertyCount(value="MetaDefinitions")
          public int countMetaDefinitions()

      Description copied from interface: `ExtensionScheme`

      Count the number of meta definitions in this extensions scheme.

      Specified by:
        `countMetaDefinitions` in interface `ExtensionScheme`
      Returns:
        Number of meta definitions in this extensions scheme.
      See Also:
        `ExtensionScheme.getMetaDefinitions()`

    - #### removeMetaDefinition

          @MediaPropertyRemove(value="MetaDefinitions")
          public boolean removeMetaDefinition(MetaDefinition metaDefinition)
                                                                                     throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `removeMetaDefinition` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.removeMetaDefinition(AUID)`, `ExtensionScheme.getMetaDefinitions()`

    - #### removeMetaDefinition

          public boolean removeMetaDefinition(AUID metaDefinitionID)
                                       throws NullPointerException

      Description copied from interface: `ExtensionScheme`

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

      Specified by:
        `removeMetaDefinition` in interface `ExtensionScheme`
      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:
        `ExtensionScheme.removeMetaDefinition(MetaDefinition)`, `ExtensionScheme.getMetaDefinitions()`

    - #### getWeakTargetReference

          public String getWeakTargetReference()

      Description copied from interface: `WeakReferenceTarget`

      Provides a name that can be used to make a weak object reference to an instance of the implementing class.

      Specified by:
        `getWeakTargetReference` in interface `WeakReferenceTarget`
      Returns:
        A name to use to make weak reference to this object.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### deepEquals

          public boolean deepEquals(Object o)

    - #### clone

          public ExtensionScheme clone()

      Description copied from interface: `ExtensionScheme`

      Create a cloned copy of this extension scheme.

      Specified by:
        `clone` in interface `ExtensionScheme`
      Overrides:
        `clone` in class `Object`
      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.