Media Authoring
with Java API

tv.amwa.maj.entity
Class TimelineMobSlot

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

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=15104,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="TimelineMobSlot",
          description="The TimelineMobSlot class describes time-varying timeline essence.")
public class TimelineMobSlot
extends MobSlot
implements TimelineMobSlot, Serializable, Cloneable, MAJCommon

Implements the representation of a track that describes time-varying timeline essence.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class TimelineMobSlot.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.MobSlot
MobSlot.MobSlotSegmentXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String TIMELINEMOBSLOT_TAG
           
 
Fields inherited from class tv.amwa.maj.entity.MobSlot
MOBSLOT_ITEM
 
Constructor Summary
TimelineMobSlot(int slotId, Segment segment, Rational editRate, long origin)
          Creates and initializes a new timeline mob slot, which describes time-varying timeline essence.
 
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.
 TimelineMobSlot 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.
 Rational getEditRate()
          Returns the edit rate for this timeline mob slot, which specifies the units of time of the slot.
 long getMarkIn()
          Returns the mark in property of the timeline mob slot.
 long getMarkOut()
          Returns the mark out property of this timeline mob slot, which specifies the position of the marked out point as a count of edit units from the zero position of this timeline mob slot.
 long getOrigin()
          Returns the origin of this timeline mob slot, which specifies the offset used to resolve source clip references in this timeline mob slot.
 long getUserPos()
          Returns the user position property of the timeline mob slot, which specifies a user position as a count of edit units from the zero position of the timeline mob slot.
 int hashCode()
          Returns a hash code value for this interchange object.
 void setEditRate(Rational editRate)
          Sets the edit rate for this timeline mob slot, which specifies the units of time of the slot.
 void setMarkIn(Long value)
          Sets the mark in property for this timeline mob slot, which specifies the position of the marked in point as a count of edit units from the zero position of this timeline mob slot.
 void setMarkOut(Long value)
          Sets the mark out property of this timeline mob slot, which specifies the position of the marked out point as a count of edit units from the zero position of this timeline mob slot.
 void setOrigin(long origin)
          Sets the origin of this timeline mob slot, which specifies the offset used to resolve source clip references in this timeline mob slot.
 void setPropertiesFromInterface(TimelineMobSlot castFrom)
           
 void setSegment(Segment segment)
          Sets the segment for this timeline mob slot if the given segment satisfies all the required constraints.
 void setUserPos(Long value)
          Sets the user position property of the timeline mob slot, which specifies a user position as a count of edit units from the zero position of the timeline mob slot.
 void sourceMobContext()
          Sets this timeline mob slot to be in the context of a source mob.
 
Methods inherited from class tv.amwa.maj.entity.MobSlot
getDataDefinition, getId, getName, getPhysicalNumber, getSegment, getSlotID, setId, setName, setPhysicalNumber, setPropertiesFromInterface, setSlotID
 
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.MobSlot
getDataDefinition, getName, getPhysicalNumber, getSegment, getSlotID, setName, setPhysicalNumber, setSlotID
 
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
 

Field Detail

TIMELINEMOBSLOT_TAG

public static final String TIMELINEMOBSLOT_TAG
See Also:
Constant Field Values
Constructor Detail

TimelineMobSlot

public TimelineMobSlot(@UInt32
                       int slotId,
                       Segment segment,
                       Rational editRate,
                       @PositionType
                       long origin)
                throws NullPointerException,
                       IllegalArgumentException

Creates and initializes a new timeline mob slot, which describes time-varying timeline essence.

Parameters:
slotId - Integer that is used to reference the mob slot.
segment - Value of the new timeline mob slot.
editRate - Units of time for the new timeline mob slot.
origin - Offset used to resolve source clip references to the new timeline mob slot. A positive value of origin means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.
Throws:
NullPointerException - The segment and/or edit rate arguments is/are null.
IllegalArgumentException - Slot id is negative or the given segment is not valid for a timeline mob slot.
Method Detail

setPropertiesFromInterface

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

getEditRate

@AAFProperty(uuid1=87032837,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="EditRate",
             typeName="Rational",
             optional=false,
             uniqueIdentifier=false,
             pid=19201)
public Rational getEditRate()
Description copied from interface: TimelineMobSlot

Returns the edit rate for this timeline mob slot, which specifies the units of time of the slot.

Specified by:
getEditRate in interface TimelineMobSlot
Returns:
Edit rate for this timeline mob slot.

setEditRate

public void setEditRate(Rational editRate)
                 throws NullPointerException
Description copied from interface: TimelineMobSlot

Sets the edit rate for this timeline mob slot, which specifies the units of time of the slot.

Specified by:
setEditRate in interface TimelineMobSlot
Parameters:
editRate - Edit rate for this timeline mob slot.
Throws:
NullPointerException - The given edit rate is null.

getMarkIn

@AAFProperty(uuid1=117571843,
             uuid2=268,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,7},
             definedName="MarkIn",
             typeName="PositionType",
             optional=true,
             uniqueIdentifier=false,
             pid=19203)
public long getMarkIn()
               throws PropertyNotPresentException
Description copied from interface: TimelineMobSlot

Returns the mark in property of the timeline mob slot. This property specifies the position of the marked in point as a count of edit units from the zero position of the timeline mob slot. This is an optional property.

Note that this property shall not be present for a source mob.

Specified by:
getMarkIn in interface TimelineMobSlot
Returns:
Mark in property for the timeline mob slot.
Throws:
PropertyNotPresentException - The optional mark in property is not present in this timeline mob slot.

setMarkIn

public void setMarkIn(Long value)
Description copied from interface: TimelineMobSlot

Sets the mark in property for this timeline mob slot, which specifies the position of the marked in point as a count of edit units from the zero position of this timeline mob slot. Set this optional property to null to omit it.

Note that this property shall not be present for a source mob.

Specified by:
setMarkIn in interface TimelineMobSlot
Parameters:
value - Mark in property for this timeline mob slot.

getMarkOut

@AAFProperty(uuid1=117571843,
             uuid2=515,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,7},
             definedName="MarkOut",
             typeName="PositionType",
             optional=true,
             uniqueIdentifier=false,
             pid=19204)
public long getMarkOut()
                throws PropertyNotPresentException
Description copied from interface: TimelineMobSlot

Returns the mark out property of this timeline mob slot, which specifies the position of the marked out point as a count of edit units from the zero position of this timeline mob slot. This is an optional property.

Note that this property shall not be present for a source mob.

Specified by:
getMarkOut in interface TimelineMobSlot
Returns:
Mark out property of this timeline mob slot.
Throws:
PropertyNotPresentException - The optional mark out property is not present in this timeline mob slot.

setMarkOut

public void setMarkOut(Long value)
Description copied from interface: TimelineMobSlot

Sets the mark out property of this timeline mob slot, which specifies the position of the marked out point as a count of edit units from the zero position of this timeline mob slot. Set this optional property to null to omit it.

Note that this property shall not be present for a source mob.

Specified by:
setMarkOut in interface TimelineMobSlot
Parameters:
value - Mark out property of this timeline mob slot.

getOrigin

@AAFProperty(uuid1=117571843,
             uuid2=259,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Origin",
             typeName="PositionType",
             optional=false,
             uniqueIdentifier=false,
             pid=19202)
public long getOrigin()
Description copied from interface: TimelineMobSlot

Returns the origin of this timeline mob slot, which specifies the offset used to resolve source clip references in this timeline mob slot. A positive value of origin means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.

Specified by:
getOrigin in interface TimelineMobSlot
Returns:
Origin of this timeline mob slot.

setOrigin

public void setOrigin(long origin)
Description copied from interface: TimelineMobSlot

Sets the origin of this timeline mob slot, which specifies the offset used to resolve source clip references in this timeline mob slot. A positive value of origin means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.

Specified by:
setOrigin in interface TimelineMobSlot
Parameters:
origin - Origin of this timeline mob slot.

getUserPos

@AAFProperty(uuid1=117571843,
             uuid2=269,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,7},
             definedName="UserPos",
             typeName="PositionType",
             optional=true,
             uniqueIdentifier=false,
             pid=19205)
public long getUserPos()
                throws PropertyNotPresentException
Description copied from interface: TimelineMobSlot

Returns the user position property of the timeline mob slot, which specifies a user position as a count of edit units from the zero position of the timeline mob slot. This is an optional property.

Note that this property shall not be present for a source mob.

Specified by:
getUserPos in interface TimelineMobSlot
Returns:
The user position property of this timeline mob slot.
Throws:
PropertyNotPresentException - The optional user position property is not present in this timeline mob slot.

setUserPos

public void setUserPos(Long value)
Description copied from interface: TimelineMobSlot

Sets the user position property of the timeline mob slot, which specifies a user position as a count of edit units from the zero position of the timeline mob slot. Set this optional property to null to omit it.

Note that this property shall not be present for a source mob.

Specified by:
setUserPos in interface TimelineMobSlot
Parameters:
value - User position property of this timeline mob slot.

setSegment

public void setSegment(Segment segment)
                throws NullPointerException,
                       IllegalArgumentException

Sets the segment for this timeline mob slot if the given segment satisfies all the required constraints. These constraints only affect timeline mob slots with a sequence that contains an event. In this case, the constraints are:

Specified by:
setSegment in interface MobSlot
Overrides:
setSegment in class MobSlot
Parameters:
segment - Segment representing the value for this mob slot.
Throws:
NullPointerException - Argument is null.
IllegalArgumentException - The given segment does not satisfy the contraints of a timeline mob slot.
See Also:
MobSlot.setSegment(tv.amwa.maj.iface.Segment)

sourceMobContext

public void sourceMobContext()

Sets this timeline mob slot to be in the context of a source mob. In this context, the mark in, mark out and user position properties are all not present.


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 MobSlot
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 MobSlot
Returns:
Hash code value for this interchange object.
See Also:
Object.hashCode()

clone

public TimelineMobSlot 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 MobSlot
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 MobSlot
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.