public interface MetaDictionary extends MetadataObject, Cloneable
Specifies a container for meta definitions. Every AAF file has a dictionary within its preface and also contains a representation of a meta dictionary.
In MAJ, the meta dictionary is primarily represented by the warehouse. This keeps a per-virtual machine record of all meta definitions that have been registered. MAJ meta dictionaries can be static or dynamic:
makeStatic().makeDynamic(tv.amwa.maj.model.Preface).| Modifier and Type | Method and Description |
|---|---|
MetaDictionary |
clone()
Create a cloned copy of this meta dictionary.
|
int |
countClassDefinitions()
Returns the number of class definitions contained in this dictionary.
|
int |
countOpaqueTypeDefinitions()
Returns the number of opaque type definitions in the dictionary.
|
int |
countTypeDefinitions()
Returns the number of type definitions contained in the dictionary.
|
void |
createForwardClassReference(AUID classId)
Creates a forward class reference that is used to allow a class definition to
be referenced before it has had its full definition stored into this dictionary.
|
InterchangeObject |
createInstance(AUID identification)
Deprecated.
Use the
Forge.make(Class, Object...) or equivalent
instead. |
MetaDefinition |
createMetaInstance(AUID identification)
Deprecated.
Use the
Forge.make(Class, Object...) or equivalent
instead. |
Set<? extends ClassDefinition> |
getClassDefinitions()
Returns the set of all class definitions in this dictionary.
|
boolean |
getIsDynamic()
Is this meta dictionary dynamic? A dynamic meta dictionary represents only the
meta definitions required to represent a given preface at a specific point in time.
|
Set<? extends TypeDefinition> |
getOpaqueTypeDefinitions()
Return the set of all registered opaque type definitions
in the dictionary.
|
Set<? extends TypeDefinition> |
getTypeDefinitions()
Returns the set of all type definitions contained within this dictionary.
|
boolean |
hasForwardClassReference(AUID classId)
Returns
true if the given class identification is a
forward reference registered with this dictionary. |
ClassDefinition |
lookupClassDefinition(AUID identification)
Returns the class definition with the given identifier that is contained in this dictionary.
|
TypeDefinition |
lookupOpaqueTypeDefinition(AUID typeId)
Return the opaque type definition with the given id.
|
TypeDefinition |
lookupTypeDefinition(AUID identification)
Return the type definition with the given identifier that is contained within this dictionary.
|
void |
makeDynamic(Preface preface)
Turn this meta dictionary from static to dynamic and/or update the meta definitions
to represent those required to represent the given preface.
|
void |
makeStatic()
Turn this meta dictionary into a static meta dictionary, which is the default state.
|
void |
registerClassDefinition(ClassDefinition classDefinition)
Add a class definition to those contained in this dictionary.
|
void |
registerOpaqueTypeDefinition(TypeDefinition typeDef)
Add the opaque type definition to the dictionary.
|
void |
registerTypeDefinition(TypeDefinition typeDefinition)
Add a type definition to those contained in this dictionary.
|
InterchangeObject createInstance(AUID identification) throws NullPointerException, IllegalArgumentException
Forge.make(Class, Object...) or equivalent
instead.Creates a single uninitialized AAF object of the class associated with a specified interchange object class identifier.
This method is a factory for creating objects found within the body of an AAF file. In MAJ, the equivalent functionality is provided through the factory provided on the media engine.
identification - Class identifier (id) of the stored object. This is the
corresponding SMPTE identifier (as a GUID) for all predefined built-in
classes or registered extension classes.NullPointerException - Cannot create an instance from a null
value.IllegalArgumentException - The given identifier is not known or is not
for an object of interchange type.MetaDefinition createMetaInstance(AUID identification) throws NotImplementedException
Forge.make(Class, Object...) or equivalent
instead.Creates a single uninitialized AAF meta definition (class or type) associated with a specified class identifier.
This method is a factory for creating objects used to describe the meta dictionary of an AAF file. In MAJ, the equivalent functionality is provided through the factory provided on the media engine.
identification - Identifier (id) of a class or type definition. This is
the corresponding SMPTE identifier (as a GUID) for all predefined
built-in definitions or registered extensions.NullPointerException - Cannot create a meta instance for a null
value.IllegalArgumentException - The given identifier is not known or is not for
a meta definition.NotImplementedExceptionvoid registerClassDefinition(ClassDefinition classDefinition) throws InvalidParameterException, NullPointerException
Add a class definition to those contained in this dictionary.
classDefinition - Class definition to add.InvalidParameterException - A class definition with the same identifier
is already contained in this dictionary.NullPointerException - The given class definition is null.Warehouse.lookForClass(Class),
Warehouse.lookForClass(String)ClassDefinition lookupClassDefinition(AUID identification) throws NullPointerException, InvalidParameterException
Returns the class definition with the given identifier that is contained in this dictionary.
identification - Unique identifier for a class contained in this dictionary.NullPointerException - Argument is null.InvalidParameterException - The given class identifier does not match a class
definition stored in this dictionary.Warehouse.lookForClass(Class),
MediaClassSet<? extends ClassDefinition> getClassDefinitions()
Returns the set of all class definitions in this dictionary.
@UInt32 int countClassDefinitions()
Returns the number of class definitions contained in this dictionary.
void createForwardClassReference(AUID classId) throws InvalidParameterException
Creates a forward class reference that is used to allow a class definition to be referenced before it has had its full definition stored into this dictionary.
classId - Unique class identifier for the forward reference.InvalidParameterException - The given ID represents an existing
forward class reference or a class definition that has already been
successfully registered.@Bool boolean hasForwardClassReference(AUID classId) throws InvalidParameterException
Returns true if the given class identification is a
forward reference registered with this dictionary.
classId - Unique class identifier.InvalidParameterException - The given ID is not recognized as a
class definition id.void registerTypeDefinition(TypeDefinition typeDefinition) throws NullPointerException, InvalidParameterException
Add a type definition to those contained in this dictionary.
typeDefinition - Type definition to add to this dictionary.NullPointerException - The given type definition is null.InvalidParameterException - The given type has an id that matches
the id of a type definition already contained in the dictionary.Warehouse.lookForType(String),
Warehouse.lookForType(AUID),
Warehouse.registerTypes(Class, String, String),
Warehouse.register(TypeDefinition, String, String)TypeDefinition lookupTypeDefinition(AUID identification) throws NullPointerException, InvalidParameterException
Return the type definition with the given identifier that is contained within this dictionary.
identification - Unique identifier for the type definition contained in this dictionary.NullPointerException - The given type identifier is null.InvalidParameterException - The given identifier does not match that of a type
definition contained in this dictionary.Set<? extends TypeDefinition> getTypeDefinitions()
Returns the set of all type definitions contained within this dictionary.
@UInt32 int countTypeDefinitions()
Returns the number of type definitions contained in the dictionary.
void registerOpaqueTypeDefinition(TypeDefinition typeDef) throws NullPointerException, InvalidParameterException
Add the opaque type definition to the dictionary.
An opaque type definition defines a property type that has a value whose type is specified in each instance.
typeDef - Type definition object.NullPointerException - Argument is null.InvalidParameterException - The given type has already
been registered.TypeDefinition lookupOpaqueTypeDefinition(AUID typeId) throws NullPointerException, InvalidParameterException
Return the opaque type definition with the given id.
typeId - Unique type ID.NullPointerException - Argument is null.InvalidParameterException - The given ID is not recognized as
a type definition ID.Set<? extends TypeDefinition> getOpaqueTypeDefinitions()
Return the set of all registered opaque type definitions in the dictionary.
@UInt32 int countOpaqueTypeDefinitions()
Returns the number of opaque type definitions in the dictionary.
boolean getIsDynamic()
Is this meta dictionary dynamic? A dynamic meta dictionary represents only the meta definitions required to represent a given preface at a specific point in time. Otherwise, the meta dictionary is static and represents all meta definitions known to the current virtual machine.
makeStatic(),
makeDynamic(Preface)void makeDynamic(Preface preface) throws NullPointerException
Turn this meta dictionary from static to dynamic and/or update the meta definitions to represent those required to represent the given preface.
preface - Preface to compute the meta dictionary for.NullPointerException - Cannot make a dynamic meta dictionary from a null
value.getIsDynamic(),
makeStatic()void makeStatic()
Turn this meta dictionary into a static meta dictionary, which is the default state. In this state, the meta dictionary holds all meta definitions known to the current virtual machine.
getIsDynamic(),
makeDynamic(Preface)MetaDictionary clone()
Create a cloned copy of this meta dictionary.
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.