Media Authoring
with Java API

tv.amwa.maj.entity
Class DescriptiveClip

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.SourceReferenceSegment
                  extended by tv.amwa.maj.entity.SourceClip
                      extended by tv.amwa.maj.entity.DescriptiveClip
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, Component, DescriptiveClip, InterchangeObject, Segment, SourceClip, SourceReferenceSegment, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=17664,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="DescriptiveClip",
          description="A descriptive clip specifies what is being described and references a mob to provide that description.")
public class DescriptiveClip
extends SourceClip
implements DescriptiveClip, Serializable, Cloneable, MAJCommon

Implements a means to identify what is being described in terms of mob slots and references a mob to provide that description. This enables a segment in a descriptive metadata mob slot to reference a section of descriptive metadata in the mob slot of another mob. Typically, the referenced mob slot would contain descriptive markers.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class DescriptiveClip.DescribedSlotsHandler
           
static class DescriptiveClip.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.SourceReferenceSegment
SourceReferenceSegment.ChannelIDsXMLHandler, SourceReferenceSegment.MonoSourceSlotIDsXMLHandler, SourceReferenceSegment.SourceReferenceXMLHandler
 
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
 
Fields inherited from class tv.amwa.maj.entity.SourceReferenceSegment
SOURCEREFERENCE_ITEM
 
Fields inherited from class tv.amwa.maj.entity.Component
COMPONENT_ITEM
 
Constructor Summary
DescriptiveClip(DataDefinition dataDefinition, long length, SourceReferenceValue sourceReference)
          Creates and initializes a new descriptive clip, which specifies what is being descibed and references a mob to provide that description.
 
Method Summary
 void addDescribedSlotID(int describedSlotID)
          Adds the given described slot id to the list of described slot ids referenced by this descriptive clip,which specify which of the essence mob slots in the mob are being referenced.
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 DescriptiveClip clone()
          Creates a cloned copy of this entity.
 int countDescribedSlotIDs()
          Returns the number of described slot ids in the set of described slot ids referenced by this descriptive clip, which specify which of the essence mob slots in the mob are being referenced.
 boolean equals(Object o)
          Tests to see if the given object is equal to this interchange object.
 Set<Integer> getDescribedSlotIDs()
          Returns a copy of the set of descriptive slot ids referenced by this descriptive clip, which specify which of the essence mob slots in the mob are being referenced.
 int hashCode()
          Returns a hash code value for this interchange object.
 boolean isDescribedSlotIDPresent(int describedSlotID)
          Returns true if the given described slot id is present in the set of described slot ids referenced from this source clip, hich specify which of the essence mob slots in the mob are being referenced.
 void removeDescribedSlotID(int describedSlotID)
          Removes the given described slot id from the list of described slot ids referenced by this descriptive clip, which specify which of the essence mob slots in the mob are being referenced.
 void setPropertiesFromInterface(DescriptiveClip castFrom)
           
 
Methods inherited from class tv.amwa.maj.entity.SourceClip
getFade, getFadeInLength, getFadeInType, getFadeOutLength, getFadeoutType, getSourceReference, getStartTime, resolveRef, setFade, setFade, setPropertiesFromInterface, setSourceReference
 
Methods inherited from class tv.amwa.maj.entity.SourceReferenceSegment
getChannelIDs, getChannelIDsSize, getMonoSourceSlotIDs, getMonoSourceSlotIDsSize, getSourceID, getSourceMobSlotID, setChannelIDs, setMonoSourceSlotIDs, setPropertiesFromInterface, setSourceID, setSourceMobSlotID
 
Methods inherited from class tv.amwa.maj.entity.Segment
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, toString, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.SourceClip
getFade, getSourceReference, resolveRef, setFade, setFade, setSourceReference
 
Methods inherited from interface tv.amwa.maj.iface.SourceReferenceSegment
getChannelIDs, getChannelIDsSize, getMonoSourceSlotIDs, getMonoSourceSlotIDsSize, getSourceID, getSourceMobSlotID, setChannelIDs, setMonoSourceSlotIDs, setSourceID, setSourceMobSlotID
 
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
 

Constructor Detail

DescriptiveClip

public DescriptiveClip(DataDefinition dataDefinition,
                       long length,
                       SourceReferenceValue sourceReference)
                throws NullPointerException,
                       BadLengthException

Creates and initializes a new descriptive clip, which specifies what is being descibed and references a mob to provide that description.

Parameters:
dataDefinition - Kind of data represented by this component.
length - Length of the source clip component.
sourceReference - Reference to the mob providing the description.
Throws:
NullPointerException - The data definition and/or source reference arguments are null.
BadLengthException - The length of a descriptive clip cannot be negative.
Method Detail

setPropertiesFromInterface

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

getDescribedSlotIDs

@AAFProperty(uuid1=17236230,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="SourceTrackIDs",
             typeName="UInt32Set",
             optional=true,
             uniqueIdentifier=false,
             pid=24835)
public Set<Integer> getDescribedSlotIDs()
Description copied from interface: DescriptiveClip

Returns a copy of the set of descriptive slot ids referenced by this descriptive clip, which specify which of the essence mob slots in the mob are being referenced.

Specified by:
getDescribedSlotIDs in interface DescriptiveClip
Returns:
A copy of the set of descriptive slot ids referenced by this descriptive clip.

addDescribedSlotID

public void addDescribedSlotID(int describedSlotID)
                        throws IllegalArgumentException,
                               InvalidParameterException
Description copied from interface: DescriptiveClip

Adds the given described slot id to the list of described slot ids referenced by this descriptive clip,which specify which of the essence mob slots in the mob are being referenced.

Specified by:
addDescribedSlotID in interface DescriptiveClip
Parameters:
describedSlotID - Descriptive slot id to add to the set of described slot ids referenced by this descriptive clip.
Throws:
IllegalArgumentException - The given slot id is negative.
InvalidParameterException - The given described slot id is already contained in the list of described slot ids referenced by this descriptive clip.

countDescribedSlotIDs

public int countDescribedSlotIDs()
Description copied from interface: DescriptiveClip

Returns the number of described slot ids in the set of described slot ids referenced by this descriptive clip, which specify which of the essence mob slots in the mob are being referenced.

Specified by:
countDescribedSlotIDs in interface DescriptiveClip
Returns:
Number of described slot ids in the set of described slot ids referenced by this descriptive clip.

isDescribedSlotIDPresent

public boolean isDescribedSlotIDPresent(int describedSlotID)
                                 throws IllegalArgumentException
Description copied from interface: DescriptiveClip

Returns true if the given described slot id is present in the set of described slot ids referenced from this source clip, hich specify which of the essence mob slots in the mob are being referenced.

Specified by:
isDescribedSlotIDPresent in interface DescriptiveClip
Parameters:
describedSlotID - Described slot id to check to see if it is contained in the set of described slot ids of this descriptive clip.
Returns:
Is the given described slot id present in the set of described slot ids referenced by this descriptive clip?
Throws:
IllegalArgumentException - The given slot id is negative.

removeDescribedSlotID

public void removeDescribedSlotID(int describedSlotID)
                           throws IllegalArgumentException,
                                  InvalidParameterException
Description copied from interface: DescriptiveClip

Removes the given described slot id from the list of described slot ids referenced by this descriptive clip, which specify which of the essence mob slots in the mob are being referenced. In effect, optional property empty sets become not present when the last element is removed.

Specified by:
removeDescribedSlotID in interface DescriptiveClip
Parameters:
describedSlotID - Described slot id to remove from this descriptive clip.
Throws:
IllegalArgumentException - A given slot id is negative.
InvalidParameterException - The given slot id is not in the set of descriptive slot ids of this descriptive clip.

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 SourceClip
Parameters:
o - Object to test for equality with.
Returns:
Is the given object equals to this value?
See Also:
SourceReferenceSegment.equals(java.lang.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 SourceClip
Returns:
Hash code value for this interchange object.
See Also:
Object.hashCode()

clone

public DescriptiveClip 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 SourceClip
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 SourceClip
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.