From f74f793cfc3da45a87571655b865eeb1f98a7b92 Mon Sep 17 00:00:00 2001 From: Carlos Schmidt <18703981+carlos-schmidt@users.noreply.github.com> Date: Mon, 11 Dec 2023 11:58:18 +0100 Subject: [PATCH 1/6] Add submodel-only option --- .../de/fraunhofer/iosb/app/aas/AasAgent.java | 117 +++++++++++------- .../iosb/app/controller/AasController.java | 4 +- .../model/configuration/Configuration.java | 11 ++ .../iosb/app/sync/Synchronizer.java | 19 ++- .../fraunhofer/iosb/app/aas/AasAgentTest.java | 2 +- example/configurations/provider.properties | 1 + ...ataspaceconnector-configuration.properties | 1 + 7 files changed, 99 insertions(+), 56 deletions(-) diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/AasAgent.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/AasAgent.java index e7ef9693..23c7725d 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/AasAgent.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/AasAgent.java @@ -15,10 +15,30 @@ */ package de.fraunhofer.iosb.app.aas; +import static java.lang.String.format; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Objects; + +import org.eclipse.edc.spi.EdcException; + import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; + import de.fraunhofer.iosb.app.Logger; -import de.fraunhofer.iosb.app.model.aas.*; +import de.fraunhofer.iosb.app.model.aas.CustomAssetAdministrationShell; +import de.fraunhofer.iosb.app.model.aas.CustomAssetAdministrationShellEnvironment; +import de.fraunhofer.iosb.app.model.aas.CustomConceptDescription; +import de.fraunhofer.iosb.app.model.aas.CustomSubmodel; +import de.fraunhofer.iosb.app.model.aas.CustomSubmodelElement; +import de.fraunhofer.iosb.app.model.aas.CustomSubmodelElementCollection; +import de.fraunhofer.iosb.app.model.aas.Identifier; import de.fraunhofer.iosb.app.util.AASUtil; import de.fraunhofer.iosb.app.util.Encoder; import de.fraunhofer.iosb.app.util.HttpRestClient; @@ -29,14 +49,6 @@ import io.adminshell.aas.v3.model.impl.DefaultSubmodel; import jakarta.ws.rs.core.Response; import okhttp3.OkHttpClient; -import org.eclipse.edc.spi.EdcException; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.*; - -import static java.lang.String.format; /** * Communicating with AAS service @@ -123,11 +135,11 @@ public Response deleteModel(URL aasServiceUrl, String element) { * @return AAS model enriched with each elements access URL as string in assetId * field. */ - public CustomAssetAdministrationShellEnvironment getAasEnvWithUrls(URL aasServiceUrl) + public CustomAssetAdministrationShellEnvironment getAasEnvWithUrls(URL aasServiceUrl, boolean onlySubmodels) throws IOException, DeserializationException { var aasServiceUrlString = aasServiceUrl.toString(); - var model = readModel(aasServiceUrl); + var model = readModel(aasServiceUrl, onlySubmodels); // Add urls to all shells model.getAssetAdministrationShells().forEach(shell -> shell.setSourceUrl( format("%s/shells/%s", aasServiceUrlString, @@ -139,9 +151,9 @@ public CustomAssetAdministrationShellEnvironment getAasEnvWithUrls(URL aasServic Encoder.encodeBase64(submodel.getIdentification().getId()))); submodel.getSubmodelElements() .forEach(elem -> putUrlRec( - format("%s/submodels/%s/submodel/submodel-elements", aasServiceUrlString, - Encoder.encodeBase64(submodel.getIdentification().getId())), - elem)); + format("%s/submodels/%s/submodel/submodel-elements", aasServiceUrlString, + Encoder.encodeBase64(submodel.getIdentification().getId())), + elem)); }); model.getSubmodels().forEach(submodel -> AASUtil.getAllSubmodelElements(submodel) .forEach(element -> element.setSourceUrl( @@ -158,36 +170,53 @@ public CustomAssetAdministrationShellEnvironment getAasEnvWithUrls(URL aasServic /** * Returns the AAS model. */ - private CustomAssetAdministrationShellEnvironment readModel(URL aasServiceUrl) + private CustomAssetAdministrationShellEnvironment readModel(URL aasServiceUrl, boolean onlySubmodels) throws IOException, DeserializationException { + var aasEnv = new CustomAssetAdministrationShellEnvironment(); - String shellResponse; - String conceptResponse; - String submodelResponse; + URL shellsUrl; + URL conceptDescriptionsUrl; + URL submodelUrl; try { - shellResponse = - Objects.requireNonNull(httpRestClient.get(aasServiceUrl.toURI().resolve("/shells").toURL()).body()).string(); - submodelResponse = - Objects.requireNonNull(httpRestClient.get(aasServiceUrl.toURI().resolve("/submodels").toURL()).body()).string(); - conceptResponse = Objects.requireNonNull(httpRestClient.get(aasServiceUrl.toURI().resolve("/concept" + - "-descriptions").toURL()).body()) - .string(); - } catch (URISyntaxException e) { - throw new EdcException(e.getMessage()); + submodelUrl = aasServiceUrl.toURI().resolve("/submodels").toURL(); + shellsUrl = aasServiceUrl.toURI().resolve("/shells").toURL(); + conceptDescriptionsUrl = aasServiceUrl.toURI().resolve("/concept-descriptions").toURL(); + } catch (URISyntaxException resolveUriException) { + throw new EdcException( + format("Error while building URLs for reading from the AAS Service at %s", aasServiceUrl), + resolveUriException); } - CustomAssetAdministrationShell[] shells = objectMapper.readValue(shellResponse, - CustomAssetAdministrationShell[].class); - CustomConceptDescription[] conceptDescriptions = objectMapper.readValue(conceptResponse, - CustomConceptDescription[].class); + aasEnv.setSubmodels(readSubmodels(submodelUrl, onlySubmodels)); + if (!onlySubmodels) { + aasEnv.setAssetAdministrationShells(readShells(shellsUrl)); + aasEnv.setConceptDescriptions(readConceptDescriptions(conceptDescriptionsUrl)); + } + return aasEnv; + } + + private List readConceptDescriptions(URL conceptDescriptionsUrl) throws IOException { - // Because of SMCs "value" field, submodels have to be parsed manually + var conceptResponse = Objects.requireNonNull(httpRestClient.get(conceptDescriptionsUrl).body()).string(); + + return Arrays.asList(objectMapper.readValue(conceptResponse, CustomConceptDescription[].class)); + } - // First, parse into full admin-shell.io submodels: + private List readShells(URL shellsUrl) throws IOException { + var shellHttpResponse = Objects.requireNonNull(httpRestClient.get(shellsUrl).body()).string(); + + return Arrays.asList(objectMapper.readValue(shellHttpResponse, CustomAssetAdministrationShell[].class)); + } + + private List readSubmodels(URL submodelUrl, boolean onlySubmodels) + throws IOException, DeserializationException { + var submodelHttpResponse = Objects.requireNonNull(httpRestClient.get(submodelUrl).body()).string(); + + // First, parse into "full" admin-shell.io submodels: JsonDeserializer jsonDeserializer = new JsonDeserializer(); - List submodels = jsonDeserializer.readReferables(submodelResponse, DefaultSubmodel.class); + List submodels = jsonDeserializer.readReferables(submodelHttpResponse, DefaultSubmodel.class); - // Now, create custom submodels from the data of the full submodels + // Now, create customSubmodels from the "full" submodels List customSubmodels = new ArrayList<>(); for (Submodel submodel : submodels) { var customSubmodel = new CustomSubmodel(); @@ -197,20 +226,14 @@ private CustomAssetAdministrationShellEnvironment readModel(URL aasServiceUrl) customSubmodel.setIdentification(customIdentification); customSubmodel.setIdShort(submodel.getIdShort()); - - // Recursively add submodelElements - var customElements = AASUtil.getCustomSubmodelElementStructureFromSubmodel(submodel); - customSubmodel.setSubmodelElements((List) customElements); - + if (!onlySubmodels) { + // Recursively add submodelElements + var customElements = AASUtil.getCustomSubmodelElementStructureFromSubmodel(submodel); + customSubmodel.setSubmodelElements((List) customElements); + } customSubmodels.add(customSubmodel); } - var aasEnv = new CustomAssetAdministrationShellEnvironment(); - - aasEnv.setAssetAdministrationShells(Arrays.asList(shells)); - aasEnv.setSubmodels(customSubmodels); - aasEnv.setConceptDescriptions(Arrays.asList(conceptDescriptions)); - - return aasEnv; + return customSubmodels; } /** diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/controller/AasController.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/controller/AasController.java index c8602379..e74921c9 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/controller/AasController.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/controller/AasController.java @@ -70,10 +70,10 @@ public Response handleRequest(RequestType requestType, URL url, String... reques * @throws DeserializationException AAS from service could not be deserialized * @throws IOException Communication with AAS service failed */ - public CustomAssetAdministrationShellEnvironment getAasModelWithUrls(URL aasServiceUrl) + public CustomAssetAdministrationShellEnvironment getAasModelWithUrls(URL aasServiceUrl, boolean onlySubmodels) throws IOException, DeserializationException { Objects.requireNonNull(aasServiceUrl); - return aasAgent.getAasEnvWithUrls(aasServiceUrl); + return aasAgent.getAasEnvWithUrls(aasServiceUrl, onlySubmodels); } /** diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/configuration/Configuration.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/configuration/Configuration.java index 5d1d37ee..f98e5d12 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/configuration/Configuration.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/configuration/Configuration.java @@ -43,6 +43,9 @@ public class Configuration { @JsonProperty(SETTINGS_PREFIX + "syncPeriod") private int syncPeriod = 5; // Seconds + + @JsonProperty(SETTINGS_PREFIX + "onlySubmodels") + private boolean onlySubmodels = false; @JsonProperty(SETTINGS_PREFIX + "exposeSelfDescription") private boolean exposeSelfDescription = true; @@ -80,6 +83,14 @@ public int getSyncPeriod() { return syncPeriod; } + public boolean isOnlySubmodels() { + return onlySubmodels; + } + + public void setOnlySubmodels(boolean onlySubmodels) { + this.onlySubmodels = onlySubmodels; + } + public boolean isExposeSelfDescription() { return exposeSelfDescription; } diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/sync/Synchronizer.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/sync/Synchronizer.java index 3271906b..a4c06c2a 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/sync/Synchronizer.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/sync/Synchronizer.java @@ -18,6 +18,7 @@ import de.fraunhofer.iosb.app.controller.AasController; import de.fraunhofer.iosb.app.controller.ResourceController; import de.fraunhofer.iosb.app.model.aas.*; +import de.fraunhofer.iosb.app.model.configuration.Configuration; import de.fraunhofer.iosb.app.model.ids.SelfDescription; import de.fraunhofer.iosb.app.model.ids.SelfDescriptionChangeListener; import de.fraunhofer.iosb.app.model.ids.SelfDescriptionRepository; @@ -43,12 +44,14 @@ public class Synchronizer implements SelfDescriptionChangeListener { private final SelfDescriptionRepository selfDescriptionRepository; private final AasController aasController; private final ResourceController resourceController; + private final Configuration configuration; public Synchronizer(SelfDescriptionRepository selfDescriptionRepository, AasController aasController, ResourceController resourceController) { this.selfDescriptionRepository = selfDescriptionRepository; this.aasController = aasController; this.resourceController = resourceController; + this.configuration = Configuration.getInstance(); } /** @@ -62,10 +65,12 @@ public void synchronize() { } private void synchronize(URL aasServiceUrl) { + var onlySubmodels = this.configuration.isOnlySubmodels(); + var oldSelfDescription = selfDescriptionRepository.getSelfDescription(aasServiceUrl); - CustomAssetAdministrationShellEnvironment newEnvironment; + var newEnvironment = fetchCurrentAasModel(aasServiceUrl, onlySubmodels); - newEnvironment = fetchCurrentAasModel(aasServiceUrl); + // Only load submodels or shells, conceptDescriptions, submodelElements as well? if (Objects.nonNull(oldSelfDescription)) { var oldEnvironment = oldSelfDescription.getEnvironment(); @@ -77,9 +82,10 @@ private void synchronize(URL aasServiceUrl) { // If the element exists in oldEnvironment, copy the old elements into // newEnvironment, already having an idsContractId/idsAssetId syncShell(newEnvironment, oldEnvironment); - syncSubmodel(newEnvironment, oldEnvironment); syncConceptDescription(newEnvironment, oldEnvironment); + syncSubmodel(newEnvironment, oldEnvironment); + removeOldElements(newEnvironment, oldEnvironment); // Finally, update the self description @@ -88,11 +94,11 @@ private void synchronize(URL aasServiceUrl) { selfDescriptionRepository.updateSelfDescription(aasServiceUrl, newEnvironment); } - private CustomAssetAdministrationShellEnvironment fetchCurrentAasModel(URL aasServiceUrl) { + private CustomAssetAdministrationShellEnvironment fetchCurrentAasModel(URL aasServiceUrl, boolean onlySubmodels) { CustomAssetAdministrationShellEnvironment newEnvironment; try { // Fetch current AAS model from AAS service - newEnvironment = aasController.getAasModelWithUrls(aasServiceUrl); + newEnvironment = aasController.getAasModelWithUrls(aasServiceUrl, onlySubmodels); } catch (IOException aasServiceUnreachableException) { throw new EdcException(format("Could not reach AAS service (%s): %s", aasServiceUrl, aasServiceUnreachableException.getMessage())); @@ -105,7 +111,8 @@ private CustomAssetAdministrationShellEnvironment fetchCurrentAasModel(URL aasSe private void addNewElements(CustomAssetAdministrationShellEnvironment newEnvironment) { var envElements = AASUtil.getAllElements(newEnvironment); - addAssetsContracts(envElements.stream().filter(element -> Objects.isNull(element.getIdsAssetId()) || Objects.isNull(element.getIdsContractId())) + addAssetsContracts(envElements.stream().filter( + element -> Objects.isNull(element.getIdsAssetId()) || Objects.isNull(element.getIdsContractId())) .toList()); } diff --git a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/aas/AasAgentTest.java b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/aas/AasAgentTest.java index d166d9db..15c23826 100644 --- a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/aas/AasAgentTest.java +++ b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/aas/AasAgentTest.java @@ -74,7 +74,7 @@ public void testGetAasEnvWithUrls() throws IOException, DeserializationException var shouldBeResult = FileManager.loadResource("selfDescriptionWithAccessURLS.json"); var result = new ObjectMapper().writeValueAsString( - aasAgent.getAasEnvWithUrls(new URL(HTTP_LOCALHOST_8080))); + aasAgent.getAasEnvWithUrls(new URL(HTTP_LOCALHOST_8080), true)); result = result.replace("\n", "").replace(" ", ""); assertEquals(shouldBeResult, result); diff --git a/example/configurations/provider.properties b/example/configurations/provider.properties index a4e79700..fce08b48 100644 --- a/example/configurations/provider.properties +++ b/example/configurations/provider.properties @@ -2,6 +2,7 @@ # Supply AAS model + (port XOR AAS service config) for an AAS service internally started by the extension edc.aas.localAASModelPath=./example/resources/FestoDemoAAS.json edc.aas.localAASServicePort=8080 +edc.aas.onlySubmodels = True # edc.aas.localAASServiceConfigPath = ./example/resources/exampleConfig.json # Provide a URL of an already running AAS service (such as FA³ST, BaSyx) # edc.aas.remoteAasLocation = http://example.com/aas diff --git a/example/dataspaceconnector-configuration.properties b/example/dataspaceconnector-configuration.properties index 11c2e303..9c93d224 100644 --- a/example/dataspaceconnector-configuration.properties +++ b/example/dataspaceconnector-configuration.properties @@ -8,6 +8,7 @@ # Supply AAS model + (port XOR AAS service config) for an AAS service internally started by the extension edc.aas.localAASModelPath=./resources/FestoDemoAAS.json edc.aas.localAASServicePort=9090 +edc.aas.onlySubmodels = False # edc.aas.localAASServiceConfigPath = ./example/resources/exampleConfig.json # Provide a URL of an already running AAS service (such as FA³ST, BaSyx) # edc.aas.remoteAasLocation = http://example.com/aas From fd44d8c974664691f667c68478791ced87e4c310 Mon Sep 17 00:00:00 2001 From: Carlos Schmidt <18703981+carlos-schmidt@users.noreply.github.com> Date: Mon, 11 Dec 2023 11:58:39 +0100 Subject: [PATCH 2/6] Don't show empty lists in self description --- .../aas/CustomAssetAdministrationShellEnvironment.java | 9 ++++++--- .../de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomAssetAdministrationShellEnvironment.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomAssetAdministrationShellEnvironment.java index 26e410db..dacd3f7a 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomAssetAdministrationShellEnvironment.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomAssetAdministrationShellEnvironment.java @@ -16,17 +16,20 @@ package de.fraunhofer.iosb.app.model.aas; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import java.util.ArrayList; import java.util.List; +@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class CustomAssetAdministrationShellEnvironment { - protected List assetAdministrationShells; + protected List assetAdministrationShells = new ArrayList<>(); - protected List submodels; + protected List submodels= new ArrayList<>(); - protected List conceptDescriptions; + protected List conceptDescriptions= new ArrayList<>(); public List getAssetAdministrationShells() { return assetAdministrationShells; diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java index 3e2e10d1..1f017c26 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java @@ -17,10 +17,12 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import java.util.ArrayList; import java.util.List; +@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) @JsonAutoDetect public class CustomSubmodel extends AASElement { From faf6f992caba87e99adacd4fe0e800aba5fb13f4 Mon Sep 17 00:00:00 2001 From: Carlos Schmidt <18703981+carlos-schmidt@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:52:51 +0100 Subject: [PATCH 3/6] Adapt tests to new printing policy --- .../fraunhofer/iosb/app/aas/AasAgentTest.java | 23 +++++++++++++-- .../app/model/ids/SelfDescriptionTest.java | 2 +- .../iosb/app/sync/SynchronizerTest.java | 4 +-- .../oneSubmodelOneSubmodelElementLess.json | 28 +------------------ .../selfDescriptionWithAccessURLS.json | 2 +- ...escriptionWithAccessURLsSubmodelsOnly.json | 1 + .../resources/selfDescriptionWithIds.json | 2 +- ...fDescriptionWithIdsNoSubmodelElements.json | 2 +- ...hIdsOneSubmodelOneSubmodelElementLess.json | 2 +- .../src/test/resources/submodels.json | 1 - 10 files changed, 30 insertions(+), 37 deletions(-) create mode 100644 edc-extension4aas/src/test/resources/selfDescriptionWithAccessURLsSubmodelsOnly.json diff --git a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/aas/AasAgentTest.java b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/aas/AasAgentTest.java index 15c23826..862409d3 100644 --- a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/aas/AasAgentTest.java +++ b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/aas/AasAgentTest.java @@ -59,8 +59,7 @@ public void initializeAasAgent() { aasAgent = new AasAgent(new OkHttpClient()); } - @Test // Can't really test this anymore with new variable "sourceUrl" that is not - // serialized + @Test public void testGetAasEnvWithUrls() throws IOException, DeserializationException { var shells = FileManager.loadResource("shells.json"); var submodels = FileManager.loadResource("submodels.json"); @@ -73,6 +72,26 @@ public void testGetAasEnvWithUrls() throws IOException, DeserializationException var shouldBeResult = FileManager.loadResource("selfDescriptionWithAccessURLS.json"); + var result = new ObjectMapper().writeValueAsString( + aasAgent.getAasEnvWithUrls(new URL(HTTP_LOCALHOST_8080), false)); + result = result.replace("\n", "").replace(" ", ""); + + assertEquals(shouldBeResult, result); + } + + @Test + public void testGetAasEnvWithUrlsOnlySubmodels() throws IOException, DeserializationException { + var shells = FileManager.loadResource("shells.json"); + var submodels = FileManager.loadResource("submodels.json"); + var conceptDescriptions = FileManager.loadResource("conceptDescriptions.json"); + + mockServer.when(request().withMethod("GET").withPath("/shells")).respond(response().withBody(shells)); + mockServer.when(request().withMethod("GET").withPath("/submodels")).respond(response().withBody(submodels)); + mockServer.when(request().withMethod("GET").withPath("/concept-descriptions")) + .respond(response().withBody(conceptDescriptions)); + + var shouldBeResult = FileManager.loadResource("selfDescriptionWithAccessURLsSubmodelsOnly.json"); + var result = new ObjectMapper().writeValueAsString( aasAgent.getAasEnvWithUrls(new URL(HTTP_LOCALHOST_8080), true)); result = result.replace("\n", "").replace(" ", ""); diff --git a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/model/ids/SelfDescriptionTest.java b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/model/ids/SelfDescriptionTest.java index 49cc44bf..406bbb4b 100644 --- a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/model/ids/SelfDescriptionTest.java +++ b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/model/ids/SelfDescriptionTest.java @@ -25,7 +25,7 @@ public class SelfDescriptionTest { @Test public void emptyEnvironmentTest() { SelfDescription selfDescription = new SelfDescription(new CustomAssetAdministrationShellEnvironment()); - assertEquals("{\"assetAdministrationShells\":null,\"submodels\":null,\"conceptDescriptions\":null}", + assertEquals("{}", selfDescription.toString()); } } diff --git a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/sync/SynchronizerTest.java b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/sync/SynchronizerTest.java index 3c63e0a8..162f62dc 100644 --- a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/sync/SynchronizerTest.java +++ b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/sync/SynchronizerTest.java @@ -102,7 +102,7 @@ public void synchronizationInitializeTest() { } @Test - public void synchronizationRemoveSubmodelElementTest() { + public void synchronizationRemoveAllSubmodelElementsTest() { startMockServer(port); prepareDefaultMockedResponse(); @@ -142,7 +142,7 @@ public void synchronizationRemoveAllTest() { prepareEmptyMockedResponse(); synchronizer.synchronize(); - assertEquals("{\"assetAdministrationShells\":[],\"submodels\":[],\"conceptDescriptions\":[]}", + assertEquals("{}", selfDescriptionRepo.getSelfDescription(url).toString()); } diff --git a/edc-extension4aas/src/test/resources/oneSubmodelOneSubmodelElementLess.json b/edc-extension4aas/src/test/resources/oneSubmodelOneSubmodelElementLess.json index bd842c62..700b9a5d 100644 --- a/edc-extension4aas/src/test/resources/oneSubmodelOneSubmodelElementLess.json +++ b/edc-extension4aas/src/test/resources/oneSubmodelOneSubmodelElementLess.json @@ -18,33 +18,7 @@ "name": "Submodel" }, "kind": "Instance", - "submodelElements": [ - { - "value": "", - "semanticId": { - "keys": [ - { - "idType": "Iri", - "type": "GlobalReference", - "value": "0173-1#02-AAO677#002" - } - ] - }, - "idShort": "GripperUp", - "category": "Variable", - "modelType": { - "name": "Property" - }, - "valueType": "boolean", - "kind": "Instance", - "descriptions": [ - { - "language": "en", - "text": "Shows it the gripper is currently pulled up" - } - ] - } - ] + "submodelElements": [] }, { "semanticId": { diff --git a/edc-extension4aas/src/test/resources/selfDescriptionWithAccessURLS.json b/edc-extension4aas/src/test/resources/selfDescriptionWithAccessURLS.json index 9053fbea..8e0991ed 100644 --- a/edc-extension4aas/src/test/resources/selfDescriptionWithAccessURLS.json +++ b/edc-extension4aas/src/test/resources/selfDescriptionWithAccessURLS.json @@ -1 +1 @@ -{"assetAdministrationShells":[{"idsContractId":null,"idsAssetId":null,"idShort":"FestoDemoAAS","identification":{"idType":"Iri","id":"https://example.com/ids/aas/3235_8090_6012_8932"}}],"submodels":[{"idsContractId":null,"idsAssetId":null,"idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"},"submodelElements":[]},{"idsContractId":null,"idsAssetId":null,"idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"},"submodelElements":[{"idShort":"GripperUp"},{"idShort":"Pressure"},{"idShort":"ProcessCounter"},{"idShort":"ProcessDuration"},{"idShort":"RemainingProcesses"},{"idShort":"GripperOpen"},{"idShort":"DistanceSensor"},{"idShort":"LightGateEntrance"},{"idShort":"LightGateMiddle"},{"idShort":"LightGateExit"},{"idShort":"ConveyorBeltForward"},{"idShort":"ConveyorBeltBackward"},{"idShort":"isRunning"},{"idShort":"LED_green"},{"idShort":"LED_yellow"},{"idShort":"LED_red"},{"idShort":"ConveyorBeltReady"}]},{"idsContractId":null,"idsAssetId":null,"idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"},"submodelElements":[{"idShort":"GripperUpAverage"},{"idShort":"GripperOpenAverage"},{"idShort":"DistanceSensorAverage"},{"idShort":"LightGateEntranceAverage"},{"idShort":"LightGateMiddleAverage"},{"idShort":"LightGateExitAverage"},{"idShort":"ConveyorBeltForwardAverage"},{"idShort":"ConveyorBeltBackwardAverage"},{"idShort":"isRunningAverage"},{"idShort":"LED_greenAverage"},{"idShort":"LED_yellowAverage"},{"idShort":"LED_redAverage"},{"idShort":"ConveyorBeltReadyAverage"}]},{"idsContractId":null,"idsAssetId":null,"idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"},"submodelElements":[{"idShort":"JTS_data"}]},{"idsContractId":null,"idsAssetId":null,"idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"},"submodelElements":[{"idShort":"Pressure"},{"idShort":"ProcessDuration"}]}],"conceptDescriptions":[{"idsContractId":null,"idsAssetId":null,"idShort":"TestConceptDescription","identification":{"idType":"Iri","id":"https://acplt.org/Test_ConceptDescription"}}]} \ No newline at end of file +{"assetAdministrationShells":[{"idsContractId":null,"idsAssetId":null,"idShort":"FestoDemoAAS","identification":{"idType":"Iri","id":"https://example.com/ids/aas/3235_8090_6012_8932"}}],"submodels":[{"idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"}},{"idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"},"submodelElements":[{"idShort":"GripperUp"},{"idShort":"Pressure"},{"idShort":"ProcessCounter"},{"idShort":"ProcessDuration"},{"idShort":"RemainingProcesses"},{"idShort":"GripperOpen"},{"idShort":"DistanceSensor"},{"idShort":"LightGateEntrance"},{"idShort":"LightGateMiddle"},{"idShort":"LightGateExit"},{"idShort":"ConveyorBeltForward"},{"idShort":"ConveyorBeltBackward"},{"idShort":"isRunning"},{"idShort":"LED_green"},{"idShort":"LED_yellow"},{"idShort":"LED_red"},{"idShort":"ConveyorBeltReady"}]},{"idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"},"submodelElements":[{"idShort":"GripperUpAverage"},{"idShort":"GripperOpenAverage"},{"idShort":"DistanceSensorAverage"},{"idShort":"LightGateEntranceAverage"},{"idShort":"LightGateMiddleAverage"},{"idShort":"LightGateExitAverage"},{"idShort":"ConveyorBeltForwardAverage"},{"idShort":"ConveyorBeltBackwardAverage"},{"idShort":"isRunningAverage"},{"idShort":"LED_greenAverage"},{"idShort":"LED_yellowAverage"},{"idShort":"LED_redAverage"},{"idShort":"ConveyorBeltReadyAverage"}]},{"idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"},"submodelElements":[{"idShort":"JTS_data"}]},{"idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"},"submodelElements":[{"idShort":"Pressure"},{"idShort":"ProcessDuration"}]}],"conceptDescriptions":[{"idsContractId":null,"idsAssetId":null,"idShort":"TestConceptDescription","identification":{"idType":"Iri","id":"https://acplt.org/Test_ConceptDescription"}}]} \ No newline at end of file diff --git a/edc-extension4aas/src/test/resources/selfDescriptionWithAccessURLsSubmodelsOnly.json b/edc-extension4aas/src/test/resources/selfDescriptionWithAccessURLsSubmodelsOnly.json new file mode 100644 index 00000000..dcd43227 --- /dev/null +++ b/edc-extension4aas/src/test/resources/selfDescriptionWithAccessURLsSubmodelsOnly.json @@ -0,0 +1 @@ +{"submodels":[{"idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"}},{"idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"}},{"idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"}},{"idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"}},{"idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"}}]} \ No newline at end of file diff --git a/edc-extension4aas/src/test/resources/selfDescriptionWithIds.json b/edc-extension4aas/src/test/resources/selfDescriptionWithIds.json index b7b94c4a..4900861b 100644 --- a/edc-extension4aas/src/test/resources/selfDescriptionWithIds.json +++ b/edc-extension4aas/src/test/resources/selfDescriptionWithIds.json @@ -1 +1 @@ -{"assetAdministrationShells":[{"idsContractId":"DEFAULT_CONTRACT2","idsAssetId":"-1379397334","idShort":"FestoDemoAAS","identification":{"idType":"Iri","id":"https://example.com/ids/aas/3235_8090_6012_8932"}}],"submodels":[{"idsContractId":"DEFAULT_CONTRACT3","idsAssetId":"358736994","idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"},"submodelElements":[]},{"idsContractId":"DEFAULT_CONTRACT4","idsAssetId":"-2140270666","idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT8","idsAssetId":"1403345733","idShort":"GripperUp"},{"idsContractId":"DEFAULT_CONTRACT9","idsAssetId":"-36927578","idShort":"Pressure"},{"idsContractId":"DEFAULT_CONTRACT10","idsAssetId":"-892753618","idShort":"ProcessCounter"},{"idsContractId":"DEFAULT_CONTRACT11","idsAssetId":"769417378","idShort":"ProcessDuration"},{"idsContractId":"DEFAULT_CONTRACT12","idsAssetId":"-1622475224","idShort":"RemainingProcesses"},{"idsContractId":"DEFAULT_CONTRACT13","idsAssetId":"-4657036","idShort":"GripperOpen"},{"idsContractId":"DEFAULT_CONTRACT14","idsAssetId":"1964729520","idShort":"DistanceSensor"},{"idsContractId":"DEFAULT_CONTRACT15","idsAssetId":"-1206164330","idShort":"LightGateEntrance"},{"idsContractId":"DEFAULT_CONTRACT16","idsAssetId":"-988501131","idShort":"LightGateMiddle"},{"idsContractId":"DEFAULT_CONTRACT17","idsAssetId":"1817740030","idShort":"LightGateExit"},{"idsContractId":"DEFAULT_CONTRACT18","idsAssetId":"-451751058","idShort":"ConveyorBeltForward"},{"idsContractId":"DEFAULT_CONTRACT19","idsAssetId":"519282778","idShort":"ConveyorBeltBackward"},{"idsContractId":"DEFAULT_CONTRACT20","idsAssetId":"-1268910060","idShort":"isRunning"},{"idsContractId":"DEFAULT_CONTRACT21","idsAssetId":"866424462","idShort":"LED_green"},{"idsContractId":"DEFAULT_CONTRACT22","idsAssetId":"1592888905","idShort":"LED_yellow"},{"idsContractId":"DEFAULT_CONTRACT23","idsAssetId":"2056775388","idShort":"LED_red"},{"idsContractId":"DEFAULT_CONTRACT24","idsAssetId":"148844684","idShort":"ConveyorBeltReady"}]},{"idsContractId":"DEFAULT_CONTRACT5","idsAssetId":"-772733259","idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT25","idsAssetId":"-1736407145","idShort":"GripperUpAverage"},{"idsContractId":"DEFAULT_CONTRACT26","idsAssetId":"778529736","idShort":"GripperOpenAverage"},{"idsContractId":"DEFAULT_CONTRACT27","idsAssetId":"751611438","idShort":"DistanceSensorAverage"},{"idsContractId":"DEFAULT_CONTRACT28","idsAssetId":"488415782","idShort":"LightGateEntranceAverage"},{"idsContractId":"DEFAULT_CONTRACT29","idsAssetId":"1611662887","idShort":"LightGateMiddleAverage"},{"idsContractId":"DEFAULT_CONTRACT30","idsAssetId":"1912641086","idShort":"LightGateExitAverage"},{"idsContractId":"DEFAULT_CONTRACT31","idsAssetId":"737143950","idShort":"ConveyorBeltForwardAverage"},{"idsContractId":"DEFAULT_CONTRACT32","idsAssetId":"1165259396","idShort":"ConveyorBeltBackwardAverage"},{"idsContractId":"DEFAULT_CONTRACT33","idsAssetId":"-1355566104","idShort":"isRunningAverage"},{"idsContractId":"DEFAULT_CONTRACT34","idsAssetId":"271497262","idShort":"LED_greenAverage"},{"idsContractId":"DEFAULT_CONTRACT35","idsAssetId":"-1115107595","idShort":"LED_yellowAverage"},{"idsContractId":"DEFAULT_CONTRACT36","idsAssetId":"445523936","idShort":"LED_redAverage"},{"idsContractId":"DEFAULT_CONTRACT37","idsAssetId":"1542428016","idShort":"ConveyorBeltReadyAverage"}]},{"idsContractId":"DEFAULT_CONTRACT6","idsAssetId":"1218664477","idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT38","idsAssetId":"-378946552","idShort":"JTS_data"}]},{"idsContractId":"DEFAULT_CONTRACT7","idsAssetId":"1754436341","idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT39","idsAssetId":"1534629733","idShort":"Pressure"},{"idsContractId":"DEFAULT_CONTRACT40","idsAssetId":"156363779","idShort":"ProcessDuration"}]}],"conceptDescriptions":[{"idsContractId":"DEFAULT_CONTRACT1","idsAssetId":"15573708","idShort":"TestConceptDescription","identification":{"idType":"Iri","id":"https://acplt.org/Test_ConceptDescription"}}]} \ No newline at end of file +{"assetAdministrationShells":[{"idsContractId":"DEFAULT_CONTRACT2","idsAssetId":"-1379397334","idShort":"FestoDemoAAS","identification":{"idType":"Iri","id":"https://example.com/ids/aas/3235_8090_6012_8932"}}],"submodels":[{"idsContractId":"DEFAULT_CONTRACT3","idsAssetId":"358736994","idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"}},{"idsContractId":"DEFAULT_CONTRACT4","idsAssetId":"-2140270666","idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT8","idsAssetId":"1403345733","idShort":"GripperUp"},{"idsContractId":"DEFAULT_CONTRACT9","idsAssetId":"-36927578","idShort":"Pressure"},{"idsContractId":"DEFAULT_CONTRACT10","idsAssetId":"-892753618","idShort":"ProcessCounter"},{"idsContractId":"DEFAULT_CONTRACT11","idsAssetId":"769417378","idShort":"ProcessDuration"},{"idsContractId":"DEFAULT_CONTRACT12","idsAssetId":"-1622475224","idShort":"RemainingProcesses"},{"idsContractId":"DEFAULT_CONTRACT13","idsAssetId":"-4657036","idShort":"GripperOpen"},{"idsContractId":"DEFAULT_CONTRACT14","idsAssetId":"1964729520","idShort":"DistanceSensor"},{"idsContractId":"DEFAULT_CONTRACT15","idsAssetId":"-1206164330","idShort":"LightGateEntrance"},{"idsContractId":"DEFAULT_CONTRACT16","idsAssetId":"-988501131","idShort":"LightGateMiddle"},{"idsContractId":"DEFAULT_CONTRACT17","idsAssetId":"1817740030","idShort":"LightGateExit"},{"idsContractId":"DEFAULT_CONTRACT18","idsAssetId":"-451751058","idShort":"ConveyorBeltForward"},{"idsContractId":"DEFAULT_CONTRACT19","idsAssetId":"519282778","idShort":"ConveyorBeltBackward"},{"idsContractId":"DEFAULT_CONTRACT20","idsAssetId":"-1268910060","idShort":"isRunning"},{"idsContractId":"DEFAULT_CONTRACT21","idsAssetId":"866424462","idShort":"LED_green"},{"idsContractId":"DEFAULT_CONTRACT22","idsAssetId":"1592888905","idShort":"LED_yellow"},{"idsContractId":"DEFAULT_CONTRACT23","idsAssetId":"2056775388","idShort":"LED_red"},{"idsContractId":"DEFAULT_CONTRACT24","idsAssetId":"148844684","idShort":"ConveyorBeltReady"}]},{"idsContractId":"DEFAULT_CONTRACT5","idsAssetId":"-772733259","idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT25","idsAssetId":"-1736407145","idShort":"GripperUpAverage"},{"idsContractId":"DEFAULT_CONTRACT26","idsAssetId":"778529736","idShort":"GripperOpenAverage"},{"idsContractId":"DEFAULT_CONTRACT27","idsAssetId":"751611438","idShort":"DistanceSensorAverage"},{"idsContractId":"DEFAULT_CONTRACT28","idsAssetId":"488415782","idShort":"LightGateEntranceAverage"},{"idsContractId":"DEFAULT_CONTRACT29","idsAssetId":"1611662887","idShort":"LightGateMiddleAverage"},{"idsContractId":"DEFAULT_CONTRACT30","idsAssetId":"1912641086","idShort":"LightGateExitAverage"},{"idsContractId":"DEFAULT_CONTRACT31","idsAssetId":"737143950","idShort":"ConveyorBeltForwardAverage"},{"idsContractId":"DEFAULT_CONTRACT32","idsAssetId":"1165259396","idShort":"ConveyorBeltBackwardAverage"},{"idsContractId":"DEFAULT_CONTRACT33","idsAssetId":"-1355566104","idShort":"isRunningAverage"},{"idsContractId":"DEFAULT_CONTRACT34","idsAssetId":"271497262","idShort":"LED_greenAverage"},{"idsContractId":"DEFAULT_CONTRACT35","idsAssetId":"-1115107595","idShort":"LED_yellowAverage"},{"idsContractId":"DEFAULT_CONTRACT36","idsAssetId":"445523936","idShort":"LED_redAverage"},{"idsContractId":"DEFAULT_CONTRACT37","idsAssetId":"1542428016","idShort":"ConveyorBeltReadyAverage"}]},{"idsContractId":"DEFAULT_CONTRACT6","idsAssetId":"1218664477","idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT38","idsAssetId":"-378946552","idShort":"JTS_data"}]},{"idsContractId":"DEFAULT_CONTRACT7","idsAssetId":"1754436341","idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT39","idsAssetId":"1534629733","idShort":"Pressure"},{"idsContractId":"DEFAULT_CONTRACT40","idsAssetId":"156363779","idShort":"ProcessDuration"}]}],"conceptDescriptions":[{"idsContractId":"DEFAULT_CONTRACT1","idsAssetId":"15573708","idShort":"TestConceptDescription","identification":{"idType":"Iri","id":"https://acplt.org/Test_ConceptDescription"}}]} \ No newline at end of file diff --git a/edc-extension4aas/src/test/resources/selfDescriptionWithIdsNoSubmodelElements.json b/edc-extension4aas/src/test/resources/selfDescriptionWithIdsNoSubmodelElements.json index c4ce0d69..c7de22eb 100644 --- a/edc-extension4aas/src/test/resources/selfDescriptionWithIdsNoSubmodelElements.json +++ b/edc-extension4aas/src/test/resources/selfDescriptionWithIdsNoSubmodelElements.json @@ -1 +1 @@ -{"assetAdministrationShells":[{"idsContractId":"DEFAULT_CONTRACT2","idsAssetId":"-1379397334","idShort":"FestoDemoAAS","identification":{"idType":"Iri","id":"https://example.com/ids/aas/3235_8090_6012_8932"}}],"submodels":[{"idsContractId":"DEFAULT_CONTRACT3","idsAssetId":"358736994","idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"},"submodelElements":[]},{"idsContractId":"DEFAULT_CONTRACT4","idsAssetId":"-2140270666","idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"},"submodelElements":[]},{"idsContractId":"DEFAULT_CONTRACT5","idsAssetId":"-772733259","idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"},"submodelElements":[]},{"idsContractId":"DEFAULT_CONTRACT6","idsAssetId":"1218664477","idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"},"submodelElements":[]},{"idsContractId":"DEFAULT_CONTRACT7","idsAssetId":"1754436341","idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"},"submodelElements":[]}],"conceptDescriptions":[{"idsContractId":"DEFAULT_CONTRACT1","idsAssetId":"15573708","idShort":"TestConceptDescription","identification":{"idType":"Iri","id":"https://acplt.org/Test_ConceptDescription"}}]} \ No newline at end of file +{"assetAdministrationShells":[{"idsContractId":"DEFAULT_CONTRACT2","idsAssetId":"-1379397334","idShort":"FestoDemoAAS","identification":{"idType":"Iri","id":"https://example.com/ids/aas/3235_8090_6012_8932"}}],"submodels":[{"idsContractId":"DEFAULT_CONTRACT3","idsAssetId":"358736994","idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"}},{"idsContractId":"DEFAULT_CONTRACT4","idsAssetId":"-2140270666","idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"}},{"idsContractId":"DEFAULT_CONTRACT5","idsAssetId":"-772733259","idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"}},{"idsContractId":"DEFAULT_CONTRACT6","idsAssetId":"1218664477","idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"}},{"idsContractId":"DEFAULT_CONTRACT7","idsAssetId":"1754436341","idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"}}],"conceptDescriptions":[{"idsContractId":"DEFAULT_CONTRACT1","idsAssetId":"15573708","idShort":"TestConceptDescription","identification":{"idType":"Iri","id":"https://acplt.org/Test_ConceptDescription"}}]} \ No newline at end of file diff --git a/edc-extension4aas/src/test/resources/selfDescriptionWithIdsOneSubmodelOneSubmodelElementLess.json b/edc-extension4aas/src/test/resources/selfDescriptionWithIdsOneSubmodelOneSubmodelElementLess.json index 30dca880..ff96e27d 100644 --- a/edc-extension4aas/src/test/resources/selfDescriptionWithIdsOneSubmodelOneSubmodelElementLess.json +++ b/edc-extension4aas/src/test/resources/selfDescriptionWithIdsOneSubmodelOneSubmodelElementLess.json @@ -1 +1 @@ -{"assetAdministrationShells":[{"idsContractId":"DEFAULT_CONTRACT2","idsAssetId":"-1379397334","idShort":"FestoDemoAAS","identification":{"idType":"Iri","id":"https://example.com/ids/aas/3235_8090_6012_8932"}}],"submodels":[{"idsContractId":"DEFAULT_CONTRACT3","idsAssetId":"358736994","idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT41","idsAssetId":"-1211678183","idShort":"GripperUp"}]},{"idsContractId":"DEFAULT_CONTRACT4","idsAssetId":"-2140270666","idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT9","idsAssetId":"-36927578","idShort":"Pressure"},{"idsContractId":"DEFAULT_CONTRACT10","idsAssetId":"-892753618","idShort":"ProcessCounter"},{"idsContractId":"DEFAULT_CONTRACT11","idsAssetId":"769417378","idShort":"ProcessDuration"},{"idsContractId":"DEFAULT_CONTRACT12","idsAssetId":"-1622475224","idShort":"RemainingProcesses"},{"idsContractId":"DEFAULT_CONTRACT13","idsAssetId":"-4657036","idShort":"GripperOpen"},{"idsContractId":"DEFAULT_CONTRACT14","idsAssetId":"1964729520","idShort":"DistanceSensor"},{"idsContractId":"DEFAULT_CONTRACT15","idsAssetId":"-1206164330","idShort":"LightGateEntrance"},{"idsContractId":"DEFAULT_CONTRACT16","idsAssetId":"-988501131","idShort":"LightGateMiddle"},{"idsContractId":"DEFAULT_CONTRACT17","idsAssetId":"1817740030","idShort":"LightGateExit"},{"idsContractId":"DEFAULT_CONTRACT18","idsAssetId":"-451751058","idShort":"ConveyorBeltForward"},{"idsContractId":"DEFAULT_CONTRACT19","idsAssetId":"519282778","idShort":"ConveyorBeltBackward"},{"idsContractId":"DEFAULT_CONTRACT20","idsAssetId":"-1268910060","idShort":"isRunning"},{"idsContractId":"DEFAULT_CONTRACT21","idsAssetId":"866424462","idShort":"LED_green"},{"idsContractId":"DEFAULT_CONTRACT22","idsAssetId":"1592888905","idShort":"LED_yellow"},{"idsContractId":"DEFAULT_CONTRACT23","idsAssetId":"2056775388","idShort":"LED_red"},{"idsContractId":"DEFAULT_CONTRACT24","idsAssetId":"148844684","idShort":"ConveyorBeltReady"}]},{"idsContractId":"DEFAULT_CONTRACT5","idsAssetId":"-772733259","idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT25","idsAssetId":"-1736407145","idShort":"GripperUpAverage"},{"idsContractId":"DEFAULT_CONTRACT26","idsAssetId":"778529736","idShort":"GripperOpenAverage"},{"idsContractId":"DEFAULT_CONTRACT27","idsAssetId":"751611438","idShort":"DistanceSensorAverage"},{"idsContractId":"DEFAULT_CONTRACT28","idsAssetId":"488415782","idShort":"LightGateEntranceAverage"},{"idsContractId":"DEFAULT_CONTRACT29","idsAssetId":"1611662887","idShort":"LightGateMiddleAverage"},{"idsContractId":"DEFAULT_CONTRACT30","idsAssetId":"1912641086","idShort":"LightGateExitAverage"},{"idsContractId":"DEFAULT_CONTRACT31","idsAssetId":"737143950","idShort":"ConveyorBeltForwardAverage"},{"idsContractId":"DEFAULT_CONTRACT32","idsAssetId":"1165259396","idShort":"ConveyorBeltBackwardAverage"},{"idsContractId":"DEFAULT_CONTRACT33","idsAssetId":"-1355566104","idShort":"isRunningAverage"},{"idsContractId":"DEFAULT_CONTRACT34","idsAssetId":"271497262","idShort":"LED_greenAverage"},{"idsContractId":"DEFAULT_CONTRACT35","idsAssetId":"-1115107595","idShort":"LED_yellowAverage"},{"idsContractId":"DEFAULT_CONTRACT36","idsAssetId":"445523936","idShort":"LED_redAverage"},{"idsContractId":"DEFAULT_CONTRACT37","idsAssetId":"1542428016","idShort":"ConveyorBeltReadyAverage"}]},{"idsContractId":"DEFAULT_CONTRACT6","idsAssetId":"1218664477","idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT38","idsAssetId":"-378946552","idShort":"JTS_data"}]},{"idsContractId":"DEFAULT_CONTRACT7","idsAssetId":"1754436341","idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT39","idsAssetId":"1534629733","idShort":"Pressure"},{"idsContractId":"DEFAULT_CONTRACT40","idsAssetId":"156363779","idShort":"ProcessDuration"}]}],"conceptDescriptions":[{"idsContractId":"DEFAULT_CONTRACT1","idsAssetId":"15573708","idShort":"TestConceptDescription","identification":{"idType":"Iri","id":"https://acplt.org/Test_ConceptDescription"}}]} \ No newline at end of file +{"assetAdministrationShells":[{"idsContractId":"DEFAULT_CONTRACT2","idsAssetId":"-1379397334","idShort":"FestoDemoAAS","identification":{"idType":"Iri","id":"https://example.com/ids/aas/3235_8090_6012_8932"}}],"submodels":[{"idsContractId":"DEFAULT_CONTRACT3","idsAssetId":"358736994","idShort":"Config","identification":{"idType":"IRI","id":"https://example.com/ids/sm/1145_8090_6012_5097"}},{"idsContractId":"DEFAULT_CONTRACT4","idsAssetId":"-2140270666","idShort":"Status","identification":{"idType":"IRI","id":"https://example.com/ids/sm/4445_8090_6012_7409"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT9","idsAssetId":"-36927578","idShort":"Pressure"},{"idsContractId":"DEFAULT_CONTRACT10","idsAssetId":"-892753618","idShort":"ProcessCounter"},{"idsContractId":"DEFAULT_CONTRACT11","idsAssetId":"769417378","idShort":"ProcessDuration"},{"idsContractId":"DEFAULT_CONTRACT12","idsAssetId":"-1622475224","idShort":"RemainingProcesses"},{"idsContractId":"DEFAULT_CONTRACT13","idsAssetId":"-4657036","idShort":"GripperOpen"},{"idsContractId":"DEFAULT_CONTRACT14","idsAssetId":"1964729520","idShort":"DistanceSensor"},{"idsContractId":"DEFAULT_CONTRACT15","idsAssetId":"-1206164330","idShort":"LightGateEntrance"},{"idsContractId":"DEFAULT_CONTRACT16","idsAssetId":"-988501131","idShort":"LightGateMiddle"},{"idsContractId":"DEFAULT_CONTRACT17","idsAssetId":"1817740030","idShort":"LightGateExit"},{"idsContractId":"DEFAULT_CONTRACT18","idsAssetId":"-451751058","idShort":"ConveyorBeltForward"},{"idsContractId":"DEFAULT_CONTRACT19","idsAssetId":"519282778","idShort":"ConveyorBeltBackward"},{"idsContractId":"DEFAULT_CONTRACT20","idsAssetId":"-1268910060","idShort":"isRunning"},{"idsContractId":"DEFAULT_CONTRACT21","idsAssetId":"866424462","idShort":"LED_green"},{"idsContractId":"DEFAULT_CONTRACT22","idsAssetId":"1592888905","idShort":"LED_yellow"},{"idsContractId":"DEFAULT_CONTRACT23","idsAssetId":"2056775388","idShort":"LED_red"},{"idsContractId":"DEFAULT_CONTRACT24","idsAssetId":"148844684","idShort":"ConveyorBeltReady"}]},{"idsContractId":"DEFAULT_CONTRACT5","idsAssetId":"-772733259","idShort":"CalculatedAverages","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2110_9090_6012_8448"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT25","idsAssetId":"-1736407145","idShort":"GripperUpAverage"},{"idsContractId":"DEFAULT_CONTRACT26","idsAssetId":"778529736","idShort":"GripperOpenAverage"},{"idsContractId":"DEFAULT_CONTRACT27","idsAssetId":"751611438","idShort":"DistanceSensorAverage"},{"idsContractId":"DEFAULT_CONTRACT28","idsAssetId":"488415782","idShort":"LightGateEntranceAverage"},{"idsContractId":"DEFAULT_CONTRACT29","idsAssetId":"1611662887","idShort":"LightGateMiddleAverage"},{"idsContractId":"DEFAULT_CONTRACT30","idsAssetId":"1912641086","idShort":"LightGateExitAverage"},{"idsContractId":"DEFAULT_CONTRACT31","idsAssetId":"737143950","idShort":"ConveyorBeltForwardAverage"},{"idsContractId":"DEFAULT_CONTRACT32","idsAssetId":"1165259396","idShort":"ConveyorBeltBackwardAverage"},{"idsContractId":"DEFAULT_CONTRACT33","idsAssetId":"-1355566104","idShort":"isRunningAverage"},{"idsContractId":"DEFAULT_CONTRACT34","idsAssetId":"271497262","idShort":"LED_greenAverage"},{"idsContractId":"DEFAULT_CONTRACT35","idsAssetId":"-1115107595","idShort":"LED_yellowAverage"},{"idsContractId":"DEFAULT_CONTRACT36","idsAssetId":"445523936","idShort":"LED_redAverage"},{"idsContractId":"DEFAULT_CONTRACT37","idsAssetId":"1542428016","idShort":"ConveyorBeltReadyAverage"}]},{"idsContractId":"DEFAULT_CONTRACT6","idsAssetId":"1218664477","idShort":"DaySummary","identification":{"idType":"IRI","id":"https://example.com/ids/sm/5410_9090_6012_0950"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT38","idsAssetId":"-378946552","idShort":"JTS_data"}]},{"idsContractId":"DEFAULT_CONTRACT7","idsAssetId":"1754436341","idShort":"ProducerRecommendations","identification":{"idType":"IRI","id":"https://example.com/ids/sm/2402_1191_1022_1090"},"submodelElements":[{"idsContractId":"DEFAULT_CONTRACT39","idsAssetId":"1534629733","idShort":"Pressure"},{"idsContractId":"DEFAULT_CONTRACT40","idsAssetId":"156363779","idShort":"ProcessDuration"}]}],"conceptDescriptions":[{"idsContractId":"DEFAULT_CONTRACT1","idsAssetId":"15573708","idShort":"TestConceptDescription","identification":{"idType":"Iri","id":"https://acplt.org/Test_ConceptDescription"}}]} \ No newline at end of file diff --git a/edc-extension4aas/src/test/resources/submodels.json b/edc-extension4aas/src/test/resources/submodels.json index 9f979fc7..b70bd349 100644 --- a/edc-extension4aas/src/test/resources/submodels.json +++ b/edc-extension4aas/src/test/resources/submodels.json @@ -115,7 +115,6 @@ } ] }, - { "value": "13.6", "semanticId": { From 5ccb337db22edbf56dcb64e3a5fbcf4cef97e3dd Mon Sep 17 00:00:00 2001 From: Carlos Schmidt <18703981+carlos-schmidt@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:01:03 +0100 Subject: [PATCH 4/6] Update docker example and how-to --- edc-extension4aas/build.gradle.kts | 12 +- example/Dockerfile | 6 +- example/README.md | 11 +- .../configurations/workdir/config.properties | 34 + example/configurations/workdir/demoAAS.json | 936 ++++++++++++++++++ 5 files changed, 984 insertions(+), 15 deletions(-) create mode 100644 example/configurations/workdir/config.properties create mode 100644 example/configurations/workdir/demoAAS.json diff --git a/edc-extension4aas/build.gradle.kts b/edc-extension4aas/build.gradle.kts index ea636096..08960659 100644 --- a/edc-extension4aas/build.gradle.kts +++ b/edc-extension4aas/build.gradle.kts @@ -40,14 +40,10 @@ dependencies { repositories { mavenCentral() } - -tasks.test { - useJUnitPlatform() -} - -tasks.jacocoTestReport { - dependsOn(tasks.test) // tests are required to run before generating the report -} +tasks.compileJava {options.encoding = "UTF-8"} +tasks.compileTestJava {options.encoding = "UTF-8"} +tasks.test {useJUnitPlatform()} +tasks.jacocoTestReport {dependsOn(tasks.test)} // FA³ST dependency needs the following configurations.all { diff --git a/example/Dockerfile b/example/Dockerfile index e291d163..7a74bb54 100644 --- a/example/Dockerfile +++ b/example/Dockerfile @@ -11,11 +11,11 @@ WORKDIR /app # Copy FA³ST config # COPY ./resources/demoConfig.json /app/demoConfig.json # Copy config -COPY ./configurations /configurations -COPY ./resources /resources +# COPY ./configurations /configurations +# COPY ./resources /resources # Copy jar COPY ./build/libs/dataspace-connector.jar /app ENV EDC_FS_CONFIG=$EDC_FS_CONFIG -ENTRYPOINT java -jar dataspace-connector.jar +ENTRYPOINT ["java", "-jar", "dataspace-connector.jar"] diff --git a/example/README.md b/example/README.md index b19f1333..563e3837 100644 --- a/example/README.md +++ b/example/README.md @@ -40,12 +40,15 @@ java "-Dedc.fs.config=./example/configurations/provider.properties" -jar ./examp ### Alternative: docker & docker-compose + After building the extension as seen above, a docker image can be built with -```sh -cd ./example -docker build -t edc-aas-extension:latest . -``` +0. `cd ./example` +1. `docker build -t edc-aas-extension:latest .` +2. `mkdir workdir` +2. Create configuration under `./workdir/config.properties` +3. Add additional files under `./workdir` (Fitting to your paths in config.properties) +4. Run with `docker run -i -v $PWD/workdir:/workdir/ -e EDC_FS_CONFIG=/workdir/config.properties edc-extension4aas:latest` This docker image can be run individually or **inside a docker-compose file**: diff --git a/example/configurations/workdir/config.properties b/example/configurations/workdir/config.properties new file mode 100644 index 00000000..997c162f --- /dev/null +++ b/example/configurations/workdir/config.properties @@ -0,0 +1,34 @@ +# AAS Extension specific +# Supply AAS model + (port XOR AAS service config) for an AAS service internally started by the extension +edc.aas.localAASModelPath=/workdir/demoAAS.json +edc.aas.localAASServicePort=8080 +# edc.aas.localAASServiceConfigPath = /app/demoConfig.json +# Provide a URL of an already running AAS service (such as FA³ST, BaSyx) +# edc.aas.remoteAasLocation = http://example.com/aas +# Period of synchronizing the EDC assetStore with the connected AAS services (in seconds) +edc.aas.syncPeriod=100 +# Path to a default access policy definition file +# edc.aas.defaultAccessPolicyDefinitionPath = ... +# Path to a default contract policy definition file +# edc.aas.defaultContractPolicyDefinitionPath = ... +# EDC specific, mostly default values +# Port and path for custom http services such as SelfDescription +web.http.port=8181 +web.http.path=/api +# Port and path for requesting an EDC to communicate with another EDC by IDS messages (consumer-provider) +web.http.management.port=8182 +web.http.management.path=/management +# Port and path for IDS messages (from another EDC) +web.http.protocol.port=8282 +web.http.protocol.path=/dsp +edc.dsp.callback.address=http://provider:8282/dsp +edc.transfer.functions.enabled.protocols=http +# Connector hostname, which e.g. is used in referer urls +edc.hostname=provider +# Auth key for using internal EDC api (header key: x-api-key) +edc.api.auth.key=password +# GUI configuration (enable DataDashboard to communicate with EDC) +edc.web.rest.cors.enabled=true +edc.web.rest.cors.origins=* +edc.web.rest.cors.headers=x-api-key, content-type +edc.web.rest.cors.methods=GET, POST, DELETE, PUT, OPTIONS diff --git a/example/configurations/workdir/demoAAS.json b/example/configurations/workdir/demoAAS.json new file mode 100644 index 00000000..f0f7efce --- /dev/null +++ b/example/configurations/workdir/demoAAS.json @@ -0,0 +1,936 @@ +{ + "assetAdministrationShells": [ + { + "assetInformation": { + "assetKind": "Instance", + "globalAssetId": { + "keys": [ + { + "idType": "Iri", + "type": "Asset", + "value": "https://acplt.org/Test_Asset" + } + ] + }, + "billOfMaterial": [ + { + "keys": [ + { + "idType": "Iri", + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" + } + ] + } + ] + }, + "submodels": [ + { + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/1145_8090_6012_5097", + "idType": "Iri" + } + ] + }, + { + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/4445_8090_6012_7409", + "idType": "Iri" + } + ] + }, + { + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/2110_9090_6012_8448", + "idType": "Iri" + } + ] + }, + { + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/5410_9090_6012_0950", + "idType": "Iri" + } + ] + }, + { + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/2402_1191_1022_1090", + "idType": "Iri" + } + ] + } + ], + "identification": { + "idType": "Iri", + "id": "https://example.com/ids/aas/3235_8090_6012_8932" + }, + "idShort": "FestoDemoAAS", + "modelType": { + "name": "AssetAdministrationShell" + } + } + ], + "assets": [ + { + "identification": { + "idType": "Iri", + "id": "https://example.com/ids/asset/3435_8090_6012_2867" + }, + "idShort": "FestoDemo", + "modelType": { + "name": "Asset" + }, + "kind": "Instance" + } + ], + "submodels": [ + { + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "identification": { + "idType": "Iri", + "id": "https://example.com/ids/sm/1145_8090_6012_5097" + }, + "idShort": "Config", + "modelType": { + "name": "Submodel" + }, + "kind": "Instance", + "submodelElements": [] + }, + { + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "identification": { + "idType": "Iri", + "id": "https://example.com/ids/sm/4445_8090_6012_7409" + }, + "idShort": "Status", + "modelType": { + "name": "Submodel" + }, + "kind": "Instance", + "submodelElements": [ + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "GripperUp", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows it the gripper is currently pulled up" + } + ] + }, + { + "value": "3", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "Pressure", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "int", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows pressure" + } + ] + }, + { + "value": "55", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ProcessCounter", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "int", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Counts the processes" + } + ] + }, + { + "value": "13.6", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ProcessDuration", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows the last measurement duration" + } + ] + }, + { + "value": "40", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "RemainingProcesses", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "int", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows remaining processes until system failure" + } + ] + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "GripperOpen", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows if the gripper claw is currently open" + } + ] + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "DistanceSensor", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "int", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows the current distance of the object (height guess)" + } + ] + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LightGateEntrance", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LightGateMiddle", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LightGateExit", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ConveyorBeltForward", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ConveyorBeltBackward", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "isRunning", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LED_green", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LED_yellow", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LED_red", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + }, + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ConveyorBeltReady", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "boolean", + "kind": "Instance" + } + ], + "descriptions": [] + }, + { + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "identification": { + "idType": "Iri", + "id": "https://example.com/ids/sm/2110_9090_6012_8448" + }, + "idShort": "CalculatedAverages", + "modelType": { + "name": "Submodel" + }, + "kind": "Instance", + "submodelElements": [ + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "GripperUpAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows it the gripper is currently pulled up" + } + ] + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "GripperOpenAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows if the gripper claw is currently open" + } + ] + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "DistanceSensorAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "Shows the current distance of the object (height guess)" + } + ] + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LightGateEntranceAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LightGateMiddleAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LightGateExitAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ConveyorBeltForwardAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ConveyorBeltBackwardAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "isRunningAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LED_greenAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LED_yellowAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "LED_redAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "0", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ConveyorBeltReadyAverage", + "category": "Variable", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + } + ] + }, + { + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "identification": { + "idType": "Iri", + "id": "https://example.com/ids/sm/5410_9090_6012_0950" + }, + "idShort": "DaySummary", + "modelType": { + "name": "Submodel" + }, + "kind": "Instance", + "submodelElements": [ + { + "value": "", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "JTS_data", + "modelType": { + "name": "Property" + }, + "valueType": "string", + "kind": "Instance", + "descriptions": [ + { + "language": "en", + "text": "contains the JSON JTS (json time series) data of the whole day" + } + ] + } + ] + }, + { + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "identification": { + "idType": "Iri", + "id": "https://example.com/ids/sm/2402_1191_1022_1090" + }, + "idShort": "ProducerRecommendations", + "modelType": { + "name": "Submodel" + }, + "kind": "Instance", + "submodelElements": [ + { + "value": "4.1", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "Pressure", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + }, + { + "value": "16.2", + "semanticId": { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ] + }, + "idShort": "ProcessDuration", + "modelType": { + "name": "Property" + }, + "valueType": "float", + "kind": "Instance" + } + ] + } + ], + "conceptDescriptions": [ + { + "modelType": { + "name": "ConceptDescription" + }, + "administration": { + "revision": "0", + "version": "0.9" + }, + "identification": { + "idType": "Iri", + "id": "https://acplt.org/Test_ConceptDescription" + }, + "idShort": "TestConceptDescription", + "isCaseOf": [ + { + "keys": [ + { + "idType": "Iri", + "type": "GlobalReference", + "value": "http://acplt.org/DataSpecifications/ConceptDescriptions/TestConceptDescription" + } + ] + } + ], + "description": [ + { + "language": "en-us", + "text": "An example concept description for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-ConceptDescription für eine Test-Anwendung" + } + ] + } + ] +} \ No newline at end of file From 4cff7622d81ff052f5bddcbcede49f9dbdd3d46a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 23:10:59 +0000 Subject: [PATCH 5/6] Bump org.glassfish.jersey.core:jersey-common in /edc-extension4aas Bumps org.glassfish.jersey.core:jersey-common from 3.1.4 to 3.1.5. --- updated-dependencies: - dependency-name: org.glassfish.jersey.core:jersey-common dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- edc-extension4aas/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edc-extension4aas/build.gradle.kts b/edc-extension4aas/build.gradle.kts index ea636096..167a6999 100644 --- a/edc-extension4aas/build.gradle.kts +++ b/edc-extension4aas/build.gradle.kts @@ -31,7 +31,7 @@ dependencies { implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}") testImplementation("$group:junit:$edcVersion") - testImplementation("org.glassfish.jersey.core:jersey-common:3.1.4") + testImplementation("org.glassfish.jersey.core:jersey-common:3.1.5") testImplementation("org.mockito:mockito-core:${mockitoVersion}") testImplementation("org.mock-server:mockserver-junit-jupiter:${mockserverVersion}") testImplementation("org.mock-server:mockserver-netty:${mockserverVersion}") From 99f541195237cceb6f65df7b30e7e89e2c70347f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 00:01:07 +0000 Subject: [PATCH 6/6] Bump gradle/gradle-build-action Bumps [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) from 0280eb7de5ad3fb0deb50017b8ce842980b4789a to f95e9c74599bc49122b76ecfe1306f0034f87266. - [Release notes](https://github.com/gradle/gradle-build-action/releases) - [Commits](https://github.com/gradle/gradle-build-action/compare/0280eb7de5ad3fb0deb50017b8ce842980b4789a...f95e9c74599bc49122b76ecfe1306f0034f87266) --- updated-dependencies: - dependency-name: gradle/gradle-build-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index cc3d9699..3e8d31c0 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -29,6 +29,6 @@ jobs: java-version: '17' distribution: 'temurin' - name: Build with Gradle - uses: gradle/gradle-build-action@0280eb7de5ad3fb0deb50017b8ce842980b4789a + uses: gradle/gradle-build-action@f95e9c74599bc49122b76ecfe1306f0034f87266 with: arguments: clean build