Media Authoring
with Java API

tv.amwa.maj.iface
Interface Component

All Superinterfaces:
InterchangeObject
All Known Subinterfaces:
CommentMarker, DescriptiveClip, DescriptiveMarker, EdgecodeSegment, EssenceGroup, Event, Filler, GPITrigger, HTMLClip, NestedScope, OperationGroup, Pulldown, ScopeReference, Segment, Selector, Sequence, SourceClip, SourceReferenceSegment, TextClip, TimecodeSegment, TimecodeStream, TimecodeStream12M, Transition
All Known Implementing Classes:
CommentMarker, Component, DescriptiveClip, DescriptiveMarker, EdgecodeSegment, EssenceGroup, Event, Filler, GPITrigger, HTMLClip, NestedScope, OperationGroup, Pulldown, ScopeReference, Segment, Selector, Sequence, SourceClip, SourceReferenceSegment, TextClip, TimecodeSegment, TimecodeStream, TimecodeStream12M, Transition

public interface Component
extends InterchangeObject

Specifies an essence element.

The getLength() and setLength(long) methods apply to all time-varying media and may apply to events but do not apply to static media, so length is an optional property. Whether the property is present or omitted is determined by the kind of mob slot that the component is in:

Author:
Richard Cartwright
See Also:
MobSlot.getSegment()

Method Summary
 void appendAttribute(String name, String value)
          Append an attribute name/value pair to the attributes collection of of this component, which specify attributes that are under the control of the application (for example filter control).
 void appendAttribute(TaggedValue attribute)
          Append an attribute defined by an existing tagged value to the attributes collection of this component, which specify attributes that are under the control of the application (for example filter control).
 void appendComment(String name, String value)
          Append a user comment name/value pair to the collection of user comments of the component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 void appendComment(TaggedValue comment)
          Append a user comment defined by an existing tagged value to the collection of user comments of this component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 void appendKLVData(KLVData data)
          Appends a KLV Data to the collection of KLV data of this component.
 int countAttributes()
          Returns the size of the collection of attributes for the component, which specify attributes that are under the control of the application (for example filter control).
 int countComments()
          Returns the number of user comments in the collection of user comments of this component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 int countKLVData()
          Returns the total number of KLV data in the collection for this component.
 List<? extends TaggedValue> getAttributes()
          Returns the collection of attributes of this component, which specify attributes that are under the control of the application (for example filter control).
 List<? extends TaggedValue> getComments()
          Returns the collection of user comments of the component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 DataDefinition getDataDefinition()
          Returns the data definition of the component, which specifies the kind of data described by this component.
 List<? extends KLVData> getKLVData()
          Returns the list of KLV data of this component.
 long getLength()
          Returns the length of this component, which specifies its duration in edit units.
 void removeAttribute(TaggedValue attribute)
          Remove an attribute from the collection of attributes of this component, which specify attributes that are under the control of the application (for example filter control).
 void removeComment(TaggedValue comment)
          Removes a given user comment from the collection of user comments of this component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).
 void removeKLVData(KLVData data)
          Removes the given KLV data from the collection of this component.
 void setDataDefinition(DataDefinition dataDefinition)
          Sets the data definition property for the component, which specifies the kind of data described by this component.
 void setLength(long length)
          Sets the length property of this component, which specifies its duration in edit units.
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 

Method Detail

setLength

void setLength(@LengthType
               long length)
               throws BadLengthException

Sets the length property of this component, which specifies its duration in edit units. This is an optional property, which will only be present for time-varying media.

Parameters:
length - The duration in edit units of this component.
Throws:
BadLengthException - Cannot set the length to a negative value.

getLength

@LengthType
long getLength()
               throws BadPropertyException

Returns the length of this component, which specifies its duration in edit units. This is an optional property, which will be present for time-varying media and may be present for events.

Returns:
Length of this component in edit units.
Throws:
BadPropertyException - The optional length property is not present for this object.

setDataDefinition

void setDataDefinition(DataDefinition dataDefinition)
                       throws NullPointerException

Sets the data definition property for the component, which specifies the kind of data described by this component.

Parameters:
dataDefinition - Data definition of this component.
Throws:
NullPointerException - The given data definition is null.

getDataDefinition

DataDefinition getDataDefinition()

Returns the data definition of the component, which specifies the kind of data described by this component.

Returns:
Data definition of this component.

appendKLVData

void appendKLVData(KLVData data)
                   throws NullPointerException

Appends a KLV Data to the collection of KLV data of this component.

Parameters:
data - KLV data value to add to the set of KLV data values of this component.
Throws:
NullPointerException - The given KLV data value is null.
See Also:
makeKLVData()

countKLVData

@UInt32
int countKLVData()

Returns the total number of KLV data in the collection for this component.

Returns:
Number of KLV data objects in this collection for this component.

getKLVData

List<? extends KLVData> getKLVData()

Returns the list of KLV data of this component.

Returns:
Shallow copy of the list of KLV data of this component.

removeKLVData

void removeKLVData(KLVData data)
                   throws NullPointerException,
                          ObjectNotFoundException

Removes the given KLV data from the collection of this component.

Parameters:
data - KLV data value to remove from the component.
Throws:
NullPointerException - The given KLV data item is null.
ObjectNotFoundException - The given KLV data object is not in the collection of this component.

appendComment

void appendComment(@AAFString
                   String name,
                   @AAFString
                   String value)
                   throws NullPointerException

Append a user comment name/value pair to the collection of user comments of the component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

This method creates a new tagged value, initializes it with the specified comment name/value pair, and appends it to the comment list.

Parameters:
name - The name associated with the new comment to create.
value - The corresponding value, or description, of the new comment.
Throws:
NullPointerException - One or both of the name and/or value values is/are null.
See Also:
makeTaggedValue()

appendComment

void appendComment(TaggedValue comment)
                   throws NullPointerException

Append a user comment defined by an existing tagged value to the collection of user comments of this component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

Parameters:
comment - User comment to append to the collection of user comments of this component.
Throws:
NullPointerException - The given user comment value is null.
See Also:
makeTaggedValue(), TaggedValueDefinition

countComments

@UInt32
int countComments()

Returns the number of user comments in the collection of user comments of this component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

Returns:
Number of user comments of the component.

getComments

List<? extends TaggedValue> getComments()

Returns the collection of user comments of the component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

Returns:
Shallow copy of the collection of user comments for this component.

removeComment

void removeComment(TaggedValue comment)
                   throws NullPointerException,
                          ObjectNotFoundException

Removes a given user comment from the collection of user comments of this component, which specify user comments that are directly classified and set up by the operator (for example Bin columns).

Parameters:
comment - User comment to remove from the collection of user comments of this component.
Throws:
NullPointerException - The given comment is null.
ObjectNotFoundException - The comment to be removed cannot be found in the collection of comments of this component.

appendAttribute

void appendAttribute(@AAFString
                     String name,
                     @AAFString
                     String value)
                     throws NullPointerException

Append an attribute name/value pair to the attributes collection of of this component, which specify attributes that are under the control of the application (for example filter control).

This method creates a new tagged value, initializes it with the specified attribute name/value pair, and appends it to the attribute list.

Parameters:
name - Name for the new attribute.
value - Corresponding value for the new attribute.
Throws:
NullPointerException - One or both of the given name and/or value method parameters are null.

appendAttribute

void appendAttribute(TaggedValue attribute)
                     throws NullPointerException

Append an attribute defined by an existing tagged value to the attributes collection of this component, which specify attributes that are under the control of the application (for example filter control).

Parameters:
attribute - Tagged value to be appended to the collection of attributes for this component.
Throws:
NullPointerException - The given attribute value is null.
See Also:
makeTaggedValue(), TaggedValueDefinition

countAttributes

@UInt32
int countAttributes()

Returns the size of the collection of attributes for the component, which specify attributes that are under the control of the application (for example filter control).

Returns:
Size of the collection of attributes of this component.

getAttributes

List<? extends TaggedValue> getAttributes()

Returns the collection of attributes of this component, which specify attributes that are under the control of the application (for example filter control).

Returns:
Shallow copy of the collection of attributes of this component.

removeAttribute

void removeAttribute(TaggedValue attribute)
                     throws NullPointerException,
                            ObjectNotFoundException

Remove an attribute from the collection of attributes of this component, which specify attributes that are under the control of the application (for example filter control).

Parameters:
attribute - Attribute to remove from the collection of attributes of the component.
Throws:
NullPointerException - The given attribute is null.
ObjectNotFoundException - The given tagged value is not currently contained by the list of attributes of this component.

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.