Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce a holistic JSON example #405

Open
Tracked by #384
mristin opened this issue Apr 12, 2024 · 5 comments
Open
Tracked by #384

Produce a holistic JSON example #405

mristin opened this issue Apr 12, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@mristin
Copy link
Collaborator

mristin commented Apr 12, 2024

The issue has been moved from aas-core-works/aas-core-codegen#461.

We copy in the following the original description by @VladimirAlexiev for the context.

(cc @mristin)

In https://github.com/VladimirAlexiev/aas-core-codegen/tree/main/test_data/jsonld_context/trials#next-steps
and #386 (comment)
I asked for some more holistic examples, so I can experiment with langString, datatyped literals, and maybe framing.

@ethieblin referred to JSON examples.
But if we take one of those eg https://github.com/admin-shell-io/aas-specs/blob/master/schemas/json/examples/generated/LangStringPreferredNameTypeIec61360/maximal.json,
it doesn't look like complete AAS data, so I'm not sure whether I can expect to get "complete" turtle out of it.

I think that having a bigger realistic example will be very useful for implementers and users alike.

Eg see the hundreds of examples in these folders (Turtle and Diagrams are automatically generated from JSON):

@mristin
Copy link
Collaborator Author

mristin commented Apr 12, 2024

Here are the latest findings by @VladimirAlexiev from aas-core-works/aas-core-codegen#461.

https://v3.admin-shell-io.com/submodels/

  • The first two are submodel templates with empty elements.
  • But the third one is an instance of "Nameplate" (a Linear motor axis by WEISS) with useful info.
  • And googling for several of the IRDIs finds submodel PDF specifications ("manual linked data" ;-))

Here are indexes of useful examples (can be extracted with jq)

  • 2 Nameplate-Weiss
  • 3 ContactInformation
  • 4 HandoverDocumentation
  • 5 TechnicalData
  • 9 ArticleInformation
  • 11 ServiceNotifications
  • 12 Nameplate-Festo

These are empty

Some more googling turns up Submodel definitions and examples, but these are in XML not JSON:

There are 229 models.

curl https://v3.admin-shell-io.com/submodels/ > submodels-v3.json
jq ".result[].idShort" submodels-v3.json | wc -l
229

Here is a count by type:

jq ".result[].idShort" submodels-v3.json | sort | uniq -c
      2 "ArticleInformation"
      1 "AssetIdentification"
      4 "BillOfMaterial"
      1 "CarbonFootprint"
      1 "CertificatesAndDeclarations"
      8 "ContactInformation"
      2 "ContactInformations"
      1 "cynapseTeachInService"
      6 "DeviceDescriptionFiles"
      1 "DeviceInfo"
     19 "Document"
     11 "Documentation"
      6 "Electrical_and_Fluid_CAD"
      1 "Electrical_and_FluidCAD"
      1 "FluidCAD"
      8 "HandoverDocumentation"
     33 "Identification"
      1 "ingredients"
      2 "ManufacturerDocumentation"
     16 "MCAD"
     44 "Nameplate"
      1 "nutrition_facts"
      1 "OperationalData"
      1 "PLC_Programming"
      1 "SecurityMetaModelForServer"
      1 "SecuritySettingsForServer"
     27 "Service"
      3 "ServiceNotifications"
     22 "TechnicalData"
      3 "TechnicalSpecification"

To extract the first few useful submodels:

jq ".result[2]"  submodels-v3.json > Nameplate-Weiss.json
jq ".result[3]"  submodels-v3.json > ContactInformation.json
jq ".result[4]"  submodels-v3.json > HandoverDocumentation.json
jq ".result[5]"  submodels-v3.json > TechnicalData.json
jq ".result[9]"  submodels-v3.json > ArticleInformation.json
jq ".result[11]" submodels-v3.json > ServiceNotifications.json
jq ".result[12]" submodels-v3.json > Nameplate-Festo.json
# jq ".result[170]" submodels-v3.json > CarbonFootprint.json # empty

@mristin
Copy link
Collaborator Author

mristin commented Apr 12, 2024

@VladimirAlexiev while you are at it, would you mind verifying the AAS with https://github.com/aas-core-works/aas-core3.0-cli-swiss-knife?

You only have to convert each Submodel to an Environment. You can simply embed it in an Environment by this template:

{
"submodels": [
"some-submodel": <your submodel comes here>
]
}

Then you can call:

aas-core3.0-sk-verify.exe --environment <path to the environment file>

@BirgitBoss
Copy link
Collaborator

BirgitBoss commented Apr 12, 2024

As @mristin correct stated the existing examples are reflecting older versions only. Sorry for this. But there is good news:
Today it was announced in the IDTA newletter that all published Submodel Templates are now compatible with AAS V3.0.

https://github.com/admin-shell-io/submodel-templates/tree/main/published

Other examples AASX files will be added.

@juileetikekar

@ethieblin I am not sure I understand the issue: do you "just" want examples or do you want a single (or two) example file(s) as part of the specification similar to the generated one but "more holistic". If it is the first, the issue is not really part of this repository as well.

@BirgitBoss BirgitBoss added this to the V3.x milestone Apr 12, 2024
@BirgitBoss BirgitBoss added the documentation Improvements or additions to documentation label Apr 12, 2024
@VladimirAlexiev
Copy link

@BirgitBoss
Copy link
Collaborator

When you import an AAS xml to the aasx package explorer you can also export/save it again in JSON or RDF. For some functionality the package explorer also offers a corresponding command line execution.

Generated examples for xml, JSON and RDF are always up-to-date

To me it seems that the examples in https://github.com/admin-shell-io/aas-knowledge-graph/tree/main/examples/aasx are not up-to-date (at least the naming suggest that you copied them from some of the very first demonstrators of the AAS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants