Media Authoring
with Java API

tv.amwa.maj.entity
Class SourceClip

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

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=4352,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="SourceClip",
          description="The SourceClip class represents the essence and identifies the source of the essence.")
public class SourceClip
extends SourceReferenceSegment
implements SourceClip, Serializable, Cloneable, MAJCommon

Implements a representation of essence and identifies the source of the essence. This interface uses the source reference values to manage the properties of a source clip.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class SourceClip.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
SourceClip(DataDefinition dataDefinition, long length, SourceReferenceValue sourceReference)
          Creates and initializes a new source clip, which represents an item of essence and identifies the source of the 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.
 SourceClip 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.
 Fade getFade()
          Deprecated. 
 long getFadeInLength()
          Deprecated. 
 FadeType getFadeInType()
          Deprecated. 
 long getFadeOutLength()
          Deprecated. 
 FadeType getFadeoutType()
          Deprecated. 
 SourceReferenceValue getSourceReference()
          The method returns the source reference of this source clip.
 long getStartTime()
           
 int hashCode()
          Returns a hash code value for this interchange object.
 Mob resolveRef()
          Returns the mob that this source clip references.
 void setFade(Fade fade)
          Deprecated. 
 void setFade(long fadeInLength, FadeType fadeInType, long fadeOutLength, FadeType fadeOutType)
          Deprecated. 
 void setPropertiesFromInterface(SourceClip castFrom)
           
 void setSourceReference(SourceReferenceValue sourceReference)
          Sets the source reference of this source clip.
 
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.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

SourceClip

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

Creates and initializes a new source clip, which represents an item of essence and identifies the source of the essence.

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

setPropertiesFromInterface

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

getSourceReference

public SourceReferenceValue getSourceReference()
Description copied from interface: SourceClip

The method returns the source reference of this source clip. The source reference includes the start time property of this source clip.

Specified by:
getSourceReference in interface SourceClip
Returns:
Source reference of this source clip.
See Also:
SourceReferenceValue.isContextual(), SourceReferenceValue.isOriginalSource(), SourceReferenceValue.getStartTime()

setSourceReference

public void setSourceReference(SourceReferenceValue sourceReference)
                        throws NullPointerException
Description copied from interface: SourceClip

Sets the source reference of this source clip. The source reference includes the start time property of this source clip.

Specified by:
setSourceReference in interface SourceClip
Parameters:
sourceReference - Source reference of this source clip.
Throws:
NullPointerException - The given source reference is null.
See Also:
SourceReferenceValue.originalSource(), SourceReferenceValue.inContextReference(int), SourceReferenceValue.inContextReference(int, Long), SourceReferenceValue.SourceReferenceValue(tv.amwa.maj.record.MobID, int, Long)

resolveRef

public Mob resolveRef()
               throws MobNotFoundException
Description copied from interface: SourceClip

Returns the mob that this source clip references.

Specified by:
resolveRef in interface SourceClip
Returns:
Mob that the source clip references.
Throws:
MobNotFoundException - The source reference of this source clip could not be resolved to a mob.

setFade

@Deprecated
public void setFade(long fadeInLength,
                               FadeType fadeInType,
                               long fadeOutLength,
                               FadeType fadeOutType)
             throws BadLengthException
Deprecated. 

Description copied from interface: SourceClip

Sets the optional fade properties of this source clip. The fade properties only apply to a source clip of data definition (or convertible to a data definition) of type sound. All arguments should be specified. Length units are specified by the containing mob slot's edit rate.

Specified by:
setFade in interface SourceClip
Parameters:
fadeInLength - Fade in length for the source clip.
fadeInType - Fade in type for the source clip.
fadeOutLength - Fade out length for the source clip.
fadeOutType - Fade out type for the source clip.
Throws:
BadLengthException - One or both of the length parameters of the fade is/are negative.
See Also:
Component.getDataDefinition(), DataDefinitionConstant.Sound, SourceClip.setFade(tv.amwa.maj.record.Fade)

getFade

@Deprecated
public Fade getFade()
Deprecated. 

Description copied from interface: SourceClip

This method returns the optional fade information for this source clip. This function only applies to audio source clips. Length units are specified by the containing mob slot's edit rate.

Specified by:
getFade in interface SourceClip
Returns:
Fade information for this source clip.

setFade

@Deprecated
public void setFade(Fade fade)
             throws NullPointerException
Deprecated. 

Description copied from interface: SourceClip

Sets the optional fade properties of this source clip from a set of fade properties. The fade properties only apply to a source clip of data definition (or convertible to a data definition) of type sound. Length units are specified by the containing mob slot's edit rate.

Specified by:
setFade in interface SourceClip
Parameters:
fade - Parameters of a fade for this source clip.
Throws:
NullPointerException - The given set of fade properties is null.
See Also:
Component.getDataDefinition(), DataDefinitionConstant.Sound, Fade.Fade(long, FadeType, long, FadeType), SourceClip.setFade(long, FadeType, long, FadeType)

getFadeInLength

@AAFProperty(uuid1=117572097,
             uuid2=261,
             uuid3=512,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="FadeInLength",
             typeName="LengthType",
             optional=true,
             uniqueIdentifier=false,
             pid=4610)
@Deprecated
public long getFadeInLength()
                     throws PropertyNotPresentException
Deprecated. 

Throws:
PropertyNotPresentException

getFadeInType

@AAFProperty(uuid1=87033089,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="FadeInType",
             typeName="FadeType",
             optional=true,
             uniqueIdentifier=false,
             pid=4611)
@Deprecated
public FadeType getFadeInType()
                       throws PropertyNotPresentException
Deprecated. 

Throws:
PropertyNotPresentException

getFadeOutLength

@AAFProperty(uuid1=117572097,
             uuid2=261,
             uuid3=768,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="FadeOutLength",
             typeName="LengthType",
             optional=true,
             uniqueIdentifier=false,
             pid=4612)
@Deprecated
public long getFadeOutLength()
                      throws PropertyNotPresentException
Deprecated. 

Throws:
PropertyNotPresentException

getFadeoutType

@AAFProperty(uuid1=87033090,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="FadeOutType",
             typeName="FadeType",
             optional=true,
             uniqueIdentifier=false,
             pid=4613)
@Deprecated
public FadeType getFadeoutType()
                        throws PropertyNotPresentException
Deprecated. 

Throws:
PropertyNotPresentException

getStartTime

@AAFProperty(uuid1=117571843,
             uuid2=260,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="StartTime",
             typeName="PositionType",
             optional=true,
             uniqueIdentifier=false,
             pid=4609)
public long getStartTime()
                  throws PropertyNotPresentException
Throws:
PropertyNotPresentException

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

clone

public SourceClip 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 Segment
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 SourceReferenceSegment
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.