|
Media Authoring with Java API |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objecttv.amwa.maj.entity.InterchangeObject
tv.amwa.maj.entity.Component
tv.amwa.maj.entity.Segment
tv.amwa.maj.entity.Sequence
@AAFClass(uuid1=218169601,
uuid2=257,
uuid3=3840,
uuid4={6,14,43,52,2,6,1,1},
definedName="Sequence",
description="The Sequence class combines an ordered list of Segments and Transitions.")
public class Sequence
Implements the representation of the combination of an ordered list of segments and transitions. A sequence is the mechanism for combining sections of essence to be played in a sequential manner. If a sequence object has one segment followed by another segment, after the first segment is played, the following one begins immediately.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
| Nested Class Summary | |
|---|---|
static class |
Sequence.ComponentsXMLHandler
|
static class |
Sequence.XMLHandler
|
| 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 |
SEQUENCE_TAG
|
| Fields inherited from class tv.amwa.maj.entity.Component |
|---|
COMPONENT_ITEM |
| Constructor Summary | |
|---|---|
Sequence(DataDefinition dataDefinition)
Creates and initializes a new sequence, which combines an ordered list of segments and transitions. |
|
| Method Summary | |
|---|---|
void |
appendComponent(Component component)
Appends the given component to this sequence. |
void |
appendXMLChildren(Node parent)
Append child elements to the given parent node to serialize the value of an object to an XML fragment. |
Sequence |
clone()
Creates a cloned copy of this entity. |
int |
countComponents()
Returns the number of components in this sequence. |
boolean |
equals(Object o)
Tests to see if the given object is equal to this interchange object. |
Component |
getComponentAt(int index)
Returns the component at the given index through this sequence. |
List<Component> |
getComponents()
Returns a list of all the components of this sequence. |
int |
hashCode()
Returns a hash code value for this interchange object. |
void |
insertComponentAt(int index,
Component component)
Insert the given component into this sequence at the given index. |
void |
prependComponent(Component component)
Prepends the given component to this sequence. |
void |
removeComponentAt(int index)
Removes the component at the given index from this sequence. |
void |
setPropertiesFromInterface(Sequence castFrom)
|
| 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.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 |
|---|
public static final String SEQUENCE_TAG
| Constructor Detail |
|---|
public Sequence(DataDefinition dataDefinition)
throws NullPointerException
Creates and initializes a new sequence, which combines an ordered list of
segments and transitions.
dataDefinition - Kind of data represented by this component.
NullPointerException - Data definition is null.| Method Detail |
|---|
public final void setPropertiesFromInterface(Sequence castFrom)
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)
@AAFProperty(uuid1=100729092,
uuid2=1545,
uuid3=0,
uuid4={6,14,43,52,1,1,1,2},
definedName="Components",
typeName="StrongReferenceVector of Component",
optional=false,
uniqueIdentifier=false,
pid=4097)
public List<Component> getComponents()
SequenceReturns a list of all the components of this sequence.
getComponents in interface Sequence
public void appendComponent(Component component)
throws NullPointerException,
InvalidDataDefinitionException,
LeadingTransitionException,
EventSemanticsException,
BadPropertyException,
BadLengthException,
AdjacentTransitionException,
InsufficientTransitionMaterialException
SequenceAppends the given component to this sequence. The length of the sequence is incremented by the size of the component or transition.
If the component is to be the first in the sequence and is a
transition, the method
fails with a LeadingTransitionException as it is not
acceptable to have a transition as the first element of a sequence.
Note that this method supports the incremental creation of sequences from start to
finish and so could be used to create a sequence that ends in a transition,
which is an illegal state.
The method checks that the data definition of the appended component is compatible with that of the sequence.
appendComponent in interface Sequencecomponent - Component to append to this sequence.
NullPointerException - The given component is null.
InvalidDataDefinitionException - The kind of data of the component
is not compatible with the data definition of the sequence.
LeadingTransitionException - A transition cannot be appended to a
sequence so as to become its first component.
EventSemanticsException - The given component is an event that
either: does not match the other kinds of event in the sequence; does not have the contextual
position property set; does not follow on from the previous event.
BadPropertyException - The given non-event component does not have a
length value set.
BadLengthException - The length of the given components is negative.
AdjacentTransitionException - Appending the given transition component would
result in two adjacent transitions.
InsufficientTransitionMaterialException - Appending the given component
or transition will result in insufficient material for the last transition in
the sequence.Eventpublic int countComponents()
SequenceReturns the number of components in this sequence.
countComponents in interface Sequence
public Component getComponentAt(int index)
throws IndexOutOfBoundsException
SequenceReturns the component at the given index through this sequence.
getComponentAt in interface Sequenceindex - Index of component through this sequence
IndexOutOfBoundsException - The index is outside the acceptable
range for this sequence.
public void insertComponentAt(int index,
Component component)
throws NullPointerException,
IndexOutOfBoundsException,
InvalidDataDefinitionException,
LeadingTransitionException,
AdjacentTransitionException,
InsufficientTransitionMaterialException
SequenceInsert the given component into this sequence at the given index. The length of the sequence is incremented by the size of the component, unless the component is a transition. Indices of components higher than the given index will be increased by one to accommodate the new component.
If the component is a transition, the method checks that it is not the first object in the sequence, and that it is not neighbouring another transition. It also verifies that there is enough source material on either side of the transition. Note that this method supports the incremental creation of sequences from start to finish and so could be used to create a sequence that ends in a transition, which is an illegal state.
The method checks that the data definition
of the appended component is compatible with that of the sequence.
insertComponentAt in interface Sequenceindex - 0-based index to insert the new component at.component - Component to insert into the sequence.
NullPointerException - The given component to insert is null.
IndexOutOfBoundsException - The index is outside the acceptable
range for the sequence.
InvalidDataDefinitionException - The kind of data of the component
is not compatible with the data definition of the sequence.
LeadingTransitionException - A transition component cannot be
inserted as first element of the sequence.
AdjacentTransitionException - Inserting a transition and the
given index will result in two neighbouring transitions, which is not
permitted.
InsufficientTransitionMaterialException - Not enough source material
exists either side of the given transition for the transition to work.
public void prependComponent(Component component)
throws NullPointerException,
InvalidDataDefinitionException,
LeadingTransitionException
SequencePrepends the given component to this sequence. The length of the sequence is incremented by the size of the component.
If the component is a transition, the method
fails with a LeadingTransitionException as it is not
acceptable to have a transition as the first element of a sequence.
Use Sequence.insertComponentAt(int, Component) instead.
The method checks that the data definition
of the appended component is compatible with that of the sequence.
prependComponent in interface Sequencecomponent - Component to prepend to this sequence.
NullPointerException - The given component is null.
InvalidDataDefinitionException - The kind of data of the component
is not compatible with the data definition of the sequence.
LeadingTransitionException - A transition cannot be appended to a
sequence so as to become its first or last component.
public void removeComponentAt(int index)
throws IndexOutOfBoundsException
SequenceRemoves the component at the given index from this sequence. Components already existing at indices higher than the given index will be moved to the next lower index to accommodate.
Note that removal of a component from a sequence may result in the sequence being in an illegal state.
removeComponentAt in interface Sequenceindex - Index of component to be removed.
IndexOutOfBoundsException - The index is outside the acceptable
range for the sequence.public boolean equals(Object o)
MAJCommonTests 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.
equals in interface MAJCommonequals in class Componento - Object to test for equality with.
Object.equals(Object)public int hashCode()
MAJCommonReturns a hash code value for this interchange object.
hashCode in interface MAJCommonhashCode in class ComponentObject.hashCode()public Sequence clone()
MAJCommonCreates 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.
clone in interface MAJCommonclone in class SegmentSegment.clone()public void appendXMLChildren(Node parent)
XMLSerializableAppend 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.
appendXMLChildren in interface XMLSerializableappendXMLChildren in class Componentparent - XML parent element to append child nodes to.
|
Media Authoring with Java API |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||