|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NestedScope
Specifies a scope and has an ordered set of segments. Typically, nested scopes are used within composition mobs.
The length of each segment contained in the list of segments must be the same as the length of the nested scope itself.
The value represented by a nested scope is the value specified by the last segment in the list of segments it contains, which must have a compatible essence type to that of the nested scope. Nested scopes are used to encapsulate intermediate results which may be referenced from more than one place, in a similar way to subexpressions within mathematical expressions.
makeNestedScope()
,
ScopeReference
,
CompositionMob
,
OperationGroup
Method Summary | |
---|---|
void |
appendSegment(Segment segment)
Append an input segment to the list of segments of this nested scope. |
int |
countSegments()
Returns the number of segments in the list of segments of this nested scope. |
Segment |
getSegmentAt(int index)
Returns the segment at the given index through the list of segments in this nested scope. |
List<? extends Segment> |
getSegments()
Returns the list of segments that make up this nested scope. |
void |
insertSegmentAt(int index,
Segment segment)
Insert an input segment into the list of segments of this nested scope at the given index. |
void |
prependSegment(Segment segment)
Prepend an input segment to the list of segments of this nested scope. |
void |
removeSegmentAt(int index)
Removes the segment at the given index in the list of segments of this nested scope. |
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 |
Method Detail |
---|
void appendSegment(Segment segment) throws NullPointerException, InvalidDataDefinitionException, BadLengthException
Append an input segment to the list of segments of this nested scope. The last segment added will be used as the output value of the nested scope. Typically, the given segment contains operations whose inputs are scope references.
segment
- Input segment to append to the list of segments in this nested scope.
NullPointerException
- The given segment is null
.
InvalidDataDefinitionException
- The given segment will become the value of this nested scope
has an incompatible data definition.
BadLengthException
- The given segment has a different length from that of this nested scope.void prependSegment(Segment segment) throws NullPointerException, BadLengthException
Prepend an input segment to the list of segments of this nested scope.
segment
- Segment to add at the beginning of the list.
NullPointerException
- The given segment is null
.
BadLengthException
- The given segment has a different length from that of
this nested scope.void insertSegmentAt(@UInt32 int index, Segment segment) throws NullPointerException, IndexOutOfBoundsException, InvalidDataDefinitionException, BadLengthException
Insert an input segment into the list of segments of this nested scope at the given index. Segments already existing at the given and higher indices will be moved up by one index to accommodate.
index
- Index at which the segment is to be inserted into the
list of segments of this nested scope.segment
- Segment to be inserted into the list.
NullPointerException
- The given segment is null
.
IndexOutOfBoundsException
- Index is outside the range
of the indices of the current list.
InvalidDataDefinitionException
- The given segment will become the value of this nested scope
and has an incompatible data definition.
BadLengthException
- The given segment has a different length from that of this nested scope.void removeSegmentAt(@UInt32 int index) throws IndexOutOfBoundsException, InvalidDataDefinitionException, IllegalArgumentException
Removes the segment at the given index in the list of segments of this nested scope. Segments already existing at indices greater than the given index will be moved down by one index to accommodate.
index
- Index corresponding to segment to be removed from the list of segments
of this nested scope.
IndexOutOfBoundsException
- The given index is outside the acceptable range for the current
list of segments.
InvalidDataDefinitionException
- The removal operation for the given index will result in the
value of the nested scope having an incompatible data definition to the nested scope itself.
IllegalArgumentException
- Removal of a segment will leave an empty list.@UInt32 int countSegments()
Returns the number of segments in the list of segments of this nested scope.
Segment getSegmentAt(@UInt32 int index) throws IndexOutOfBoundsException
Returns the segment at the given index through the list of segments in this nested scope.
index
- 0-based index of the segment to return.
IndexOutOfBoundsException
- Index is outside the range acceptable range
for the current list of segments of this nested scope.List<? extends Segment> getSegments()
Returns the list of segments that make up this nested scope.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |