|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tv.amwa.maj.entity.InterchangeObject tv.amwa.maj.entity.DefinitionObject tv.amwa.maj.entity.OperationDefinition
@AAFClass(uuid1=218169601, uuid2=257, uuid3=7168, uuid4={6,14,43,52,2,6,1,1}, definedName="OperationDefinition", description="The OperationDefinition class identifies an operation that is performed on an array of Segments.") public class OperationDefinition
Implements 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.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
Nested Class Summary | |
---|---|
static class |
OperationDefinition.DegradeToXMLHander
|
static class |
OperationDefinition.ParametersDefinedXMLHandler
|
static class |
OperationDefinition.XMLHandler
|
Nested classes/interfaces inherited from class tv.amwa.maj.entity.DefinitionObject |
---|
DefinitionObject.DefinitionObjectXMLHandler |
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject |
---|
InterchangeObject.InterchangeObjectXMLHandler |
Field Summary |
---|
Fields inherited from interface tv.amwa.maj.iface.OperationDefinition |
---|
ISTIMEWARP_DEFAULT |
Fields inherited from interface tv.amwa.maj.constant.OperationConstant |
---|
Flip, FlipFlop, Flop, MonoAudioDissolve, MonoAudioGain, MonoAudioMixdown, MonoAudioPan, PictureWithMate, SMPTEVideoWipe, StereoAudioDissolve, StereoAudioGain, TwoParameterMonoAudioDissolve, Unknown, VideoAlphaWithinVideoKey, VideoChromaKey, VideoCornerPinning, VideoCrop, VideoDissolve, VideoFadeToBlack, VideoFrameToMask, VideoLuminanceKey, VideoPosition, VideoRepeat, VideoRotate, VideoScale, VideoSeparateAlphaKey, VideoSpeedControl |
Constructor Summary | |
---|---|
OperationDefinition(AUID identifier,
String name,
DataDefinition dataDefinition,
int numInputs)
Creates and initializes a new operation definition, which identifies an operation that is performed on an array of segments . |
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. |
void |
appendXMLChildren(Node parent)
Append child elements to the given parent node to serialize the value of an object to an XML fragment. |
OperationDefinition |
clone()
Creates a cloned copy of this entity. |
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. |
static OperationDefinition |
forIdentification(AUID identification)
|
static OperationDefinition |
forName(String operationName)
|
int |
getBypass()
This is a 1-based index. |
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<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. |
boolean |
getIsTimeWarp()
|
int |
getNumberInputs()
Returns the number of input media segments of this operation definition. |
Set<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. |
static boolean |
registerOperationDefinition(OperationDefinition definedOperation)
|
static int |
registerOperationsFromClass(Class<?> classWithOperations)
|
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. |
void |
setPropertiesFromInterface(OperationDefinition castFrom)
|
Methods inherited from class tv.amwa.maj.entity.DefinitionObject |
---|
equals, getAUID, getDescription, getLocalizedUID, getName, hashCode, setDescription, setLocalizedUID, setName |
Methods inherited from class tv.amwa.maj.entity.InterchangeObject |
---|
castFromInterface, countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, registerImplementation, setPropertiesFromInterface, setPropertyValue, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
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 |
Methods inherited from interface tv.amwa.maj.entity.MAJCommon |
---|
equals, hashCode, toString |
Constructor Detail |
---|
public OperationDefinition(AUID identifier, @AAFString String name, DataDefinition dataDefinition, int numInputs) throws NullPointerException
Creates and initializes a new operation definition, which identifies an operation
that is performed on an array of segments
.
identifier
- Unique identifier for the operation definition.name
- Display name of the operation definition.dataDefinition
- The kind of data that is produced by the operation.numInputs
- Number of input segments. A value of -1
indicates that the
effect can have any number of input segments.
NullPointerException
- One or more of the arguments is null
and they
are all required properties.Method Detail |
---|
public static final int registerOperationsFromClass(Class<?> classWithOperations) throws NullPointerException
NullPointerException
public static final boolean registerOperationDefinition(OperationDefinition definedOperation) throws NullPointerException
NullPointerException
public static final OperationDefinition forName(String operationName) throws NullPointerException
NullPointerException
public static final OperationDefinition forIdentification(AUID identification) throws NullPointerException
NullPointerException
public final void setPropertiesFromInterface(OperationDefinition castFrom)
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)
public void addParameterDefinition(ParameterDefinition parameterDefinition) throws NullPointerException, ObjectAlreadyAttachedException
OperationDefinition
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.
addParameterDefinition
in interface OperationDefinition
parameterDefinition
- Parameter definition object to add.
NullPointerException
- The given parameter definition is null
.
ObjectAlreadyAttachedException
- Parameter definition is already
present within this operation definition.OperationGroup.addParameter(Parameter)
public void appendDegradeToOperation(OperationDefinition operationDefinition) throws NullPointerException
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. 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.
appendDegradeToOperation
in interface OperationDefinition
operationDefinition
- Degrade-to operation to append.
NullPointerException
- The given degrade-to operation definition is null
.public int countDegradeToOperations()
OperationDefinition
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.
countDegradeToOperations
in interface OperationDefinition
public int countParameterDefinitions()
OperationDefinition
Return the number of parameter definitions of this operation definition, which specify the parameters that can be used as controls for the operation.
countParameterDefinitions
in interface OperationDefinition
@AAFProperty(uuid1=87033093, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,1}, definedName="Bypass", typeName="UInt32", optional=true, uniqueIdentifier=false, pid=7688) public int getBypass() throws PropertyNotPresentException
This is a 1-based index. A value of 0
indicates this optional property
is not set.
getBypass
in interface OperationDefinition
PropertyNotPresentException
- The optional bypass property is
not present in this operation definition.OperationDefinition.getBypass()
public void setBypass(Integer bypass)
OperationDefinition
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.
setBypass
in interface OperationDefinition
bypass
- Index of bypass media segment for the operation definition.@AAFProperty(uuid1=87033098, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="OperationCategory", typeName="OperationCategoryType", optional=true, uniqueIdentifier=false, pid=7686) public AUID getCategory() throws PropertyNotPresentException
OperationDefinition
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.
getCategory
in interface OperationDefinition
PropertyNotPresentException
- The optional operation category property is not present
for this operation definition.OperationCategoryType
,
TypeDefinitionExtendibleEnumeration.OperationCategoryType
public void setCategory(AUID category)
OperationDefinition
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.
setCategory
in interface OperationDefinition
category
- AUID indicating the category of the operation definition.OperationCategoryType
,
TypeDefinitionExtendibleEnumeration.OperationCategoryType
@AAFProperty(uuid1=87033097, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="DataDefinition", typeName="WeakReference to DataDefinition", optional=false, uniqueIdentifier=false, pid=7681) public DataDefinition getDataDefinition()
OperationDefinition
Returns the data definition referenced from this operation definition, which identifies the kind of data that is produced by the operation.
getDataDefinition
in interface OperationDefinition
public void setDataDefinition(DataDefinition dataDefinition) throws NullPointerException
OperationDefinition
Sets the data definition of this operation definition, which identifies the kind of data that is produced by the operation.
setDataDefinition
in interface OperationDefinition
dataDefinition
- Data definition of the operation.
NullPointerException
- The given data definition is null
.@AAFProperty(uuid1=100729092, uuid2=1025, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="DegradeTo", typeName="WeakReferenceVector of OperationDefinition", optional=true, uniqueIdentifier=false, pid=7683) public List<OperationDefinition> getDegradeToOperations()
OperationDefinition
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.
getDegradeToOperations
in interface OperationDefinition
@AAFProperty(uuid1=87033092, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,1}, definedName="NumberInputs", typeName="Int32", optional=false, uniqueIdentifier=false, pid=7687) public int getNumberInputs()
OperationDefinition
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.
getNumberInputs
in interface OperationDefinition
public void setNumberInputs(int numberInputs)
OperationDefinition
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.
setNumberInputs
in interface OperationDefinition
numberInputs
- Number of input media segments of this operation
definition.@AAFProperty(uuid1=100729092, uuid2=770, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="ParametersDefined", typeName="WeakReferenceSet of ParameterDefinition", optional=true, uniqueIdentifier=false, pid=7689) public Set<ParameterDefinition> getParameterDefinitions()
OperationDefinition
Returns the collection of parameter definitions of this operation definition, which specify the parameters that can be used as controls for the operation.
getParameterDefinitions
in interface OperationDefinition
OperationGroup.addParameter(Parameter)
public void insertDegradeToOperationAt(int index, OperationDefinition operationDefinition) throws NullPointerException, IndexOutOfBoundsException
OperationDefinition
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.
insertDegradeToOperationAt
in interface OperationDefinition
index
- 0-based index at which the operation definition is to be inserted.operationDefinition
- Degrade-to operation definition to insert at the
specified index.
NullPointerException
- The given operation definition is null
.
IndexOutOfBoundsException
- The index is outside the acceptable range for
the current degrade-to list.public boolean isTimeWarp()
OperationDefinition
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.
isTimeWarp
in interface OperationDefinition
OperationDefinition.ISTIMEWARP_DEFAULT
@AAFProperty(uuid1=87033091, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,1}, definedName="IsTimeWarp", typeName="Boolean", optional=true, uniqueIdentifier=false, pid=7682) public boolean getIsTimeWarp()
public void setIsTimeWarp(Boolean isTimeWarp)
OperationDefinition
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
.
setIsTimeWarp
in interface OperationDefinition
isTimeWarp
- Does this operation change the total length of segments
in the associated operation group?OperationDefinition.ISTIMEWARP_DEFAULT
public ParameterDefinition lookupParameterDefinition(AUID parameterDefinition) throws NullPointerException, ObjectNotFoundException
OperationDefinition
Looks up and returns the parameter definition corresponding to the given identifier from the collection of defined parameters of this operation definition.
lookupParameterDefinition
in interface OperationDefinition
parameterDefinition
- Identity of the parameter definition to look up.
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.public void prependDegradeToOperation(OperationDefinition operationDefinition) throws NullPointerException
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. 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.
prependDegradeToOperation
in interface OperationDefinition
operationDefinition
- Degrade-to operation definition to add.
NullPointerException
- The given degrade-to operation definition is null
.public void removeDegradeToOperationAt(int index) throws IndexOutOfBoundsException
OperationDefinition
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.
removeDegradeToOperationAt
in interface OperationDefinition
index
- 0-based index of operation definition to remove from the
degrade-to list of this operation definition
IndexOutOfBoundsException
- The index is outside the range acceptable range for
the current degrade-to list.public OperationDefinition clone()
MAJCommon
Creates a cloned copy of this entity. The clone will be initialized to have the same value as this value but exists independently from then on. Changes to this value will not effect the clone and changes to the clone will not effect this. MAJ API clones are true deep clones with no shared references to areas of memory within the original.
This method does not throw a CloneNotSupportedException
as all
entity values must implement the Cloneable
interface. If a cloning
error does occur, a null
value will be returned but this is very unlikely
to happen.
clone
in interface MAJCommon
clone
in class DefinitionObject
Object.clone()
public void appendXMLChildren(Node parent)
XMLSerializable
Append child elements to the given parent node to serialize the value of an object
to an XML fragment. Methods of the XMLBuilder
class are provided to help with this
process.
appendXMLChildren
in interface XMLSerializable
appendXMLChildren
in class DefinitionObject
parent
- XML parent element to append child nodes to.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |