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

tv.amwa.maj.meta.impl

## Class RootImpl

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

- All Implemented Interfaces:
    Serializable, Cloneable, MetadataObject, Root

      @MediaClass(uuid1=218169601,
                  uuid2=768,
                  uuid3=0,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="Root",
                  symbol="Root",
                  description="Represents the logical association of the definitions of the extensions used in a file with the structural and descriptive metadata in the file.",
                  namespace="http://www.smpte-ra.org/schemas/2001-2/2007/aaf",
                  prefix="aaf")
      public class RootImpl
      extends Object
      implements Root, Cloneable, Serializable, MetadataObject

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RootImpl()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRootExtension(ExtensionScheme extensionScheme)` Add an extension scheme to the set of extension schemes used for this file.
    `void` | `clearRootExtensions()` Clear all the root extension schemes for the file.
    `Root` | `clone()` Create a cloned copy of this root.
    `boolean` | `containsRootExtension(AUID extensionSchemeID)` Determines if the root contains the given extension scheme identifier, indicating that the corresponding scheme is used in the file.
    `boolean` | `containsRootExtension(ExtensionScheme extensionScheme)` Determines if the root contains the given extension scheme, indicating that the scheme is used in the file.
    `boolean` | `containsRootExtension(String schemeURI)` Determines if the root contains the given extension scheme from its scheme URI or preferred prefix, indicating that the corresponding scheme is used in the file.
    `int` | `countRootExtensions()` Returns the number of extension schemes attached to the file.
    `Set<ExtensionScheme>` | `getRootExtensions()` Returns the set of extension schemes that are used for this file.
    `int` | `getRootFormatVersion()` Returns the simple integer version number of meta model.
    `Preface` | `getRootPreface()` Returns the preface of the file.
    `boolean` | `removeRootExtension(AUID extensionScheme)` Remove the identified extension scheme from the set of extension schemes of this file.
    `boolean` | `removeRootExtension(ExtensionScheme extensionScheme)` Remove the given extension scheme from the set of extension schemes of this file.
    `void` | `setRootFormatVersion(Integer rootFormatVerison)` Sets the simple integer version number of meta model.
    `void` | `setRootPreface(Preface preface)` Sets the preface of the file.

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

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

- - ### Constructor Detail

    - #### RootImpl

          public RootImpl()

  - ### Method Detail

    - #### getRootPreface

          @MediaProperty(uuid1=100729095,
                         uuid2=5888,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,10},
                         definedName="RootPreface",
                         aliases="Preface",
                         typeName="PrefaceStrongReference",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=2,
                         symbol="RootPreface",
                         description="Preface of the file.")
          public Preface getRootPreface()

      Description copied from interface: `Root`

      Returns the preface of the file.

      Specified by:
        `getRootPreface` in interface `Root`
      Returns:
        Preface of the file.

    - #### setRootPreface

          @MediaPropertySetter(value="RootPreface")
          public void setRootPreface(Preface preface)
                                                                        throws NullPointerException

      Description copied from interface: `Root`

      Sets the preface of the file.

      Specified by:
        `setRootPreface` in interface `Root`
      Parameters:
        `preface` - Preface of the file.
      Throws:
        `NullPointerException` - Cannot set the preface of the file using a `null` value.

    - #### getRootExtensions

          @MediaProperty(uuid1=100729095,
                         uuid2=6656,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,13},
                         definedName="RootExtensions",
                         aliases="RootExtensionSchemes",
                         typeName="ExtensionSchemeStrongReferenceSet",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=35,
                         symbol="RootExtensions",
                         description="Set of extension schemes that are used for this file. The extension schemes represent meta definitions that are not contained in the AAF baseline.")
          public Set<ExtensionScheme> getRootExtensions()

      Description copied from interface: `Root`

      Returns the set of extension schemes that are used for this file. The extension schemes represent meta definitions that are not contained in the AAF baseline.

      Specified by:
        `getRootExtensions` in interface `Root`
      Returns:
        Set of extension schemes that are used for this file.
      See Also:
        `ApplicationPluginObject.getApplicationScheme()`, `DescriptiveMarker.getDescriptiveMetadataScheme()`, `InterchangeObject.getApplicationPlugins()`, `Preface.getDescriptiveSchemes()`

    - #### addRootExtension

          @MediaSetAdd(value="RootExtensions")
          public void addRootExtension(ExtensionScheme extensionScheme)

      Description copied from interface: `Root`

      Add an extension scheme to the set of extension schemes used for this file.

      Specified by:
        `addRootExtension` in interface `Root`
      Parameters:
        `extensionScheme` - Extension scheme to add.
      See Also:
        `Root.getRootExtensions()`

    - #### clearRootExtensions

          @MediaPropertyClear(value="RootExtensions")
          public void clearRootExtensions()

      Description copied from interface: `Root`

      Clear all the root extension schemes for the file.

      Specified by:
        `clearRootExtensions` in interface `Root`
      See Also:
        `Root.getRootExtensions()`

    - #### containsRootExtension

          @MediaPropertyContains(value="RootExtensions")
          public boolean containsRootExtension(ExtensionScheme extensionScheme)
                                                                                       throws NullPointerException

      Description copied from interface: `Root`

      Determines if the root contains the given extension scheme, indicating that the scheme is used in the file.

      Specified by:
        `containsRootExtension` in interface `Root`
      Parameters:
        `extensionScheme` - Extension scheme to check for.
      Returns:
        Is the given extension scheme contained in the root of the file?
      Throws:
        `NullPointerException` - Cannot check for a root using a `null` value.
      See Also:
        `Root.containsRootExtension(AUID)`, `Root.containsRootExtension(String)`, `Root.getRootExtensions()`

    - #### containsRootExtension

          public boolean containsRootExtension(AUID extensionSchemeID)
                                        throws NullPointerException

      Description copied from interface: `Root`

      Determines if the root contains the given extension scheme identifier, indicating that the corresponding scheme is used in the file.

      Specified by:
        `containsRootExtension` in interface `Root`
      Returns:
        Is the identified extension scheme contained in the root of the file?
      Throws:
        `NullPointerException` - Cannot check for a root using a `null` value.
      See Also:
        `Root.containsRootExtension(ExtensionScheme)`, `Root.containsRootExtension(String)`, `Root.getRootExtensions()`, `ExtensionScheme.getSchemeID()`

    - #### containsRootExtension

          public boolean containsRootExtension(String schemeURI)
                                        throws NullPointerException

      Description copied from interface: `Root`

      Determines if the root contains the given extension scheme from its scheme URI or preferred prefix, indicating that the corresponding scheme is used in the file.

      Specified by:
        `containsRootExtension` in interface `Root`
      Parameters:
        `schemeURI` - Namespace URI or preferred prefix of the extension scheme to check for.
      Returns:
        Is the identified extension scheme contained in the root of the file?
      Throws:
        `NullPointerException` - Cannot check for a root using a `null` value.
      See Also:
        `Root.containsRootExtension(ExtensionScheme)`, `Root.containsRootExtension(AUID)`, `Root.getRootExtensions()`, `ExtensionScheme.getSchemeURI()`, `ExtensionScheme.getPreferredPrefix()`

    - #### countRootExtensions

          @MediaPropertyCount(value="RootExtensions")
          public int countRootExtensions()

      Description copied from interface: `Root`

      Returns the number of extension schemes attached to the file.

      Specified by:
        `countRootExtensions` in interface `Root`
      Returns:
        Number of extension schemes attached to the file.
      See Also:
        `Root.getRootExtensions()`

    - #### removeRootExtension

          @MediaPropertyRemove(value="RootExtensions")
          public boolean removeRootExtension(ExtensionScheme extensionScheme)
                                                                                   throws NullPointerException

      Description copied from interface: `Root`

      Remove the given extension scheme from the set of extension schemes of this file.

      Specified by:
        `removeRootExtension` in interface `Root`
      Parameters:
        `extensionScheme` - Extension scheme to remove from this file.
      Returns:
        Has the extension scheme been successfully removed from this file? Returns `false` if the extension scheme was not contained.
      Throws:
        `NullPointerException` - Cannot remove an extension scheme using a `null` value.
      See Also:
        `Root.removeRootExtension(AUID)`, `Root.getRootExtensions()`

    - #### removeRootExtension

          public boolean removeRootExtension(AUID extensionScheme)
                                      throws NullPointerException

      Description copied from interface: `Root`

      Remove the identified extension scheme from the set of extension schemes of this file.

      Specified by:
        `removeRootExtension` in interface `Root`
      Parameters:
        `extensionScheme` - Identifier for the extension scheme to remove from this file.
      Returns:
        Has the extension scheme been successfully removed from this file? Returns `false` if the extension scheme was not contained.
      Throws:
        `NullPointerException` - Cannot remove an extension scheme using a `null` value.
      See Also:
        `Root.removeRootExtension(ExtensionScheme)`, `Root.getRootExtensions()`

    - #### getRootFormatVersion

          @MediaProperty(uuid1=100729095,
                         uuid2=6400,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,10},
                         definedName="RootFormatVersion",
                         typeName="UInt32",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=34,
                         symbol="RootFormatVersion",
                         description="Simple integer version number of meta model. If present, this optional property shall be 12h (18) or greater.")
           @UInt32
          public int getRootFormatVersion()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                throws PropertyNotPresentException

      Description copied from interface: `Root`

      Returns the simple integer version number of meta model. If present, this optional property shall be 12h or greater.

      Specified by:
        `getRootFormatVersion` in interface `Root`
      Returns:
        Simple integer version number of meta model.
      Throws:
        `PropertyNotPresentException` - The optional root format version property is not present for this root.

    - #### setRootFormatVersion

          @MediaPropertySetter(value="RootFormatVersion")
          public void setRootFormatVersion(@UInt32
                                                                                           Integer rootFormatVerison)
                                                                                    throws IllegalArgumentException

      Description copied from interface: `Root`

      Sets the simple integer version number of meta model. If present, this optional property shall be 12h or greater.

      Specified by:
        `setRootFormatVersion` in interface `Root`
      Parameters:
        `rootFormatVerison` - Simple integer version number of meta model.
      Throws:
        `IllegalArgumentException` - Cannot set the root format version to a value less than 12h (18).

    - #### clone

          public Root clone()

      Description copied from interface: `Root`

      Create a cloned copy of this root.

      Specified by:
        `clone` in interface `Root`
      Overrides:
        `clone` in class `Object`
      Returns:
        Cloned copy of this root.

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