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

tv.amwa.maj.model.impl

## Class DataDefinitionImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.DefinitionObjectImpl
    - - tv.amwa.maj.model.impl.DataDefinitionImpl

- All Implemented Interfaces:
    Serializable, Cloneable, DataDefinitionConstant, MediaEntity, MetadataObject, WeakReferenceTarget, DataDefinition, DefinitionObject, DefinitionType, InterchangeObject

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=6912,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="DataDefinition",
                  description="The DataDefinition class specifies the kind of data that can be stored in a Component.",
                  symbol="DataDefinition")
      public class DataDefinitionImpl
      extends DefinitionObjectImpl
      implements DataDefinition, Serializable, Cloneable, DataDefinitionConstant

  Implements a definition for the kind of data that can be stored in a component.

  See Also:
    `TypeDefinitions.DataDefinitionWeakReference`, `TypeDefinitions.DataDefinitionStrongReference`, `TypeDefinitions.DataDefinitionStrongReferenceSet`, `TypeDefinitions.DataDefinitionWeakReferenceSet`, `TypeDefinitions.DataDefinitionWeakReferenceVector`, Serialized Form

- - ### Field Summary

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

      `ObjectClassPropertyID`

    - ### Fields inherited from interface tv.amwa.maj.constant.DataDefinitionConstant

      `Auxiliary, DataEssence, DescriptiveMetadata, Edgecode, LegacyPicture, LegacySound, LegacyTimecode, Matte, ParsedText, Picture, PictureWithMatte, Sound, Timecode, Unknown`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataDefinitionImpl()`
    `DataDefinitionImpl(AUID identification, String name)` Creates and initializes the required fields of a data definition, which specifies the kind of data that can be stored in a `component`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DataDefinition` | `clone()` Create a cloned copy of this interchange object.
    `static int` | `count()`
    `boolean` | `doesDataDefConvertFrom(DataDefinition dataDef)` Returns `true` if data represented by this type of data definition can be created by converting from the type represented by the given data definition.
    `boolean` | `doesDataDefConvertTo(DataDefinition dataDef)` Returns `true` if the data represented by this data definition can be converted to the data definition given as an argument.
    `static DataDefinition` | `forAUID(AUID identification)`
    `static DataDefinition` | `forIdentification(AUID identification)`
    `static DataDefinition` | `forName(String dataDefinitionName)`
    `String` | `getWeakTargetReference()` Provides a name that can be used to make a weak object reference to an instance of the implementing class.
    `static Collection<String>` | `inventory()`
    `boolean` | `isAuxilaryKind()` Returns `true` if the data definition represents Auxiliary data; otherwise `false`.
    `boolean` | `isDataDefOf(DataDefinition dataDef)` Returns `true` is this data definition matches the data definition provided in the parameter; otherwise `false`.
    `boolean` | `isDescriptiveMetadataKind()` Returns `true` if the data definition represents data that is descriptive metadata; otherwise `false`.
    `boolean` | `isEdgecodeKind()` Returns `true` if the data definition represents data that is a stream of film edge code values; otherwise `false`.
    `boolean` | `isMatteKind()` Returns `true` in the data definition is a matte, in other words a stream of essence that contains an image of alpha values; otherwise `false`.
    `boolean` | `isPictureKind()` Returns `true` is the data definition is a picture only; otherwise returns `false`.
    `boolean` | `isPictureWithMatteKind()` Returns `true` if the data definition is for a picture with a matte; otherwise returns `false`.
    `boolean` | `isSoundKind()` Returns `true` is a data definition corresponds to sound data; otherwise returns false.
    `boolean` | `isTimecodeKind()` Returns `true` if the data definition represents data that is a stream of tape timecode values; otherwise `false`.
    `static boolean` | `registerDataDefinition(DataDefinition definedDataDefinition)`
    `static int` | `registerDataDefinitionsFromClass(Class<?> classWithDataDefinitions)`

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

      `getAUID, getDefinitionObjectIdentificationString, getDescription, getLocalizedUID, getName, initializeDefinitionObjectIdentification, initializeDefinitionObjectName, setAUID, setDefinitionObjectIdentificationString, setDescription, setLocalizedUID, setName`

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

      `addApplicationPlugin, appendXMLChildren, 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.DefinitionObject

      `getAUID, getDescription, getName, setDescription, setName`

    - ### 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`

- - ### Constructor Detail

    - #### DataDefinitionImpl

          public DataDefinitionImpl()

    - #### DataDefinitionImpl

          public DataDefinitionImpl(AUID identification,
                                    @AAFString
                                    String name)
                             throws NullPointerException

      Creates and initializes the required fields of a data definition, which specifies the kind of data that can be stored in a `component`.

      Parameters:
        `identification` - Unique identifier for the data definition.
        `name` - Name for the data definition.
      Throws:
        `NullPointerException` - One or both of the arguments is `null`.

  - ### Method Detail

    - #### registerDataDefinitionsFromClass

          public static final int registerDataDefinitionsFromClass(Class<?> classWithDataDefinitions)
                                                            throws NullPointerException

      Throws:
        `NullPointerException`

    - #### registerDataDefinition

          public static final boolean registerDataDefinition(DataDefinition definedDataDefinition)
                                                      throws NullPointerException

      Throws:
        `NullPointerException`

    - #### forName

          public static final DataDefinition forName(String dataDefinitionName)
                                              throws NullPointerException

      Throws:
        `NullPointerException`

    - #### forIdentification

          public static final DataDefinition forIdentification(AUID identification)
                                                        throws NullPointerException

      Throws:
        `NullPointerException`

    - #### forAUID

          public static final DataDefinition forAUID(AUID identification)
                                              throws NullPointerException

      Throws:
        `NullPointerException`

    - #### inventory

          public static final Collection<String> inventory()

    - #### count

          public static final int count()

    - #### doesDataDefConvertFrom

          public boolean doesDataDefConvertFrom(DataDefinition dataDef)
                                         throws NullPointerException

      Description copied from interface: `DataDefinition`

      Returns `true` if data represented by this type of data definition can be created by converting from the type represented by the given data definition. Matching takes place based on the `name property` of the given data definition.

      Specified by:
        `doesDataDefConvertFrom` in interface `DataDefinition`
      Parameters:
        `dataDef` - Data definition of the type of data to be converted from.
      Returns:
        Can data of the type represented by the given data definition be converted to data of the type represented by this data definition?
      Throws:
        `NullPointerException` - Argument is null.

    - #### doesDataDefConvertTo

          public boolean doesDataDefConvertTo(DataDefinition dataDef)
                                       throws NullPointerException

      Description copied from interface: `DataDefinition`

      Returns `true` if the data represented by this data definition can be converted to the data definition given as an argument. Matching takes place passed on the name property of the data definition.

      Specified by:
        `doesDataDefConvertTo` in interface `DataDefinition`
      Parameters:
        `dataDef` - Data definition to compare this data definition with.
      Returns:
        Can data associated with this data definition be converted into data associated by the given data definition?
      Throws:
        `NullPointerException` - The given data definition is `null`.

    - #### isAuxilaryKind

          public boolean isAuxilaryKind()

      Description copied from interface: `DataDefinition`

      Returns `true` if the data definition represents Auxiliary data; otherwise `false`.

      Specified by:
        `isAuxilaryKind` in interface `DataDefinition`
      Returns:
        Does the data definition represent data of an auxiliary kind?
      See Also:
        `DataDefinitionConstant.Auxiliary`

    - #### isDataDefOf

          public boolean isDataDefOf(DataDefinition dataDef)
                              throws NullPointerException

      Description copied from interface: `DataDefinition`

      Returns `true` is this data definition matches the data definition provided in the parameter; otherwise `false`. Matching takes place using the name property of the definition.

      Specified by:
        `isDataDefOf` in interface `DataDefinition`
      Parameters:
        `dataDef` - Data definition to compare with.
      Returns:
        Does this data definition match the given one?
      Throws:
        `NullPointerException` - The given data definition is `null`.

    - #### isDescriptiveMetadataKind

          public boolean isDescriptiveMetadataKind()

      Description copied from interface: `DataDefinition`

      Returns `true` if the data definition represents data that is descriptive metadata; otherwise `false`.

      Specified by:
        `isDescriptiveMetadataKind` in interface `DataDefinition`
      Returns:
        Does the data definition represent data that is descriptive metadata?
      See Also:
        `DataDefinitionConstant.DescriptiveMetadata`

    - #### isEdgecodeKind

          public boolean isEdgecodeKind()

      Description copied from interface: `DataDefinition`

      Returns `true` if the data definition represents data that is a stream of film edge code values; otherwise `false`.

      Specified by:
        `isEdgecodeKind` in interface `DataDefinition`
      Returns:
        Does this data definition represent data that is a stream of film edgecode values?
      See Also:
        `DataDefinitionConstant.Edgecode`

    - #### isMatteKind

          public boolean isMatteKind()

      Description copied from interface: `DataDefinition`

      Returns `true` in the data definition is a matte, in other words a stream of essence that contains an image of alpha values; otherwise `false`.

      Specified by:
        `isMatteKind` in interface `DataDefinition`
      Returns:
        Is the data definition related to a matte?
      See Also:
        `DataDefinitionConstant.Matte`

    - #### isPictureKind

          public boolean isPictureKind()

      Description copied from interface: `DataDefinition`

      Returns `true` is the data definition is a picture only; otherwise returns `false`.

      Specified by:
        `isPictureKind` in interface `DataDefinition`
      Returns:
        Does the data definition relate to a picture?
      See Also:
        `DataDefinitionConstant.Picture`

    - #### isPictureWithMatteKind

          public boolean isPictureWithMatteKind()

      Description copied from interface: `DataDefinition`

      Returns `true` if the data definition is for a picture with a matte; otherwise returns `false`. Pictures like this have both picture data alpha values.

      Specified by:
        `isPictureWithMatteKind` in interface `DataDefinition`
      Returns:
        Does the data definition represent data with both a picture and a matte?
      See Also:
        `DataDefinitionConstant.PictureWithMatte`

    - #### isSoundKind

          public boolean isSoundKind()

      Description copied from interface: `DataDefinition`

      Returns `true` is a data definition corresponds to sound data; otherwise returns false.

      Specified by:
        `isSoundKind` in interface `DataDefinition`
      Returns:
        Does the data definition represent sound data?
      See Also:
        `DataDefinitionConstant.Sound`

    - #### isTimecodeKind

          public boolean isTimecodeKind()

      Description copied from interface: `DataDefinition`

      Returns `true` if the data definition represents data that is a stream of tape timecode values; otherwise `false`.

      Specified by:
        `isTimecodeKind` in interface `DataDefinition`
      Returns:
        Does the data definition represent data that is a stream of tape timecode values?
      See Also:
        `DataDefinitionConstant.Timecode`

    - #### clone

          public DataDefinition 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 `DataDefinition`
      Specified by:
        `clone` in interface `DefinitionObject`
      Specified by:
        `clone` in interface `InterchangeObject`
      Overrides:
        `clone` in class `DefinitionObjectImpl`
      Returns:
        Cloned copy of this interchange object.

    - #### 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`
      Overrides:
        `getWeakTargetReference` in class `DefinitionObjectImpl`
      Returns:
        A name to use to make weak reference to this object.

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