Media Authoring
with Java API

tv.amwa.maj.entity
Class SourceReferenceSegment

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
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, Component, InterchangeObject, Segment, SourceReferenceSegment, XMLSerializable
Direct Known Subclasses:
SourceClip, TextClip

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=4096,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="SourceReference",
          description="The SourceReference class represents the essence or other data described by a MobSlot in a Mob.")
public abstract class SourceReferenceSegment
extends Segment
implements SourceReferenceSegment, Serializable, Cloneable, MAJCommon

Implements the representation of essence or other data described by a mob slot in a mob.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class SourceReferenceSegment.ChannelIDsXMLHandler
           
static class SourceReferenceSegment.MonoSourceSlotIDsXMLHandler
           
static class 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
static String SOURCEREFERENCE_ITEM
           
 
Fields inherited from class tv.amwa.maj.entity.Component
COMPONENT_ITEM
 
Constructor Summary
SourceReferenceSegment()
           
 
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.
 int[] getChannelIDs()
          For references to a multi-channel mob slot, returns the channel ids property of this source reference, which specifies the channels within that mob slot that are referenced.
 int getChannelIDsSize()
          Returns the number of elements of the channel ids array of this source reference.
 int[] getMonoSourceSlotIDs()
          For references from a multi-channel mob slot to multiple mono mob slots, returns the mono source slot ids property of this source reference, which specifies multiple mono mob slots that are referenced.
 int getMonoSourceSlotIDsSize()
          Returns the size of the mono source slot ids array.
 MobID getSourceID()
          Returns the source id of this source reference.
 int getSourceMobSlotID()
          Returns the mob slot id of this source reference.
 int hashCode()
          Returns a hash code value for this interchange object.
 void setChannelIDs(int[] channelIDs)
          For references to a multi-channel mob slot, sets the channel ids property of this source reference, which specifies the channels within that mob slot that are referenced.
 void setMonoSourceSlotIDs(int[] monoSourceSlotIDs)
          For references from a multi-channel mob slot to multiple mono mob slots, sets the mono source slot ids property of this source reference, which specifies multiple mono mob slots that are referenced.
 void setPropertiesFromInterface(SourceReferenceSegment castFrom)
           
 void setSourceID(MobID sourceID)
          Set the source id of this source reference, which identifies the mob being referenced.
 void setSourceMobSlotID(int slotID)
          Sets the mob slot id of this source reference.
 
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, toString, 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
clone, toString
 

Field Detail

SOURCEREFERENCE_ITEM

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

SourceReferenceSegment

public SourceReferenceSegment()
Method Detail

setPropertiesFromInterface

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

getChannelIDs

@AAFProperty(uuid1=100729091,
             uuid2=1792,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,7},
             definedName="ChannelIDs",
             typeName="UInt32Array",
             optional=true,
             uniqueIdentifier=false,
             pid=4355)
public int[] getChannelIDs()
                    throws PropertyNotPresentException
Description copied from interface: SourceReferenceSegment

For references to a multi-channel mob slot, returns the channel ids property of this source reference, which specifies the channels within that mob slot that are referenced. This optional property is omitted to indicate that all channels in the referenced mob slot are referenced in the same order.

The number of channel ids shall equal the number of channels being described the mob slot containing the source reference, e.g. 1 element for a mono audio slot, 6 elements for a 5.1 multi-channel audio slot.

Specified by:
getChannelIDs in interface SourceReferenceSegment
Returns:
Array of channel ids for this source reference.
Throws:
PropertyNotPresentException - The optional channel ids property is not present in this source reference.

setChannelIDs

public void setChannelIDs(int[] channelIDs)
                   throws IllegalArgumentException
Description copied from interface: SourceReferenceSegment

For references to a multi-channel mob slot, sets the channel ids property of this source reference, which specifies the channels within that mob slot that are referenced. Set this optional property to null to omit it and indicate that all channels in the referenced mob slot are referenced in the same order.

The number of channel ids shall equal the number of channels being described the mob slot containing the source reference, e.g. 1 element for a mono audio slot, 6 elements for a 5.1 multi-channel audio slot.

Specified by:
setChannelIDs in interface SourceReferenceSegment
Parameters:
channelIDs - Array of channel IDs to set for the source reference.
Throws:
IllegalArgumentException

getChannelIDsSize

public int getChannelIDsSize()
                      throws PropertyNotPresentException
Description copied from interface: SourceReferenceSegment

Returns the number of elements of the channel ids array of this source reference. For references to a multi-channel mob slot, the channel ids property specifies the channels within that mob slot that are referenced. This is an optional property.

Specified by:
getChannelIDsSize in interface SourceReferenceSegment
Returns:
Number of elements of the channel ids array of the source reference.
Throws:
PropertyNotPresentException - The optional channel ids property is not present in this source reference.

getMonoSourceSlotIDs

@AAFProperty(uuid1=100729091,
             uuid2=2048,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,8},
             definedName="MonoSourceSlotIDs",
             typeName="UInt32Array",
             optional=true,
             uniqueIdentifier=false,
             pid=4356)
public int[] getMonoSourceSlotIDs()
                           throws PropertyNotPresentException
Description copied from interface: SourceReferenceSegment

For references from a multi-channel mob slot to multiple mono mob slots, returns the mono source slot ids property of this source reference, which specifies multiple mono mob slots that are referenced. This is an optional property that is omitted to specify that this is a single-channel reference.

The number of elements in the mono source slot ids array shall equal the number of channels being described by the mob slot containing this source reference, e.g. 6 elements for a 5.1 multi-channel audio mob slot.

Specified by:
getMonoSourceSlotIDs in interface SourceReferenceSegment
Returns:
Array of mono source slot ids of this source reference.
Throws:
PropertyNotPresentException - This optional mono source slot ids property is not present in this source reference.

setMonoSourceSlotIDs

public void setMonoSourceSlotIDs(int[] monoSourceSlotIDs)
                          throws IllegalArgumentException
Description copied from interface: SourceReferenceSegment

For references from a multi-channel mob slot to multiple mono mob slots, sets the mono source slot ids property of this source reference, which specifies multiple mono mob slots that are referenced. Set this optional property to null to omit it and specify that this is a single-channel reference.

The number of elements in the mono source slot ids array shall equal the number of channels being described by the mob slot containing this source reference, e.g. 6 elements for a 5.1 multi-channel audio mob slot.

Specified by:
setMonoSourceSlotIDs in interface SourceReferenceSegment
Parameters:
monoSourceSlotIDs - Array of mono source slot ids for this source reference.
Throws:
IllegalArgumentException

getMonoSourceSlotIDsSize

public int getMonoSourceSlotIDsSize()
                             throws PropertyNotPresentException
Description copied from interface: SourceReferenceSegment

Returns the size of the mono source slot ids array. For references from a multi-channel mob slot to multiple mono mob slots, the mono source slot ids property specifies multiple mono mob slots that are referenced. This is an optional property.

Specified by:
getMonoSourceSlotIDsSize in interface SourceReferenceSegment
Returns:
Size of the mono source slot ids array.
Throws:
PropertyNotPresentException - The optional mono source slot ids property is not present for this source reference.

getSourceID

@AAFProperty(uuid1=100729091,
             uuid2=256,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="SourceID",
             typeName="MobIDType",
             optional=true,
             uniqueIdentifier=false,
             pid=4353)
public MobID getSourceID()
                  throws PropertyNotPresentException
Description copied from interface: SourceReferenceSegment

Returns the source id of this source reference. This is an optional property.

If the source id property is the zero mob id, the mob owning the source reference describes the original source. If this property is omitted, the reference is to another mob slot within the same mob.

Specified by:
getSourceID in interface SourceReferenceSegment
Returns:
Source id of this source reference.
Throws:
PropertyNotPresentException - The optional source id property is not present in this source reference, implying that this is a reference to a mob slot within the same mob.
See Also:
SourceReferenceValue.getSourceID()

setSourceID

public void setSourceID(MobID sourceID)
Description copied from interface: SourceReferenceSegment

Set the source id of this source reference, which identifies the mob being referenced.

If the property has a value of the zero mob id, it means that the mob owning this source reference describes the original source. Set this optional property to null to omit and indicate that this reference is to another mob slot in the same mob.

For source clips, it is recommended that the setSourceReference() method is used to set the source id property in preference to this method.

Specified by:
setSourceID in interface SourceReferenceSegment
Parameters:
sourceID - Source id of this source reference.
See Also:
SourceReferenceValue.setSourceID(MobID), MobID.getZeroMobID(), SourceClip.setSourceReference(SourceReferenceValue)

getSourceMobSlotID

@AAFProperty(uuid1=100729091,
             uuid2=512,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="SourceMobSlotID",
             typeName="UInt32",
             optional=false,
             uniqueIdentifier=false,
             pid=4354)
public int getSourceMobSlotID()
Description copied from interface: SourceReferenceSegment

Returns the mob slot id of this source reference. If the source id property is the the zero mob id, the source mob slot id should be 0.

Specified by:
getSourceMobSlotID in interface SourceReferenceSegment
Returns:
Mob slot id of this source reference.
See Also:
SourceReferenceValue.getSourceSlotID()

setSourceMobSlotID

public void setSourceMobSlotID(int slotID)
                        throws IllegalArgumentException
Description copied from interface: SourceReferenceSegment

Sets the mob slot id of this source reference. If the source id property is the the zero mob id, the source mob slot id should be 0.

Specified by:
setSourceMobSlotID in interface SourceReferenceSegment
Parameters:
slotID - Mob slot id of this source reference.
Throws:
IllegalArgumentException - The given source mob slot id is negative.
See Also:
SourceReferenceValue.setSourceSlotID(int)

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.