opencaesar / oml

Ontological Modeling Language (OML)
https://opencaesar.github.io/oml/
Apache License 2.0
24 stars 4 forks source link

Support for annotation-based diagram filtering #31

Open NicolasRouquette opened 4 years ago

NicolasRouquette commented 4 years ago

User Story

As an OML author, I would like to be able to specify the subset of an ontology that should be visualized on a diagram using annotations that are placed on elements in that subset.

Detailed Description.

Consider this vocabulary: https://github.com/opencaesar/vocabularies/blob/vocabularies%231/src/main/oml/opencaesar.io/foundation/metrology.oml

Diagramming the whole metrology vocabulary is a nice capability but the resulting diagram is difficult to use because related entities can be far apart from each other in the diagram layout.

Instead of trying to come up with smarter diagram layout engines, it is often easy to get domain-specific hints about what constitutes a useful domain-specific diagram views. The collection of such views then can cover the scope of a complex vocabulary while each view is more limited in scope so that a reasonable diagram layout engine can produce a usable rendering of that limited scope.

In the case of metrology, domain-specific views could corresponds to the SysML QUDV diagrams, that is:

To avoid cluttering the OML content with diagram-related annotations, it would be nice to segregate the OML content, say, in src/oml from the diagrams, say, in src/diagram, where the latter has oml ontologies with diagram annotations in .omldiagram files.

An OML ontology file could have one or more OML diagram files extending it with diagram annotations.

Note that the scope of elements that may be visualized in a given diagram include elements defined in ontologies in its import closure (i.e., all transitively imported ontologies).

Acceptance Criteria

Note that this ticket is focused on exploring this design and prototyping. It is not the ultimate implementation ticket. Note: one source of good notational option for a class diagram that we can consider is here.