Media Authoring
with Java API

MAJ API Overview

This documentation describes the Media Authoring with Java API (MAJ API), an implementation of the classes of the Advanced Authoring Format specification in Java.


tv.amwa.maj.argument Implementations of classes used to package up collections of values as an argument to a method of the MAJ API.
tv.amwa.maj.constant Defines constant values used throughout the MAJ API and defined by external specifications.
tv.amwa.maj.embeddable Implementations of structured values that can be embedded as properties of entity beans.
tv.amwa.maj.entity Implementation of the AAF interchange object classes.
tv.amwa.maj.entity.item Entities used to preserve the order of list items when ordered collections are persisted to the database.
tv.amwa.maj.enumeration Defines Java enumerations representing the enumerations specified in the AAF object specification and other enumerations used across the MAJ API.
tv.amwa.maj.exception Specific exceptions thrown due to exceptional behaviour during the execution of method calls from the MAJ API.
tv.amwa.maj.iface Specifications of all the persistent and meta classes of AAF as Java interfaces.
tv.amwa.maj.industry Industrial units for manufacturing and storing instances of classes and meta-classes, referenced by names and registered identifiers.
tv.amwa.maj.integer Provides annotations to label that a value of a Java primitive type in the current context should be interpreted as a particular AAF integer data type. Support for the input and output of AAF classes as XML fragments and documents.
tv.amwa.maj.meta Implementation of the AAF meta-classes as Java classes.
tv.amwa.maj.misctype Provides annotations that describe the mapping of miscellaneous AAF data types to Java data types.
tv.amwa.maj.record Specifications of representations of structured values, such as those of the AAF record data types.
tv.amwa.maj.union Provides interfaces to a union type representing values which may contain one of many different sub-types, as used to specify matching criteria for search operations.
tv.amwa.maj.util Utility methods and classes used internally by the MAJ API that may also be useful to applications using the API.


This documentation describes the Media Authoring with Java API (MAJ API), an implementation of the classes of the Advanced Authoring Format specification in Java. The classes are implemented as plain old Java objects (POJOs) and version 3 entity Enterprise Java Beans (EJB3s). This API is being developed as a project of the Advanced Media Workflow Association and is licensed under the AAF SDK Public Source License.

This is an early release version 0.1 and so contains only limited description of how to get started with this API. However, a Java developer should be able to get started quite quickly. The documentation of all the packages is rich and almost complete, so worthwhile exploring fot a technical person.

Here is a code snippet to get you started:

import tv.amwa.maj.argument.SourceReferenceValue;
import tv.amwa.maj.embeddable.*;
import tv.amwa.maj.entity.*;
import tv.amwa.maj.industry.AAFFactory;

public class AMWADemoClass {

        public static void main(String[] args) throws Exception {

            MasterMob amwaMob = new MasterMob(
                new MobID(), // 24bit pseudo random
            Sequence amwaVideoSequence = new Sequence(
            amwaVideoSequence.appendComponent(new SourceClip(
                DataDefinition.forName("Picture"), 60l,
                new SourceReferenceValue(MobID.parseMobID(
                  1, 10l)));
            AAFFactory factory = AAFFactory.getFactory();
            TimelineMobSlot amwaVideoSlot = factory.makeTimelineMobSlot(
                1, amwaVideoSequence, new Rational(25, 1), 0l);
            amwaVideoSlot.setName("AMWA VIDEO SLOT");
            amwaMob.appendComment("company", "portability 4 media");


To compile this and other example code, you need to have the following on your Java classpath:

You don't have to deploy maj.jar into an application server. The following commands worked for me (Unix):

  javac -classpath maj.jar:ejb3-persistence.jar
  java -classpath .:maj.jar AMWADemoClass

Note that this release should contain all classes, data types and constants included with the C-based AAF SDK version 1.1.2.

Significant features that are missing from this version and will be added to the phase 1 full release:

Features missing from the phase 1 release to be added in the phase 2 release:

You can download a pre-built JAR file and view the API documentation on line at

Please address any general queries to the forums at For more directed enquires, contact

Richard Cartwright

Media Authoring
with Java API

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