A document on accessing available metadata through the Metatype Manager.
The Metadata Manager allows you to:
To access a Metatype Provider, use the getMetaTypeProvider method. In this case returned Metatype Provider instance does not include attribute definitions of a parent object class, referenced by its child. Use the getAggregatedMetaTypeProvider method to retrieve a Metatype Provider containing a child ObjectClassDefinition with its full set of AttributeDefinitions.
If the metadata is available through a Metatype Provider service in the OSGi framework, the Metadata Manager wraps the service into a MetaTypeProviderExtern object and directly maps the application call to the wrapped provider.
If metadata is defined in an XML file, the Metadata Manager stores the metadata in the persistent storage using the Core Database Bundle. When an application requests some metadata, the Metadata Manager returns the metadata as a serialized MetaTypeProvider holding a collection of ObjectClassDefinition instances.
Applications can check the metadata version through the getMetaTypeProviderVersion method.
Use the getMetaTypeProviderResource method of the Metadata Manager to get the location to the metadata XML resource.
Use the getProvidingBundle method to get the ID of the bundle, containing specific metadata. For example, this ID can be used to access the supplier bundle within the OSGi framework context.