Media Authoring
with Java API

tv.amwa.maj.entity
Class Event

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.Component
          extended by tv.amwa.maj.entity.Segment
              extended by tv.amwa.maj.entity.Event
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, Component, Event, InterchangeObject, Segment, XMLSerializable
Direct Known Subclasses:
CommentMarker, GPITrigger

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=1536,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="Event",
          description="The Event class defines a text comment, a trigger, or an area in the image that has an associated interactive action.")
public abstract class Event
extends Segment
implements Event, Serializable, Cloneable

Implements a text comment, a trigger, or an area in the image that has an associated interactive action.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class Event.EventXMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.Segment
Segment.SegmentXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.Component
Component.ComponentAttributesXMLHandler, Component.ComponentUserCommentsXMLHandler, Component.ComponentXMLHandler, Component.KLVDataXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String EVENT_ITEM
           
 
Fields inherited from class tv.amwa.maj.entity.Component
COMPONENT_ITEM
 
Constructor Summary
Event()
           
 
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.
 boolean equals(Object o)
          Tests to see if the given object is equal to this interchange object.
 String getComment()
          Returns the comment that specifies the purpose of this event.
 long getPosition()
          Returns the position of this event, which specifies the starting time of the event in an event mob slot.
 boolean getPositionPresent()
          Determine whether this event is in a context where the position property is present or not.
 int hashCode()
          Returns a hash code value for this interchange object.
 void setComment(String comment)
          Set a comment that specifies the purpose of the event.
 void setPosition(long position)
          Sets the position of this event, which specifies the starting time of the event in an event mob slot.
 void setPositionPresent(boolean positionPresent)
          Sets whether this event is in a context where the position property is present or not.
 void setPropertiesFromInterface(Event castFrom)
           
 
Methods inherited from class tv.amwa.maj.entity.Segment
clone, segmentOffsetToTC, segmentTCToOffset, setPropertiesFromInterface
 
Methods inherited from class tv.amwa.maj.entity.Component
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, countAttributes, countComments, countKLVData, getAttributes, getComments, getDataDefinition, getKLVData, getLength, getLengthPresent, removeAttribute, removeComment, removeKLVData, setDataDefinition, setLength, setLengthPresent, setPropertiesFromInterface
 
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.Segment
segmentOffsetToTC, segmentTCToOffset
 
Methods inherited from interface tv.amwa.maj.iface.Component
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, countAttributes, countComments, countKLVData, getAttributes, getComments, getDataDefinition, getKLVData, getLength, removeAttribute, removeComment, removeKLVData, setDataDefinition, setLength
 
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

EVENT_ITEM

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

Event

public Event()
Method Detail

setPropertiesFromInterface

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

getComment

@AAFProperty(uuid1=87032836,
             uuid2=256,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Comment",
             typeName="String",
             optional=true,
             uniqueIdentifier=false,
             pid=1538)
public String getComment()
                  throws PropertyNotPresentException
Description copied from interface: Event

Returns the comment that specifies the purpose of this event. This is an optional property.

Specified by:
getComment in interface Event
Returns:
Comment describing this event.
Throws:
PropertyNotPresentException - The optional comment property is not present in this event.

setComment

public void setComment(String comment)
Description copied from interface: Event

Set a comment that specifies the purpose of the event. Set this optional property to null to omit it.

Specified by:
setComment in interface Event
Parameters:
comment - Comment to set for this event.

getPosition

@AAFProperty(uuid1=117571843,
             uuid2=771,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Position",
             typeName="PositionType",
             optional=false,
             uniqueIdentifier=false,
             pid=1537)
public long getPosition()
                 throws BadPropertyException
Description copied from interface: Event

Returns the position of this event, which specifies the starting time of the event in an event mob slot.

Specified by:
getPosition in interface Event
Returns:
Position of this event in an event mob slot.
Throws:
BadPropertyException - The position property is not present in the context of this event.

setPosition

public void setPosition(long position)
                 throws BadPropertyException
Description copied from interface: Event

Sets the position of this event, which specifies the starting time of the event in an event mob slot.

Specified by:
setPosition in interface Event
Parameters:
position - The position for this event in an event mob slot.
Throws:
BadPropertyException - The position property is not present in the context of this event.

getPositionPresent

public boolean getPositionPresent()

Determine whether this event is in a context where the position property is present or not.

If an Event is in a timeline mob slot or a static mob slot, it shall not have a position property. If an event is in an event mob slot, it shall have a position property.

Returns:
Is this event in a context where the position property is present?

setPositionPresent

public void setPositionPresent(boolean positionPresent)

Sets whether this event is in a context where the position property is present or not.

If an Event is in a timeline mob slot or a static mob slot, it shall not have a position property. If an event is in an event mob slot, it shall have a position property.

Parameters:
positionPresent - Is this event in a context where the position property is 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 Component
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 Component
Returns:
Hash code value for this interchange object.
See Also:
Object.hashCode()

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 Component
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.