eclipse-esmf / esmf-sdk

Load Aspect Models and their artifacts as Java code; share components to realize SAMM as code
https://eclipse-esmf.github.io/esmf-developer-guide/index.html
Mozilla Public License 2.0
25 stars 12 forks source link

[Task] CLI SAMM2AAS Distinguish between ID of submodel and its semanticID #433

Open BirgitBoss opened 1 year ago

BirgitBoss commented 1 year ago

Is your task related to a problem? Please describe. In the current implementation of the CLI generator SAMM 2 AAS the id of the SMT and the semanticID are identical. We probably should distinguish between the ID of the SMT and the semantic ID. i.e. We need to make a proposal how to generate the SMT ID based on a SAMM Semantic model.

`

Batch en A batch is a quantity of (semi-) finished products or (raw) material product that have been produced under the same circumstances (e.g. same production location), as specified groups or amounts, within a certain time frame. Every batch can differ in the number or amount of products. Different batches can have varied specifications, e.g., different colors. A batch is identified via a Batch ID. urn:samm:io.catenax.batch:2.0.0#Batch Template ModelReference ConceptDescription urn:samm:io.catenax.batch:2.0.0#Batch ` **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you have considered. **Additional context** Add any other context or screenshots about the feature request here.
KobOp commented 11 months ago

Hi,

let me recap the situation in this issue with the proposed solution.

Current Behavior:

samm:Aspect.urn -> aas:Submodel.id (not shown in the documentation)
samm:Aspect.urn -> aas:Submodel.semanticId (documented in https://eclipse-esmf.github.io/esmf-developer-guide/tooling-guide/java-aspect-tooling.html#mapping-aas)

Movement example
aas:Submodel.semanticId: <urn:samm:org.eclipse.examples:1.0.0#Movement>
aas:Submodel.id: <urn:samm:org.eclipse.examples:1.0.0#Movement>

Expectation: submodel id and semanticId are not identical, since one is an identifier of the submodel template, and one is of the semantic Aspect Model. Also, the semanticId is optional, so it is unusual to duplicate a mandatory thing. The usage of aspect urn as a semanticId fits better, because the semanticId should point to the external source.

Options:

  1. User must provide the submodel id as a parameter
  2. Duplicate Aspect.urn = semanticId = submodel id (adv: no change. disadvantage: this points to the source instead of defining the submodel own URN)
  3. Change the namespace from Aspect.urn = semanticId to e.g. urn:samm -> urn:aas (disadvantage: it's not a typical AAS pattern)

Proposal:

By default, use 3. (samm replaced with aas) (todo: find best pattern with @atextor )
Allow user-defined parameter (1.) to define Submodel.id (which overwrites the default)
chris-volk commented 9 months ago

@BirgitBoss , could you let us know if this proposal is what you have in mind or if you would like something other than that?

BirgitBoss commented 4 months ago

I agree to the proposal in https://github.com/eclipse-esmf/esmf-sdk/issues/433#issuecomment-1830309897

By default, use 3. (samm replaced with aas)

Allow user-defined parameter (1.) to define Submodel.id (which overwrites the default)