Metamodels¶
A metamodel is the language la-gram models in: its element and relationship types, how they are drawn, which relationships are permitted, its viewpoints, its checks. la-gram reads all of it from data, as published on meta.linked.archi, so a language la-gram has never seen works the same as ArchiMate. ArchiMate 4.0 is loaded when la-gram starts; the Metamodels menu changes that.
Unload¶
Under Loaded, each loaded metamodel has a ✓ and unload. Clicking it unloads that metamodel, with every document it loaded — those its manifest names and those they import — except the core's and any that another loaded metamodel uses: its types leave the palette. The model is kept as it is: elements of the unloaded language stay, and show under Unclassified in the model tree until a metamodel that knows them is loaded again.
- Open Metamodels.
- Click ✓ ArchiMate 4.0 Metamodel under Loaded. It is unloaded, and the palette empties.
Opening a model does this for you: the metamodels it declares are loaded, and the others unloaded (Open).
Add or switch¶
Under Loaded, the catalogue's metamodels by section: Core, Modelling languages, Frameworks and Extensions. Each entry offers two things:
| Choice | Does |
|---|---|
| the entry itself (add) | loads it alongside what is loaded: the palette offers both languages |
| switch to | replaces the loaded metamodels with this one |
A loaded entry says loaded and cannot be chosen again. Loading says what it loaded, and how many parts could not be loaded (see Loaded assets).
- Open Metamodels.
- Click Architecture Decisions: it is loaded beside ArchiMate 4.0, and the palette has its Decision Record and Forces.
- To model in C4 alone instead, click switch to on C4 Model.
A metamodel can also be loaded as la-gram starts, with
?metamodel=:
https://app.linked.archi/la-gram/?metamodel=https://meta.linked.archi/basic/metamodel%23Basic
Load by IRI¶
Load by IRI… loads any metamodel, listed in the catalogue or not, by its IRI. Its dialog, Load
metamodel, asks for the IRI of an arch:Metamodel (or its manifest), and starts at
https://meta.linked.archi/. It is fetched as Sources says, and added to what is loaded.
- Choose Metamodels › Load by IRI….
- Type the IRI, and choose OK:
https://meta.linked.archi/c4/metamodel#C4Model
In a URL parameter the # is written %23; in the dialog, as it is.
Upload¶
Upload metamodel or asset files… opens Upload metamodel or asset files, which takes files from your computer, or a folder: drop them on it, or choose them with Choose files… or Choose folder…. Files or a folder dropped anywhere on la-gram's window are uploaded the same way, without the dialog. A folder is read with its subfolders.
| File | What la-gram does with it |
|---|---|
.ttl, .trig, .jsonld, .json, .rdf, .owl, .nt, .nq |
reads it as RDF |
.svg, .png, .jpg, .jpeg, .gif, .webp |
keeps it, for the icons |
any other, and a hidden file or folder (.git, .DS_Store) |
leaves it out |
Your metamodel's IRIs need not resolve anywhere. Every file of an upload is registered before anything is loaded, so the order of the files does not matter, and each is found by every IRI it can be referred to by:
- what it says it is: its
owl:Ontology,owl:versionIRI,skos:ConceptSchemeandarch:MetamodelIRIs, each with or without a trailing#or/— a manifest's<https://acme.example/ea/onto#>finds the file that says<https://acme.example/ea/onto> a owl:Ontology; - failing that, an IRI it gives a type — a notation set it declares;
- failing that, the namespace of such an IRI.
The last two count only under the upload's own namespaces, never under https://meta.linked.archi/. A
document is loaded into the graph its file's own IRI names. Uploaded files are asked before any other
source, so a file stands in for the published one of the same IRI. Two files of one upload that
say they are the same IRI are reported, and the first by path is used; a later upload stands in for an
earlier one.
What is loaded¶
| The upload | la-gram |
|---|---|
declares an arch:Metamodel |
loads each it declares beside those loaded; one already loaded is loaded again from the new files, where it stands among them. The files no manifest reaches are not loaded |
| declares none | adds each file for the metamodels that name it, such as a notation or shapes file of your own — except a model, which it leaves to File › Open… |
A part a manifest names that is under the manifest's namespace — its IRI up to the last /,
https://acme.example/ea/ for https://acme.example/ea/metamodel#Acme — and that the upload does not
have is not fetched: it is unavailable, Not among the uploaded files, at once. The bundle is still
asked. This holds when the upload brings another of the manifest's documents; a manifest uploaded alone
has its parts from the usual sources, and so does one under https://meta.linked.archi/.
One message says what the upload did: the metamodels loaded and from how many files, then what was not used, unavailable, could not be read, is a model, or was left out.
-
Put your metamodel in a folder,
acme:acme/ ├── metamodel.ttl <https://acme.example/ea/metamodel#Acme>, which names the ontology <https://acme.example/ea/onto#> ├── onto.ttl <https://acme.example/ea/onto>, the type Actor, its icon <https://acme.example/ea/icons/actor.svg> └── icons/ └── actor.svg -
Choose Metamodels › Upload metamodel or asset files…, then Choose folder…, and choose
acme. - la-gram says Loaded Acme Metamodel from 2 files., and the palette offers Actor with its icon.
Icons¶
An icon whose IRI is under an uploaded file's namespace is drawn from the uploaded image at the matching
path: the file's IRI and its path in the upload are matched from the end, and what is left of each stands
for the other. <https://acme.example/ea/onto> in acme/onto.ttl makes https://acme.example/ea/ the
folder acme/, so the icon https://acme.example/ea/icons/actor.svg is acme/icons/actor.svg. Failing
that, the one uploaded image of the icon's file name is drawn. The icon is drawn so on the canvas, in the
palette, the menus and the model tree, and an exported SVG or PNG carries it.
Kept¶
Uploaded files are kept in this browser, and taken again when la-gram starts, before any metamodel is
loaded: ?metamodel= may name an uploaded metamodel, and a model that
conforms to one opens with it. The Metamodels menu lists the uploaded metamodels under Uploaded, each
with switch to and add, as the catalogue's are.
Forget uploaded files…, offered while anything is uploaded, asks first (Forget uploaded files), then removes them all from this browser. What is loaded stays loaded until it is unloaded or la-gram is reloaded.
- Choose Metamodels › Forget uploaded files….
- Choose Forget. la-gram says The uploaded files are forgotten.
Kept in this browser only
Another browser, and the other members of a collaboration room, do not have the files you uploaded.
Loaded assets¶
Show loaded assets… opens Loaded semantic assets: for each loaded metamodel, every document its manifest names, with what became of it, its role, its IRI, where it came from and its triples. A metamodel that is incomplete has a line for each thing it leaves out first, with the types concerned by name:
■ ATAM Metamodel
⚠ Incomplete: it names no classification (arch:conceptClassification): its 8 element types are listed under “Other”: ATAM Evaluation, Architectural Risk, Non-Risk, …
loaded manifest https://meta.linked.archi/atam/metamodel# (remote) · 30 triples
…
| Outcome | Means |
|---|---|
loaded |
read and loaded |
not-bundled |
not in the bundle, and not fetched (offline) |
unavailable |
could not be fetched |
skipped |
not read on purpose: a role la-gram does not use (see Manifest) |
error |
fetched, but could not be read |
A document read from an uploaded file says so, with the file. Every uploaded file is listed last, under Uploaded, with the IRI it stands for:
■ Acme Metamodel
loaded manifest https://acme.example/ea/metamodel# (uploaded: acme/metamodel.ttl) · 4 triples
loaded ontology https://acme.example/ea/onto (uploaded: acme/onto.ttl) · 4 triples
…
■ Uploaded
acme/metamodel.ttl → https://acme.example/ea/metamodel#
acme/onto.ttl → https://acme.example/ea/onto
- Choose Metamodels › Show loaded assets….
- Read the list, as it is for ArchiMate 4.0 started with
?assets=offline:
■ ArchiMate 4.0 Metamodel
loaded manifest https://meta.linked.archi/archimate4/metamodel# (bundled) · 45 triples
loaded ontology https://meta.linked.archi/archimate4/onto# (bundled) · 987 triples
loaded taxonomy https://meta.linked.archi/archimate4/tax# (bundled) · 415 triples
loaded notation https://meta.linked.archi/archimate4/notation# (bundled) · 826 triples
…
skipped derivationRules https://meta.linked.archi/archimate4/derivation#
Choose which to show¶
The menu offers, at first, ArchiMate 4.0 and 3.2, C4 Model, EDGY 23 and UML 2.5.1; ADMIT, ATAM, DoDAF 2.02, EA on a Page, TOGAF and UAF 1.2; and the Architecture Decisions, Architecture Processes and Reference Architecture extensions. The catalogue's others — Basic, BPMN, Zachman and the rest — are hidden until you ask for them, and so is one the catalogue gains later; Choose which to show… says how many are hidden (15 hidden). An installation can offer others (configuration).
Choose which to show… opens File › Settings… › Metamodels, where each catalogue entry has a checkbox, ticked when the menu offers it. Tick one to add it to the menu, untick one to leave it out. A loaded metamodel is listed anyway, and Load by IRI… still reaches any.
- Choose Metamodels › Choose which to show….
- Under Modelling languages, tick Basic, then Apply. The menu offers Basic.
- Under Frameworks, choose None, then Apply. The menu lists no frameworks.
Sources¶
Every document a metamodel needs is looked for in up to three places, in an order the assets URL
parameter sets. A file uploaded with Upload metamodel or asset files… always comes first, and the
network is not asked for a part of an uploaded metamodel that the upload lacks (What is
loaded).
assets |
Order | When |
|---|---|---|
bundled-first (the default in a browser) |
uploaded → bundled → remote | the bundle wins; meta.linked.archi covers what is not bundled. Fast, the same every time |
remote-first |
uploaded → remote → bundled | the published version wins; the bundle covers an outage |
offline |
uploaded → bundled | nothing is fetched, the catalogue included |
The default is bundled-first (a comment in the source code says remote-first; the code starts
bundled-first). The desktop app starts the same way.
https://app.linked.archi/la-gram/?assets=remote-first
Remote fetch¶
A document that is fetched is asked for at its IRI (without the fragment) with one exact type,
Accept: text/turtle: meta.linked.archi answers a list of types with quality values with a 404. A fetch
that takes more than 10 seconds is given up, and the document is unavailable.
What la-gram asks meta.linked.archi for
Loading C4 from the catalogue fetches its manifest with:
GET /c4/metamodel HTTP/1.1
Host: meta.linked.archi
Accept: text/turtle
Bundled¶
la-gram ships, in assets/, a snapshot of what meta.linked.archi serves for:
- ArchiMate 4.0, the default language;
- ArchiMate 3.2, which the ArchiMate Exchange import and export need, the exchange format being a 3.x one;
- Basic, the generic language, whose Connection relates any two of its elements;
- Architecture Decisions, the extension for decision records — issues, decisions, options and the forces on them — to add beside a language;
- Architecture Processes, the extension for the architecture practice's own processes — a process, its activities and tasks, milestones, deliverables and roles, and what it governs — to add beside a language;
- the core vocabularies: core, core-vis, the core shapes and the core questions;
- their icons and the relationship-end markers;
- the catalogue,
assets/catalog.ttl.
About la-gram names the snapshot (Bundled metamodels: snapshot e4882df07d49, say). A bundled icon's
published address, https://meta.linked.archi/archimate4/icons/…, is drawn from the app's own copy,
assets/archimate4/icons/…?v=<digest>, so it works offline; the ?v= changes with the file, so a new
snapshot is never served from a cache. Other languages' icons come from meta.linked.archi.
https://meta.linked.archi/archimate4/icons/business-actor.svg
assets/archimate4/icons/business-actor.svg?v=<digest>
Catalogue¶
What the menu offers is meta.linked.archi's catalogue, a DCAT catalogue of its semantic assets: each
metamodel by its skos:prefLabel, in the section its dcat:theme names (core, languages,
frameworks or extensions). Metamodels in other sections, such as the examples, are not offered, and
still load by IRI.
la-gram starts with the bundled copy, so the menu is complete offline, and, unless assets=offline,
replaces it with the published one, https://meta.linked.archi/catalog, when it arrives. A metamodel
meta.linked.archi publishes is then in the menu without a new la-gram. A published catalogue that cannot
be read, or lists no metamodels, leaves the bundled one.
What the menu reads of C4's entry, from the bundled assets/catalog.ttl (the menu drops the
" Metamodel" its label ends in):
@prefix arch: <https://meta.linked.archi/core#> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
<https://meta.linked.archi/c4/metamodel> a dcat:Dataset ;
dcat:theme <https://meta.linked.archi/catalog#languages> ;
foaf:primaryTopic <https://meta.linked.archi/c4/metamodel#C4Model> .
<https://meta.linked.archi/c4/metamodel#C4Model> a arch:Metamodel ;
skos:prefLabel "C4 Model Metamodel"@en .
<https://meta.linked.archi/catalog#languages> a skos:Concept ;
skos:notation "languages" .
Manifest¶
A metamodel's manifest names its parts. la-gram follows these roles:
| Manifest property | Role |
|---|---|
arch:modelConcepts |
the ontology: element and relationship types |
arch:conceptClassification |
the taxonomy: how the palette groups the types |
arch:notationSet, arch:usesNotationSet |
how each type is drawn |
arch:formalRules, arch:architectureViewpointsRestrictions |
SHACL shapes: the relationship rules and the checks |
arch:architectureViewpoints, arch:viewpointLibrary |
the viewpoints |
arch:presentationContextScheme |
the presentation contexts (audiences) |
arch:referenceData |
the values a property may take |
arch:hasQuestionSet |
the model questions of the SPARQL tab |
These it records as skipped, on purpose: derivationRules (they need a SHACL-AF engine),
referenceModels, hasDeliverableTemplate and basedOnFramework, which feed document generation.
@prefix arch: <https://meta.linked.archi/core#> .
<https://example.org/acme/metamodel#AcmeLanguage>
a arch:Metamodel ;
arch:modelConcepts <https://example.org/acme/onto#> ;
arch:conceptClassification <https://example.org/acme/tax#> ;
arch:notationSet <https://example.org/acme/notation#> ;
arch:formalRules <https://example.org/acme/shapes#> .
Notation lookup¶
How an element or a relationship is drawn, its shape, colours and icon, is looked for in this order, the
first found winning. The active set is the notation set the presentation chosen names
(arch:usesNotationSet), else the first metamodel's arch:notationSet.
- A description of the type in the active set.
- A description of it in the other loaded metamodels' default sets, in the order they were loaded.
- The type's own
arch:prefVisNotation. - The nearest superclass that has a description, nearest first: for each, the active set, then the
others. The walk stops at
arch:Elementandarch:QualifiedRelationship. - la-gram's built-in look: for an element, a rectangle with a white fill and a black line; for a relationship, a solid black line.
What is published for the type itself beats anything inherited, so a generic set cannot flatten another
language's notation: with Basic loaded beside ArchiMate 4.0, ArchiMate's Composition keeps its filled
diamond (step 2). An extension's subclass of am4:BusinessActor that says nothing of its look is drawn as
a Business Actor (step 4).