The Object Management Group's Meta Object Facility
The Meta Object Facility (MOF) is another standard from the ACM's
Object Management Group (OMG) just as UML. MOF is defined like an
standard that ``provides a metadata management framework, and a
set of services to enable the development and interoperability of
model and metadata systems'' [Adaptive et al., 2003].
Therefore MOF can be viewed both as a metadata interchange framework
or as a metamodeling framework. Although MOF has not been formally
used in this Thesis it is interesting to note the many similarities
exist between this standard and the solutions provided in CLAM (see
chapter 3) or the conceptual metamodel presented in
the Object-Oriented Content Transmission Metamodel (see chapter 5).
MOF is platform and implementation independent and can be mapped to
different languages such as XML or Java.
MOF defines separate concerns or capabilities for reuse by other models
and metamodels. These concerns are organized into packages and the
main packages addressing modeling and metadata management concerns
are: Reflection, Identity and Extension.
The Reflection package extends a model with the ability to
be self-describing, that is it provides all the necessary infrastructure
to use an object without prior knowledge of its specific features.
In MOF an object's class (i.e. its meta object) reveals the nature,
kind and features of the object.
The Reflection package includes the Object class, which is
the the superclass of all model elements. This abstract class has
the following main operations:
The other important class in the Reflection package is the Factory
class, which is in charge of creating MOF instances and offers the
- getMetaClass(): returns the class that describes this object
- container(): returns the parent container of the object if
- equals(element): returns true if the element and the 'this'
reference the same instance.
- get(property): returns the value of the given property
- set(property, element): sets the element to the given property
of the object.
- isSet(property): true if value is different from the default
value (if multiplicity is >1 is true if there is at least 1 element).
- unset(property): sets the value to default
The Identity package provides an extension for uniquely identifying
metamodel objects without relying on model data subject to change.
The main concept in this package is the identifier. The identifier
of an object is a formal representation of the object identity (see
section 1.1.1), it distinguishes a given object from
all the rest. Identifiers allow the serialization of references to
external objects, can be used to coordinate data updates where there
has been replication, and can provide clear identification in communication.
Identifiers also facilitate Model-Driven Development by providing
an identifier immutable to model transformations (see section 1.2.2
for a brief summary on Model-Driven Development).
- createFromString(datatype, string): creates an Element from
the value of the String with a format defined by the XML Schema Simple
Type corresponding to that data type.
- convertToString(datatype,element): creates a string representation
of the Element
- create(metaClass): creates an object with all properties unset
that is an instance of the metaclass.
The Identity package provides the concept of extents. An Extent
is a context in which an object can be identified. An object may be
the member of zero or more extents. An Extent is not an object, it
is part of a MOF capability. It has the following operations:
Identity extends the Basic::Package with a URI that can be used for
externally identifying it. It also extends the Basic::Property with
the ability to designate a property as an identifier for the containing
- useContainment(): returns true if it includes all objects contained
by members of the objects.
- objects(): returns a ReflectiveSequence of the objects directly referenced
by this extent.
An URIExtent is an Extent that provides URI identity. It has
the following operations:
Finally, the Extension package offers a simple way of extending
model elements with name/value pairs. MOF offers the ability to define
metamodel elements like classes with properties and operations. But
sometimes it is necessary to extend model elements with additional
information such as information missing from the model or data required
for a particular application.
- contextURI(): returns a string specifying the URI established for
the context of the extent.
- uri(object): returns the uri of a given object in the extent.
- object(string): returns the object identified by a given uri in an
The Extension package includes the Tag class. A Tag is a single
piece of information that can be associated with model elements. It
has the following properties:
- name: string
- value: string (MOF places no meaning on the value)