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

tv.amwa.maj.enumeration

## Enum MaterialType

- java.lang.Object
- - java.lang.Enum<MaterialType>
  - - tv.amwa.maj.enumeration.MaterialType

- All Implemented Interfaces:
    Serializable, Comparable<MaterialType>, MediaEnumerationValue

      public enum MaterialType
      extends Enum<MaterialType>
      implements MediaEnumerationValue

  Identifies the material type of content according the the SMPTE UMID specification SMPTE S330M. Elements of the enumeration are taken from table 2 in section 5.1.1.1.

  To find the corresponding byte value of the given material type identifier, call `getMaterialTypeCode()`. The static method `materialTypeFromCode(byte)` converts the byte value code into a value of this enumeration.

  See Also:
    `PackageID`, `PackageIDType`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `Audio` Deprecated. Use `SingleAudio` or `TwoAudiosOrMore` instead.
    `Data` Deprecated. Use `SingleAuxilary` or `TwoAuxilarysOrMore` instead.
    `MixedGroup` Mixed group of components in a single container.
    `NotIdentified` Material type is not identified.
    `Other` Deprecated. Use `NotIdentified` instead.
    `Picture` Deprecated. Use `SinglePicture` or `TwoPicturesOrMore` instead.
    `SingleAudio` Single audio component.
    `SingleAuxilary` Single auxiliary (or data) component.
    `SinglePicture` Single picture component.
    `TwoAudiosOrMore` Two or more audio components in a single container.
    `TwoAuxilarysOrMore` Two or more auxiliary (or data) components in a single container.
    `TwoPicturesOrMore` Two or more picture components in a single container.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte` | `getMaterialTypeCode()` Returns the byte value of the material type, as defined in table 2 of SMPTE S330M.
    `static MaterialType` | `materialTypeFromCode(byte code)` Converts a byte code for a material type into a value of this enumeration, as defined in table 2 of SMPTE S330M.
    `String` | `symbol()` Provides a name for the enumeration value that can be used in XML serialisation.
    `long` | `value()` Returns the unique integer value associated with an enumeration value, either according to the AAF specification and/or the current AAF meta dictionary.
    `static MaterialType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static MaterialType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

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

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

      `name`

- - ### Enum Constant Detail

    - #### Picture

          @Deprecated
          public static final MaterialType Picture

      Deprecated. Use `SinglePicture` or `TwoPicturesOrMore` instead.

      Picture material (deprecated).

    - #### Audio

          public static final MaterialType Audio

      Deprecated. Use `SingleAudio` or `TwoAudiosOrMore` instead.

      Audio material (deprecated).

    - #### Data

          public static final MaterialType Data

      Deprecated. Use `SingleAuxilary` or `TwoAuxilarysOrMore` instead.

      Data material (deprecated).

    - #### Other

          public static final MaterialType Other

      Deprecated. Use `NotIdentified` instead.

      Other material (deprecated).

    - #### SinglePicture

          public static final MaterialType SinglePicture

      Single picture component. For example, Y component.

    - #### TwoPicturesOrMore

          public static final MaterialType TwoPicturesOrMore

      Two or more picture components in a single container. For example, interleaved Y, Cb and Cr components.

    - #### SingleAudio

          public static final MaterialType SingleAudio

      Single audio component. For example, mono audio.

    - #### TwoAudiosOrMore

          public static final MaterialType TwoAudiosOrMore

      Two or more audio components in a single container. For example, AES3 audio pair.

    - #### SingleAuxilary

          public static final MaterialType SingleAuxilary

      Single auxiliary (or data) component. For example, sub-titles only.

    - #### TwoAuxilarysOrMore

          public static final MaterialType TwoAuxilarysOrMore

      Two or more auxiliary (or data) components in a single container. For example, multiple sub-titles streams in different languages.

    - #### MixedGroup

          public static final MaterialType MixedGroup

      Mixed group of components in a single container. For example, video & stereo audio pair.

    - #### NotIdentified

          public static final MaterialType NotIdentified

      Material type is not identified.

  - ### Method Detail

    - #### values

          public static MaterialType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (MaterialType c : MaterialType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static MaterialType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getMaterialTypeCode

          public byte getMaterialTypeCode()

      Returns the byte value of the material type, as defined in table 2 of SMPTE S330M.

      Returns:
        Byte value associated with the material type.

    - #### materialTypeFromCode

          public static final MaterialType materialTypeFromCode(byte code)

      Converts a byte code for a material type into a value of this enumeration, as defined in table 2 of SMPTE S330M.

      Parameters:
        `code` - Code to convert to an enumeration value.
      Returns:
        Enumeration value corresponding to the given code, or `null` if a match could not be found.

    - #### value

          public long value()

      Description copied from interface: `MediaEnumerationValue`

      Returns the unique integer value associated with an enumeration value, either according to the AAF specification and/or the current AAF meta dictionary.

      Specified by:
        `value` in interface `MediaEnumerationValue`
      Returns:
        Unique integer value associated with an enumeration constant.

    - #### symbol

          public String symbol()

      Description copied from interface: `MediaEnumerationValue`

      Provides a name for the enumeration value that can be used in XML serialisation. The name is unique within the namespace of the owning type.

      As an example, the `ChannelStatusModeType` value `ChannelStatusModeType.Fixed` value has the name "`Fixed`" and symbol "`ChannelStatusMode_Fixed`".

      Specified by:
        `symbol` in interface `MediaEnumerationValue`
      Returns:
        Symbol name for this enumeration value.

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