Analysing the standard MOF model, on the left
of Figure 1, the base of the hierarchy is the M0
level. This level refers to source objects in a given
reality, either being physical or non-physical entities
such as persons, or information stored in a database.
These objects are considered external, therefore are
not included within the Metadata Repository.
The M1 level (model) describes objects in the
M0 level. A model is a finite description of a source
object for a specific purpose. For example, the
model of a conference paper can be composed of the
paper title, abstract, conference name and authors.
For dealing with change management requirements,
a versioning system is proposed to allow storage of
multiple versions of a model, and a model
relationship mechanism for allowing the explicit
establishment of relationships between models to
represent their source object relations or other
logical relations. In the Metadata Repository
context, models are called instances, their versions
are represented by XML documents and relations
are established by using a pre-defined XML syntax.
The M2 level (metamodel) describes the various
models in the M1 level. A metamodel is the
definition of a language to be used for a type of
models, defining their fields and relations to other
models. In the Metadata Repository, metamodels are
called concepts and are defined using XML
Schema and Schematron that are used for ensuring
validity: all instances are checked if they are
compliant with their concept definitions prior to
their storage. By allowing custom definitions for
concepts, the Metadata Repository is able to deal
with any kind of metadata including metadata
standards, a common requirement for Metadata
Repositories (Marco, 2000). Furthermore, concepts
can be grouped in metamodels according to the
target XML namespaces defined in their schemas:
two or more concepts that share the same target
namespace belong to the same metamodel. The use
of namespaces eases the integration of external
metamodels, including metadata standards.
The M3 level (meta-metamodel) defines
descriptions for the various metamodels in the M2
level such as rules and common structure definitions
for all metamodels. In the Metadata Repository these
are called as rules and include properties and
predefined structures to be used in every concept,
with the purpose of enforcing concept structure
consistency and standardization. Examples of those
rules are: (i) common structures to be used in every
concept (identification, versioning and authoring
information); (ii) properties that every XML Schema
must satisfy; (iii) syntax structures to declare and
specify relationships between instances; (iv) checks
to ensure instance and concept names uniqueness
within the same metamodel; (v) syntax of internal
global identifiers for instances and their versions.
These rules are internal to the Metadata Repository,
are implemented by XML Schema, Schematron
and Java code, and are used for performing validity
and support operations on concepts and instances.
Summarizing, instances are XML documents
that follow the language defined by an XML
Schema of a single concept; concepts can be
grouped in metamodels by their schemas’ target
namespaces; and a set of design rules apply to all
concepts. These rules include that every concept
XML Schema and consequently every instance
XML has in its root element attributes for storing its
instance identifier and version identifier (1), and
elements for storing the instance name (2), version
creation and modification dates (3). This is shown in
the following instance XML example:
<Paper globalId="1.1.1"
version="last"
xmlns:mdr="http://di.fct.unl.pt/mdr">
<mdr:Name>Metadata Repository
for...</mdr:Name>
...
<mdr:CreationDate>2006-12-
05</mdr:CreationDate>
<mdr:ModificationDate>2007-03-
05</mdr:ModificationDate>
...
<Authors type="relation">
<mdr:Relation name="Ricardo Ferreira"
semantic="paper author"/>
<mdr:Relation name="João Moura-Pires"
semantic="paper author"/>
</Authors>
</Paper>
Figure 2: Instance XML example.
Note in (1) the syntax of global identifiers for
instances (serverId . databaseId . instanceId) and the
syntax for version identifiers (numeric or “last” for
the last version). The presented example shows an
instance to model this paper, with its authors
specified as relations to other instances (4). The
predefined syntax for referring related instances is
presented in (5), identifying the related instances by
their name (that acts as identifier within the current
namespace) and specifying a semantic for the
relation using attributes. Other attributes exist for
specifying the target namespace of the instance,
which in this case was not used since the reference is
within the same namespace, the identifier of the
target instance version, which if omitted the last
version is considered, and an XPath expression to
refer to a fragment inside the target instance XML.
Like all other instance elements, relation elements
are declared in the concept XML Schema using a
predefined complex type, and configured with an
annotation where relation cardinality and eligible
instance targets are defined by their concept names
and namespaces.
1
2
3
4
5
ICEIS 2007 - International Conference on Enterprise Information Systems
346