@Documented @Retention(value=RUNTIME) @Target(value=TYPE) public @interface MediaClass
Labels a Java class as one suitable for use as an AAF specified class, extension class or
class from another namespace compatible with SMPTE registration. It must be possible to derive
the AAF meta-class definition from the annotations provided. A class
using the annotation must also have any get methods used to retrieve the value of properties annotated with MediaProperty.
Aspects of the structure of the Java implementation are used to provide the data used to create a class definition. This includes:
MediaProperty annotations within the annotated Java class become properties
of the class definition.This information is collected on the first call to Warehouse.lookForClass(Class) for
any Java class labelled with this annotation. A lookup table of this data is help statically
within the running virtual machine.
A symbol name must be provided which will be used to name an element when writing the class to an XML file. Normally, the namespace for the element will be the same for the parent class in the class hierarchy. A namespace can be specified to override this if required.
| Modifier and Type | Required Element and Description |
|---|---|
String |
definedName |
String |
symbol
Provides the registered symbol used for this class when serialized to XML.
|
int |
uuid1 |
int |
uuid2 |
int |
uuid3 |
byte[] |
uuid4 |
| Modifier and Type | Optional Element and Description |
|---|---|
String[] |
aliases
Alternative names that this class may be known by.
|
String |
description
Provides a description of the class.
|
EmitXMLClassIDAs |
emitXMLClassID
Determines how the class identifier of an XML element is serialized.
|
boolean |
isConcrete
Is this class a concrete class? If the Java class is abstract then the class definition record
will be set to
false. |
String |
namespace
Provides the XML namespace for this class.
|
String |
prefix
Provides the XML namespace prefix abbreviation for this class.
|
public abstract String definedName
public abstract String symbol
Provides the registered symbol used for this class when serialized to XML. The symbol should not include a namespace declaration. Symbols must be unique within a namespace.
namespace()public abstract String[] aliases
Alternative names that this class may be known by. The namespace for class names is flat so take care not to overwrite the definition of another class. A warning will be generated if an alias overwrites a defined class name.
As an example, the root of the main AAF class hierarchy is defined as InterchangeObject and is known by the alias AAFObject in the C-based reference implementation.
public abstract String description
Provides a description of the class.
MediaProperty.description()public abstract String namespace
Provides the XML namespace for this class. If none is defined, the one for the parent
class is used. Any member properties or child classes of the annotated class
will share the same namespace unless this is overwritten. When serialized to XML, the class
will have the following xmlns: attribute included in its element name:
xmlns:<namespaceAbbreviation>="<namespace>"prefix(),
symbol(),
ExtensionScheme.getSchemeURI(),
MetaDefinition.getNamespace()public abstract String prefix
Provides the XML namespace prefix abbreviation for this class. If none is defined, the one for the parent
class is used. Any member properties or child classes of the annotated class
will share the same namespace unless this is overwritten. When serialized to XML, the class
will have the following xmlns: attribute included in its element name:
xmlns:<namespaceAbbreviation>="<namespace>"namespace(),
ExtensionScheme.getPreferredPrefix(),
MetaDefinition.getPrefix()public abstract EmitXMLClassIDAs emitXMLClassID
Determines how the class identifier of an XML element is serialized. For details, see the
description of the associated EmitXMLClassIDAs enumeration.
public abstract boolean isConcrete
Is this class a concrete class? If the Java class is abstract then the class definition record
will be set to false. Otherwise, this annotation field will be used to determine
the status of the class.
true if the defined class is concrete, otherwise false.(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.