tv.amwa.maj.entity
Class Segment
java.lang.Object
tv.amwa.maj.entity.InterchangeObject
tv.amwa.maj.entity.Component
tv.amwa.maj.entity.Segment
- All Implemented Interfaces:
- Serializable, Cloneable, MAJCommon, Component, InterchangeObject, Segment, XMLSerializable
- Direct Known Subclasses:
- EdgecodeSegment, EssenceGroup, Event, Filler, NestedScope, OperationGroup, Pulldown, ScopeReference, Selector, Sequence, SourceReferenceSegment, TimecodeSegment, TimecodeStream
@AAFClass(uuid1=218169601,
uuid2=257,
uuid3=768,
uuid4={6,14,43,52,2,6,1,1},
definedName="Segment",
description="The Segment class represents a Component that is independent of any surrounding object.")
public abstract class Segment
- extends Component
- implements Segment, Serializable, Cloneable, MAJCommon
Implements a component that is independent of any surrounding
object. Contrast this to a transition which is a component that
depends on other components to establish its value.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
- Author:
- Richard Cartwright
- See Also:
- Serialized Form
Methods inherited from class tv.amwa.maj.entity.Component |
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, appendXMLChildren, countAttributes, countComments, countKLVData, equals, getAttributes, getComments, getDataDefinition, getKLVData, getLength, getLengthPresent, hashCode, 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 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 |
Segment
public Segment()
setPropertiesFromInterface
public final void setPropertiesFromInterface(Segment castFrom)
segmentOffsetToTC
public TimecodeValue segmentOffsetToTC(long offset)
throws TimecodeNotFoundException
- Description copied from interface:
Segment
Converts the given segment offset to a timecode
value.
- Specified by:
segmentOffsetToTC
in interface Segment
- Parameters:
offset
- Segment offset to be converted to a timecode.
- Returns:
- Converted timecode value.
- Throws:
TimecodeNotFoundException
- The given offset is not available as
a timecode value in this segment.- See Also:
Segment.segmentTCToOffset(TimecodeValue, Rational)
segmentTCToOffset
public long segmentTCToOffset(TimecodeValue timecode,
Rational editRate)
throws NullPointerException,
TimecodeNotFoundException,
BadSampleOffsetException
- Description copied from interface:
Segment
Converts the given timecode and edit rate
to a segment offset value.
- Specified by:
segmentTCToOffset
in interface Segment
- Parameters:
timecode
- Timecode to be converted to an offset.editRate
- Edit rate of the given timecode.
- Returns:
- Frame offset into the segment.
- Throws:
NullPointerException
- One or both of the given timecode and/or edit rate is/are
null
.
TimecodeNotFoundException
- The given timecode is not available
in this segment.
BadSampleOffsetException
- The given timecode is outside the bounds
of the timecode values represented by this segment.- See Also:
Segment.segmentOffsetToTC(long)
clone
public Segment 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 Object
- Returns:
- Independent clone of this value, which is a deep copy.
- See Also:
Object.clone()
(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.