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

tv.amwa.maj.model

## Interface OperationGroup

- All Superinterfaces:
    Component, InterchangeObject, MediaEntity, MetadataObject, Segment
  All Known Subinterfaces:
    QOperationGroup
  All Known Implementing Classes:
    OperationGroupImpl

      public interface OperationGroup
      extends Segment

  Specifies a container with an ordered set of segments and an operation that is performed on these segments.

  In an operation group that is itself in a transition, the input segments are provided by the transition and so the optional input segments property shall be omitted.

  See Also:
    `OperationDefinition`, `CompositionPackage`, `Transition.getTransitionOperation()`, `TypeDefinitions.OperationGroupStrongReference`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addParameter(Parameter parameter)` Adds a new parameter to the collection of parameters of this operation group, which specify control values for the operation.
    `void` | `appendInputSegment(Segment segment)` Appends an input segment to the list of input segments of this operation group.
    `void` | `clearInputSegments()` Clear the list of input segments for this operation group, omitting this optional property.
    `void` | `clearParameters()` Clears the list of parameters in the list of parameters of this operation group, which specify control values for the operation.
    `OperationGroup` | `clone()` Create a cloned copy of this operation group.
    `int` | `countInputSegments()` Returns the number of media sources for this operation group, which is the size of the list of input segments for this operation.
    `int` | `countParameters()` Returns the number of parameters in the collection of parameters of this operation group, which specify control values for the operation.
    `int` | `getBypassOverride()` Returns the optional bypass override index of this operation group, which specifies the array index (1-based) of the input segment which is the primary input.
    `Segment` | `getInputSegmentAt(int index)` Given an index, returns the corresponding input segment from this list of input segments of this operation group.
    `List<Segment>` | `getInputSegments()` Returns the list of input segments of this operation group.
    `OperationDefinition` | `getOperationDefinition()` Returns the operation definition for this operation group, which identifies the kind of operation.
    `List<? extends Parameter>` | `getParameters()` Returns the list of parameters of this operation group, which specify control values for the operation.
    `SourceReferenceSegment` | `getRendering()` Returns the segment that represents the optional rendering of this operation group, which specifies a rendered or precomputed version of the operation.
    `void` | `insertInputSegmentAt(int index, Segment segment)` Inserts an input segment into the list of input segments of this operation group at the given index.
    `boolean` | `isTimeWarp()` Returns `true` if an operation group represents a time warping effect.
    `boolean` | `isValidTransitionOperation()` Returns `true` if this operation group can be used in a transition; otherwise returns `false`.
    `Parameter` | `lookupParameter(AUID argumentId)` Given an argument id, returns the corresponding parameter slot from the collection of parameters of this operation group.
    `void` | `prependInputSegment(Segment segment)` Prepends an input segment to the list of input segments of this operation group.
    `void` | `removeInputSegmentAt(int index)` Removes the segment at the given index from the list of input segments of the operation group.
    `void` | `setBypassOverride(Integer bypassOverride)` Sets the optional bypass override property on the given operation group object, which specifies the array index (1-based) of the input segment which is the primary input.
    `void` | `setOperationDefinition(OperationDefinition operationDefinition)` Sets the operation definition for the operation group, which identifies the kind of operation.
    `void` | `setRendering(SourceReferenceSegment sourceReference)` Returns the segment that represents the optional rendering of this operation group, which specifies a rendered or precomputed version of the operation.

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

      `generateSequence, segmentOffsetToTC, segmentTCToOffset`

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

      `appendComponentAttribute, appendComponentAttribute, appendComponentKLVData, appendComponentUserComment, appendComponentUserComment, clearComponentAttributes, clearComponentKLVData, clearComponentUserComments, countComponentAttributes, countComponentKLVData, countComponentUserComments, getComponentAttributes, getComponentDataDefinition, getComponentKLVData, getComponentLength, getComponentUserComments, getLengthPresent, removeComponentAttribute, removeComponentKLVData, removeComponentUserComment, setComponentDataDefinition, setComponentLength, setLengthPresent`

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

- - ### Method Detail

    - #### getOperationDefinition

          OperationDefinition getOperationDefinition()

      Returns the operation definition for this operation group, which identifies the kind of operation.

      Returns:
        Operation definition for this operation group.
      See Also:
        `TypeDefinitions.OperationDefinitionWeakReference`

    - #### setOperationDefinition

          void setOperationDefinition(OperationDefinition operationDefinition)
                               throws NullPointerException

      Sets the operation definition for the operation group, which identifies the kind of operation.

      Parameters:
        `operationDefinition` - Operation definition for the operation group.
      Throws:
        `NullPointerException` - The given operation definition is `null`.

    - #### getRendering

          SourceReferenceSegment getRendering()
                                       throws PropertyNotPresentException

      Returns the segment that represents the optional rendering of this operation group, which specifies a rendered or precomputed version of the operation. Working and final renderings are handled by using an essence group as the segment.

      Returns:
        Segment that represents the optional rendering of this operation group.
      Throws:
        `PropertyNotPresentException` - The optional rendering property is not present for this operation group.
      See Also:
        `SourceClip`, `TypeDefinitions.SourceReferenceStrongReference`

    - #### setRendering

          void setRendering(SourceReferenceSegment sourceReference)

      Returns the segment that represents the optional rendering of this operation group, which specifies a rendered or precomputed version of the operation. Multiple renderings may exist if the source clip refers to a material package that contains an essence group.

      Parameters:
        `sourceReference` - Segment containing a representation of the rendering.
      See Also:
        `SourceClip`

    - #### getBypassOverride

          @UInt32
          int getBypassOverride()
                                 throws PropertyNotPresentException

      Returns the optional bypass override index of this operation group, which specifies the array index (1-based) of the input segment which is the primary input. This overrides any bypass specified by the operation definition. This is an optional property.

      Returns:
        Optional bypass override index of the operation group.
      Throws:
        `PropertyNotPresentException` - The optional bypass override property is not set for the operation group.
      See Also:
        `OperationDefinition.getBypass()`, `getOperationDefinition()`

    - #### setBypassOverride

          void setBypassOverride(@UInt32
                                 Integer bypassOverride)
                          throws IllegalArgumentException

      Sets the optional bypass override property on the given operation group object, which specifies the array index (1-based) of the input segment which is the primary input. This overrides any bypass specified by the operation definition. Set this optional property to `null` to omit it.

      Parameters:
        `bypassOverride` - Bypass override property of this operation group.
      Throws:
        `IllegalArgumentException` - The bypass override property must be a 1-based index value.

    - #### countParameters

          @UInt32
          int countParameters()

      Returns the number of parameters in the collection of parameters of this operation group, which specify control values for the operation. This is an optional property and this method returns 0 when the property is not present.

      Returns:
        Number of parameters in the collection of parameters of this operation group.

    - #### clearParameters

          void clearParameters()

      Clears the list of parameters in the list of parameters of this operation group, which specify control values for the operation. This has the effect of omitting this optional property.

    - #### addParameter

          void addParameter(Parameter parameter)
                     throws DuplicateParameterException,
                            NullPointerException

      Adds a new parameter to the collection of parameters of this operation group, which specify control values for the operation. This is an optional property that becomes present when this method is called.

      Parameters:
        `parameter` - Parameter to add to the collection of parameters of this operation group.
      Throws:
        `DuplicateParameterException` - The given parameter has the same identifier as one that is already present in this operation group.
        `NullPointerException` - The given parameter is `null`.

    - #### getParameters

          List<? extends Parameter> getParameters()
                                           throws PropertyNotPresentException

      Returns the list of parameters of this operation group, which specify control values for the operation. This is an optional property that returns an empty list when not present.

      Returns:
        Shallow copy of the collection of parameters of this operation group.
      Throws:
        `PropertyNotPresentException` - No parameters are present in this operation group.
      See Also:
        `TypeDefinitions.ParameterStrongReferenceVector`

    - #### lookupParameter

          Parameter lookupParameter(@ArgIDType
                                    AUID argumentId)
                             throws ParameterNotFoundException,
                                    NullPointerException

      Given an argument id, returns the corresponding parameter slot from the collection of parameters of this operation group.

      Parameters:
        `argumentId` - Argument id to look up in the collection of parameters of this operation group.
      Returns:
        Matching parameter from the operation group.
      Throws:
        `ParameterNotFoundException` - The given argument identifier does not match that of a parameter in the set of parameters for this operation group.
        `NullPointerException` - The given argument identifier is `null`.

    - #### countInputSegments

          @UInt32
          int countInputSegments()

      Returns the number of media sources for this operation group, which is the size of the list of input segments for this operation. The input segments list is an optional property and 0 will be returned if the property is omitted.

      Returns:
        Number of media sources for this operation group.

    - #### clearInputSegments

          void clearInputSegments()

      Clear the list of input segments for this operation group, omitting this optional property.

    - #### getInputSegments

          List<Segment> getInputSegments()
                                  throws PropertyNotPresentException

      Returns the list of input segments of this operation group. This is an optional property.

      Returns:
        List of input segments of this operation group.
      Throws:
        `PropertyNotPresentException` - The list of input segments is not present for this operation group.

    - #### appendInputSegment

          void appendInputSegment(Segment segment)
                           throws NullPointerException

      Appends an input segment to the list of input segments of this operation group. The list is an optional property that will become present if a segment is appended.

      Parameters:
        `segment` - Segment to append to the list of input segments of this operation group.
      Throws:
        `NullPointerException` - The given segment to append is `null`.

    - #### prependInputSegment

          void prependInputSegment(Segment segment)
                            throws NullPointerException

      Prepends an input segment to the list of input segments of this operation group. The list is an optional property that will become present if a segment is prepended.

      Parameters:
        `segment` - Input segment to add to the beginning of the list of input segments.
      Throws:
        `NullPointerException` - The given segment to prepend is `null`.

    - #### insertInputSegmentAt

          void insertInputSegmentAt(@UInt32
                                    int index,
                                    Segment segment)
                             throws IndexOutOfBoundsException,
                                    NullPointerException

      Inserts an input segment into the list of input segments of this operation group at the given index. The existing segments at the given and higher indices are moved up by one to make room. This is an optional property that will become present if a segment is inserted at index 0.

      Parameters:
        `index` - 0-based index where input segment is to be inserted.
        `segment` - Input segment to insert at the given index.
      Throws:
        `IndexOutOfBoundsException` - The index value is outside the acceptable range for the list of input segments.
        `NullPointerException` - The given segment to insert is `null`.

    - #### getInputSegmentAt

          Segment getInputSegmentAt(@UInt32
                                    int index)
                             throws IndexOutOfBoundsException

      Given an index, returns the corresponding input segment from this list of input segments of this operation group. This is an optional property and this method will always throw an `IndexOutOfBoundsException` if the property is omitted.

      Parameters:
        `index` - 0-based index into the list of input segments of this operation group.
      Returns:
        Input segment at the given index.
      Throws:
        `IndexOutOfBoundsException` - The index is outside the acceptable range for the list of input segments.

    - #### removeInputSegmentAt

          void removeInputSegmentAt(@UInt32
                                    int index)
                             throws IndexOutOfBoundsException

      Removes the segment at the given index from the list of input segments of the operation group. Existing segments at higher indices are moved down by one to accommodate. This is an optional property and this method will always throw an `IndexOutOfBoundsException` if the property is omitted. Removing the last input segment from the list will omit this property.

      Parameters:
        `index` - 0-based index into the list of input segments of this operation group.
      Throws:
        `IndexOutOfBoundsException` - The index is outside the acceptable range for the list of input segments.

    - #### isValidTransitionOperation

          @Bool
          boolean isValidTransitionOperation()

      Returns `true` if this operation group can be used in a transition; otherwise returns `false`. An operation group can be used in a transition if its operation has exactly 2 inputs and the operation has a level parameter.

      Returns:
        Can the operation group be used in a transition?
      See Also:
        `Transition.setTransitionOperation(OperationGroup)`

    - #### isTimeWarp

          @Bool
          boolean isTimeWarp()

      Returns `true` if an operation group represents a time warping effect.

      Returns:
        Does this operation group have an operation that warps time?
      See Also:
        `getOperationDefinition()`, `OperationDefinition.isTimeWarp()`

    - #### clone

          OperationGroup clone()

      Create a cloned copy of this operation group.

      Specified by:
        `clone` in interface `Component`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `Segment`
      Returns:
        Cloned copy of this operation group.

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