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

tv.amwa.maj.model.impl

## Class ApplicationObjectImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.ApplicationObjectImpl

- All Implemented Interfaces:
    Serializable, Cloneable, MediaEntity, MetadataObject, XMLSerializable, ApplicationObject, InterchangeObject
  Direct Known Subclasses:
    ApplicationPluginObjectImpl, ApplicationReferencedObjectImpl

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=26112,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="ApplicationObject",
                  symbol="ApplicationObject",
                  description="Common properties of application plugin objects and application referenced objects. These classes provide the mechanism to decorate interchange objects with application-specific extension metadata.")
      public abstract class ApplicationObjectImpl
      extends InterchangeObjectImpl
      implements ApplicationObject, Cloneable, Serializable, XMLSerializable

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApplicationObjectImpl()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendXMLChildren(Node parent)` Append extra child elements to the given parent node to serialize the value of an object to an XML fragment.
    `void` | `clearExtensionProperties()` Clear all extension properties from this application object, effectively omitting them all.
    `ApplicationObject` | `clone()` Create a cloned copy of this interchange object.
    `int` | `countExtensionProperties()` Returns the number of extension properties that are present for this application object.
    `abstract ExtensionScheme` | `getApplicationScheme()`
    `ClassDefinition` | `getBaseClass()` Returns the class identifier of the immediate superclass that this object extends.
    `PropertyValue` | `getExtensionProperty(AUID propertyID)` Get the value of an extension property by its property identifier.
    `PropertyValue` | `getExtensionProperty(String propertyName)` Get the value of an extension property by its property name.
    `Set<AUID>` | `getExtensionPropertyIDs()` Returns the set of extension property identifiers for present properties of this application object.
    `SortedMap<? extends PropertyDefinition,? extends PropertyValue>` | `getProperties()` Creates a map of all present property definitions of this application object and their current values.
    `boolean` | `isExtensionPropertyPresent(AUID propertyID)` Determines whether the given property identifier is for a present property of the application object.
    `boolean` | `isExtensionPropertyPresent(String propertyName)` Determines whether the given property name is for a present property of the application object.
    `void` | `putExtensionProperty(AUID propertyID, PropertyValue propertyValue)` Put an extension property value into this application object by property identifier, either creating the property the property and making it present, or updating its value.
    `void` | `putExtensionProperty(String propertyName, PropertyValue propertyValue)` Put an extension property value into this application object by property name, either creating the property the property and making it present, or updating its value.
    `void` | `setBaseClass(ClassDefinition baseClass)` Sets the class identifier of the immediate superclass that this object extends.

    - ### Methods inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getComment, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toString`

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

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

    - ### Methods inherited from interface tv.amwa.maj.model.InterchangeObject

      `addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toString`

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

      `getPersistentID, setPersistentIndex`

    - ### Methods inherited from interface tv.amwa.maj.io.xml.XMLSerializable

      `getComment`

- - ### Constructor Detail

    - #### ApplicationObjectImpl

          public ApplicationObjectImpl()

  - ### Method Detail

    - #### getBaseClass

          @MediaProperty(uuid1=100729092,
                         uuid2=267,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,12},
                         definedName="BaseClass",
                         typeName="ClassDefinitionWeakReference",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         symbol="BaseClass",
                         description="Class of the immediate superclass that this object extends.")
          public ClassDefinition getBaseClass()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             throws PropertyNotPresentException

      Description copied from interface: `ApplicationObject`

      Returns the class identifier of the immediate superclass that this object extends. This is an optional property.

      Specified by:
        `getBaseClass` in interface `ApplicationObject`
      Returns:
        Class identifier of the immediate superclass that this object extends.
      Throws:
        `PropertyNotPresentException` - The optional base class property is not present for this application object.
      See Also:
        `InterchangeObject.getObjectClass()`

    - #### setBaseClass

          @MediaPropertySetter(value="BaseClass")
          public void setBaseClass(ClassDefinition baseClass)

      Description copied from interface: `ApplicationObject`

      Sets the class identifier of the immediate superclass that this object extends. Set this optional property to `null` to omit it.

      Specified by:
        `setBaseClass` in interface `ApplicationObject`
      Parameters:
        `baseClass` - Class identifier of the immediate superclass that this object extends.
      See Also:
        `InterchangeObject.setObjectClass(ClassDefinition)`

    - #### getExtensionPropertyIDs

          public Set<AUID> getExtensionPropertyIDs()

      Description copied from interface: `ApplicationObject`

      Returns the set of extension property identifiers for present properties of this application object. This set can be used to iterate through all of the property values with `ApplicationObject.getExtensionProperty(AUID)`.

      Specified by:
        `getExtensionPropertyIDs` in interface `ApplicationObject`
      Returns:
        Set of property identifiers for present properties of this application object.

    - #### clearExtensionProperties

          public void clearExtensionProperties()

      Description copied from interface: `ApplicationObject`

      Clear all extension properties from this application object, effectively omitting them all.

      Specified by:
        `clearExtensionProperties` in interface `ApplicationObject`

    - #### countExtensionProperties

          public int countExtensionProperties()

      Description copied from interface: `ApplicationObject`

      Returns the number of extension properties that are present for this application object.

      Specified by:
        `countExtensionProperties` in interface `ApplicationObject`
      Returns:
        Number of extension properties that are present for this application object.

    - #### getExtensionProperty

          public PropertyValue getExtensionProperty(AUID propertyID)
                                             throws NullPointerException,
                                                    PropertyNotPresentException,
                                                    IllegalArgumentException

      Description copied from interface: `ApplicationObject`

      Get the value of an extension property by its property identifier.

      Specified by:
        `getExtensionProperty` in interface `ApplicationObject`
      Parameters:
        `propertyID` - Identifier of the extension property to retrieve the value of.
      Returns:
        Value of the extension property with the given identifier.
      Throws:
        `NullPointerException` - Cannot retrieve an extension property using a `null` identifier.
        `PropertyNotPresentException` - The given property identifier is not present for this application object.
        `IllegalArgumentException` - The given property identifier is not known in the extension scheme.
      See Also:
        `ApplicationObject.getExtensionProperty(String)`, `ApplicationObject.putExtensionProperty(String, PropertyValue)`

    - #### getExtensionProperty

          public PropertyValue getExtensionProperty(String propertyName)
                                             throws NullPointerException,
                                                    PropertyNotPresentException,
                                                    IllegalArgumentException

      Description copied from interface: `ApplicationObject`

      Get the value of an extension property by its property name.

      Specified by:
        `getExtensionProperty` in interface `ApplicationObject`
      Parameters:
        `propertyName` - Name of the extension property to retrieve the value of.
      Returns:
        Value of the extension property with the given identifier.
      Throws:
        `NullPointerException` - Cannot retrieve an extension property using a `null` name.
        `PropertyNotPresentException` - The given property name is not present for this application object.
        `IllegalArgumentException` - The given property identifier is not known in the extension scheme.
      See Also:
        `ApplicationObject.getExtensionProperty(AUID)`, `ApplicationObject.putExtensionProperty(String, PropertyValue)`

    - #### isExtensionPropertyPresent

          public boolean isExtensionPropertyPresent(AUID propertyID)
                                             throws NullPointerException,
                                                    IllegalArgumentException

      Description copied from interface: `ApplicationObject`

      Determines whether the given property identifier is for a present property of the application object. A property is present when it exists in the extension properties and its value is not `null`.

      Specified by:
        `isExtensionPropertyPresent` in interface `ApplicationObject`
      Parameters:
        `propertyID` - Property identifier to check if the property is present.
      Returns:
        Is the property present for this application object?
      Throws:
        `NullPointerException` - Cannot check for the presence of a property using a `null` identifier.
        `IllegalArgumentException` - The given property identifier does not match one known in the associated extension scheme.
      See Also:
        `ApplicationObject.isExtensionPropertyPresent(String)`, `ApplicationObject.getExtensionProperty(AUID)`

    - #### isExtensionPropertyPresent

          public boolean isExtensionPropertyPresent(String propertyName)
                                             throws NullPointerException,
                                                    IllegalArgumentException

      Description copied from interface: `ApplicationObject`

      Determines whether the given property name is for a present property of the application object. A property is present when it exists in the extension properties and its value is not `null`.

      Specified by:
        `isExtensionPropertyPresent` in interface `ApplicationObject`
      Parameters:
        `propertyName` - Property identifier to check if the property is present.
      Returns:
        Is the property present for this application object?
      Throws:
        `NullPointerException` - Cannot check for the presence of a property using a `null` identifier.
        `IllegalArgumentException` - The given property identifier does not match one known in the associated extension scheme.
      See Also:
        `ApplicationObject.isExtensionPropertyPresent(AUID)`, `ApplicationObject.getExtensionProperty(String)`

    - #### putExtensionProperty

          public void putExtensionProperty(AUID propertyID,
                                           PropertyValue propertyValue)
                                    throws IllegalArgumentException,
                                           NullPointerException,
                                           IllegalPropertyValueException

      Description copied from interface: `ApplicationObject`

      Put an extension property value into this application object by property identifier, either creating the property the property and making it present, or updating its value. The property should be within the context of the defined extension scheme.

      Note that the property value cannot itself be `null` but the value it wraps may be `null`, depending on the type and property definition. Property values can be created with the `TypeDefinition.createValue(Object)` method.

      Specified by:
        `putExtensionProperty` in interface `ApplicationObject`
      Parameters:
        `propertyID` - Identifier of the property to add or update.
        `propertyValue` - Value of the property to update.
      Throws:
        `IllegalArgumentException` - The given property identifier is not found within an appropriate context.
        `NullPointerException` - One or both of the property identifier or value is/are `null`.
        `IllegalPropertyValueException` - The given property value does not match the type defined for the property.
      See Also:
        `ApplicationObject.putExtensionProperty(String, PropertyValue)`, `ApplicationObject.getExtensionProperty(AUID)`

    - #### putExtensionProperty

          public void putExtensionProperty(String propertyName,
                                           PropertyValue propertyValue)
                                    throws IllegalArgumentException,
                                           NullPointerException,
                                           IllegalPropertyValueException

      Description copied from interface: `ApplicationObject`

      Put an extension property value into this application object by property name, either creating the property the property and making it present, or updating its value. The property should be within the context of the defined extension scheme.

      Note that the property value cannot itself be `null` but the value it wraps may be `null`, depending on the type and property definition. Property values can be created with the `TypeDefinition.createValue(Object)` method.

      Specified by:
        `putExtensionProperty` in interface `ApplicationObject`
      Parameters:
        `propertyName` - Identifier of the property to add or update.
        `propertyValue` - Value of the property to update.
      Throws:
        `IllegalArgumentException` - The given property identifier is not known in the extension scheme.
        `NullPointerException` - One or both of the property identifier or value is/are `null`.
        `IllegalPropertyValueException` - The given property value does not match the type defined for the property.
      See Also:
        `ApplicationObject.putExtensionProperty(AUID, PropertyValue)`, `ApplicationObject.getExtensionProperty(String)`

    - #### getApplicationScheme

          public abstract ExtensionScheme getApplicationScheme()

    - #### getProperties

          public SortedMap<? extends PropertyDefinition,? extends PropertyValue> getProperties()

      Description copied from interface: `ApplicationObject`

      Creates a map of all present property definitions of this application object and their current values.

      Specified by:
        `getProperties` in interface `ApplicationObject`
      Returns:
        All present property definitions of this object mapped to their values.

    - #### appendXMLChildren

          public void appendXMLChildren(Node parent)

      Description copied from interface: `XMLSerializable`

      Append extra child elements to the given parent node to serialize the value of an object to an XML fragment. Methods of the `XMLBuilder` class are provided to help with this process.

      Specified by:
        `appendXMLChildren` in interface `XMLSerializable`
      Overrides:
        `appendXMLChildren` in class `InterchangeObjectImpl`
      Parameters:
        `parent` - XML parent element to append child nodes to.

    - #### clone

          public ApplicationObject clone()

      Description copied from interface: `InterchangeObject`

      Create a cloned copy of this interchange object.

      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `ApplicationObject`
      Specified by:
        `clone` in interface `InterchangeObject`
      Overrides:
        `clone` in class `InterchangeObjectImpl`
      Returns:
        Cloned copy of this interchange object.

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