Media Authoring
with Java API

tv.amwa.maj.entity
Class ParameterDefinition

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.DefinitionObject
          extended by tv.amwa.maj.entity.ParameterDefinition
All Implemented Interfaces:
Serializable, Cloneable, ParameterConstant, DefinitionType, MAJCommon, DefinitionObject, InterchangeObject, ParameterDefinition, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=7424,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="ParameterDefinition",
          description="The ParameterDefinition class defines a kind of Parameter for an effect.")
public class ParameterDefinition
extends DefinitionObject
implements ParameterDefinition, Serializable, ParameterConstant, Cloneable, MAJCommon

Implements the definition of a kind of parameter for an effect.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class ParameterDefinition.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.constant.ParameterConstant
AlphaKeyInvertAlpha, Amplitude, CropBottom, CropLeft, CropRight, CropTop, IncomingLevel, Level, LumKeyClip, LumKeyLevel, OutgoingLevel, Pan, PhaseOffset, PinBottomLeftX, PinBottomLeftY, PinBottomRightX, PinBottomRightY, PinTopLeftX, PinTopLeftY, PinTopRightX, PinTopRightY, PositionOffsetX, PositionOffsetY, Rotation, ScaleX, ScaleY, SMPTEBorder, SMPTECheckerboard, SMPTEModulator, SMPTEPosition, SMPTEReplicationH, SMPTEReplicationV, SMPTEReverse, SMPTEShadow, SMPTESoft, SMPTESpotlight, SMPTETumble, SMPTEWipeNumber, SpeedRatio
 
Constructor Summary
ParameterDefinition(AUID identification, String name, TypeDefinition type)
          Creates and initializes a new parameter definition, which defines a kind of parameter for an effect.
 
Method Summary
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 ParameterDefinition clone()
          Creates a cloned copy of this entity.
static ParameterDefinition forIdentification(AUID identification)
           
static ParameterDefinition forName(String parameterName)
           
 String getDisplayUnits()
          Returns the display unit property of this parameter definition, which is a displayable string identifying the units in which the parameter is measured.
 TypeDefinition getTypeDefinition()
          Returns the type definition attached to this parameter definition, which specifies the data type of the parameter.
static boolean registerParameterDefinition(ParameterDefinition definedParameter)
           
static int registerParametersFromClass(Class<?> classWithParameters)
           
 void setDisplayUnits(String displayUnits)
          Sets the display units of this parameter definition, which is a displayable string identifying the units in which the parameter is measured.
 void setPropertiesFromInterface(ParameterDefinition 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, 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

ParameterDefinition

public ParameterDefinition(AUID identification,
                           @AAFString
                           String name,
                           TypeDefinition type)
                    throws NullPointerException

Creates and initializes a new parameter definition, which defines a kind of parameter for an effect.

Parameters:
identification - Uniquely identifies the parameter definition.
name - Display name of the parameter definition.
type - Data type of the parameter.
Throws:
NullPointerException - One or more of the arguments is null and they are all required properties in this implementation.
Method Detail

registerParametersFromClass

public static final int registerParametersFromClass(Class<?> classWithParameters)
                                             throws NullPointerException
Throws:
NullPointerException

registerParameterDefinition

public static final boolean registerParameterDefinition(ParameterDefinition definedParameter)
                                                 throws NullPointerException
Throws:
NullPointerException

forName

public static final ParameterDefinition forName(String parameterName)
                                         throws NullPointerException
Throws:
NullPointerException

forIdentification

public static final ParameterDefinition forIdentification(AUID identification)
                                                   throws NullPointerException
Throws:
NullPointerException

setPropertiesFromInterface

public final void setPropertiesFromInterface(ParameterDefinition castFrom)
See Also:
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)

getDisplayUnits

@AAFProperty(uuid1=87033099,
             uuid2=256,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="DisplayUnits",
             typeName="String",
             optional=true,
             uniqueIdentifier=false,
             pid=7939)
public String getDisplayUnits()
                       throws PropertyNotPresentException
Description copied from interface: ParameterDefinition

Returns the display unit property of this parameter definition, which is a displayable string identifying the units in which the parameter is measured. For example: "% of picture width". This property is optional.

Specified by:
getDisplayUnits in interface ParameterDefinition
Returns:
Display unit property of the parameter definition.
Throws:
PropertyNotPresentException - The optional display units property is not present in this parameter definition.

setDisplayUnits

public void setDisplayUnits(String displayUnits)
Description copied from interface: ParameterDefinition

Sets the display units of this parameter definition, which is a displayable string identifying the units in which the parameter is measured. For example: "% of picture width". Set this optional property to null to omit it.

Specified by:
setDisplayUnits in interface ParameterDefinition
Parameters:
displayUnits - Display units of this parameter definition.

getTypeDefinition

@AAFProperty(uuid1=100729092,
             uuid2=262,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Type",
             typeName="WeakReference to TypeDefinition",
             optional=false,
             uniqueIdentifier=false,
             pid=7937)
public TypeDefinition getTypeDefinition()
Description copied from interface: ParameterDefinition

Returns the type definition attached to this parameter definition, which specifies the data type of the parameter.

Specified by:
getTypeDefinition in interface ParameterDefinition
Returns:
Type definition attached to this parameter definition.

clone

public ParameterDefinition clone()
Description copied from interface: 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.

Specified by:
clone in interface MAJCommon
Overrides:
clone in class DefinitionObject
Returns:
Independent clone of this value, which is a deep copy.
See Also:
Object.clone()

appendXMLChildren

public void appendXMLChildren(Node parent)
Description copied from interface: 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.

Specified by:
appendXMLChildren in interface XMLSerializable
Overrides:
appendXMLChildren in class DefinitionObject
Parameters:
parent - XML parent element to append child nodes to.

Media Authoring
with Java API

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