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

tv.amwa.maj.record

## Interface EdgeCodeValue

- All Known Implementing Classes:
    EdgeCodeValueImpl

      public interface EdgeCodeValue

  Specifies a value that represents film edge code information. A film edge code is described by a start frame, its edge code format, the film format and an optional header.

  See Also:
    `EdgeCodeSegment`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `EdgeCodeValue` | `clone()` Create a cloned copy of this edgecode value.
    `FilmType` | `getEdgeCodeFilmFormat()` Returns the film format of the edge code.
    `EdgeType` | `getEdgeCodeFormat()` Returns the format of the edge code.
    `byte[]` | `getEdgeCodeHeader()` Returns the text prefix that identifies the film.
    `String` | `getEdgeCodeHeaderAsString()` Returns the text prefix the identifies the film as a string value.
    `long` | `getEdgeCodeStart()` Returns the edge code at the beginning of the corresponding segment.
    `void` | `setEdgeCodeFilmFormat(FilmType filmKind)` Sets the film format for this edge code.
    `void` | `setEdgeCodeFormat(EdgeType codeFormat)` Sets the format of the edge code.
    `void` | `setEdgeCodeHeader(byte[] header)` Sets the text prefix that identifies the film.
    `void` | `setEdgeCodeHeader(String header)` Set the value of the edge code header from the given string.
    `void` | `setEdgeCodeStart(long startFrame)` Sets the edge code at the beginning of the corresponding segment.
    `String` | `toString()` Formats this edgecode value in a pseudo-XML representation that is compatible with the AAF XML schema.

- - ### Method Detail

    - #### getEdgeCodeFormat

          EdgeType getEdgeCodeFormat()

      Returns the format of the edge code.

      Returns:
        Format of the edge code.
      See Also:
        `EdgeType`

    - #### setEdgeCodeFormat

          void setEdgeCodeFormat(EdgeType codeFormat)
                          throws NullPointerException

      Sets the format of the edge code.

      Parameters:
        `codeFormat` - Format of the edge code.
      Throws:
        `NullPointerException` - The given edge code format is `null`.

    - #### getEdgeCodeFilmFormat

          FilmType getEdgeCodeFilmFormat()

      Returns the film format of the edge code.

      Returns:
        Film format for this edge code.
      See Also:
        `FilmType`

    - #### setEdgeCodeFilmFormat

          void setEdgeCodeFilmFormat(FilmType filmKind)
                              throws NullPointerException

      Sets the film format for this edge code.

      Parameters:
        `filmKind` - Film format for this edge code.
      Throws:
        `NullPointerException` - The given film type for the edge code is `null`.

    - #### getEdgeCodeHeader

          @EdgecodeHeader
          byte[] getEdgeCodeHeader()
                                            throws PropertyNotPresentException

      Returns the text prefix that identifies the film. Typically, this is a text string of no more than 8 7-bit ISO characters. This is an optional property.

      Returns:
        Text prefix that identifies the film.
      Throws:
        `PropertyNotPresentException` - The optional header property is not present for this edgecode value.
      See Also:
        `getEdgeCodeHeaderAsString()`

    - #### getEdgeCodeHeaderAsString

          String getEdgeCodeHeaderAsString()
                                    throws PropertyNotPresentException

      Returns the text prefix the identifies the film as a string value. Typically, this is a text string of no more than 8 7-bit ISO characters. This is an optional property.

      Returns:
        Text prefix that identifies the film as a string.
      Throws:
        `PropertyNotPresentException` - The optional header property is not present for this edgecode value.
      See Also:
        `getEdgeCodeHeader()`, `setEdgeCodeHeader(String)`

    - #### setEdgeCodeHeader

          void setEdgeCodeHeader(@EdgecodeHeader
                                 byte[] header)

      Sets the text prefix that identifies the film. Typically, this is a text string of no more than 8 7-bit ISO characters. Set the value to `null` to omit this optional property.

      To convert a `String` to an array of bytes, use `String.getBytes(String)`.

      Parameters:
        `header` - Text prefix that identifies the film.
      See Also:
        `setEdgeCodeHeader(String)`

    - #### setEdgeCodeHeader

          void setEdgeCodeHeader(String header)
                          throws NullPointerException

      Set the value of the edge code header from the given string. Conversion to bytes takes place using the platforms default character set, according to `String.String(byte[])`.

      Parameters:
        `header` - String representation of the edge code header.
      Throws:
        `NullPointerException`
      See Also:
        `setEdgeCodeHeader(byte[])`

    - #### getEdgeCodeStart

          @FrameOffset
          long getEdgeCodeStart()

      Returns the edge code at the beginning of the corresponding segment.

      Returns:
        Edge code the the beginning of the corresponding segment.

    - #### setEdgeCodeStart

          void setEdgeCodeStart(@FrameOffset
                                long startFrame)

      Sets the edge code at the beginning of the corresponding segment.

      Parameters:
        `startFrame` - Edge code the the beginning of the corresponding segment.

    - #### clone

          EdgeCodeValue clone()

      Create a cloned copy of this edgecode value.

      Returns:
        Cloned copy of this edgecode value.

    - #### toString

          String toString()

      Formats this edgecode value in a pseudo-XML representation that is compatible with the AAF XML schema. For example:

               <EdgecodeValue>
                 <EdgeCodeStart>321</EdgeCodeStart>
                 <FilmKind>Ft35MM</FilmKind>
                 <CodeFormat>EtKeycode</CodeFormat>
                 <!--Header as text: 'abcdefgh'-->
                 <EdgeCodeHeader>6162636465666768</EdgeCodeHeader>
               </EdgecodeValue>

      Overrides:
        `toString` in class `Object`
      Returns:
        Pseudo-XML representation of this edgecode value.
      See Also:
        `Object.toString()`

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