Minimal links
disl0.120.12Minimal links
Example definition minimal-links.dis: The smallest diagram type that holds links to elements of other documents and is linked to (DISL 0.12, 4.12).
Views generated from the file
These views are drawn by this site from minimal-links.dis itself: its metamodel, and the layers it fills. They are not the notation the definition draws; that appears in an IDE that runs it.
minimal-links.dis at ddb0daaDiagram as text (Mermaid)
classDiagram
accTitle: Metamodel of the Minimal links example
accDescr: Class diagram of minimal-links.dis: 2 node types (Task, LinkedTask) and 0 relation types (none), with their typed attributes, inheritance, containment and relation ends.
class Task {
+string title
+string status
}
class LinkedTask {
+link link
+number x
}minimal-links.dis at ddb0daaDiagram as text (Mermaid)
flowchart LR
accTitle: Layers of minimal-links.dis
accDescr: The eight DISL layers in order. minimal-links.dis fills 3 of them: Metamodel (2 items), Behavior (1 items), Persistence (8 items). It leaves Coordinates, Notation, Toolbox, Constraints, Layout empty.
L1["1 · Metamodel<br/>2 items"]
L2["2 · Coordinate systems, placement and snapping<br/>not used"]
L3["3 · Notation (visual definition)<br/>not used"]
L4["4 · Toolbox, context tools and forms<br/>not used"]
L5["5 · Constraints<br/>not used"]
L6["6 · Behavior<br/>1 items"]
L7["7 · Layout<br/>not used"]
L8["8 · Persistence<br/>8 items"]
L1 --> L2 --> L3 --> L4 --> L5 --> L6 --> L7 --> L8
classDef filled stroke-width:3px
classDef empty stroke-dasharray:4 4
class L1 filled
class L2 empty
class L3 empty
class L4 empty
class L5 empty
class L6 filled
class L7 empty
class L8 filled- Layer 1 — Metamodel: 2 items
- Layer 2 — Coordinate systems, placement and snapping: not used
- Layer 3 — Notation (visual definition): not used
- Layer 4 — Toolbox, context tools and forms: not used
- Layer 5 — Constraints: not used
- Layer 6 — Behavior: 1 items
- Layer 7 — Layout: not used
- Layer 8 — Persistence: 8 items
The file
Download minimal-links.dis (2,000 bytes, unchanged from the source).
{
"$schema": "https://etalii.net/adp/disl/schema/0.2/disl.schema.json#/$defs/Specification",
"disl": "0.12",
"language": {
"id": "org.example.minimal-links",
"version": "1.0.0",
"label": "Minimal links",
"doc": {
"summary": "The smallest diagram type that holds links to elements of other documents and is linked to (DISL 0.12, 4.12).",
"description": "`Task` can be linked to from other documents, named by its `title`. `LinkedTask` stands for an element of another document, shows that element's `status` live, and is added with the standard action `lookup` from the canvas menu. The document gets an 8-character id; the binding, not shown here, declares `document.id` (FBL 17.2)."
}
},
"metamodel": {
"types": {
"Task": {
"doc": "A task of this plan, which other documents can link to.",
"attributes": {
"title": { "type": "string", "required": true },
"status": { "type": "string" }
},
"labelAttribute": "title",
"linkable": { "nameProperty": "title" }
},
"LinkedTask": {
"doc": "An element of another document, shown in this plan.",
"attributes": {
"link": { "type": "link", "required": true, "origins": ["etalii/timeline", "etalii/knowledge"] },
"x": { "type": "number" }
},
"linked": { "attribute": "link", "shows": [ { "attribute": "status", "label": "Status" } ] }
}
}
},
"behavior": {
"operations": {
"addLinked": {
"label": "Add from another document…",
"for": "diagram",
"actions": [
{ "lookup": { "create": "LinkedTask", "as": "at" }, "as": "added" },
{ "select": "added" }
]
}
}
},
"persistence": {
"format": "fbl",
"binding": "minimal-links.fbl#tasks",
"ids": { "strategy": "nanoid", "alphabet": "base36", "length": 8 },
"documentId": { "strategy": "nanoid", "alphabet": "base36", "length": 8 }
}
}In an IDE
No IDE host runs this example yet.