Metagraph
Metagraphs are abstract representations of the structure of a graph. They are a useful method of describing a data representation model that can be used to ensure people structure their information in the same manner. The metagraph describes the structure of a graph, and when that graph is a data representation model, allows individually developed content to be compatible by way of sharing the same data structure.
Metagraphs are a method of describing the structure of a graph, where the
graph they describe is built in an organized fashion. Metagraphs are made up of metanodes,
which represent the types of nodes that may appear in the graph. To fully describe a metagraph, it is necessary to first describe nodes and metanodes.
Nodes are the basic units in the data structure; they are the place where the
data is stored. Nodes may be linked to other nodes, with the structure of
nodes and links forming the data structure. To describe the structure it is
helpful to categorized
similar nodes into types. Each of these types can then be represented by a single metanode.
In other words, the metanode is an abstract node. The
data representation structure can then be represented by a tree of metanodes
with edges that indicates
which metanodes can be linked, and how they can be linked. The metanode structure
when expanded and filled with the right types of data forms an instance graph;
an actual data structure.
Because metagraphs are an abstract way of describing a data structure, they
are a good method for defining a data representation model (DRM).
The purpose of a DRM is to ensure that everybody presents the same types of data
in the same way.
Example: two people are making a list of their favourite dish detergents. They want to join the lists together eventually to create a
list of good detergents that they can bring with them when they go shopping. One person organizes their list to read:
<Detergent list>
<President's-Choice>
<name>Relaxing Aroma Therapy<name>
<name>Invigorating Aroma Therapy<name>
<name>Antibacterial Hand Soap & Dishwashing Liquid</name>
</President's-Choice>
<Sunlight>
<name>Antibacterial<name>
<name>Lemon Fresh</name>
</Sunlight>
</Detergent List>
The other person organizes their list so that it reads:
<Dish Detergents>
<Scented>
<name>President's Choice Relaxing Aroma Therapy</name>
<name>Sunlight Lemon Fresh</name>
</Scented>
<Antibacterial>
<name>Sunlight Antibacterial</name>
<name>Palmolive Antibacterial</name>
</Antibacterial>
</Dish Detergents>
Though both lists contain the same types of information, the data is organized quite differently. An automated
tool would have difficulty comparing these two data sets and combining them into a useful list without duplicates. The tool needs both lists to be structured the same way in order to make meaningful comparisons. This is where a DRM
is useful.
When people separately create a model to describing complex data,
they may organize the data differently. A DRM
describes rules for creating data models so that all models
are organized using the same principles. A data representation model describes
an organization and structure that can be used for multiple data sets. The DRM provides a set of
classes for organizing the data, describes the relationship between the classes, and
defines a set of necessary and a set of optional attributes for each class.
Using these classes, relationships and attributes, the data set can be fully
described.
Magnetar XSG consists of structure graphs that are linked to entities,
functions and behaviours is a specified manner. A metagraph is used to describe
a DRM for Magnetar XSG. The DRM metagraph defines how the structure graph should
be constructed,
and indicates where and how entities, behaviours, and functions should be attached to the graph.
All of the specifications found on this site will have a metagraph that not
only describes how to use each language, but also describes how the languages
can be extended. Understanding the metagraphs is of particular importance
to anybody wanting to develop tools to work with Magnetar XSG content.