eclipse-esmf / esmf-semantic-aspect-meta-model

Formal and textual specification of the Semantic Aspect Meta Model (SAMM)
https://eclipse-esmf.github.io/samm-specification/snapshot/index.html
Mozilla Public License 2.0
47 stars 9 forks source link

[Task] Enhancing User-Friendly Namespaces by introducing human-readable names and descriptions #246

Closed waltersve closed 1 year ago

waltersve commented 1 year ago

Situation Currently there is no official way to provide a human-readable name and a description for namespaces. This is only supported for general Meta-Model definitions like Aspects, Entities, etc. A name and description allows users to better understand the intended use (provide further context information/meaning). For example, if a namespace provides a list of Events and is intended to be used as definition library or in case of Operations, for which use case the operations are intended for, e.g. for a forklift, or a car multimedia system.

Describe the solution you'd like There are different options to allow that. For me the most straight forward way is to define within the ttl as part of the namespace using standard RDF capabilities:

<urn:samm:com.acme.events:1.0.0#> a aux:Namespace ;
aux:preferredName "Car Events"@en
aux:description "The namespace includes defined Events definition to be used for car related use cases"@en
aux:see "https://covesa.github.io/vehicle_signal_specification"

Describe alternatives you've considered The name and description could be provided as part of a separate meta file. Not very intuitive from my experience considering the example of providing a description for a package in Java.

atextor commented 1 year ago

Related: https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/issues/305

atextor commented 1 year ago

I'd propose to use the standard samm RDF namespace and @prefix for this, i.e., introduce a new meta model element called Namespace (instead of a new RDF namespace such as aux):

<urn:samm:com.example:1.0.0#> a samm:Namespace ;
  samm:preferredName "..."@en ;
  samm:description "..."@en .

When the # is indeed part of the URI for the namespace, it would be even possible to re-use the already-defined prefix, e.g.:

@prefix : <urn:samm:com.example:1.0.0#> .
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.1.0#> .

# In the following line, a single colon is the subject, which is valid RDF/Turtle
# and means we refer to the empty prefix without any element name
: a samm:Namespace ;
  samm:preferredName "..."@en ;
  samm:description "..."@en ;