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

tv.amwa.maj.record

## Enum MaterialNumberGeneration

- java.lang.Object
- - java.lang.Enum<MaterialNumberGeneration>
  - - tv.amwa.maj.record.MaterialNumberGeneration

- All Implemented Interfaces:
    Serializable, Comparable<MaterialNumberGeneration>

      public enum MaterialNumberGeneration
      extends Enum<MaterialNumberGeneration>

  Describes the method used to generate the material number part of a UMID, which form the last 16 bytes of a UMID value. The techniques represented by this enumeration are defined in appendix A of SMPTE 330M. The kind of material number generation can be specified when creating a UMID with the UMID factory methods.

  To find the corresponding byte value of the material number generation type, call `getMethodCode()`. The static method `generationMethodFromCode(byte)` converts the byte value code into a value of this enumeration.

  The material number generation method is encoded within a UMID value. Call `PackageID.getMaterialNumberGenerator()` to find out the kind of instance number generation in use.

  See Also:
    `Forge.generatePackageID(tv.amwa.maj.enumeration.MaterialType, InstanceNumberGeneration, MaterialNumberGeneration)`, `Forge.generatePackageID(tv.amwa.maj.enumeration.MaterialType, InstanceNumberGeneration, MaterialNumberGeneration, AUID)`, `Forge.generatePackageID(tv.amwa.maj.enumeration.MaterialType, InstanceNumberGeneration, MaterialNumberGeneration, byte[])`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `IEEE1394` Material number generation method specified by the IEEE 1394 network method, including the current date, time and an 8 byte system identifier.
    `Masked` Masked SMPTE material number generation method based on the SMPTE method, obscuring the details of data using a MD5 hashing function to hide secure information.
    `NotDefined` Material number generation method is not defined.
    `SMPTE` SMPTE material number generation method that uses the system clock, current date, a a 2-byte random number and a 6 byte system identifier.
    `UUID_UL` SMPTE material number generation methods that uses a given UUID/UL value to define the material number.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MaterialNumberGeneration` | `generationMethodFromCode(byte code)` Converts a numeric code for a material number generation type into a value of this enumeration, as defined in table 3 of SMPTE 330M.
    `byte` | `getMethodCode()` Returns the numeric code for the material number generation type, as defined in table 3 of SMPTE 330M.
    `static MaterialNumberGeneration` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static MaterialNumberGeneration[]` | `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`

- - ### Enum Constant Detail

    - #### NotDefined

          public static final MaterialNumberGeneration NotDefined

      Material number generation method is not defined. In this case, the MAJ API generates a completely random UMID from 128 bits of random data.

    - #### SMPTE

          public static final MaterialNumberGeneration SMPTE

      SMPTE material number generation method that uses the system clock, current date, a a 2-byte random number and a 6 byte system identifier.

      See Also:
        `Masked`

    - #### UUID_UL

          public static final MaterialNumberGeneration UUID_UL

      SMPTE material number generation methods that uses a given UUID/UL value to define the material number.

    - #### Masked

          public static final MaterialNumberGeneration Masked

      Masked SMPTE material number generation method based on the SMPTE method, obscuring the details of data using a MD5 hashing function to hide secure information.

      See Also:
        `SMPTE`

    - #### IEEE1394

          public static final MaterialNumberGeneration IEEE1394

      Material number generation method specified by the IEEE 1394 network method, including the current date, time and an 8 byte system identifier.

  - ### Method Detail

    - #### values

          public static MaterialNumberGeneration[] 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 (MaterialNumberGeneration c : MaterialNumberGeneration.values())
              System.out.println(c);

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

    - #### valueOf

          public static MaterialNumberGeneration 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

    - #### getMethodCode

          public byte getMethodCode()

      Returns the numeric code for the material number generation type, as defined in table 3 of SMPTE 330M.

      Returns:
        Byte value associated with material number generation type.

    - #### generationMethodFromCode

          public static final MaterialNumberGeneration generationMethodFromCode(byte code)

      Converts a numeric code for a material number generation type into a value of this enumeration, as defined in table 3 of SMPTE 330M.

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

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