eclipse-basyx / basyx-java-components

java-components
MIT License
25 stars 31 forks source link

How to load multiple .aasx during startup #28

Closed wiresio closed 2 years ago

wiresio commented 2 years ago

Can I load multiple .aasx during startup of the AAS Repository? How to write that in aas.properties?

The following only loads the very last .assx:

aas.source=/usr/share/config/aasx/30_Wittenstein.aasx
aas.source=/usr/share/config/aasx/31_SICK.aasx
aas.source=/usr/share/config/aasx/32_SICK.aasx
aas.source=/usr/share/config/aasx/33_SICK.aasx
aas.source=/usr/share/config/aasx/34_Festo.aasx
FrankSchnicke commented 2 years ago

Right now, there's no possibility to load multiple .aasx. However, we're planning to support this feature in one of the upcoming releases of BaSyx.

Until then, you can write a small program using BaSyx that loads all contained AAS/Submodels from your .aasx files and combines it into a single .aasx file.

I will update this ticket when BaSyx supports loading multiple .aasx out of the box.

wiresio commented 2 years ago

Thanks for the feedback! Two follow-up questions:

Thanks again and sorry for abusing this issue as a support channel.

FrankSchnicke commented 2 years ago

If I understand you correctly, it is also not possible to upload an .aasx via the API because PUT on /shells/{aasId} requires a JSON body and does not support the zipped .aasx format. Right?

The HTTP PUT does only support a json body. However, we're also supporting the upload of AASX files via HTTP multipart. For the respective code, see org.eclipse.basyx.extensions.aas.aggregator.aasxupload and org.eclipse.basyx.testsuite.regression.extensions.aas.aggregator.aasxupload in the SDK development branch. It is also integrated with the AAS Server Component in the development branch.

Where can I find info about (offline) combining of .aasx files?

Please see org.eclipse.basyx.aas.factory.aasx.AASXToMetamodelConverter and org.eclipse.basyx.aas.factory.aasx.MetamodelToAASXConverter in the SDK development branch.

FrankSchnicke commented 2 years ago

The feature is implemented and will be included in the upcoming 1.1 release. For details, see the linked PR.