A Thing is the base element of a Limada.ThingGraph.
A Thing is used as a vertice (or node) of a graph with
- a unique ID (uuid)
- a generic Data property
Id Id
}
IThing<T>:IThing {
T data
}
A Link is a labeled edge, and based on IThing. The label, called marker, is a Thing by itself.
T Root
T Leaf
}
ILink: Limaki.Graph.IEdge<IThing>, IThing {
IThing Marker;
}
The Marker provides meaningful information about the link (semantics).
In other words, a Link is a triple of Things: a Root, a Leaf and a Marker thing. The Root is the described thing (subject), the Leaf is a thing that is somehow related to the Root (object); the marker indicates what kind of relation between root and leaf exists (predicate).
Eg. The leaf-thing is the name of the root-thing in case the root-thing is a person; or someone the person knows, etc. etc.
The definition of a link seem very simple:
- a link is a thing
- a link has a root, a leaf and a marker which are things
The usage of a link is
- the root is a predecessor or parent
- the leaf is a successor or child
- the marker is a quality or weight or meaning of a link
The consequences of this design are:
- a link can connect links
- every thing can be a marker
The Marker-Things can be defined in Schemes, which are collections of Things used to describe relations between things.
A ThingGraph is a Limaki.Graph<IThing>.