6.2.3 Concepts of the data model
The data model defines what constructs your design information
consists of. In MetaEdit+ the structure of the data model is based on the GOPPRR
data model. GOPPRR is an acronym from the words
Graph-
Object-
Property-
Port-
Role-
Relationship.
Each of these is called a
metatype. The GOPPRR metatypes may be described
as follows:
Object
An
object is a thing that exists
on its own. Examples of objects are a
Button, a
State, and an
Action that belong to a WatchApplication or
Class and
Object that belong to an UML Class Diagram. All instances of objects
support reuse
functionality: an existing object can be
reused in other graphs by using the add existing
function.
Relationship
A
relationship is an
explicit
connection between a group of objects. Relationships attach to objects via
roles. An example of a relationship is a
Transition that belongs to a
WatchApplication or an
Inheritance and an
Association that can be
found from UML Class Diagram.
Role
A
role specifies how an object
participates in a relationship. Examples for a
Transition relationship in
WatchApplication are the roles
From and
To, which specify how the
objects at either end of the
Transition participate in the relationship.
Similarly, in
Inheritance relationships there are two kinds of roles:
Ancestors and
Descendants.
Port
A
port is a part of an object to
which a role can connect. For example, an Amplifier object might have a port for
analog input, a port for digital input, and an analog output port. Roles
connecting to each of these will have different semantics. Port instances are
defined in an object type symbol, and all object instances share those same
ports. (Note that in addition to these static ports, there are also dynamic
ports, which are actually normal objects playing the part of a port in a symbol
via a template.)
Graph
A
graph is a collection of
objects, relationships, roles, and
bindings of these to show which
objects a relationship connects via which roles. A graph also maintains
information about which graphs its elements explode too. Examples of graphs are
WatchApplication and
UML Class
Diagram.
Property
A
property is a describing or
qualifying characteristic associated with the other types, such as a
name, an
identifier or a
description.
The GOPPRR metatypes are applied on both the type and the
instance level, e.g. a graph type could be WatchApplication, and an
instance of that would be a particular WatchApplication, e.g.
‘Stopwatch’. Graph types contain object types, whereas graphs
contain objects.
As stated in the second rule, representation independence,
each of these concepts (apart from property) can have multiple representations
(
Figure 6–1) even in different
representational paradigms (i.e. diagram, matrix,
table).