Media Authoring
with Java API

tv.amwa.maj.entity
Class ControlPoint

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

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=6400,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="ControlPoint",
          description="The ControlPoint class specifies a value and a time point and is used to specify an effect control value.")
public class ControlPoint
extends InterchangeObject
implements ControlPoint, Serializable, Cloneable, MAJCommon

Implements a value and a time point (position) that is used to specify an effect control value. Control points must be added to a varying value that is then added to the operation group describing the effect.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class ControlPoint.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Constructor Summary
ControlPoint(VaryingValue varyingValue, Rational time, Object value)
          Creates and initializes a new control point object, which specifies a value and a time point and is used to specify an effect control value.
 
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.
 ControlPoint clone()
          Creates a cloned copy of this entity.
 boolean equals(Object o)
          Tests to see if the given object is equal to this interchange object.
 EditHintType getEditHint()
          Returns the edit hint of the control point, which describes how to alter the position (time) of the operation group is made longer or shorter.
 Rational getTime()
          Returns the time property of this control point, which specifies the time within the varying value segment for which the value is defined.
 TypeDefinition getTypeDefinition()
          Returns the type definition of the value of this control point.
 Object getValue()
          Returns the control point value at the control point's postition (time), which is a value of the data type returned by ControlPoint.getTypeDefinition().
 int hashCode()
          Returns a hash code value for this interchange object.
 void setEditHint(EditHintType editHint)
          Sets the control point edit hint value, which describes how to alter the position (time) if the operation group is made longer or shorter.
 void setPropertiesFromInterface(ControlPoint castFrom)
           
 void setTime(Rational time)
          Sets the position of the control point within an operation group, which specifies the time within the varying value segment for which the value is defined.
 void setValue(Object value)
          Set the data value describing this control point at the control point's postition (time), which is a value of the data type returned by ControlPoint.getTypeDefinition()..
 
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.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 
Methods inherited from interface tv.amwa.maj.entity.MAJCommon
toString
 

Constructor Detail

ControlPoint

public ControlPoint(VaryingValue varyingValue,
                    Rational time,
                    Object value)
             throws NullPointerException,
                    RationalRangeException

Creates and initializes a new control point object, which specifies a value and a time point and is used to specify an effect control value.

Parameters:
varyingValue - A varying value. This determines the type of this control point through the parameter definition.
time - Specifies the time within the VaryingValue segment for which the value is defined, with a value between 0 and 1.
value - Control point value.
Throws:
NullPointerException - One or more of the arguments is null and all values are required.
RationalRangeException - Rational time value is outside the inclusive range 0.0 to 1.0.
ClassCastException - Cannot cast the given Java value to the given AAF type definition.
Method Detail

setPropertiesFromInterface

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

getEditHint

@AAFProperty(uuid1=87033096,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="EditHint",
             typeName="EditHintType",
             optional=true,
             uniqueIdentifier=false,
             pid=6660)
public EditHintType getEditHint()
                         throws PropertyNotPresentException
Description copied from interface: ControlPoint

Returns the edit hint of the control point, which describes how to alter the position (time) of the operation group is made longer or shorter. This is an optional property.

Specified by:
getEditHint in interface ControlPoint
Returns:
A hint to be used if the effect starting time or length is changed during editing.
Throws:
PropertyNotPresentException - The optional edit hint property is not present for this control point.

setEditHint

public void setEditHint(EditHintType editHint)
Description copied from interface: ControlPoint

Sets the control point edit hint value, which describes how to alter the position (time) if the operation group is made longer or shorter. Set this optional property to null to omit it.

Specified by:
setEditHint in interface ControlPoint
Parameters:
editHint - Specifies a hint to be used if the effect starting time or length is changed during editing.

getTime

@AAFProperty(uuid1=117571843,
             uuid2=4098,
             uuid3=256,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Time",
             typeName="Rational",
             optional=false,
             uniqueIdentifier=false,
             pid=6659)
public Rational getTime()
Description copied from interface: ControlPoint

Returns the time property of this control point, which specifies the time within the varying value segment for which the value is defined. The value of the time property should be between&nbps;0 and 1 inclusive.

Specified by:
getTime in interface ControlPoint
Returns:
Time property of this control point.

setTime

public void setTime(Rational time)
             throws RationalRangeException,
                    NullPointerException
Description copied from interface: ControlPoint

Sets the position of the control point within an operation group, which specifies the time within the varying value segment for which the value is defined. The value is expressed as a rational value between from 0 to 1.

Specified by:
setTime in interface ControlPoint
Parameters:
time - Control point time.
Throws:
RationalRangeException - The rational value is outside the range 0 to 1.
NullPointerException - The given time value is null.

getTypeDefinition

public TypeDefinition getTypeDefinition()
Description copied from interface: ControlPoint

Returns the type definition of the value of this control point.

Specified by:
getTypeDefinition in interface ControlPoint
Returns:
Type definition associated with the control point data value inside this object.
See Also:
TypeDefinitionIndirect

getValue

@AAFProperty(uuid1=87033101,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Value",
             typeName="Indirect",
             optional=false,
             uniqueIdentifier=false,
             pid=6658)
public Object getValue()
Description copied from interface: ControlPoint

Returns the control point value at the control point's postition (time), which is a value of the data type returned by ControlPoint.getTypeDefinition().

Specified by:
getValue in interface ControlPoint
Returns:
Control point value.
See Also:
TypeDefinitionIndirect, ControlPoint.getTypeDefinition()

setValue

public void setValue(Object value)
              throws NullPointerException,
                     ClassCastException
Description copied from interface: ControlPoint

Set the data value describing this control point at the control point's postition (time), which is a value of the data type returned by ControlPoint.getTypeDefinition()..

Specified by:
setValue in interface ControlPoint
Parameters:
value - The value of this control point at its position (time).
Throws:
NullPointerException - The given control point value is null.
ClassCastException - Cannot cast the given value to the defined type for this control point.
See Also:
TypeDefinition.createValue(Object), PropertyValue.getValue()

equals

public boolean equals(Object o)
Description copied from interface: MAJCommon

Tests to see if the given object is equal to this interchange object. To be equal, the given value must be not null, share the same interface to its value and each of the properties of the value must each be equal.

Specified by:
equals in interface MAJCommon
Overrides:
equals in class Object
Parameters:
o - Object to test for equality with.
Returns:
Is the given object equals to this value?
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from interface: MAJCommon

Returns a hash code value for this interchange object.

Specified by:
hashCode in interface MAJCommon
Overrides:
hashCode in class Object
Returns:
Hash code value for this interchange object.
See Also:
Object.hashCode()

clone

public ControlPoint 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 Object
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 InterchangeObject
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.