Media Authoring
with Java API

tv.amwa.maj.iface
Interface OperationDefinition

All Superinterfaces:
DefinitionObject, InterchangeObject
All Known Implementing Classes:
OperationDefinition

public interface OperationDefinition
extends DefinitionObject

Specifies the definition of an operation that is performed on an array of segments. Operation definitions specify which parameters are possible on an operation, while an operation group specifies specific parameters and input segments for a particular operation invocation.

Author:
Richard Cartwright
See Also:
makeOperationDefinition(), OperationConstant, OperationDefinition.forName(String), OperationDefinition.forIdentification(AUID), Dictionary.getOperationDefinitions()

Field Summary
static boolean ISTIMEWARP_DEFAULT
          Default value for the is time warp property, which is false.
 
Method Summary
 void addParameterDefinition(ParameterDefinition parameterDefinition)
          Add a parameter definition to the unordered collection of parameter definitions of this operation definition, which specify the parameters that can be used as controls for the operation.
 void appendDegradeToOperation(OperationDefinition operationDefinition)
          Append an operation definition tto the degrade-to list of operation definitions of this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it.
 int countDegradeToOperations()
          Returns the number of degrade-to operations in this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it.
 int countParameterDefinitions()
          Return the number of parameter definitions of this operation definition, which specify the parameters that can be used as controls for the operation.
 int getBypass()
          Gets the bypass media segment index, which specifies the array index (1-based) of the input segment which is the primary input.
 AUID getCategory()
          Returns an AUID identifying the category of this operation definition, which specifies the kind of operation, such as video effect, audio effect, or 3D operation.
 DataDefinition getDataDefinition()
          Returns the data definition referenced from this operation definition, which identifies the kind of data that is produced by the operation.
 List<? extends OperationDefinition> getDegradeToOperations()
          Returns the list of degrade-to operation definitions of this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it.
 int getNumberInputs()
          Returns the number of input media segments of this operation definition.
 Set<? extends ParameterDefinition> getParameterDefinitions()
          Returns the collection of parameter definitions of this operation definition, which specify the parameters that can be used as controls for the operation.
 void insertDegradeToOperationAt(int index, OperationDefinition operationDefinition)
          Insert an operation definition into the degrade-to list of definitions of this operation definition at the given index.
 boolean isTimeWarp()
          Returns true if the length of an operation group is different from the lengths of the input segments, for example a slow motion effect.
 ParameterDefinition lookupParameterDefinition(AUID parameterDefinition)
          Looks up and returns the parameter definition corresponding to the given identifier from the collection of defined parameters of this operation definition.
 void prependDegradeToOperation(OperationDefinition operationDefinition)
          Prepend an operation definition to the degrade-to list of operation definitions of this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it.
 void removeDegradeToOperationAt(int index)
          Removes the indexed operation definition from the degrade-to list of operation definitions of this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it.
 void setBypass(Integer bypass)
          Sets the bypass media segment index, which specifies the array index (1-based) of the input segment which is the primary input.
 void setCategory(AUID category)
          Sets an AUID identifying the category of this operation definition, which specifies the kind of operation, such as video effect, audio effect, or 3D operation.
 void setDataDefinition(DataDefinition dataDefinition)
          Sets the data definition of this operation definition, which identifies the kind of data that is produced by the operation.
 void setIsTimeWarp(Boolean isTimeWarp)
          Set to true to indicate that the the length of an operation group is different from the lengths of the input segments, for example a slow motion effect.
 void setNumberInputs(int numberInputs)
          Sets the number of input media segments for the operation definition.
 
Methods inherited from interface tv.amwa.maj.iface.DefinitionObject
getAUID, getDescription, getName, setDescription, setName
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 

Field Detail

ISTIMEWARP_DEFAULT

static final boolean ISTIMEWARP_DEFAULT

Default value for the is time warp property, which is false.

See Also:
isTimeWarp(), setIsTimeWarp(Boolean), Constant Field Values
Method Detail

getDataDefinition

DataDefinition getDataDefinition()

Returns the data definition referenced from this operation definition, which identifies the kind of data that is produced by the operation.

Returns:
Data definition referenced from this operation definition.

setDataDefinition

void setDataDefinition(DataDefinition dataDefinition)
                       throws NullPointerException

Sets the data definition of this operation definition, which identifies the kind of data that is produced by the operation.

Parameters:
dataDefinition - Data definition of the operation.
Throws:
NullPointerException - The given data definition is null.

isTimeWarp

@Bool
boolean isTimeWarp()

Returns true if the length of an operation group is different from the lengths of the input segments, for example a slow motion effect.

If this optional property is not present, its default value of false is returned.

Returns:
Does this operation change the total length of segments in the associated operation group?
See Also:
ISTIMEWARP_DEFAULT

setIsTimeWarp

void setIsTimeWarp(@Bool
                   Boolean isTimeWarp)

Set to true to indicate that the the length of an operation group is different from the lengths of the input segments, for example a slow motion effect.

The default value for this optional property is false. To omit this optional property, call this method with null.

Parameters:
isTimeWarp - Does this operation change the total length of segments in the associated operation group?
See Also:
ISTIMEWARP_DEFAULT

prependDegradeToOperation

void prependDegradeToOperation(OperationDefinition operationDefinition)
                               throws NullPointerException

Prepend an operation definition to the degrade-to list of operation definitions of this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it. Use this function to add an operation definition to be scanned first when searching for a replacement, to be considered as a more desirable alternate operation.

Parameters:
operationDefinition - Degrade-to operation definition to add.
Throws:
NullPointerException - The given degrade-to operation definition is null.

appendDegradeToOperation

void appendDegradeToOperation(OperationDefinition operationDefinition)
                              throws NullPointerException

Append an operation definition tto the degrade-to list of operation definitions of this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it. Use this function to add an operation definition to be scanned last when searching for a replacement, to be considered as a less desirable alternate operation.

Parameters:
operationDefinition - Degrade-to operation to append.
Throws:
NullPointerException - The given degrade-to operation definition is null.

insertDegradeToOperationAt

void insertDegradeToOperationAt(@UInt32
                                int index,
                                OperationDefinition operationDefinition)
                                throws NullPointerException,
                                       IndexOutOfBoundsException

Insert an operation definition into the degrade-to list of definitions of this operation definition at the given index. The degrade-to list of operation definitions specify simpler operations that an application can substitute for the defined operation if it cannot process it. Operation definitions already existing at the given and higher indices will be moved up to the next higher index to accommodate.

Parameters:
index - 0-based index at which the operation definition is to be inserted.
operationDefinition - Degrade-to operation definition to insert at the specified index.
Throws:
NullPointerException - The given operation definition is null.
IndexOutOfBoundsException - The index is outside the acceptable range for the current degrade-to list.

removeDegradeToOperationAt

void removeDegradeToOperationAt(@UInt32
                                int index)
                                throws IndexOutOfBoundsException

Removes the indexed operation definition from the degrade-to list of operation definitions of this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it. Operation definitions already existing at indices higher than the given index will be moved down to the next lower index to accommodate.

Parameters:
index - 0-based index of operation definition to remove from the degrade-to list of this operation definition
Throws:
IndexOutOfBoundsException - The index is outside the range acceptable range for the current degrade-to list.

getDegradeToOperations

List<? extends OperationDefinition> getDegradeToOperations()

Returns the list of degrade-to operation definitions of this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it. The definitions are ordered from the most desirable to the least desirable alternative.

Returns:
Shallow copy of the list of degrade-to operation definitions of this operation definition.

countDegradeToOperations

@UInt32
int countDegradeToOperations()

Returns the number of degrade-to operations in this operation definition, which specify simpler operations that an application can substitute for the defined operation if it cannot process it.

Returns:
Number of degrade-to operations listed in this operation definition.

getCategory

AUID getCategory()
                 throws PropertyNotPresentException

Returns an AUID identifying the category of this operation definition, which specifies the kind of operation, such as video effect, audio effect, or 3D operation. This is an optional property.

Returns:
Identifier for the category of the operation definition.
Throws:
PropertyNotPresentException - The optional operation category property is not present for this operation definition.
See Also:
OperationCategoryType, TypeDefinitionExtendibleEnumeration.OperationCategoryType

setCategory

void setCategory(AUID category)

Sets an AUID identifying the category of this operation definition, which specifies the kind of operation, such as video effect, audio effect, or 3D operation. Set this optional property to null to omit it.

Parameters:
category - AUID indicating the category of the operation definition.
See Also:
OperationCategoryType, TypeDefinitionExtendibleEnumeration.OperationCategoryType

getNumberInputs

@Int32
int getNumberInputs()

Returns the number of input media segments of this operation definition. A value of -1 indicates that the effect can have any number of input segments.

Returns:
Number of input media segments for this operation definition.

setNumberInputs

void setNumberInputs(@Int32
                     int numberInputs)

Sets the number of input media segments for the operation definition. A value of -1 indicates that the effect can have any number of input segments.

Parameters:
numberInputs - Number of input media segments of this operation definition.

getBypass

@UInt32
int getBypass()
              throws PropertyNotPresentException

Gets the bypass media segment index, which specifies the array index (1-based) of the input segment which is the primary input. This value allows the client application to pick one of the inputs (foreground, background, etc.) to stand in for the effect if it is not available and none of the degrade-to effects are available. This is an optional property.

Note that the methods of the C-based AAF reference implementation use 0-based indexing.

Returns:
1-based index of the bypass media segment for the operation definition.
Throws:
PropertyNotPresentException - The optional bypass property is not present in this operation definition.

setBypass

void setBypass(@UInt32
               Integer bypass)

Sets the bypass media segment index, which specifies the array index (1-based) of the input segment which is the primary input. This value allows the client application to pick one of the inputs (foreground, background, etc.) to stand in for the effect if it is not available, and none of the degrade to effects are available. Set this optional property to null to omit it.

Parameters:
bypass - Index of bypass media segment for the operation definition.

addParameterDefinition

void addParameterDefinition(ParameterDefinition parameterDefinition)
                            throws NullPointerException,
                                   ObjectAlreadyAttachedException

Add a parameter definition to the unordered collection of parameter definitions of this operation definition, which specify the parameters that can be used as controls for the operation.

Parameters:
parameterDefinition - Parameter definition object to add.
Throws:
NullPointerException - The given parameter definition is null.
ObjectAlreadyAttachedException - Parameter definition is already present within this operation definition.
See Also:
OperationGroup.addParameter(Parameter)

getParameterDefinitions

Set<? extends ParameterDefinition> getParameterDefinitions()

Returns the collection of parameter definitions of this operation definition, which specify the parameters that can be used as controls for the operation.

Returns:
Shallow copy of the collection of parameter definitions of the operation definition.
See Also:
OperationGroup.addParameter(Parameter)

countParameterDefinitions

@UInt32
int countParameterDefinitions()

Return the number of parameter definitions of this operation definition, which specify the parameters that can be used as controls for the operation.

Returns:
Number of parameter definitions of this operation definition.

lookupParameterDefinition

ParameterDefinition lookupParameterDefinition(AUID parameterDefinition)
                                              throws NullPointerException,
                                                     ObjectNotFoundException

Looks up and returns the parameter definition corresponding to the given identifier from the collection of defined parameters of this operation definition.

Parameters:
parameterDefinition - Identity of the parameter definition to look up.
Returns:
Matching parameter definition with the given identifier.
Throws:
NullPointerException - The given identifier for a parameter definition is null.
ObjectNotFoundException - The given identifier does not correspond to a parameter definition of this operation definition.

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.