Media Authoring
with Java API

tv.amwa.maj.iface
Interface AAFFactory

All Known Implementing Classes:
AAFFactory

public interface AAFFactory

Specifies a factory for all concrete, persistent AAF classes. For every concrete class in the AAF Java API interface X, a factory method makeX is included here. Each method must be provided with the required parameters of that class according to the AAF object specification, with the exception of required values with a specified default value and required collection values that are permitted to be empty (size 0).

In general, all optional properties are omitted in a newly manufactured object. These can then be subsequently included and set to values other than their defaults using set, append etc. methods of the manufactured classes themselves.

An implementation of this interface is available as AAFFactory. To create an instance of the factory, use the static method:

tv.amwa.maj.factory.AAFFactory.getFatory()

This factory also extends to meta definitions that can be manufactured using the methods of this factory. Manufacturing new type definitions is an advanced use of the MAJ API and may lead to interoperability issues so it is recommended that wherever possible, the built in and registered meta definitions are used. These well-known meta definitions can be found and referenced using the implementations of the following methods:

Property definitions can be accessed through methods of their respective class definitions.

This factory also includes methods to make timecode and edgecode values that are required parameters to other factory methods.

Included in the see all section of the documentation for each method is a link to the related MAJ API constructor implementation that can be called to provide an implementation of the specified factory method.

Author:
Richard Cartwright

Method Summary
 ClassDefinition classDefinitionForClass(Class<?> javaClass)
          Finds and returns an class definition for the given Java class.
 ClassDefinition classDefinitionForName(String className)
          Finds and returns a class definition for the given AAF class name.
 DataDefinition dataDefinitionForName(String definitionName)
          Finds and returns a data definition from the given data definition name.
 AAFFile makeAAFFile(FileDescriptor aafFile)
          Manufactures and initializes an AAF file from a Java file descriptor.
 AES3PCMDescriptor makeAES3PCMDescriptor(ContainerDefinition containerFormat, Rational audioSamplingRate, int channels, int quantizationBits, short blockAlign, int averageBPS)
          Manufactures a new AES3 PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format.
 AIFCDescriptor makeAIFCDescriptor(ContainerDefinition containerFormat, Rational sampleRate, long length, byte[] summary)
          Manufactures and initializes a new AIFC descriptor, which specifies that a file source mob is associated with audio essence formatted according to the Audio Interchange File Format with Compression (AIFC).
 AuxiliaryDescriptor makeAuxiliaryDescriptor(String mimeType)
          Manufactures and initializes a new auxiliary descriptor, which describes an auxiliary file essence source using the given mime type.
 BWFImportDescriptor makeBWFImportDescriptor()
          Manufactures and initializes a new BWF import descriptor, which specifies imported audio data essence encoded according to the Broadcast Wave specifications.
 CDCIDescriptor makeCDCIDescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, int horizontalSubsampling, int componentWidth)
          Manufactures and initializes a new CDCI descriptor, which specifies that a file source mob is associated with video essence that is formatted with one luminance component and two color-difference components.
 ClassDefinition makeClassDefinition(AUID identification, String className, ClassDefinition parentClass, boolean isConcrete)
          Manufactures and initializes a class definition, which defines a class and references its underlying properties.
 CodecDefinition makeCodecDefinition(AUID identification, String name, ClassDefinition fileDescriptorClass, Set<DataDefinition> dataDefinitions)
          Manufactures and initializes all the fields of a codec definition, which specifies an essence codec.
 CommentMarker makeCommentMarker(DataDefinition dataDefinition)
          Manufactures and initializes a new comment marker for the given kind of essence data, which specifies a user comment that is associated with a point in time.
 CompositionMob makeCompositionMob(MobID mobID, String name)
          Manufacturers and initializes a composition mob, which specifies how to combine essence elements into a sequence, how to modify essence elements, and how to synchronize essence elements.
 ConstantValue makeConstantValue(ParameterDefinition parameterDefinition, Object value)
          Manufactures and initializes a new constant value object, which specifies a constant data value for an effect control value.
 ContainerDefinition makeContainerDefinition(AUID identification, String name)
          Manufactures and initializes a container definition, which specifies the mechanism used to store essence data.
 ContentStorage makeContentStorage(Set<Mob> mobs, Set<EssenceData> essenceData)
          Manufactures and initializes a content storage object, which stores the mob and essence data objects of an AAF persistent unit.
 ControlPoint makeControlPoint(VaryingValue varyingValue, Rational time, Object value)
          Manufactures and initializes a new control point, which contains a value at point in time and is used to specify an effect control value.
 DataDefinition makeDataDefinition(AUID identification, String name)
          Manufactures and initializes the required fields of a data definition, which specifies the kind of data that can be stored in a component.
 DataEssenceDescriptor makeDataEssenceDescriptor(ContainerDefinition containerFormat)
          Manufactures and initializes a new data essence descriptor, which specifies that a file source mob is associated with data essence.
 DescriptiveClip makeDescriptiveClip(DataDefinition dataDefinition, long length, SourceReferenceValue sourceReference)
          Manufactures and initializes a new descriptive clip, which specifies what is being described and references a mob to provide that description.
 DescriptiveMarker makeDescriptiveMarker()
          Manufactures and initializes a descriptive marker, which specifies descriptive metadata that is associated with a point in time.
 Dictionary makeDictionary()
          Manufactures and initializes a new dictionary object, which has the definition objects of an AAF persistent unit.
 EdgecodeSegment makeEdgecode(long length, EdgecodeValue edgecode)
          Manufactures and initializes a new edgecode segment, which stores film edge code information.
 EdgecodeSegment makeEdgecodeSegment(long length, EdgecodeValue edgecode)
          Manufactures and initializes a new edgecode segment, which stores film edge code information.
 EdgecodeValue makeEdgecodeValue(long start, FilmType filmKind, EdgeType codeFormat)
          Manufactures and initializes a new edgecode value, which can be used to define the value on an edgecode segment.
 EssenceData makeEssenceData(SourceMob sourceMob, byte[] data)
          Manufactures and initializes a new essence data object that contains essence.
 EssenceFormat makeEssenceFormat()
          Manufactures and initializes an empty essence format list.
 EssenceGroup makeEssenceGroup(DataDefinition dataDefinition, long length)
          Manufactures and initializes an empty essence group segment, which describes multiple digital representations of the same original content source.
 EventMobSlot makeEventMobSlot(int slotId, Segment segment, Rational editRate)
          Manufactures and initializes a new event mob slot, which holds a sequence of events.
 Filler makeFiller(DataDefinition dataDefinition, long length)
          Manufactures and initializes a new filler segment, which represents an unspecified value for the duration of the segment.
 FilmDescriptor makeFilmDescriptor()
          Manufactures and initializes a film descriptor that describes film media.
 GPITrigger makeGPITrigger(DataDefinition dataDefinition, boolean activeState)
          Manufactures and initializes a new GPI trigger event, which specifies a trigger action that should be taken when the GPITrigger is reached.
 Header makeHeader()
          Manufactures and initializes a header, which provides file-wide information and indexes.
 HTMLClip makeHTMLClip(MobID sourceID, int sourceMobSlotID)
          Manufactures and initializes a new HTML clip, which represents an HTML document and identifies the source of the document.
 HTMLDescriptor makeHTMLDescriptor(ContainerDefinition containerFormat)
          Manufactures and initializes a new HTML descriptor, which describes static essence in the HTML file format.
 Identification makeIdentification(String companyName, String productName, String productVersionString, AUID productID)
          Manufactures and initializes a new identification, which provides information about the application that created or modified a file.
 ImportDescriptor makeImportDescriptor()
          Manufactures and initializes a new import descriptor, which represents a file essence source that is not directly manipulated by an AAF application.
 InterpolationDefinition makeInterpolationDefinition(AUID identification, String name)
          Manufactures and initializes a new interpolation definition, which specifies the mechanism used to calculate the values produced by a varying value using the specified control points.
 KLVData makeKLVData(AUID key, byte[] value)
          Manufactures and initializes a new KLV data object, which contains user data specified with a key (SMPTE label), length, and value.
 KLVDataDefinition makeKLVDataDefinition(AUID identification, String name)
          Manufactures and initializes a new KLV data definition, which documents the KLV data objects used in the current persistent unit.
 MasterMob makeMasterMob(MobID mobID, String name)
          Manufactures and initializes a new master mob, which provides access to source mob and essence data objects.
 MPEGVideoDescriptor makeMPEGVideoDescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, int horizontalSubsampling, int componentWidth)
          Manufactures and initializes a new MPEG video descriptor , which specifies that a file source mob is associated with video essence that is represented and coded according to the MPEG specifications.
 MultipleDescriptor makeMultipleDescriptor(Rational sampleRate, long length)
          Manufactures and initializes a new multiple descriptor, which content data associated with a single file source mob that contains multiple tracks of essence.
 NestedScope makeNestedScope(List<Segment> slots)
          Manufactures and initializes a new nested scope, which defines a scope and has an ordered set of segments.
 NetworkLocator makeNetworkLocator(String urlString)
          Manufactures and initializes a new network locator, which provides information to help find a file containing essence.
 OperationDefinition makeOperationDefinition(AUID identifier, String name, DataDefinition dataDefinition, int numberInputs)
          Manufactures and initializes a new operation definition, which identifies an operation that is performed on an array of segments.
 OperationGroup makeOperationGroup(DataDefinition dataDefinition, long length, OperationDefinition operation)
          Manufactures and initializes a new operation group, which contains an ordered set of segments and an operation that is performed on these.
 ParameterDefinition makeParameterDefinition(AUID identification, String name, TypeDefinition type)
          Manufactures and initializes a new parameter definition, which defines a kind of parameter for an effect.
 PCMDescriptor makePCMDescriptor(ContainerDefinition containerFormat, Rational audioSamplingRate, int channels, int quantizationBits, short blockAlign, int averageBPS)
          Manufactures and initializes a new PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format.
 PluginDefinition makePluginDefinition(AUID identification, String name, AUID pluginCategory, VersionType versionNumber, AUID definitionObject)
          Manufactures and initializes a plugin definition, which is used to identify code objects that provide an implementation for a definition object such as codec definition, or for a meta definition such as a class definition.
 PropertyDefinition makePropertyDefinition(AUID identification, String name, TypeDefinition type, ClassDefinition memberOf, boolean isOptional)
          Manufactures and initializes a new property definition, which describes allowed properties of a class definition.
 Pulldown makePulldown(DataDefinition dataDefinition, Segment inputSegment, PulldownKindType pulldownKind, PulldownDirectionType pulldownDirection, int phaseFrame)
          Manufactures and initializes a new pulldown segment, which converts between film frame rates and videotape frame rates.
 RecordingDescriptor makeRecordingDescriptor()
          Manufactures and initializes a new recording descriptor, which describes the source of file source material that has no physical source.
 RGBADescriptor makeRGBADescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, RGBAComponent[] pixelLayout)
          Manufactures and initializes a new RGBA descriptor that does not include or use a palette.
 RGBADescriptor makeRGBADescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, RGBAComponent[] pixelLayout, byte[] palette, RGBAComponent[] paletteLayout)
          Manufactures and initializes a new RGBA descriptor that includes a palette.
 RIFFChunk makeRIFFChunk(int chunkID)
          Manufactures and initializes a new RIFF data chunk with the given chunk identifier.
 ScopeReference makeScopeReference(DataDefinition dataDefinition, int relativeScope, int relativeSlot)
          Manufactures and initializes a new scope reference object, which refers to a section in the specified mob slot or nested scope slot.
 Selector makeSelector(Segment selected)
          Manufactures and initializes a new selector segment, which provides the value of a single segment while preserving references to unused alternatives.
 Sequence makeSequence(DataDefinition dataDefinition)
          Manufactures and initializes a new sequence, which combines an ordered list of segments and transitions.
 SoundDescriptor makeSoundDescriptor(ContainerDefinition containerFormat, Rational audioSamplingRate, int channels, int quantizationBits)
          Manufactures and initializes a new sound descriptor, which specifies that a file source mob is associated with audio essence.
 SourceClip makeSourceClip(DataDefinition dataDefinition, long length, SourceReferenceValue sourceReference)
          Manufactures and initializes a new source clip, which represents an item of essence and identifies the source of the essence.
 SourceMob makeSourceMob(MobID mobID, String name, EssenceDescriptor essenceDescription)
          Manufactures and initializes a new source mob, which describes essence that is either stored in a digital form in a file or stored on a physical media, such as tape or film.
 StaticMobSlot makeStaticMobSlot(int slotId, Segment segment)
          Manufactures and initializes a new static mob slot, which describes essence data that has no relationship to time, such as a static image.
 TaggedValue makeTaggedValue(String name, TypeDefinition typeDefinition, Object value)
          Manufactures and initializes a new tagged value, which specifies a user-defined tag and value.
 TaggedValueDefinition makeTaggedValueDefinition(AUID identification, String name)
          Manufactures and initializes all the fields of a tagged value definition, which can be used to document the tagged value objects used in an AAF persistent unit.
 TapeDescriptor makeTapeDescriptor()
          Manufactures and initializes a new tape descriptor, which describes audio tape or video tape media.
 TextLocator makeTextLocator(String name)
          Manufactures and initializes a new text locator, which provides information to help find a file containing essence or to help find the physical media.
 TIFFDescriptor makeTIFFDescriptor(ContainerDefinition containerFormat, boolean isUniform, boolean isContiguous, byte[] summary)
          Manufactures and initializes a new TIFF descriptor, which specifies that a file source mob is associated with video essence formatted according to the TIFF specification.
 TimecodeSegment makeTimecode(long length, TimecodeValue timecode)
          Manufactures and initializes a new timecode segment, which stores videotape or audio tape timecode information.
 TimecodeSegment makeTimecodeSegment(long length, TimecodeValue timecode)
          Manufactures and initializes a new timecode segment, which stores videotape or audio tape timecode information.
 TimecodeStream12M makeTimecodeStream12M(Rational sampleRate, byte[] source, TCSource sourceType)
          Manufactures and initializes a new SMPTE 12M-compliant timecode stream, which specifies a stream of timecode data in the SMPTE 12M format.
 TimecodeValue makeTimecodeValue(long start, short fps, boolean drop)
          Manufactures and initializes a new timecode value.
 TimelineMobSlot makeTimelineMobSlot(int slotId, Segment segment, Rational editRate, long origin)
          Manufactures and initializes a new timeline mob slot, which describes time-varying timeline essence.
 Transition makeTransition(DataDefinition dataDefinition, long length, OperationGroup operationGroup, long cutPoint)
          Manufactures and initializes a transition, which specifies that the two adjacent segments should be overlapped when they are played and that the overlapped sections should be combined using the specified effect.
 TypeDefinitionCharacter makeTypeDefinitionCharacter(AUID identification, String typeName)
          Manufactures and initializes a new type definition for characters, which defines a property type that has a value of a single 2-byte character similar to Java's char type.
 TypeDefinitionEnumeration makeTypeDefinitionEnumeration(AUID identification, String typeName, Class<?> enumeration)
          Manufactures and initializes an enumeration type definition, which defines a property type that can have one of a set of integer values.
 TypeDefinitionExtendibleEnumeration makeTypeDefinitionExtendibleEnumeration(AUID identification, String typeName, SortedMap<String,AUID> elements)
          Manufactures and initializes a new extendible enumeration type definition, which defines a property type that can have one of an extendible set of AUID values.
 TypeDefinitionFixedArray makeTypeDefinitionFixedArray(AUID identification, String typeName, TypeDefinition elementType, int numberElements)
          Manufactures and initializes a new fixed array type definition, which defines a property type that has a fixed number of values of the underlying type.
 TypeDefinitionIndirect makeTypeDefinitionIndirect(AUID identification, String typeName)
          Manufactures and initializes a new indirect type definition, which defines a property type that has a value whose type is specified in each instance.
 TypeDefinitionInteger makeTypeDefinitionInteger(AUID identification, String typeName, byte intSize, boolean isSigned)
          Manufactures and initializes a new integer type definition, which defines a property type that is a signed or an unsigned integer with the specified number of bytes.
 TypeDefinitionOpaque makeTypeDefinitionOpaque(AUID identification, String typeName)
          Manufactures and initializes a new opaque type definition, which defines a property type that has a value whose type is specified in each instance.
 TypeDefinitionRecord makeTypeDefinitionRecord(AUID identification, String typeName, String[] names, Map<String,TypeDefinition> elements)
          Manufactures and initializes a new record type definition, which defines a property type that consists of an ordered set of fields, where each field has a name and type.
 TypeDefinitionRename makeTypeDefinitionRename(AUID identification, String typeName, TypeDefinition baseType)
          Manufactures and initializes a new renamed type definition, which defines a property type that has the same structure and representation as its underlying type but has a different meaning.
 TypeDefinitionSet makeTypeDefinitionSet(AUID identification, String typeName, TypeDefinitionObjectReference elementType)
          Manufactures and initializes a new set type definition, which defines a property type that has a collection of object references to uniquely identified objects.
 TypeDefinitionStream makeTypeDefinitionStream(AUID identification, String typeName)
          Manufactures and initializes a new type definition for a streams, which defines a property type that is stored in a stream and has a value that consists of a varying number of the bytes.
 TypeDefinitionString makeTypeDefinitionString(AUID identification, String typeName, TypeDefinition typeDefinition)
          Manufactures and initializes a new string type definition, which defines a property type that consists of a zero-terminated array of the underlying character or integer type.
 TypeDefinitionStrongObjectReference makeTypeDefinitionStrongObjectReference(AUID identification, String typeName, ClassDefinition referencedType)
          Manufactures and initializes a new strong object reference type definition, which defines a property type that defines an object relationship where the target of the strong reference is owned by the object with the property.
 TypeDefinitionVariableArray makeTypeDefinitionVariableArray(AUID identification, String typeName, TypeDefinition elementType)
          Manufactures and initializes a new variable size array type definition, which defines a property type that has a varying number of values of the underlying type.
 TypeDefinitionWeakObjectReference makeTypeDefinitionWeakObjectReference(AUID identification, String typeName, ClassDefinition objectType, AUID[] targetSet)
          Manufactures and initializes a new weak object reference type definition, which defines a property type that defines an object relationship where the target of the weak reference is referenced by the object with the property.
 VaryingValue makeVaryingValue(ParameterDefinition parameterDefinition, InterpolationDefinition interpolation)
          Manufactures and initializes a new varying value, which specifies a changing data value for an effect control value.
 WAVEDescriptor makeWAVEDescriptor(ContainerDefinition containerFormat, byte[] summary)
          Manufactures and initializes a new WAVE descriptor, which specifies that a file source mob is associated with audio essence formatted according to the RIFF Waveform Audio File Format (WAVE).
 TypeDefinition typeDefinitionForIdentification(AUID identification)
          Finds and returns the type definition for the given type identification.
 TypeDefinition typeDefinitionForName(String typeName)
          Finds and returns the type definition for the given type name.
 

Method Detail

makeAAFFile

AAFFile makeAAFFile(FileDescriptor aafFile)
                    throws NullPointerException

Manufactures and initializes an AAF file from a Java file descriptor. This method makes no attempt to check the validity of the given file descriptor or whether the file it specifies exists and can be accessed.

Note that in the current version of the MAJ API, no support is provided for AAF structured format or KLV files. The MAJ API implementation of this method does nothing useful. This and related methods are provided as part of a skeleton implementation of an interface similar to that provided in the existing C-based reference implementation COM interface definitions (file "AAF.idl").

Parameters:
aafFile - File descriptor for an AAF file.
Returns:
Manufactured AAF file.
Throws:
NullPointerException - The given file descriptor is null.
See Also:
Related MAJ API constructor

makeAIFCDescriptor

AIFCDescriptor makeAIFCDescriptor(ContainerDefinition containerFormat,
                                  Rational sampleRate,
                                  @LengthType
                                  long length,
                                  @DataValue
                                  byte[] summary)
                                  throws NullPointerException,
                                         BadLengthException

Manufactures and initializes a new AIFC descriptor, which specifies that a file source mob is associated with audio essence formatted according to the Audio Interchange File Format with Compression (AIFC).

Parameters:
containerFormat - Container mechanism used to store the essence.
sampleRate - Sample rate of the essence.
length - Duration of the essence measured in sample units.
summary - Copy of the descriptive information in the associated AIFC audio data value.
Returns:
Manufactured AIFC descriptor.
Throws:
NullPointerException - One or more of the arguments is null and all values are required.
BadLengthException - The given length of the described material is negative.
See Also:
Related MAJ API constructor, CodecConstant.AIFC

makeAuxiliaryDescriptor

AuxiliaryDescriptor makeAuxiliaryDescriptor(@AAFString
                                            String mimeType)
                                            throws NullPointerException

Manufactures and initializes a new auxiliary descriptor, which describes an auxiliary file essence source using the given mime type.

Parameters:
mimeType - Registered mimetype of the data in the auxiliary file, according to RFC 2046 (MIME Media Types) and RFC 2048 (MIME Registration Procedures).
Returns:
Manufactured auxiliary descriptor
Throws:
NullPointerException - The mime type argument is null.
See Also:
Related MAJ API constructor

makeCDCIDescriptor

CDCIDescriptor makeCDCIDescriptor(ContainerDefinition containerFormat,
                                  @UInt32
                                  int storedHeight,
                                  @UInt32
                                  int storedWidth,
                                  LayoutType frameLayout,
                                  @VideoLineMap
                                  int[] videoLineMap,
                                  Rational imageAspectRatio,
                                  @UInt32
                                  int horizontalSubsampling,
                                  @UInt32
                                  int componentWidth)
                                  throws NullPointerException,
                                         IllegalArgumentException

Manufactures and initializes a new CDCI descriptor, which specifies that a file source mob is associated with video essence that is formatted with one luminance component and two color-difference components. This format is commonly known as "YCbCr".

Parameters:
containerFormat - Container mechanism used to store the essence.
storedHeight - Number of pixels in vertical dimension of the stored view.
storedWidth - Number of pixels in horizontal dimension of the stored view.
frameLayout - Describes whether all data for a complete sample is in one frame or is split into more than one field.
videoLineMap - The scan line in the analog source that corresponds to the beginning of each digitized field. For single-field video, there is 1 value in the array; for interlaced video, there are 2 values in the array.
imageAspectRatio - Describes the ratio between the horizontal size and the vertical size in the intended final image.
horizontalSubsampling - Ratio of luminance sampling to chrominance sampling in the horizontal direction. For 4:2:2 video, the value is 2, which means that there are twice as many luminance values as there are color-difference values. Legal values are 1, 2 and 4.
componentWidth - Number of bits used to store each component. Can have a value of  8, 10 or 16. Each component in a sample is packed contiguously; the sample is filled with the number of bits specified by the optional padding bits property. If the padding bits property is omitted, samples are packed contiguously.
Returns:
Manufactured CDCI descriptor.
Throws:
NullPointerException - One or more of arguments is null and all of the arguments are required.
IllegalArgumentException - The given values are not of the permitted ranges.
See Also:
Related MAJ API constructor, CodecConstant.CDCI

makeClassDefinition

ClassDefinition makeClassDefinition(AUID identification,
                                    @AAFString
                                    String className,
                                    ClassDefinition parentClass,
                                    boolean isConcrete)
                                    throws NullPointerException

Manufactures and initializes a class definition, which defines a class and references its underlying properties. If the concrete property is set to true, objects of this class can be instantiated; otherwise, it is illegal to instantiate such objects.

When creating a class definition using the MAJ API, it is advisable to set the Java class implementation of the given definition using ClassDefinition.setJavaImplementation(Class).

Note that for reasons of interoperability, it is recommended that reference is made to existing class definitions. To get a reference to an existing class definition, use the classDefinitionForClass(Class) and classDefinitionForName(String) methods.

Parameters:
identification - Identification of the new class definition.
className - Friendly name of the new class definition.
parentClass - Specifies the parent of the class being defined according to class inheritance. If set to null, the new definition is assumed to be for a root class.
isConcrete - Can objects of this class be instantiated?
Returns:
Manufactured class definition.
Throws:
NullPointerException - The identification argument is null.
See Also:
Related MAJ API constructor, classDefinitionForClass(Class), classDefinitionForName(String), ClassDefinitionWarehouse, AAFClass

makeCodecDefinition

CodecDefinition makeCodecDefinition(AUID identification,
                                    @AAFString
                                    String name,
                                    ClassDefinition fileDescriptorClass,
                                    Set<DataDefinition> dataDefinitions)
                                    throws NullPointerException,
                                           IllegalArgumentException

Manufactures and initializes all the fields of a codec definition, which specifies an essence codec. The set of data definitions for essence kinds processed by the codec must contain at least one item, otherwise an IllegalArgumentException will be thrown.

Parameters:
identification - Unique identifier for new codec definition.
name - Display name for the new codec definition.
fileDescriptorClass - Class definition of the sub-class of file descriptor that identifies the essence format that this codec processes.
dataDefinitions - Data definitions of the essence formats that the new codec processes.
Returns:
Manufactured codec definition.
Throws:
NullPointerException - One or more of the arguments is null and all are required in this implementation.
IllegalArgumentException - Cannot crate a codec definition with and empty set of data definitions.
See Also:
Related MAJ API constructor, CodecConstant, Dictionary.getCodecDefinitions()

makeCommentMarker

CommentMarker makeCommentMarker(DataDefinition dataDefinition)
                                throws NullPointerException

Manufactures and initializes a new comment marker for the given kind of essence data, which specifies a user comment that is associated with a point in time. If this event is in an event mob slot, the position must also be set using Event.setPosition(long). Call CommentMarker.setAnnotation(SourceReferenceSegment) to set the optional annotation.

Parameters:
dataDefinition - Kind of data represented by this component.
Returns:
Manufactured comment marker.
Throws:
NullPointerException - The data definition argument is null.
See Also:
Related MAJ API constructor, Event

makeCompositionMob

CompositionMob makeCompositionMob(@MobIDType
                                  MobID mobID,
                                  @AAFString
                                  String name)
                                  throws NullPointerException

Manufacturers and initializes a composition mob, which specifies how to combine essence elements into a sequence, how to modify essence elements, and how to synchronize essence elements. The required properties of creation time and last modified time will be set automatically to the time of calling this method. These timestamp values can subsequently be set manually by calling setCreateTime() and and setModTime().

Parameters:
mobID - Unique material identifier for the new composition mob.
name - Name of the new composition mob.
Returns:
Manufactured composition mob.
Throws:
NullPointerException - Unique material identifier argument is null.
See Also:
Related MAJ API constructor, Mob

makeConstantValue

ConstantValue makeConstantValue(ParameterDefinition parameterDefinition,
                                Object value)
                                throws NullPointerException,
                                       ClassCastException

Manufactures and initializes a new constant value object, which specifies a constant data value for an effect control value.

Parameters:
parameterDefinition - Parameter definition for this object. This determines the type of the constant value.
value - The constant's value.
Returns:
Manufactured constant value object.
Throws:
NullPointerException - Either of the arguments is null.
ClassCastException - The given value is not of the required type.
See Also:
Related MAJ API constructor, Parameter

makeContainerDefinition

ContainerDefinition makeContainerDefinition(AUID identification,
                                            @AAFString
                                            String name)
                                            throws NullPointerException

Manufactures and initializes a container definition, which specifies the mechanism used to store essence data. A container can be either a kind of file, such as an AAF file, or it can be another mechanism for storing essence data. The essence is identified flag is initially set to false. Call ContainerDefinition.setEssenceIsIdentified(Boolean) to change this.

Parameters:
identification - Unique identifier for the new container definition.
name - Display name for new container definition.
Returns:
Manufactured container definition.
Throws:
NullPointerException - Identification argument is null.
See Also:
Related MAJ API constructor, ContainerConstant, Dictionary.getContainerDefinitions()

makeContentStorage

ContentStorage makeContentStorage(Set<Mob> mobs,
                                  Set<EssenceData> essenceData)
                                  throws NullPointerException

Manufactures and initializes a content storage object, which stores the mob and essence data objects of an AAF persistent unit. An AAF persistent unit shall have exactly one content storage object.

Use empty sets to indicate no mobs or essence data items are stored initially.

Parameters:
mobs - Set of all mobs to place into the new content storage.
essenceData - Set of all essence data objects to place into the new content storage.
Returns:
Manufactured content storage.
Throws:
NullPointerException - One or both of the sets are null. Use empty sets to indicate no mobs or essence data items are stored initially.
See Also:
Related MAJ API constructor

makeControlPoint

ControlPoint makeControlPoint(VaryingValue varyingValue,
                              Rational time,
                              Object value)
                              throws RationalRangeException,
                                     NullPointerException,
                                     ClassCastException

Manufactures and initializes a new control point, which contains a value at point in time and is used to specify an effect control value.

Parameters:
varyingValue - A varying value for the given point in time. This also determines the type of this control point through its associated parameter definition.
time - Specifies the time within the varying value segment for which the value is defined, with a value between 0 and 1.
value - Control point value.
Returns:
Manufactured control point value.
Throws:
RationalRangeException - Rational time value is outside the inclusive range 0.0 to 1.0.
NullPointerException - One or more of the arguments is null and all values are required.
ClassCastException - The control point value is not of the required type.
See Also:
Related MAJ API constructor, ParameterDefinition, VaryingValue

makeDataDefinition

DataDefinition makeDataDefinition(AUID identification,
                                  @AAFString
                                  String name)
                                  throws NullPointerException

Manufactures and initializes the required fields of a data definition, which specifies the kind of data that can be stored in a component.

Note that it is not normally necessary to make a new data definition as references to all the registered data definitions are available through dataDefinitionForName(String).

Parameters:
identification - Unique identifier for the data definition.
name - Name for the data definition.
Returns:
Manufactured data definition.
Throws:
NullPointerException - One or both of the arguments is/are null.
See Also:
Related MAJ API constructor, DataDefinitionConstant, Dictionary.getDataDefinitions(), dataDefinitionForName(String)

makeDescriptiveMarker

DescriptiveMarker makeDescriptiveMarker()

Manufactures and initializes a descriptive marker, which specifies descriptive metadata that is associated with a point in time. If this event is in an event mob slot, the position should subsequently be set using Event.setPosition(long).

Returns:
Manufactured descriptive marker.
See Also:
Related MAJ API constructor, CommentMarker, Event

makeDictionary

Dictionary makeDictionary()

Manufactures and initializes a new dictionary object, which has the definition objects of an AAF persistent unit. All the sets of definitions in the dictionary are initialized to empty sets.

Returns:
Manufactured dictionary.
See Also:
Related MAJ API constructor, DefinitionObject

makeEdgecodeSegment

EdgecodeSegment makeEdgecodeSegment(@LengthType
                                    long length,
                                    EdgecodeValue edgecode)
                                    throws NullPointerException,
                                           BadLengthException,
                                           BadSizeException

Manufactures and initializes a new edgecode segment, which stores film edge code information.

Note that in the MAJ API, the edgecode segment class is known as "EdgecodeSegment" whereas in the AAF specification it is known as just "Edgecode". See the section on naming conflicts in the package description for more details. As a result, calling this method is the same as calling makeEdgecode.

Parameters:
length - Duration in edit units of this component.
edgecode - Edgecode value for the new edgecode segment, which can be created with a call to makeEdgecodeValue(long, FilmType, EdgeType).
Returns:
Manufactured edgecode segment.
Throws:
NullPointerException - Edgecode argument is null.
BadLengthException - Cannot set the length of a component to a negative value.
BadSizeException - The given edgecode value has a header that is longer than 8 bytes.
See Also:
Related MAJ API constructor, EdgecodeValue, makeEdgecodeValue(long, FilmType, EdgeType)

makeEdgecode

EdgecodeSegment makeEdgecode(@LengthType
                             long length,
                             EdgecodeValue edgecode)
                             throws NullPointerException,
                                    BadLengthException,
                                    BadSizeException

Manufactures and initializes a new edgecode segment, which stores film edge code information.

Note that in the MAJ API, the edgecode segment class is known as "EdgecodeSegment" whereas in the AAF specification it is known as just "Edgecode". See the section on naming conflicts in the package description for more details. As a result, calling this method is the same as calling makeEdgecodeSegment().

Parameters:
length - Duration in edit units of this component.
edgecode - Edgecode value for the new edgecode segment, which can be created with a call to makeEdgecodeValue(long, FilmType, EdgeType).
Returns:
Manufactured edgecode segment.
Throws:
NullPointerException - Edgecode argument is null.
BadLengthException - Cannot set the length of a component to a negative value.
BadSizeException - The given edgecode value has a header that is longer than 8 bytes.
See Also:
Related MAJ API constructor, EdgecodeValue, makeEdgecodeValue(long, FilmType, EdgeType)

makeEdgecodeValue

EdgecodeValue makeEdgecodeValue(@PositionType
                                long start,
                                FilmType filmKind,
                                EdgeType codeFormat)
                                throws NullPointerException

Manufactures and initializes a new edgecode value, which can be used to define the value on an edgecode segment. The optional edgecode header is initially omitted and can be subsequently set using the EdgecodeValue.setHeader(byte[]) method. It is recommended that this is done before the manufactured edgecode value is used to create an edgecode segment.

Parameters:
start - Edgecode value at the beginning of the segment
filmKind - Type of film.
codeFormat - Edge code format.
Returns:
Manufactured edgecode value.
Throws:
NullPointerException - The film kind and/or code format arguments is/are null.
See Also:
Related MAJ API constructor, EdgecodeValue, makeEdgecodeSegment(long, EdgecodeValue), makeEdgecode(long, EdgecodeValue)

makeEssenceData

EssenceData makeEssenceData(SourceMob sourceMob,
                            @DataBuffer
                            byte[] data)
                            throws NullPointerException

Manufactures and initializes a new essence data object that contains essence. This method requires a weak reference to the corresponding source mob that describes the given essence data.

Parameters:
sourceMob - Identifies the source mob that describes the essence.
data - The essence data.
Returns:
Manufactured essence data container.
Throws:
NullPointerException - One or both of the arguments is/are null.
See Also:
Related MAJ API constructor

makeEssenceFormat

EssenceFormat makeEssenceFormat()

Manufactures and initializes an empty essence format list. Specifiers can be added to the list using addFormatSpecifier().

Note that in the current version of the MAJ API, no support is provided for AAF structured format or KLV files. The MAJ API implementation of this method does nothing useful. This and related methods are provided as part of a skeleton implementation of an interface similar to that provided in the existing C-based reference implementation COM interface definitions (file "AAF.idl").

Returns:
Manufactured essence format list.

makeEssenceGroup

EssenceGroup makeEssenceGroup(DataDefinition dataDefinition,
                              @LengthType
                              long length)
                              throws NullPointerException,
                                     BadLengthException

Manufactures and initializes an empty essence group segment, which describes multiple digital representations of the same original content source. The group should contain at least one segment, so call EssenceGroup.appendChoice(Segment) directly after creating the group.

Parameters:
dataDefinition - Kind of data described by the component.
length - Length of each and every segment in this group.
Returns:
Manufactured essence group.
Throws:
NullPointerException - Data definition argument is null.
BadLengthException - Cannot set the length of a component to a negative value.
See Also:
Related MAJ API constructor

makeEventMobSlot

EventMobSlot makeEventMobSlot(@SlotID
                              int slotId,
                              Segment segment,
                              Rational editRate)
                              throws NullPointerException,
                                     IllegalArgumentException

Manufactures and initializes a new event mob slot, which holds a sequence of events.

Parameters:
slotId - Integer that is used to reference the new mob slot.
segment - Value of the new mob slot.
editRate - Units in which the events specify their starting time and duration.
Returns:
Manufactured event mob slot.
Throws:
NullPointerException - The segment or edit rate values are null.
IllegalArgumentException - Cannot set the slot id for an event mob slot to a negative value.
See Also:
Related MAJ API constructor, MobSlot

makeFiller

Filler makeFiller(DataDefinition dataDefinition,
                  @LengthType
                  long length)
                  throws NullPointerException,
                         BadLengthException

Manufactures and initializes a new filler segment, which represents an unspecified value for the duration of the segment.

Parameters:
dataDefinition - Kind of data described by the component.
length - Duration measured in edit units of the component.
Returns:
Manufactured filler.
Throws:
NullPointerException - Data definition is null.
BadLengthException - The length of a filler segment cannot be negative.
See Also:
Related MAJ API constructor

makeFilmDescriptor

FilmDescriptor makeFilmDescriptor()

Manufactures and initializes a film descriptor that describes film media.

Returns:
Manufactured film descriptor.
See Also:
Related MAJ API constructor

makeGPITrigger

GPITrigger makeGPITrigger(DataDefinition dataDefinition,
                          @Bool
                          boolean activeState)
                          throws NullPointerException

Manufactures and initializes a new GPI trigger event, which specifies a trigger action that should be taken when the GPITrigger is reached. If this event is located in an event mob slot, its position should be subsequently set using Event.setPosition(long).

Parameters:
dataDefinition - Kind of data represented by this component.
activeState - Is the event turned on?
Returns:
Manufactured GPI trigger.
Throws:
NullPointerException - Data definition argument is null.
See Also:
Related MAJ API constructor, Event

makeHeader

Header makeHeader()

Manufactures and initializes a header, which provides file-wide information and indexes. An AAF file shall have exactly one header object.

See Also:
Related MAJ API constructor

makeIdentification

Identification makeIdentification(@AAFString
                                  String companyName,
                                  @AAFString
                                  String productName,
                                  @AAFString
                                  String productVersionString,
                                  AUID productID)
                                  throws NullPointerException

Manufactures and initializes a new identification, which provides information about the application that created or modified a file. The mandatory date and generation AUID properties of the identification will be created automatically.

Parameters:
companyName - Name of the company or organization that created the application.
productName - Name of the application.
productVersionString - Version number of the application in string form.
productID - Unique identifier for the application.
Returns:
Manufactured identification object.
Throws:
NullPointerException - One or more of the arguments is null and all arguments are required.
See Also:
Related MAJ API constructor

makeImportDescriptor

ImportDescriptor makeImportDescriptor()

Manufactures and initializes a new import descriptor, which represents a file essence source that is not directly manipulated by an AAF application.

Returns:
Manufactured import descriptor.
See Also:
Related MAJ API constructor, PhysicalDescriptor

makeInterpolationDefinition

InterpolationDefinition makeInterpolationDefinition(AUID identification,
                                                    @AAFString
                                                    String name)
                                                    throws NullPointerException

Manufactures and initializes a new interpolation definition, which specifies the mechanism used to calculate the values produced by a varying value using the specified control points.

Parameters:
identification - Unique identifier for this interpolation.
name - Display name for the interpolation.
Returns:
Manufactured interpolation definition.
Throws:
NullPointerException - One or both of the arguments is null.
See Also:
Related MAJ API constructor, InterpolationConstant, Dictionary.getInterpolationDefinitions()

makeKLVData

KLVData makeKLVData(AUID key,
                    @DataBuffer
                    byte[] value)
                    throws NullPointerException,
                           NotValidKeyException

Manufactures and initializes a new KLV data object, which contains user data specified with a key (SMPTE label), length, and value. The key should have been previously registered using the Dictionary.registerKLVDataKey(AUID, TypeDefinition) method in order to use the byte swapping functionality of the type model.

Parameters:
key - Key associated with the data value.
value - Value associated with the key.
Returns:
Manufactured KLV data object.
Throws:
NullPointerException - One or both of the arguments is null.
NotValidKeyException - The given key must not resolve to a built-in type. For most purposes, use a renamed type definition to rename an existing type.
See Also:
Related MAJ API constructor, TypeDefinitionRename, KLVDataDefinition

makeKLVDataDefinition

KLVDataDefinition makeKLVDataDefinition(AUID identification,
                                        @AAFString
                                        String name)
                                        throws NullPointerException

Manufactures and initializes a new KLV data definition, which documents the KLV data objects used in the current persistent unit.

Parameters:
identification - Unique identifier for the KLV data definition.
name - Display name for the KLV data definition.
Returns:
Manufactured KLV data definition.
Throws:
NullPointerException - One or both of the arguments is null.
See Also:
Related MAJ API constructor, Dictionary.getKLVDataDefinitions(), KLVData

makeMasterMob

MasterMob makeMasterMob(MobID mobID,
                        @AAFString
                        String name)
                        throws NullPointerException

Manufactures and initializes a new master mob, which provides access to source mob and essence data objects. The required properties of creation time and last modified time will be set automatically to the time of calling this method. These timestamp values can subsequently be set manually by calling setCreateTime() and and setModTime().

Parameters:
mobID - Unique material identifier for the mob.
name - Name of the master mob.
Returns:
Manufactured master mob.
Throws:
NullPointerException - Unique material identifier is null.
See Also:
Related MAJ API constructor, Mob

makeNestedScope

NestedScope makeNestedScope(List<Segment> slots)
                            throws NullPointerException,
                                   BadLengthException,
                                   IllegalArgumentException

Manufactures and initializes a new nested scope, which defines a scope and has an ordered set of segments. The length of all the given segments must be the same.

Parameters:
slots - Ordered set of segments; where the last segment provides the value for the nested scope object itself. The last segment is used to set the data definition and length for this segment.
Returns:
Manufactured nested scope.
Throws:
NullPointerException - The slots argument is null.
BadLengthException - One or more of the segments in the given list has a length that is different to the length of the last segment.
IllegalArgumentException - The list of slots is empty and it should contain at least one element.
See Also:
Related MAJ API constructor

makeNetworkLocator

NetworkLocator makeNetworkLocator(@AAFString
                                  String urlString)
                                  throws NullPointerException,
                                         IllegalArgumentException

Manufactures and initializes a new network locator, which provides information to help find a file containing essence.

Parameters:
urlString - Absolute Uniform Resource Locator (URL) complying with RFC 1738 or relative Uniform Resource Identifier (URI) complying with RFC 2396 for file containing the essence. If it is a relative URI, the base URI is determined from the URI of the AAF persistent unit itself.
Returns:
Manufactured network locator.
Throws:
NullPointerException - Location URL is null.
IllegalArgumentException - The given URI is not syntactically valid.
See Also:
Related MAJ API constructor, Locator

makeOperationDefinition

OperationDefinition makeOperationDefinition(AUID identifier,
                                            @AAFString
                                            String name,
                                            DataDefinition dataDefinition,
                                            @Int32
                                            int numberInputs)
                                            throws NullPointerException

Manufactures and initializes a new operation definition, which identifies an operation that is performed on an array of segments.

Parameters:
identifier - Unique identifier for the operation definition.
name - Display name of the operation definition.
dataDefinition - The kind of data that is produced by the operation.
numberInputs - Number of input segments. A value of -1 indicates that the effect can have any number of input segments.
Returns:
Manufactured operation definition.
Throws:
NullPointerException - One or more of the arguments is null and they are all required properties in this implementation.
See Also:
Related MAJ API constructor, OperationConstant, Dictionary.getOperationDefinitions()

makeOperationGroup

OperationGroup makeOperationGroup(DataDefinition dataDefinition,
                                  @LengthType
                                  long length,
                                  OperationDefinition operation)
                                  throws NullPointerException,
                                         BadLengthException

Manufactures and initializes a new operation group, which contains an ordered set of segments and an operation that is performed on these. The lists of segments and parameters of the newly manufactyred operation group are initialized to be empty.

Parameters:
dataDefinition - Data definition object that specifies the kind of data described by the component.
length - Length of the component represented by this operation group.
operation - Operation definition that identifies the kind of operation.
Throws:
NullPointerException - The data definition and/or operation arguments is/are null.
BadLengthException - Cannot set the length of an operation group to a negative value.
See Also:
Related MAJ API constructor, OperationDefinition.forName(String), OperationConstant

makeParameterDefinition

ParameterDefinition makeParameterDefinition(AUID identification,
                                            @AAFString
                                            String name,
                                            TypeDefinition type)
                                            throws NullPointerException

Manufactures and initializes a new parameter definition, which defines a kind of parameter for an effect.

Parameters:
identification - Uniquely identifies the parameter definition.
name - Display name of the parameter definition.
type - Data type of the parameter.
Returns:
Manufactured parameter definition.
Throws:
NullPointerException - One or more of the arguments is null and they are all required properties by the MAJ API.
See Also:
Related MAJ API constructor, ParameterConstant, Dictionary.getParameterDefinitions(), Parameter

makePCMDescriptor

PCMDescriptor makePCMDescriptor(ContainerDefinition containerFormat,
                                Rational audioSamplingRate,
                                @UInt32
                                int channels,
                                @UInt32
                                int quantizationBits,
                                @UInt16
                                short blockAlign,
                                @UInt32
                                int averageBPS)
                                throws NullPointerException,
                                       IllegalArgumentException

Manufactures and initializes a new PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format.

Parameters:
containerFormat - Identifies the container mechanism used to store the essence.
audioSamplingRate - Sampling rate of the audio essence.
channels - Number of audio channels.
quantizationBits - Number of quantization bits.
blockAlign - Sample block alignment.
averageBPS - Average bytes per second.
Returns:
Manufactured PCM descriptor.
Throws:
NullPointerException - The container format or sampling rate properties are null.
IllegalArgumentException - Cannot set the channels, quantization bits, block align or average bits per second values to negative values.
See Also:
Related MAJ API constructor, SoundDescriptor

makePluginDefinition

PluginDefinition makePluginDefinition(AUID identification,
                                      @AAFString
                                      String name,
                                      AUID pluginCategory,
                                      VersionType versionNumber,
                                      AUID definitionObject)
                                      throws NullPointerException

Manufactures and initializes a plugin definition, which is used to identify code objects that provide an implementation for a definition object such as codec definition, or for a meta definition such as a class definition.

The plugin category for the plugin can be subsequently set using one of the categories defined from those provided in interface PluginCategoryType using the PluginDefinition.setCategoryClass(tv.amwa.maj.record.AUID) method.

Parameters:
identification - Unique identifier for the new plugin definition.
name - Display name for the new plugin definition.
pluginCategory - Kind of plugin.
versionNumber - Version of the plugin.
definitionObject - Unique identifier of the class definition or meta definition that this definition object provides an implementation of.
Returns:
Manufactured plugin definition.
Throws:
NullPointerException - One or more of the arguments is null and all are required in this implementation.
See Also:
Related MAJ API constructor, PluginCategoryType, Dictionary.getPluginDefinitions()

makePropertyDefinition

PropertyDefinition makePropertyDefinition(AUID identification,
                                          @AAFString
                                          String name,
                                          TypeDefinition type,
                                          ClassDefinition memberOf,
                                          @Bool
                                          boolean isOptional)
                                          throws NullPointerException

Manufactures and initializes a new property definition, which describes allowed properties of a class definition.

It is not normally necessary to create property definitions directly as they are available through methods of ClassDefinition. To extend the AAF object model as implemented in the MAJ API with user defined classes, the AAFProperty annotation can be used to automatically generate property definitions.

Parameters:
identification - Unique identifier for the new property definition.
name - Display name of the new property definition.
type - Property type for the new property definition.
memberOf - The class that the new property is a member of.
isOptional - Can an object omit a value for this property?
Returns:
Manufactured property definition.
Throws:
NullPointerException - One or more of the arguments is null and they are all required in this implementation.
See Also:
Related MAJ API constructor, ClassDefinition.getPropertyDefinitions()

makePulldown

Pulldown makePulldown(DataDefinition dataDefinition,
                      Segment inputSegment,
                      PulldownKindType pulldownKind,
                      PulldownDirectionType pulldownDirection,
                      @PhaseFrameType
                      int phaseFrame)
                      throws NullPointerException

Manufactures and initializes a new pulldown segment, which converts between film frame rates and videotape frame rates.

Parameters:
dataDefinition - Kind of data represented by this new component.
inputSegment - A segment that is either a source clip or timecode segment. The length of input segment object is in the edit units determined by the pulldown kind and pulldown direction.
pulldownKind - Specifies whether the new pulldown object is converting from nominally 30 Hz or 25 Hz videoframe rate, and whether frames are dropped or the video is played at another speed.
pulldownDirection - Specifies whether the pulldown object is converting from tape to film speed or from film to tape speed.
phaseFrame - The phase within the repeating pulldown pattern of the first frame after the pulldown conversion. A value of 0 specifies that the pulldown object starts at the beginning of the pulldown pattern.
Returns:
Manufactured pulldown object.
Throws:
NullPointerException - One or more of the arguments is null and all arguments are required.
See Also:
Related MAJ API constructor

makeRecordingDescriptor

RecordingDescriptor makeRecordingDescriptor()

Manufactures and initializes a new recording descriptor, which describes the source of file source material that has no physical source.

When no physical source exists for file source material, such as in the case of live recordings, a recording source may be used to represent the source. A recording source is analogous to a tape source except that it does not represent a source that physically existed. It is used to provide a timecode reference to file source material.

Returns:
Manufactured recording descriptor.
See Also:
Related MAJ API constructor, PhysicalDescriptor

makeRGBADescriptor

RGBADescriptor makeRGBADescriptor(ContainerDefinition containerFormat,
                                  @UInt32
                                  int storedHeight,
                                  @UInt32
                                  int storedWidth,
                                  LayoutType frameLayout,
                                  @VideoLineMap
                                  int[] videoLineMap,
                                  Rational imageAspectRatio,
                                  @RGBALayout
                                  RGBAComponent[] pixelLayout)
                                  throws NullPointerException,
                                         IllegalArgumentException

Manufactures and initializes a new RGBA descriptor that does not include or use a palette. An RGBA descriptor specifies that a file source mob is associated with video essence formatted with three color components, or with three color components and an alpha component.

Parameters:
containerFormat - Container mechanism used to store the essence.
storedHeight - Number of pixels in vertical dimension of stored view.
storedWidth - Number of pixels in horizontal dimension of stored view.
frameLayout - Describes whether all data for a complete sample is in one frame or is split into more than one field.
videoLineMap - The scan line in the analog source that corresponds to the beginning of each digitized field. For single-field video, there is 1 value in the array; for interlaced video, there are 2 values in the array.
imageAspectRatio - Describes the ratio between the horizontal size and the vertical size in the intended final image.
pixelLayout - Order and size of the components within the pixel.
Returns:
Manufactured RGBA descriptor.
Throws:
NullPointerException - One or more of the arguments is null.
IllegalArgumentException - The given values are outside acceptable bounds or the pixel layout requires a palette and a palette is not provided. In this case, use makeRGBADescriptor(..., byte[], RGBAComponent[]) instead.
See Also:
Related MAJ API constructor, CodecConstant.RGBA

makeRGBADescriptor

RGBADescriptor makeRGBADescriptor(ContainerDefinition containerFormat,
                                  @UInt32
                                  int storedHeight,
                                  @UInt32
                                  int storedWidth,
                                  LayoutType frameLayout,
                                  @VideoLineMap
                                  int[] videoLineMap,
                                  Rational imageAspectRatio,
                                  RGBAComponent[] pixelLayout,
                                  @DataValue
                                  byte[] palette,
                                  @RGBALayout
                                  RGBAComponent[] paletteLayout)
                                  throws NullPointerException,
                                         IllegalArgumentException

Manufactures and initializes a new RGBA descriptor that includes a palette. An RGBA descriptor specifies that a file source mob is associated with video essence formatted with three color components, or with three color components and an alpha component.

Note that this method can be used to create a descriptor for image data that does not have a palette, although this will result in the storage of redundant data within the descriptor. If a palette is not required, use makeRGBAComponent(..., Rational, RGBAComponent[]) instead.

Parameters:
containerFormat - Container mechanism used to store the essence.
storedHeight - Number of pixels in vertical dimension of stored view.
storedWidth - Number of pixels in horizontal dimension of stored view.
frameLayout - Describes whether all data for a complete sample is in one frame or is split into more than one field.
videoLineMap - The scan line in the analog source that corresponds to the beginning of each digitized field. For single-field video, there is 1 value in the array; for interlaced video, there are 2 values in the array.
imageAspectRatio - Describes the ratio between the horizontal size and the vertical size in the intended final image.
pixelLayout - Order and size of the components within the pixel.
palette - Palette to include with this digital image descriptor.
paletteLayout - Layout of the values within the palette.
Returns:
Manufactured RGBA descriptor.
Throws:
NullPointerException - One or more of the arguments is null.
IllegalArgumentException - The given values are outside acceptable bounds or the pixel layout requires a palette and an adequate palette is not provided.
See Also:
Related MAJ API constructor, CodecConstant.RGBA

makeScopeReference

ScopeReference makeScopeReference(DataDefinition dataDefinition,
                                  @UInt32
                                  int relativeScope,
                                  @UInt32
                                  int relativeSlot)
                                  throws NullPointerException,
                                         IllegalArgumentException

Manufactures and initializes a new scope reference object, which refers to a section in the specified mob slot or nested scope slot.

Parameters:
dataDefinition - Data definition for the referenced slot and for this component.
relativeScope - Number of nested scopes to pass to find the nested scope slot or mob owning the slot.
relativeSlot - Number of slots that precede the slot owning the scope reference to pass to find the slot referenced.
Returns:
Manufactured scope reference.
Throws:
NullPointerException - Data definition is null.
IllegalArgumentException - The relative scope and or relative slot arguments are negative.
See Also:
Related MAJ API constructor

makeSelector

Selector makeSelector(Segment selected)
                      throws NullPointerException,
                             BadLengthException

Manufactures and initializes a new selector segment, which provides the value of a single segment while preserving references to unused alternatives. This list of alternatives is initialized to an empty list. The length and kind of data represented by this component is extracted from the given selected segment.

Parameters:
selected - Initial and currently selected element.
Returns:
Manufactured selector segment.
Throws:
NullPointerException - Selected element is null.
BadLengthException - The given selected segment has a negative length.
See Also:
Related MAJ API constructor

makeSequence

Sequence makeSequence(DataDefinition dataDefinition)
                      throws NullPointerException

Manufactures and initializes a new sequence, which combines an ordered list of segments and transitions.

Parameters:
dataDefinition - Kind of data represented by this component.
Returns:
Manufactured sequence.
Throws:
NullPointerException - Data definition is null.
See Also:
Related MAJ API constructor

makeSoundDescriptor

SoundDescriptor makeSoundDescriptor(ContainerDefinition containerFormat,
                                    Rational audioSamplingRate,
                                    @UInt32
                                    int channels,
                                    @UInt32
                                    int quantizationBits)
                                    throws NullPointerException,
                                           IllegalArgumentException

Manufactures and initializes a new sound descriptor, which specifies that a file source mob is associated with audio essence.

Parameters:
containerFormat - Identifies the container mechanism used to store the essence.
audioSamplingRate - Sampling rate of the audio essence.
channels - Number of audio channels.
quantizationBits - Number of quantization bits.
Returns:
Manufactured sound descriptor.
Throws:
NullPointerException - One or both of the container format and/or sampling rate is null.
IllegalArgumentException - The channels and/or quantization bit values are negative.
See Also:
Related MAJ API constructor

makeSourceClip

SourceClip makeSourceClip(DataDefinition dataDefinition,
                          @LengthType
                          long length,
                          SourceReferenceValue sourceReference)
                          throws NullPointerException,
                                 BadLengthException

Manufactures and initializes a new source clip, which represents an item of essence and identifies the source of the essence. The required source reference values can be created using the following methods of the SourceReferenceValue class:

Parameters:
dataDefinition - Kind of data represented by this component.
length - Length of the source clip component.
sourceReference - Reference to the source clip.
Returns:
Manufactured source clip.
Throws:
NullPointerException - The data definition and/or source reference arguments is/are null.
BadLengthException - The length of the component is negative.
See Also:
Related MAJ API constructor, SourceReferenceValue, SourceReferenceValue, SourceReferenceSegment

makeSourceMob

SourceMob makeSourceMob(@MobIDType
                        MobID mobID,
                        @AAFString
                        String name,
                        EssenceDescriptor essenceDescription)
                        throws NullPointerException

Manufactures and initializes a new source mob, which describes essence that is either stored in a digital form in a file or stored on a physical media, such as tape or film. The required properties of creation time and last modified time will be set automatically to the time of calling this method. These timestamp values can subsequently be set manually by calling setCreateTime() and setModTime().

Parameters:
mobID - Unique identifier for the mob.
name - Name of the source mob.
essenceDescription - Describes the format of the essence associated with the new source mob.
Returns:
Manufactured source mob.
Throws:
NullPointerException - The mob id and/or essence description arguments are null.
See Also:
Related MAJ API constructor, Mob

makeStaticMobSlot

StaticMobSlot makeStaticMobSlot(@UInt32
                                int slotId,
                                Segment segment)
                                throws NullPointerException,
                                       IllegalArgumentException

Manufactures and initializes a new static mob slot, which describes essence data that has no relationship to time, such as a static image.

Parameters:
slotId - An integer that is used to reference the new mob slot.
segment - Value of the mob slot.
Returns:
Manufactured static mob slot.
Throws:
NullPointerException - The segment argument is null.
IllegalArgumentException - Cannot create a new static mob slot with a negative slot id.
See Also:
Related MAJ API constructor, MobSlot

makeTaggedValue

TaggedValue makeTaggedValue(@AAFString
                            String name,
                            TypeDefinition typeDefinition,
                            Object value)
                            throws NullPointerException

Manufactures and initializes a new tagged value, which specifies a user-defined tag and value.

Parameters:
name - User defined name (tag) of the tagged value object.
typeDefinition - Type definition of the following value data.
value - Value of the given type.
Returns:
Manufactured tagged value.
Throws:
NullPointerException - One or more of the arguments is null and all arguments are required.
ClassCastException - The given value cannot be cast to a value of the given type.
See Also:
Related MAJ API constructor, TaggedValueDefinition

makeTaggedValueDefinition

TaggedValueDefinition makeTaggedValueDefinition(AUID identification,
                                                @AAFString
                                                String name)
                                                throws NullPointerException

Manufactures and initializes all the fields of a tagged value definition, which can be used to document the tagged value objects used in an AAF persistent unit.

Parameters:
identification - Unique identifier for the new tagged value definition object.
name - Display name of the new tagged value definition object.
Returns:
Manufactured tagged value definition.
Throws:
NullPointerException - One or both of the arguments is null.
See Also:
Related MAJ API constructor, TaggedValue, Dictionary.getTaggedValueDefinitions()

makeTapeDescriptor

TapeDescriptor makeTapeDescriptor()

Manufactures and initializes a new tape descriptor, which describes audio tape or video tape media.

Returns:
Manufactured tape descriptor.
See Also:
Related MAJ API constructor

makeTextLocator

TextLocator makeTextLocator(@AAFString
                            String name)
                            throws NullPointerException

Manufactures and initializes a new text locator, which provides information to help find a file containing essence or to help find the physical media.

Parameters:
name - Text string containing information to help find the file containing the essence or the physical media.
Returns:
Manufactured text locator.
Throws:
NullPointerException - Location of the media is null.
See Also:
Related MAJ API constructor, Locator

makeTIFFDescriptor

TIFFDescriptor makeTIFFDescriptor(ContainerDefinition containerFormat,
                                  @Bool
                                  boolean isUniform,
                                  @Bool
                                  boolean isContiguous,
                                  @DataValue
                                  byte[] summary)
                                  throws NullPointerException

Manufactures and initializes a new TIFF descriptor, which specifies that a file source mob is associated with video essence formatted according to the TIFF specification.

Parameters:
containerFormat - Container format of the TIFF data.
isUniform - Does the data have the same number of rows per strip throughout?
isContiguous - Is the data stored in contiguous bytes?
summary - A copy of the TIFF IFD, without the sample data.
Returns:
Manufactured TIFF descriptor.
Throws:
NullPointerException - The container format and/or summary arguments are null and both are required.
See Also:
Related MAJ API constructor

makeTimecodeSegment

TimecodeSegment makeTimecodeSegment(@LengthType
                                    long length,
                                    TimecodeValue timecode)
                                    throws NullPointerException,
                                           BadLengthException

Manufactures and initializes a new timecode segment, which stores videotape or audio tape timecode information. To create the required timecode value, call makeTimecodeValue(long, short, boolean).

Note that in the MAJ API, the timecode segment class is known as "TimecodeSegment" whereas in the AAF specification it is known as just "Timecode". See the section on naming conflicts in the package description for more details. As a result, calling this method is the same as calling makeTimecode().

Parameters:
length - The length of this component.
timecode - Timecode value of the new timecode segment.
Returns:
Manufactured timecode segment.
Throws:
NullPointerException - The timecode value is null.
BadLengthException - Cannot set the length of a component to a negative value.
See Also:
Related MAJ API constructor, TimecodeValue, makeTimecodeValue(long, short, boolean), makeTimecode(long, tv.amwa.maj.record.TimecodeValue)

makeTimecode

TimecodeSegment makeTimecode(@LengthType
                             long length,
                             TimecodeValue timecode)
                             throws NullPointerException,
                                    BadLengthException

Manufactures and initializes a new timecode segment, which stores videotape or audio tape timecode information. To create the required timecode value, call makeTimecodeValue(long, short, boolean).

Note that in the MAJ API, the timecode segment class is known as "TimecodeSegment" whereas in the AAF specification it is known as just "Timecode". See the section on naming conflicts in the package description for more details. As a result, calling this method is the same as calling makeTimecodeSegment().

Parameters:
length - The length of this component.
timecode - Timecode value of the new timecode segment.
Returns:
Manufactured timecode segment.
Throws:
NullPointerException - The timecode value is null.
BadLengthException - Cannot set the length of a component to a negative value.
See Also:
Related MAJ API constructor, TimecodeValue, makeTimecodeValue(long, short, boolean)

makeTimecodeStream12M

TimecodeStream12M makeTimecodeStream12M(Rational sampleRate,
                                        @DataBuffer
                                        byte[] source,
                                        TCSource sourceType)
                                        throws NullPointerException,
                                               IllegalArgumentException

Manufactures and initializes a new SMPTE 12M-compliant timecode stream, which specifies a stream of timecode data in the SMPTE 12M format.

Parameters:
sampleRate - Sample rate of the timecode data contained in the source property.
source - The timecode data.
sourceType - Kind of timecode data.
Returns:
Manufactured SMPTE 12M-compliant timecode stream.
Throws:
NullPointerException - One or more of the arguments is null and all are required.
IllegalArgumentException
See Also:
Related MAJ API constructor, TimecodeStream

makeTimecodeValue

TimecodeValue makeTimecodeValue(@PositionType
                                long start,
                                @UInt16
                                short fps,
                                @Bool
                                boolean drop)

Manufactures and initializes a new timecode value.

Parameters:
start - Timecode at the beginning of the segment.
fps - Frames per second of the videotape or audio tape.
drop - Does the timecode contain drop values?
Returns:
Manufactured timecode value.
Throws:
IllegalArgumentException - The frames per second (fps) value is negative.
See Also:
Related MAJ API constructor, TimecodeValue, TimecodeSegment, makeTimecodeSegment(long, tv.amwa.maj.record.TimecodeValue)

makeTimelineMobSlot

TimelineMobSlot makeTimelineMobSlot(@UInt32
                                    int slotId,
                                    Segment segment,
                                    Rational editRate,
                                    @PositionType
                                    long origin)
                                    throws NullPointerException,
                                           IllegalArgumentException

Manufactures and initializes a new timeline mob slot, which describes time-varying timeline essence.

Parameters:
slotId - Integer that is used to reference the mob slot.
segment - Value of the new timeline mob slot.
editRate - Units of time for the new timeline mob slot.
origin - Offset used to resolve source clip references to the new timeline mob slot. A positive value of origin means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.
Returns:
Manufactured timeline mob slot.
Throws:
NullPointerException - The segment and/or edit rate arguments is/are null.
IllegalArgumentException - Slot id is negative or the given segment is not valid for a timeline mob slot.
See Also:
Related MAJ API constructor, MobSlot

makeTransition

Transition makeTransition(DataDefinition dataDefinition,
                          @LengthType
                          long length,
                          OperationGroup operationGroup,
                          @PositionType
                          long cutPoint)
                          throws NullPointerException,
                                 BadLengthException

Manufactures and initializes a transition, which specifies that the two adjacent segments should be overlapped when they are played and that the overlapped sections should be combined using the specified effect.

Parameters:
dataDefinition - Kind of data represented by the new transition component.
length - Length of the transition component.
cutPoint - The point at which a cut would be inserted if the transition were removed.
operationGroup - An operation group that specifies the effect to be performed during the new transition.
Returns:
Manufactured transition.
Throws:
NullPointerException - The data definition and/or operation group arguments is/are null.
BadLengthException - Cannot set the length of a segment with a negative value.
See Also:
Related MAJ API constructor, Sequence

makeTypeDefinitionCharacter

TypeDefinitionCharacter makeTypeDefinitionCharacter(AUID identification,
                                                    @AAFString
                                                    String typeName)
                                                    throws NullPointerException

Manufactures and initializes a new type definition for characters, which defines a property type that has a value of a single 2-byte character similar to Java's char type.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID used to identify this type.
typeName - Friendly name used to identify this type.
Returns:
Manufactured character type definition.
Throws:
NullPointerException - The identification is null.
See Also:
Related MAJ API constructor, TypeDefinitionCharacter.Character, TypeDefinition

makeTypeDefinitionEnumeration

TypeDefinitionEnumeration makeTypeDefinitionEnumeration(AUID identification,
                                                        @AAFString
                                                        String typeName,
                                                        Class<?> enumeration)
                                                        throws NullPointerException,
                                                               IllegalArgumentException

Manufactures and initializes an enumeration type definition, which defines a property type that can have one of a set of integer values. Each of the integer values is an enumeration element and also has an associated name.

An enumeration type definition is initialized with its identity and its enumeration elements as defined by an Enum class implementing AAFEnumerationValue. For any enumeration value, this interface provides the value() method that is used to find the integer (Int64) value associated with the enumeration token in the AAF object specification and associated registers.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - Unique identifier to be used to identify this type.
typeName - Display name for the enumeration type definition.
enumeration - Java enumeration class representing this type definition and defining its enumeration elements.
Returns:
Manufactured enumeration type definition.
Throws:
NullPointerException - One or more of the arguments is null, or one or more of the elements of the names array is null.
IllegalArgumentException - The class provided to describe this enumeration is not a Java enumeration or does not implement the AAFEnumerationValue interface.
See Also:
Related MAJ API constructor, AAFEnumerationValue, tv.amwa.maj.enumeration package, TypeDefinition

makeTypeDefinitionExtendibleEnumeration

TypeDefinitionExtendibleEnumeration makeTypeDefinitionExtendibleEnumeration(AUID identification,
                                                                            @AAFString
                                                                            String typeName,
                                                                            SortedMap<String,AUID> elements)
                                                                            throws NullPointerException,
                                                                                   DuplicateException

Manufactures and initializes a new extendible enumeration type definition, which defines a property type that can have one of an extendible set of AUID values. The initial set of (possibly empty) elements must be provided as a map from element name to AUID. Further enumeration elements can then be specified using the appendElement(AUID, String) method.

The MAJ API provides a means of managing extendible enumerations through the extendible enumeration factory and extendible enumeration item annotation.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type.
typeName - Friendly name of the type definition.
elements - Map containing element names and the AUIDs they map to.
Returns:
Manufactured extendible enumeration type definition.
Throws:
NullPointerException - The identification and/or elements arguments is/are null.
DuplicateException - The given representation of an extendible enumeration contains duplicate AUID values.
See Also:
Related MAJ API constructor, ExtendibleEnumerationWarehouse, ExtendibleEnumerationItem, ColorPrimariesType, TypeDefinition

makeTypeDefinitionFixedArray

TypeDefinitionFixedArray makeTypeDefinitionFixedArray(AUID identification,
                                                      @AAFString
                                                      String typeName,
                                                      TypeDefinition elementType,
                                                      @UInt32
                                                      int numberElements)
                                                      throws NullPointerException,
                                                             IllegalArgumentException

Manufactures and initializes a new fixed array type definition, which defines a property type that has a fixed number of values of the underlying type. The order of the values is meaningful.

The following types are allowed as the underlying type for fixed array type definitions:

If the element type is not one of the above kinds, an IllegalArgumentException is thrown.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type.
elementType - Type of each element to be contained in an array defined by the fixed array type definition.
numberElements - Number of elements of this kind of array.
typeName - Friendly name of the fixed array type definition.
Throws:
NullPointerException - The identification and/or element type arguments is/are null.
IllegalArgumentException - The given underlying type is not compatible with the types supported by fixed size arrays.
See Also:
Related MAJ API constructor, TypeDefinition, TypeDefinitionVariableArray

makeTypeDefinitionIndirect

TypeDefinitionIndirect makeTypeDefinitionIndirect(AUID identification,
                                                  @AAFString
                                                  String typeName)
                                                  throws NullPointerException

Manufactures and initializes a new indirect type definition, which defines a property type that has a value whose type is specified in each instance.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type.
typeName - Friendly name of the new indirect type definition.
Returns:
Manufactured indirect type definition.
Throws:
NullPointerException - The identification argument is null.
See Also:
Related MAJ API constructor, TypeDefinition, TypeDefinitionIndirect

makeTypeDefinitionInteger

TypeDefinitionInteger makeTypeDefinitionInteger(AUID identification,
                                                @AAFString
                                                String typeName,
                                                @UInt8
                                                byte intSize,
                                                @Bool
                                                boolean isSigned)
                                                throws NullPointerException,
                                                       IllegalArgumentException

Manufactures and initializes a new integer type definition, which defines a property type that is a signed or an unsigned integer with the specified number of bytes.

The implementation of this method may only allow certain values for the intSize. It will allow at least 1, 2, 4, and 8 byte integers; some implementations may allow more than that.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to use to identify this type.
typeName - Friendly name for the integer type definition.
intSize - Number of bytes used to represent a value.
isSigned - Is the integer type signed?
Throws:
NullPointerException - The identification argument is null.
IllegalArgumentException - The implementation does not support the given number of bytes per integer value.
See Also:
Related MAJ API constructor, tv.amwa.maj.integer package, TypeDefinition

makeTypeDefinitionOpaque

TypeDefinitionOpaque makeTypeDefinitionOpaque(AUID identification,
                                              @AAFString
                                              String typeName)
                                              throws NullPointerException

Manufactures and initializes a new opaque type definition, which defines a property type that has a value whose type is specified in each instance.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID used to identify this type.
typeName - Friendly name for the opaque type definition.
Returns:
Manufactured opaque type definition.
Throws:
NullPointerException - The identification argument is null.
See Also:
Related MAJ API constructor, TypeDefinition, TypeDefinitionIndirect

makeTypeDefinitionRecord

TypeDefinitionRecord makeTypeDefinitionRecord(AUID identification,
                                              @AAFString
                                              String typeName,
                                              @AAFString
                                              String[] names,
                                              Map<String,TypeDefinition> elements)
                                              throws NullPointerException,
                                                     IllegalArgumentException

Manufactures and initializes a new record type definition, which defines a property type that consists of an ordered set of fields, where each field has a name and type.

It is only possible to use the following types as members of a record:

If a type definition of a kind other than one listed above is used, an IllegalArgumentException will be thrown.

Record type definitions provide a documented mechanism for extended the AAF meta model. However, care must be taken as any user-defined record types may not be interoperable with other systems if the record is not registered. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. TThe full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type.
typeName - Friendly name for the record type definition.
names - Names of the element of the record in the order of the records.
elements - Elements of the records represented as a map from name to type.
Returns:
Manufactured record type definition.
Throws:
NullPointerException - One or more of the identification, names or elements arguments is null, or one or more of the elements of the given arrays is null.
IllegalArgumentException - One or more of the types contained in the member type array is not a permissible type for a record. Alternatively, a member type name is duplicated in the given array of member names.
See Also:
Related MAJ API constructor, tv.amwa.maj.record package, TypeDefinition

makeTypeDefinitionRename

TypeDefinitionRename makeTypeDefinitionRename(AUID identification,
                                              @AAFString
                                              String typeName,
                                              TypeDefinition baseType)
                                              throws NullPointerException

Manufactures and initializes a new renamed type definition, which defines a property type that has the same structure and representation as its underlying type but has a different meaning. Required method parameters include the underlying base type the new type is an alias for, along with its own new identity.

Parameters:
identification - AUID to be used to identify this type.
typeName - Friendly name of the rename type definition.
baseType - Underlying base type this new rename type definition is an alias for.
Returns:
Manufactured rename type definition which is an alias for another type definition.
Throws:
NullPointerException - One or more of the arguments is null.
See Also:
Related MAJ API constructor, KLVDataDefinition, TypeDefinition

makeTypeDefinitionSet

TypeDefinitionSet makeTypeDefinitionSet(AUID identification,
                                        @AAFString
                                        String typeName,
                                        TypeDefinitionObjectReference elementType)
                                        throws NullPointerException

Manufactures and initializes a new set type definition, which defines a property type that has a collection of object references to uniquely identified objects. The order of the objects has no meaning.

Typically, the friendly name of a set type definition is either:

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type of set.
typeName - Friendly name for this type definition.
elementType - Type definition of each element contained in this set.
Returns:
Manufactured set type definition.
Throws:
NullPointerException - The identification and/or element type arguments is/are null.
See Also:
Related MAJ API constructor, TypeDefinitionVariableArray, TypeDefinition

makeTypeDefinitionStream

TypeDefinitionStream makeTypeDefinitionStream(AUID identification,
                                              @AAFString
                                              String typeName)
                                              throws NullPointerException

Manufactures and initializes a new type definition for a streams, which defines a property type that is stored in a stream and has a value that consists of a varying number of the bytes. The order of the bytes is meaningful.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this stream type.
typeName - Friendly name for this type definition.
Returns:
Manufactured stream type definition.
Throws:
NullPointerException - One or more of the arguments is null.
See Also:
Related MAJ API constructor, DataBuffer, DataValue, TypeDefinition

makeTypeDefinitionString

TypeDefinitionString makeTypeDefinitionString(AUID identification,
                                              @AAFString
                                              String typeName,
                                              TypeDefinition typeDefinition)
                                              throws NullPointerException,
                                                     IllegalArgumentException

Manufactures and initializes a new string type definition, which defines a property type that consists of a zero-terminated array of the underlying character or integer type.

Parameters for this method include the with its identity underlying data representation. Acceptable underlying type definitions are:

The MAJ API implementation of this interface uses TypeDefinitionCharacter as the underlying type and uses Java's built-in string handling. However, by using a call to TypeDefinitionString.setCharacterSet(String) it is possible to define mappings between different kinds of character sets and Java strings.

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type.
typeName - Friendly name for the string data type.
typeDefinition - Type of each element to be contained in the array.
Returns:
Manufactured string type definition.
Throws:
NullPointerException - The identification and/or type definition arguments is/are null.
IllegalArgumentException - The given type is not an acceptable underlying type for a string type definition.
See Also:
Related MAJ API constructor, makeTypeDefinitionCharacter(tv.amwa.maj.record.AUID, String), makeTypeDefinitionInteger(tv.amwa.maj.record.AUID, String, byte, boolean), AAFString, TypeDefinition

makeTypeDefinitionStrongObjectReference

TypeDefinitionStrongObjectReference makeTypeDefinitionStrongObjectReference(AUID identification,
                                                                            @AAFString
                                                                            String typeName,
                                                                            ClassDefinition referencedType)
                                                                            throws NullPointerException

Manufactures and initializes a new strong object reference type definition, which defines a property type that defines an object relationship where the target of the strong reference is owned by the object with the property. An object can be the target of only one strong reference.

Typically, the friendly name of a strong reference to an instance of class "X" is known as "StrongReference to X", e.g. "StrongReference to SourceClip".

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type.
typeName - Friendly name of the type definition.
referencedType - Class definition of objects that it is permissible for this type of object reference to reference.
Returns:
Manufactured strong object reference type definition.
Throws:
NullPointerException - The identification and/or referenced type is/are null.
See Also:
Related MAJ API constructor, TypeDefinitionObjectReference, TypeDefinitionWeakObjectReference, TypeDefinition

makeTypeDefinitionVariableArray

TypeDefinitionVariableArray makeTypeDefinitionVariableArray(AUID identification,
                                                            @AAFString
                                                            String typeName,
                                                            TypeDefinition elementType)
                                                            throws NullPointerException,
                                                                   IllegalArgumentException

Manufactures and initializes a new variable size array type definition, which defines a property type that has a varying number of values of the underlying type. The order of the values is meaningful.

Note that it is only possible to use certain types as the element type and an IllegalArgumentException is thrown if the given type is not permitted. The permissible types are:

Typically, the friendly name of a variable size array type definition is either:

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type.
typeName - Friendly name of the type definition.
elementType - Type of each element to be contained in the array.
Returns:
Manufactured variable size array type definition.
Throws:
NullPointerException - The identification and/or element type arguments is/are null.
IllegalArgumentException - The given element type is not permitted for elements of a varying size array.
See Also:
Related MAJ API constructor

makeTypeDefinitionWeakObjectReference

TypeDefinitionWeakObjectReference makeTypeDefinitionWeakObjectReference(AUID identification,
                                                                        @AAFString
                                                                        String typeName,
                                                                        ClassDefinition objectType,
                                                                        AUID[] targetSet)
                                                                        throws NullPointerException

Manufactures and initializes a new weak object reference type definition, which defines a property type that defines an object relationship where the target of the weak reference is referenced by the object with the property. Only objects that define a unique identification (AUID or mob id) can be the targets of weak object references. An object can be the target of one or more than one weak references.

The targetSet parameter points to an array of property definition AUIDs that indicate the location of the property containing the target of the weak reference. The AUIDs indicate the containment path to the target property, starting at the root header object.

For example, if the containment hierarchy is:

Header->A->B->C

then the first AUID corresponds to the header's property that contains object A; the second AUID corresponds to object A's property which contains object B; and the third AUID corresponds to object B's property C that contains the target of this weak reference. If any intermediate property is a vector or set, all objects in that vector or set are searched for the target.

Note that the final AUID must correspond to a property that is currently set.

Typically, the friendly name of a weak reference to an instance of class "X" is known as "WeakReference to X", e.g. "WeakReference to Mob".

Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause interoperability issues with other systems. The official registry of type definitions is or soon will be available from SMPTE at SMPTE Metadata Registries And Related Items. The full range of data types documented in the AAF object specification v1.1 can be accessed by name or identification using either typeDefinitionForName(String) or typeDefinitionForIdentification(tv.amwa.maj.record.AUID) respectively.

Parameters:
identification - AUID to be used to identify this type.
typeName - Friendly name of the type definition.
objectType - Class definition of objects that the reference is permitted to reference. The referenced object may also belong to a subclass of the referenced class.
targetSet - List of property definition ids that indicate where the target of the reference is to be found.
Returns:
Manufactured weak object reference type definition.
Throws:
NullPointerException - One or more of the identification, object type or target set arguments is null and all are required.
See Also:
Related MAJ API constructor, TypeDefinitionObjectReference, TypeDefinitionStrongObjectReference, TypeDefinition

makeVaryingValue

VaryingValue makeVaryingValue(ParameterDefinition parameterDefinition,
                              InterpolationDefinition interpolation)
                              throws NullPointerException

Manufactures and initializes a new varying value, which specifies a changing data value for an effect control value. The value is identified with the given parameter definition, and requires an interpolation definition to define how the value will be calculated.

The order of the creation of varying values and control points may not be immediately obvious. Although the list of control points for a varying value should not be empty, varying values are used to help manufacture their own control points. The process of setting up a varying value is as follows:

  1. Create a varying value with its parameter and interpolation definitions.
  2. Use the varying value to create the control points for the varying value.
  3. Add the control points to the varying value list using VaryingValue.addControlPoint(ControlPoint).

Parameters:
parameterDefinition - Parameter definition for the varying value, which determines the type of the varying value.
interpolation - Specifies the kind of interpolation to be used to find the value between control points.
Throws:
NullPointerException - One or more of the arguments is null and all are required.
See Also:
Related MAJ API constructor, ControlPoint, Parameter

makeWAVEDescriptor

WAVEDescriptor makeWAVEDescriptor(ContainerDefinition containerFormat,
                                  @DataBuffer
                                  byte[] summary)
                                  throws NullPointerException

Manufactures and initializes a new WAVE descriptor, which specifies that a file source mob is associated with audio essence formatted according to the RIFF Waveform Audio File Format (WAVE).

Parameters:
containerFormat - Container mechanism used to store the essence.
summary - A copy of the WAVE file information without the sample data.
Returns:
Manufactured WAVE file descriptor.
Throws:
NullPointerException - One or both of the arguments is/are null and both are required.
See Also:
Related MAJ API constructor, CodecConstant.WAVE

makeHTMLClip

HTMLClip makeHTMLClip(MobID sourceID,
                      @UInt32
                      int sourceMobSlotID)
                      throws NullPointerException,
                             IllegalArgumentException

Manufactures and initializes a new HTML clip, which represents an HTML document and identifies the source of the document. An HTML clip must have a data definition of "Auxiliary" and is static and so has no length.

Parameters:
sourceID - Reference to the mob containing the HTML essence.
sourceMobSlotID - Reference to the slot in the mob containing the HTML clip.
Returns:
Manufactured HTML clip.
Throws:
NullPointerException - The source ID argument is null.
IllegalArgumentException - The slot ID value must be non-negative.
See Also:
Related MAJ API constructor, TextClip

makeHTMLDescriptor

HTMLDescriptor makeHTMLDescriptor(ContainerDefinition containerFormat)
                                  throws NullPointerException

Manufactures and initializes a new HTML descriptor, which describes static essence in the HTML file format.

Parameters:
containerFormat - Container format of the described HTML essence.
Returns:
Manufactured HTML descriptor.
Throws:
NullPointerException - The container format argument is null.
See Also:
Related MAJ API constructor

makeDescriptiveClip

DescriptiveClip makeDescriptiveClip(DataDefinition dataDefinition,
                                    @LengthType
                                    long length,
                                    SourceReferenceValue sourceReference)
                                    throws NullPointerException,
                                           BadLengthException

Manufactures and initializes a new descriptive clip, which specifies what is being described and references a mob to provide that description.

Parameters:
dataDefinition - Kind of data represented by this component.
length - Length of the source clip component.
sourceReference - Reference to the mob providing the description.
Returns:
Manufactured descriptive clip.
Throws:
NullPointerException - The data definition and/or source reference arguments are null.
BadLengthException - The length of a descriptive clip cannot be negative.
See Also:
Related MAJ API constructor, SourceClip

makeDataEssenceDescriptor

DataEssenceDescriptor makeDataEssenceDescriptor(ContainerDefinition containerFormat)
                                                throws NullPointerException

Manufactures and initializes a new data essence descriptor, which specifies that a file source mob is associated with data essence.

Parameters:
containerFormat - Container format of the associated data essence.
Returns:
Manufactured data essence descriptor.
Throws:
NullPointerException - The container format argument is null.
See Also:
Related MAJ API constructor

makeBWFImportDescriptor

BWFImportDescriptor makeBWFImportDescriptor()

Manufactures and initializes a new BWF import descriptor, which specifies imported audio data essence encoded according to the Broadcast Wave specifications. The list of descriptors should not be empty, so call MultipleDescriptor.appendFileDescriptor(AAFFileDescriptor) after calling this method.

Returns:
Manufactured BWF import descriptor.
See Also:
Related MAJ API constructor, ImportDescriptor

makeMultipleDescriptor

MultipleDescriptor makeMultipleDescriptor(Rational sampleRate,
                                          @LengthType
                                          long length)

Manufactures and initializes a new multiple descriptor, which content data associated with a single file source mob that contains multiple tracks of essence.

Parameters:
sampleRate - Sample rate for the content represented by this multiple descriptor.
length - Length of content represented by this multiple descriptor.
Returns:
Manufactured multiple descriptor.
Throws:
NullPointerException - The sample rate argument is null.
IllegalArgumentException - The given length of the multiple descriptor is negative.
See Also:
MultipleDescriptor.MultipleDescriptor(tv.amwa.maj.record.Rational, long), AAFFileDescriptor.getLinkedSlotID(), AAFFileDescriptor.setLinkedSlotID(Integer)

makeMPEGVideoDescriptor

MPEGVideoDescriptor makeMPEGVideoDescriptor(ContainerDefinition containerFormat,
                                            @UInt32
                                            int storedHeight,
                                            @UInt32
                                            int storedWidth,
                                            LayoutType frameLayout,
                                            @VideoLineMap
                                            int[] videoLineMap,
                                            Rational imageAspectRatio,
                                            @UInt32
                                            int horizontalSubsampling,
                                            @UInt32
                                            int componentWidth)
                                            throws NullPointerException,
                                                   IllegalArgumentException

Manufactures and initializes a new MPEG video descriptor , which specifies that a file source mob is associated with video essence that is represented and coded according to the MPEG specifications.

Parameters:
containerFormat - Container mechanism used to store the essence.
storedHeight - Number of pixels in vertical dimension of the stored view.
storedWidth - Number of pixels in horizontal dimension of the stored view.
frameLayout - Describes whether all data for a complete sample is in one frame or is split into more than one field.
videoLineMap - The scan line in the analog source that corresponds to the beginning of each digitized field. For single-field video, there is 1 value in the array; for interlaced video, there are 2 values in the array.
imageAspectRatio - Describes the ratio between the horizontal size and the vertical size in the intended final image.
horizontalSubsampling - Ratio of luminance sampling to chrominance sampling in the horizontal direction. For 4:2:2 video, the value is 2, which means that there are twice as many luminance values as there are color-difference values. Legal values are 1, 2 and 4.
componentWidth - Number of bits used to store each component. Can have a value of  8, 10 or 16. Each component in a sample is packed contiguously; the sample is filled with the number of bits specified by the optional padding bits property. If the padding bits property is omitted, samples are packed contiguously.
Returns:
Manufactured MPEG video descriptor.
Throws:
NullPointerException - One or more of arguments is null.
IllegalArgumentException - The given values are not within the permitted ranges.
See Also:
Related MAJ API constructor, CDCIDescriptor

makeAES3PCMDescriptor

AES3PCMDescriptor makeAES3PCMDescriptor(ContainerDefinition containerFormat,
                                        Rational audioSamplingRate,
                                        @UInt32
                                        int channels,
                                        @UInt32
                                        int quantizationBits,
                                        @UInt16
                                        short blockAlign,
                                        @UInt32
                                        int averageBPS)
                                        throws NullPointerException,
                                               IllegalArgumentException

Manufactures a new AES3 PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format.

Parameters:
containerFormat - Identifies the container mechanism used to store the essence.
audioSamplingRate - Sampling rate of the audio essence.
channels - Number of audio channels.
quantizationBits - Number of quantization bits.
blockAlign - Sample block alignment.
averageBPS - Average bytes per second.
Returns:
Manufactured AES3 PCM descriptor
Throws:
NullPointerException - The container format or sampling rate properties are null.
IllegalArgumentException - Cannot set the channels, quantization bits, block align or average bits per second values to negative values.
See Also:
Related MAJ API constructor, PCMDescriptor

makeRIFFChunk

RIFFChunk makeRIFFChunk(@UInt32
                        int chunkID)

Manufactures and initializes a new RIFF data chunk with the given chunk identifier. The identifier is used to represent 4 ASCII characters that represent the kind of data stored inside the chunk.

Parameters:
chunkID - Identifier for the new chunk.
Returns:
Manufactured RIFF data chunk.
See Also:
Related MAJ API constructor, BWFImportDescriptor.getUnknownBWFChunks()

typeDefinitionForName

TypeDefinition typeDefinitionForName(@AAFString
                                     String typeName)
                                     throws NullPointerException,
                                            ObjectNotFoundException

Finds and returns the type definition for the given type name. Names are expected to be formatted in the same way as names in the AAF object specification or the AAF meta dictionary, for example:

Parameters:
typeName - Name of the type definition to check for.
Returns:
Type definition corresponding to the given name.
Throws:
NullPointerException - The given type definition name is null.
ObjectNotFoundException - A type definition with the given name could not be found.
See Also:
TypeDefinitionWarehouse.forName(String), typeDefinitionForIdentification(tv.amwa.maj.record.AUID), TypeDefinition

typeDefinitionForIdentification

TypeDefinition typeDefinitionForIdentification(AUID identification)
                                               throws NullPointerException,
                                                      ObjectNotFoundException

Finds and returns the type definition for the given type identification. For example, the type definition for "Int32" is represented by the following universal label:

uuid:x-ul:060E2B34.0104.0101.01010700.00000000

Parameters:
identification - Identification for the type to find and return.
Returns:
Type definition corresponding to the given type identification.
Throws:
NullPointerException - The identification is null.
ObjectNotFoundException - A type definition with the given identification could not be found.
See Also:
TypeDefinitionWarehouse.forIdentification(tv.amwa.maj.record.AUID), typeDefinitionForName(String), TypeDefinition

classDefinitionForName

ClassDefinition classDefinitionForName(@AAFString
                                       String className)
                                       throws NullPointerException,
                                              ObjectNotFoundException

Finds and returns a class definition for the given AAF class name. Firstly, the search takes place using the class name specified in the AAF object specification then using a Java class name.

Steps taken to resolve the given class name to a class definition if the name does not exactly match a class definition known to the implementation factory are implementation dependent. For example, an implementation may start looking in known Java classpaths or spot that the given string is a fully qualified class name.

Parameters:
className - Name of the class definition to find, specified using a name from the AAF object specification.
Returns:
Class definition for the given name.
Throws:
NullPointerException - The class name argument is null.
ObjectNotFoundException - A class definition for the given name cannot be found.
See Also:
ClassDefinitionWarehouse.forName(String), classDefinitionForClass(Class), ClassDefinition

classDefinitionForClass

ClassDefinition classDefinitionForClass(Class<?> javaClass)
                                        throws NullPointerException,
                                               ObjectNotFoundException

Finds and returns an class definition for the given Java class. The given Java class must be known to the implementation of the factory or be annotated as an AAF class.

Parameters:
javaClass - Java class to use to search for a corresponding AAF class definition.
Returns:
Class definition for the given Java class.
Throws:
NullPointerException - The java class argument is null.
ObjectNotFoundException - A matching AAF class definition for the given class cannot be found.
See Also:
ClassDefinitionWarehouse.forClass(Class), AAFClass, classDefinitionForName(String), ClassDefinition

dataDefinitionForName

DataDefinition dataDefinitionForName(String definitionName)
                                     throws NullPointerException,
                                            ObjectNotFoundException

Finds and returns a data definition from the given data definition name. Names should match those given in section 22.1 of the AAF specification version 1.1.

Parameters:
definitionName - Name of the definition to search for and retrieve.
Returns:
Data definition for the given data definition name.
Throws:
NullPointerException - The data definition name argument is null.
ObjectNotFoundException - A data definition of the given name could not be found.
See Also:
DataDefinition.forName(String)

Media Authoring
with Java API

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