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

tv.amwa.maj.meta

## Interface Root

- All Superinterfaces:
    MetadataObject
  All Known Implementing Classes:
    RootImpl

      public interface Root
      extends MetadataObject

  Represents the logical association of the definitions of the extensions used in a file with the structural and descriptive metadata in the file.

  See Also:
    `ExtensionScheme`, `Preface`

- - ### Method Summary

    All Methods Instance Methods Abstract 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.

- - ### Method Detail

    - #### getRootPreface

          Preface getRootPreface()

      Returns the preface of the file.

      Returns:
        Preface of the file.

    - #### setRootPreface

          void setRootPreface(Preface preface)
                       throws NullPointerException

      Sets the preface of the file.

      Parameters:
        `preface` - Preface of the file.
      Throws:
        `NullPointerException` - Cannot set the preface of the file using a `null` value.

    - #### getRootExtensions

          Set<ExtensionScheme> getRootExtensions()

      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.

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

    - #### addRootExtension

          void addRootExtension(ExtensionScheme extensionScheme)

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

      Parameters:
        `extensionScheme` - Extension scheme to add.
      See Also:
        `getRootExtensions()`

    - #### containsRootExtension

          boolean containsRootExtension(ExtensionScheme extensionScheme)
                                 throws NullPointerException

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

      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:
        `containsRootExtension(AUID)`, `containsRootExtension(String)`, `getRootExtensions()`

    - #### containsRootExtension

          boolean containsRootExtension(AUID extensionSchemeID)
                                 throws NullPointerException

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

      Parameters:
        `extensionScheme` - Identifier for 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:
        `containsRootExtension(ExtensionScheme)`, `containsRootExtension(String)`, `getRootExtensions()`, `ExtensionScheme.getSchemeID()`

    - #### containsRootExtension

          boolean containsRootExtension(String schemeURI)
                                 throws NullPointerException

      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.

      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:
        `containsRootExtension(ExtensionScheme)`, `containsRootExtension(AUID)`, `getRootExtensions()`, `ExtensionScheme.getSchemeURI()`, `ExtensionScheme.getPreferredPrefix()`

    - #### clearRootExtensions

          void clearRootExtensions()

      Clear all the root extension schemes for the file.

      See Also:
        `getRootExtensions()`

    - #### countRootExtensions

          int countRootExtensions()

      Returns the number of extension schemes attached to the file.

      Returns:
        Number of extension schemes attached to the file.
      See Also:
        `getRootExtensions()`

    - #### removeRootExtension

          boolean removeRootExtension(ExtensionScheme extensionScheme)
                               throws NullPointerException

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

      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:
        `removeRootExtension(AUID)`, `getRootExtensions()`

    - #### removeRootExtension

          boolean removeRootExtension(AUID extensionScheme)
                               throws NullPointerException

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

      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:
        `removeRootExtension(ExtensionScheme)`, `getRootExtensions()`

    - #### getRootFormatVersion

          @UInt32
          int getRootFormatVersion()
                                    throws PropertyNotPresentException

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

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

    - #### setRootFormatVersion

          void setRootFormatVersion(@UInt32
                                    Integer rootFormatVerison)
                             throws IllegalArgumentException

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

      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

          Root clone()

      Create a cloned copy of this root.

      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.