diff --git a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXDeserializer.java b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXDeserializer.java index c068ad20b..01674fab9 100644 --- a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXDeserializer.java +++ b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXDeserializer.java @@ -15,32 +15,28 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringWriter; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - import org.apache.commons.io.IOUtils; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackageRelationshipCollection; import org.apache.poi.openxml4j.opc.PackagingURIHelper; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.internal.AASXUtils; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlDeserializer; import org.eclipse.digitaltwin.aas4j.v3.model.Environment; import org.eclipse.digitaltwin.aas4j.v3.model.File; -import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; -import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; -import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; + +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; /** * The AASX package converter converts a aasx package into a list of aas, a list diff --git a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXSerializer.java b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXSerializer.java index 71e61ccb8..0dc26f626 100644 --- a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXSerializer.java +++ b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXSerializer.java @@ -15,15 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx; -import java.io.IOException; -import java.io.OutputStream; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.UUID; - import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackagePart; @@ -32,21 +23,24 @@ import org.apache.poi.openxml4j.opc.RelationshipSource; import org.apache.poi.openxml4j.opc.TargetMode; import org.apache.poi.openxml4j.opc.internal.MemoryPackagePart; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.eclipse.digitaltwin.aas4j.v3.model.File; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.internal.AASXUtils; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.Environment; +import org.eclipse.digitaltwin.aas4j.v3.model.File; import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; -import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; -import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.internal.AASXUtils; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlSerializer; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.UUID; /** * This class can be used to generate an .aasx file from Metamodel Objects and diff --git a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXValidator.java b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXValidator.java index 6184ed56e..c11a8544c 100644 --- a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXValidator.java +++ b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXValidator.java @@ -15,14 +15,13 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx; -import java.io.IOException; -import java.io.InputStream; -import java.util.Set; - import org.apache.poi.openxml4j.exceptions.InvalidFormatException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlSchemaValidator; import org.xml.sax.SAXException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.XmlSchemaValidator; +import java.io.IOException; +import java.io.InputStream; +import java.util.Set; /** * Class to validate the XML file inside an AASX-package diff --git a/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/deserialization/AASXDeserializerTest.java b/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/deserialization/AASXDeserializerTest.java index 0c274625e..77007d622 100644 --- a/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/deserialization/AASXDeserializerTest.java +++ b/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/deserialization/AASXDeserializerTest.java @@ -15,32 +15,30 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.deserialization; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.parsers.ParserConfigurationException; - import org.apache.commons.collections4.CollectionUtils; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.AASXDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.AASXSerializer; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.InMemoryFile; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASSimple; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.xml.sax.SAXException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.InMemoryFile; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASSimple; +import javax.xml.parsers.ParserConfigurationException; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class AASXDeserializerTest { diff --git a/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/deserialization/ValidationTest.java b/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/deserialization/ValidationTest.java index 6b1622c43..856ed8916 100644 --- a/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/deserialization/ValidationTest.java +++ b/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/deserialization/ValidationTest.java @@ -15,19 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.deserialization; -import static org.junit.Assert.assertEquals; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import javax.xml.parsers.ParserConfigurationException; - import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; @@ -40,6 +27,18 @@ import org.junit.rules.TemporaryFolder; import org.xml.sax.SAXException; +import javax.xml.parsers.ParserConfigurationException; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import static org.junit.Assert.assertEquals; + public class ValidationTest { @Rule diff --git a/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/serialization/AASXSerializerTest.java b/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/serialization/AASXSerializerTest.java index e8388f3a9..aee0d6031 100644 --- a/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/serialization/AASXSerializerTest.java +++ b/dataformat-aasx/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/serialization/AASXSerializerTest.java @@ -16,9 +16,15 @@ package org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.serialization; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.AASXSerializer; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.InMemoryFile; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASSimple; +import org.junit.Before; +import org.junit.Test; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerException; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -27,16 +33,8 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.TransformerException; - -import org.junit.Before; -import org.junit.Test; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.AASXSerializer; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.aasx.InMemoryFile; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASSimple; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class AASXSerializerTest { diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/deserialization/EnumDeserializer.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/deserialization/EnumDeserializer.java index 76ba4040b..ebd49fbff 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/deserialization/EnumDeserializer.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/deserialization/EnumDeserializer.java @@ -15,13 +15,13 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization; -import java.io.IOException; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; +import java.io.IOException; + /** * Deserializes enum values converting element names from UpperCamelCase to * SCREAMING_SNAKE_CASE diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/util/IdentifiableCollector.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/util/IdentifiableCollector.java index 6a182b82e..4a464f64a 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/util/IdentifiableCollector.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/util/IdentifiableCollector.java @@ -15,9 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.util; -import java.util.HashSet; -import java.util.Set; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.visitor.AssetAdministrationShellElementWalkerVisitor; import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; @@ -25,6 +22,9 @@ import org.eclipse.digitaltwin.aas4j.v3.model.Identifiable; import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; +import java.util.HashSet; +import java.util.Set; + /** * Collects all Identifiable elements within an * AssetAdministrationShellEnvironment diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/util/MostSpecificTypeTokenComparator.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/util/MostSpecificTypeTokenComparator.java index 46bb7e10e..9893b7793 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/util/MostSpecificTypeTokenComparator.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/util/MostSpecificTypeTokenComparator.java @@ -15,10 +15,10 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.util; -import java.util.Comparator; - import com.google.common.reflect.TypeToken; +import java.util.Comparator; + /** * Comparator comparing two TypeToken regarding which type is more specific. */ diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/visitor/AssetAdministrationShellElementVisitor.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/visitor/AssetAdministrationShellElementVisitor.java index f9b13eceb..d0e27b8f7 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/visitor/AssetAdministrationShellElementVisitor.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/visitor/AssetAdministrationShellElementVisitor.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +54,7 @@ import org.eclipse.digitaltwin.aas4j.v3.model.ReferenceElement; import org.eclipse.digitaltwin.aas4j.v3.model.RelationshipElement; import org.eclipse.digitaltwin.aas4j.v3.model.Resource; -import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetID; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; @@ -132,8 +133,8 @@ public default void visit(HasSemantics hasSemantics) { Class type = hasSemantics.getClass(); if (Extension.class.isAssignableFrom(type)) { visit((Extension) hasSemantics); - } else if (SpecificAssetID.class.isAssignableFrom(type)) { - visit((SpecificAssetID) hasSemantics); + } else if (SpecificAssetId.class.isAssignableFrom(type)) { + visit((SpecificAssetId) hasSemantics); } else if (Submodel.class.isAssignableFrom(type)) { visit((Submodel) hasSemantics); } else if (SubmodelElement.class.isAssignableFrom(type)) { @@ -245,7 +246,7 @@ public default void visit(Extension extension) { public default void visit(File file) { } - public default void visit(SpecificAssetID identifierKeyValuePair) { + public default void visit(SpecificAssetId identifierKeyValuePair) { } public default void visit(Key key) { diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/visitor/AssetAdministrationShellElementWalkerVisitor.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/visitor/AssetAdministrationShellElementWalkerVisitor.java index d16f45849..3c51c7700 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/visitor/AssetAdministrationShellElementWalkerVisitor.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/internal/visitor/AssetAdministrationShellElementWalkerVisitor.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +16,36 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.visitor; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AnnotatedRelationshipElement; +import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; +import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; +import org.eclipse.digitaltwin.aas4j.v3.model.BasicEventElement; +import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; +import org.eclipse.digitaltwin.aas4j.v3.model.Entity; +import org.eclipse.digitaltwin.aas4j.v3.model.Environment; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.HasDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.HasExtensions; +import org.eclipse.digitaltwin.aas4j.v3.model.HasSemantics; +import org.eclipse.digitaltwin.aas4j.v3.model.Identifiable; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringDefinitionTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringPreferredNameTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.MultiLanguageProperty; +import org.eclipse.digitaltwin.aas4j.v3.model.Operation; +import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; +import org.eclipse.digitaltwin.aas4j.v3.model.Property; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifiable; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Referable; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.ReferenceElement; +import org.eclipse.digitaltwin.aas4j.v3.model.RelationshipElement; +import org.eclipse.digitaltwin.aas4j.v3.model.Resource; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; +import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; public interface AssetAdministrationShellElementWalkerVisitor extends AssetAdministrationShellElementVisitor { @@ -98,7 +128,7 @@ public default void visit(HasSemantics hasSemantics) { if (hasSemantics == null) { return; } - visit(hasSemantics.getSemanticID()); + visit(hasSemantics.getSemanticId()); hasSemantics.getSupplementalSemanticIds().forEach(x->visit(x)); AssetAdministrationShellElementVisitor.super.visit(hasSemantics); } @@ -113,11 +143,11 @@ public default void visit(Identifiable identifiable) { } @Override - public default void visit(SpecificAssetID specificAssetId) { + public default void visit(SpecificAssetId specificAssetId) { if (specificAssetId == null) { return; } - visit(specificAssetId.getExternalSubjectID()); + visit(specificAssetId.getExternalSubjectId()); AssetAdministrationShellElementVisitor.super.visit(specificAssetId); } @@ -127,7 +157,7 @@ public default void visit(MultiLanguageProperty multiLanguageProperty) { return; } multiLanguageProperty.getValue().forEach(x -> visit(x)); - visit(multiLanguageProperty.getValueID()); + visit(multiLanguageProperty.getValueId()); AssetAdministrationShellElementVisitor.super.visit(multiLanguageProperty); } @@ -145,7 +175,7 @@ public default void visit(Property property) { if (property == null) { return; } - visit(property.getValueID()); + visit(property.getValueId()); AssetAdministrationShellElementVisitor.super.visit(property); } @@ -163,7 +193,7 @@ public default void visit(Qualifier qualifier) { if (qualifier == null) { return; } - visit(qualifier.getValueID()); + visit(qualifier.getValueId()); AssetAdministrationShellElementVisitor.super.visit(qualifier); } diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/serialization/EnumSerializer.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/serialization/EnumSerializer.java index dadf9bc6c..425e9cfdc 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/serialization/EnumSerializer.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/serialization/EnumSerializer.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,17 +16,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization; -import java.io.IOException; - +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.Direction; import org.eclipse.digitaltwin.aas4j.v3.model.StateOfEvent; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; /** * Serializes enum values. If enum is part of the AAS Java model, the name will @@ -37,11 +37,11 @@ public class EnumSerializer extends JsonSerializer { @Override public void serialize(Enum value, JsonGenerator gen, SerializerProvider provider) throws IOException { - if (value instanceof DataTypeDefXSD) { + if (value instanceof DataTypeDefXsd) { // only for the DataTypeDefXsd notation - if (value.equals(DataTypeDefXSD.ANY_URI)) { + if (value.equals(DataTypeDefXsd.ANY_URI)) { gen.writeString("xs:anyURI"); - } else if (value.equals(DataTypeDefXSD.NON_NEGATIVE_INTEGER)) { + } else if (value.equals(DataTypeDefXsd.NON_NEGATIVE_INTEGER)) { gen.writeString("xs:nonNegativeInteger"); } else if(isTimeRelatedValue(value)) { handleTimeRelatedValue(gen, value); diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/AasUtils.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/AasUtils.java index a7d12cd1a..1621c2c92 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/AasUtils.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/AasUtils.java @@ -15,20 +15,7 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util; -import java.beans.IntrospectionException; -import java.beans.Introspector; -import java.beans.PropertyDescriptor; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Comparator; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; -import java.util.stream.Stream; - +import com.google.common.reflect.TypeToken; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.util.IdentifiableCollector; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.util.MostSpecificTypeTokenComparator; @@ -45,7 +32,19 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.common.reflect.TypeToken; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Comparator; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; /** * Provides utility functions related to AAS diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/ReflectionHelper.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/ReflectionHelper.java index c16f9df9e..b69025640 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/ReflectionHelper.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/ReflectionHelper.java @@ -15,6 +15,18 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util; +import com.google.common.reflect.TypeToken; +import io.github.classgraph.ClassGraph; +import io.github.classgraph.ClassInfo; +import io.github.classgraph.ClassInfoList; +import io.github.classgraph.ScanResult; +import org.apache.commons.lang3.ClassUtils; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.util.MostSpecificTypeTokenComparator; +import org.eclipse.digitaltwin.aas4j.v3.model.DataSpecificationContent; +import org.eclipse.digitaltwin.aas4j.v3.model.Referable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; @@ -25,20 +37,6 @@ import java.util.Set; import java.util.stream.Collectors; -import org.apache.commons.lang3.ClassUtils; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.util.MostSpecificTypeTokenComparator; -import org.eclipse.digitaltwin.aas4j.v3.model.DataSpecificationContent; -import org.eclipse.digitaltwin.aas4j.v3.model.Referable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.common.reflect.TypeToken; - -import io.github.classgraph.ClassGraph; -import io.github.classgraph.ClassInfo; -import io.github.classgraph.ClassInfoList; -import io.github.classgraph.ScanResult; - /** * Helper class to collect relevant data needed for * ReflectionAnnotationIntrospector via reflection. diff --git a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/AASFull.java b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/AASFull.java index 4844d4e3c..b0cd0ae96 100644 --- a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/AASFull.java +++ b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/AASFull.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,14 +16,11 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core; -import java.util.Arrays; -import java.util.Base64; - -import org.eclipse.digitaltwin.aas4j.v3.model.AASSubmodelElements; +import org.eclipse.digitaltwin.aas4j.v3.model.AasSubmodelElements; import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; import org.eclipse.digitaltwin.aas4j.v3.model.AssetKind; import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.Direction; import org.eclipse.digitaltwin.aas4j.v3.model.EntityType; @@ -51,6 +49,7 @@ import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLangStringPreferredNameTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLangStringShortNameTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLevelType; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultMultiLanguageProperty; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultOperation; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultOperationVariable; @@ -66,6 +65,9 @@ import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultValueList; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultValueReferencePair; +import java.util.Arrays; +import java.util.Base64; + public class AASFull { public static final AssetAdministrationShell AAS_1 = createAAS1(); @@ -83,7 +85,8 @@ public class AASFull { public final static ConceptDescription CONCEPT_DESCRIPTION_2 = createConceptDescription2(); public final static ConceptDescription CONCEPT_DESCRIPTION_3 = createConceptDescription3(); public final static ConceptDescription CONCEPT_DESCRIPTION_4 = createConceptDescription4(); - public static final String AAS_3_0_RC_02_DATA_SPECIFICATION_IEC_61360 = "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360"; + public static final Environment ENVIRONMENT = createEnvironment(); + public static final String AAS_3_0_RC_02_DATA_SPECIFICATION_IEC_61360 = "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360"; public static AssetAdministrationShell createAAS1() { return new DefaultAssetAdministrationShell.Builder() @@ -106,7 +109,13 @@ public static AssetAdministrationShell createAAS1() { .build()) .assetInformation(new DefaultAssetInformation.Builder() .assetKind(AssetKind.INSTANCE) - .globalAssetID("https://acplt.org/Test_Asset") + .globalAssetId("https://acplt.org/Test_Asset") + //.billOfMaterial((new DefaultReference.Builder() + // .keys(new DefaultKey.Builder() + // .type(KeyTypes.SUBMODEL) + // .value("http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial") + // .build())) + // .build()) .build()) .submodels(new DefaultReference.Builder() .keys(new DefaultKey.Builder() @@ -138,7 +147,7 @@ public static AssetAdministrationShell createAAS2() { .id("https://acplt.org/Test_AssetAdministrationShell_Mandatory") .assetInformation(new DefaultAssetInformation.Builder() .assetKind(AssetKind.INSTANCE) - .globalAssetID("https://acplt.org/Test_Asset_Mandatory") + .globalAssetId("https://acplt.org/Test_Asset_Mandatory") .build()) .submodels(new DefaultReference.Builder() .keys(new DefaultKey.Builder() @@ -163,7 +172,7 @@ public static AssetAdministrationShell createAAS3() { .id("https://acplt.org/Test_AssetAdministrationShell2_Mandatory") .assetInformation(new DefaultAssetInformation.Builder() .assetKind(AssetKind.INSTANCE) - .globalAssetID("https://acplt.org/Test_Asset_Mandatory") + .globalAssetId("https://acplt.org/Test_Asset_Mandatory") .build()) .build(); } @@ -182,7 +191,7 @@ public static AssetAdministrationShell createAAS4() { .build()) .assetInformation(new DefaultAssetInformation.Builder() .assetKind(AssetKind.INSTANCE) - .globalAssetID("https://acplt.org/Test_Asset_Missing") + .globalAssetId("https://acplt.org/Test_Asset_Missing") .build()) .submodels(new DefaultReference.Builder() .keys(new DefaultKey.Builder() @@ -207,7 +216,7 @@ public static Submodel createSubmodel1() { .revision("9") .build()) .kind(ModellingKind.INSTANCE) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.SUBMODEL) .value("http://acplt.org/SubmodelTemplates/AssetIdentification") @@ -216,14 +225,12 @@ public static Submodel createSubmodel1() { .build()) .submodelElements(new DefaultProperty.Builder() .idShort("ManufacturerName") - .displayName( - new DefaultLangStringNameType.Builder().text("Manufacturer Name").language("en-us").build() - ) + .displayName(new DefaultLangStringNameType.Builder().language("en-us").text("Manufacturer Name").build()) .description(Arrays.asList( new DefaultLangStringTextType.Builder().text("Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation.").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("0173-1#02-AAO677#002") @@ -234,16 +241,16 @@ public static Submodel createSubmodel1() { .qualifiers(new DefaultQualifier.Builder() .value("100") .type("http://acplt.org/Qualifier/ExampleQualifier") - .valueType(DataTypeDefXSD.INT) + .valueType(DataTypeDefXsd.INT) .build()) .qualifiers(new DefaultQualifier.Builder() .value("50") .type("http://acplt.org/Qualifier/ExampleQualifier2") - .valueType(DataTypeDefXSD.INT) + .valueType(DataTypeDefXsd.INT) .build()) .value("http://acplt.org/ValueId/ACPLT") - .valueType(DataTypeDefXSD.STRING) - .valueID(new DefaultReference.Builder() + .valueType(DataTypeDefXsd.STRING) + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ACPLT") @@ -252,13 +259,13 @@ public static Submodel createSubmodel1() { .build()) .build()) .submodelElements(new DefaultProperty.Builder() - .idShort("InstanceId") .category("VARIABLE") + .idShort("InstanceId") .description(Arrays.asList( new DefaultLangStringTextType.Builder().text("Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation.").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber") @@ -266,24 +273,15 @@ public static Submodel createSubmodel1() { ) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) - .supplementalSemanticIds(Arrays.asList( - new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .type(KeyTypes.GLOBAL_REFERENCE) - .value("something_random_e14ad770") - .build()) - .type(ReferenceTypes.EXTERNAL_REFERENCE) - .build(), - new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .type(KeyTypes.GLOBAL_REFERENCE) - .value("something_random_bd061acd") - .build()) - .type(ReferenceTypes.EXTERNAL_REFERENCE) - .build())) + .supplementalSemanticIds(new DefaultReference.Builder().type(ReferenceTypes.EXTERNAL_REFERENCE) + .keys(new DefaultKey.Builder().type(KeyTypes.GLOBAL_REFERENCE).value("something_random_e14ad770").build()) + .build()) + .supplementalSemanticIds(new DefaultReference.Builder().type(ReferenceTypes.EXTERNAL_REFERENCE) + .keys(new DefaultKey.Builder().type(KeyTypes.GLOBAL_REFERENCE).value("something_random_bd061acd").build()) + .build()) .value("978-8234-234-342") - .valueType(DataTypeDefXSD.STRING) - .valueID(new DefaultReference.Builder() + .valueType(DataTypeDefXsd.STRING) + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("978-8234-234-342") @@ -306,7 +304,7 @@ public static Submodel createSubmodel2() { .version("0") .build()) .kind(ModellingKind.INSTANCE) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.SUBMODEL) .value("http://acplt.org/SubmodelTemplates/BillOfMaterial") @@ -319,7 +317,7 @@ public static Submodel createSubmodel2() { new DefaultLangStringTextType.Builder().text("Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation.").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber") @@ -333,7 +331,7 @@ public static Submodel createSubmodel2() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -341,8 +339,8 @@ public static Submodel createSubmodel2() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value("http://acplt.org/ValueId/ExampleValue2") - .valueType(DataTypeDefXSD.STRING) - .valueID(new DefaultReference.Builder() + .valueType(DataTypeDefXsd.STRING) + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleValue2") @@ -357,7 +355,7 @@ public static Submodel createSubmodel2() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -365,8 +363,8 @@ public static Submodel createSubmodel2() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value("http://acplt.org/ValueId/ExampleValueId") - .valueType(DataTypeDefXSD.STRING) - .valueID(new DefaultReference.Builder() + .valueType(DataTypeDefXsd.STRING) + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleValueId") @@ -382,7 +380,7 @@ public static Submodel createSubmodel2() { new DefaultLangStringTextType.Builder().text("Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation.").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber") @@ -390,7 +388,7 @@ public static Submodel createSubmodel2() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .entityType(EntityType.SELF_MANAGED_ENTITY) - .globalAssetID("https://acplt.org/Test_Asset2") + .globalAssetId("https://acplt.org/Test_Asset2") .build()) .build(); } @@ -408,7 +406,7 @@ public static Submodel createSubmodel3() { .revision("9") .build()) .kind(ModellingKind.INSTANCE) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelTemplates/ExampleSubmodel") @@ -422,7 +420,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example RelationshipElement object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel RelationshipElement Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/RelationshipElements/ExampleRelationshipElement") @@ -467,7 +465,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example AnnotatedRelationshipElement object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel AnnotatedRelationshipElement Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement") @@ -508,7 +506,7 @@ public static Submodel createSubmodel3() { .idShort("ExampleProperty3") .category("PARAMETER") .value("some example annotation") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .submodelElements(new DefaultOperation.Builder() @@ -518,7 +516,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example Operation object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Operation Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Operations/ExampleOperation") @@ -533,7 +531,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -541,14 +539,14 @@ public static Submodel createSubmodel3() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value("http://acplt.org/ValueId/ExampleValueId") - .valueID(new DefaultReference.Builder() + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleValueId") .build()) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .outputVariables(new DefaultOperationVariable.Builder() @@ -559,7 +557,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -567,14 +565,14 @@ public static Submodel createSubmodel3() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value("http://acplt.org/ValueId/ExampleValueId") - .valueID(new DefaultReference.Builder() + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleValueId") .build()) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .inoutputVariables(new DefaultOperationVariable.Builder() @@ -585,7 +583,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -593,14 +591,14 @@ public static Submodel createSubmodel3() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value("http://acplt.org/ValueId/ExampleValueId") - .valueID(new DefaultReference.Builder() + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleValueId") .build()) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .build()) @@ -611,7 +609,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example Capability object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Capability Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Capabilities/ExampleCapability") @@ -628,7 +626,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example BasicEvent object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel BasicEvent Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Events/ExampleBasicEvent") @@ -659,14 +657,14 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example ExampleSubmodelElementListOrdered object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel ExampleSubmodelElementListOrdered Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelElementLists/ExampleSubmodelElementListOrdered") .build()) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) - .typeValueListElement(AASSubmodelElements.SUBMODEL_ELEMENT) + .typeValueListElement(AasSubmodelElements.SUBMODEL_ELEMENT) .value(new DefaultProperty.Builder() .idShort("ExampleProperty") .category("CONSTANT") @@ -674,7 +672,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -682,14 +680,14 @@ public static Submodel createSubmodel3() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value("http://acplt.org/ValueId/ExampleValueId") - .valueID(new DefaultReference.Builder() + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleValueId") .build()) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value(new DefaultMultiLanguageProperty.Builder() .idShort("ExampleMultiLanguageProperty") @@ -698,7 +696,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example value of a MultiLanguageProperty element").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispielswert für ein MultiLanguageProperty-Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty") @@ -709,7 +707,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example MultiLanguageProperty object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel MultiLanguageProperty Element").language("de").build() )) - .valueID(new DefaultReference.Builder() + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleMultiLanguageValueId") @@ -717,14 +715,14 @@ public static Submodel createSubmodel3() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .build()) - .value(new DefaultRange.Builder() // TODO: a SME-List must only contain one SME-Type, e.g. Property or Range + .value(new DefaultRange.Builder() .idShort("ExampleRange") .category("PARAMETER") .description(Arrays.asList( new DefaultLangStringTextType.Builder().text("Example Range object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Range Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Ranges/ExampleRange") @@ -733,9 +731,8 @@ public static Submodel createSubmodel3() { .build()) .min("0") .max("100") - .valueType(DataTypeDefXSD.INT) + .valueType(DataTypeDefXsd.INT) .build()) - .typeValueListElement(AASSubmodelElements.SUBMODEL_ELEMENT) .build()) .submodelElements(new DefaultSubmodelElementCollection.Builder() .idShort("ExampleSubmodelElementCollection") @@ -744,7 +741,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example SubmodelElementCollection object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel SubmodelElementCollection Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollection") @@ -758,7 +755,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example Blob object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Blob Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder().type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Blobs/ExampleBlob") .build()) @@ -774,7 +771,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example File object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel File Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Files/ExampleFile") @@ -791,7 +788,7 @@ public static Submodel createSubmodel3() { new DefaultLangStringTextType.Builder().text("Example Reference Element object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Reference Element Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE).value( "http://acplt.org/ReferenceElements/ExampleReferenceElement") @@ -918,11 +915,11 @@ public static Submodel createSubmodel4() { .submodelElements(new DefaultSubmodelElementList.Builder() .idShort("ExampleSubmodelElementListUnordered") .orderRelevant(false) - .typeValueListElement(AASSubmodelElements.SUBMODEL_ELEMENT) + .typeValueListElement(AasSubmodelElements.SUBMODEL_ELEMENT) .value(new DefaultProperty.Builder() .idShort("ExampleProperty") .value(null) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value(new DefaultMultiLanguageProperty.Builder() .idShort("ExampleMultiLanguageProperty") @@ -931,9 +928,8 @@ public static Submodel createSubmodel4() { .idShort("ExampleRange") .min(null) .max(null) - .valueType(DataTypeDefXSD.INT) + .valueType(DataTypeDefXsd.INT) .build()) - .typeValueListElement(AASSubmodelElements.SUBMODEL_ELEMENT) .build()) .submodelElements(new DefaultSubmodelElementCollection.Builder() .idShort("ExampleSubmodelElementCollection") @@ -975,9 +971,8 @@ public static Submodel createSubmodel6() { .kind(ModellingKind.INSTANCE) .administration(new DefaultAdministrativeInformation.Builder() .version("0") - .revision("9") - .build()) - .semanticID(new DefaultReference.Builder() + .revision("9").build()) + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelTemplates/ExampleSubmodel") @@ -991,7 +986,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example RelationshipElement object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel RelationshipElement Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/RelationshipElements/ExampleRelationshipElement") @@ -1036,7 +1031,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example AnnotatedRelationshipElement object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel AnnotatedRelationshipElement Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement") @@ -1077,7 +1072,7 @@ public static Submodel createSubmodel6() { .idShort("ExampleProperty") .category("PARAMETER") .value("some example annotation") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .submodelElements(new DefaultOperation.Builder() @@ -1087,7 +1082,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Operation object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Operation Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Operations/ExampleOperation") @@ -1102,7 +1097,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -1111,10 +1106,10 @@ public static Submodel createSubmodel6() { .build()) .qualifiers(new DefaultQualifier.Builder() .type("http://acplt.org/Qualifier/ExampleQualifier") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value("exampleValue") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .outputVariables(new DefaultOperationVariable.Builder() @@ -1125,7 +1120,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -1134,10 +1129,10 @@ public static Submodel createSubmodel6() { .build()) .qualifiers(new DefaultQualifier.Builder() .type("http://acplt.org/Qualifier/ExampleQualifier") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value("exampleValue") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .inoutputVariables(new DefaultOperationVariable.Builder() @@ -1148,7 +1143,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -1157,10 +1152,10 @@ public static Submodel createSubmodel6() { .build()) .qualifiers(new DefaultQualifier.Builder() .type("http://acplt.org/Qualifier/ExampleQualifier") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value("exampleValue") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .build()) @@ -1171,7 +1166,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Capability object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Capability Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Capabilities/ExampleCapability") @@ -1188,7 +1183,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example BasicEvent object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel BasicEvent Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Events/ExampleBasicEvent") @@ -1215,12 +1210,12 @@ public static Submodel createSubmodel6() { .idShort("ExampleSubmodelElementListOrdered") .category("PARAMETER") .orderRelevant(true) - .typeValueListElement(AASSubmodelElements.SUBMODEL_ELEMENT) + .typeValueListElement(AasSubmodelElements.SUBMODEL_ELEMENT) .description(Arrays.asList( new DefaultLangStringTextType.Builder().text("Example SubmodelElementListOrdered object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel SubmodelElementListOrdered Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelElementLists/ExampleSubmodelElementListOrdered") @@ -1234,7 +1229,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -1243,10 +1238,10 @@ public static Submodel createSubmodel6() { .build()) .qualifiers(new DefaultQualifier.Builder() .type("http://acplt.org/Qualifier/ExampleQualifier") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value("exampleValue") - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value(new DefaultMultiLanguageProperty.Builder() .idShort("ExampleMultiLanguageProperty") @@ -1255,7 +1250,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example value of a MultiLanguageProperty element").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispielswert für ein MultiLanguageProperty-Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty") @@ -1274,7 +1269,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Range object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Range Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Ranges/ExampleRange") @@ -1283,9 +1278,8 @@ public static Submodel createSubmodel6() { .build()) .min("0") .max("100") - .valueType(DataTypeDefXSD.INT) + .valueType(DataTypeDefXsd.INT) .build()) - .typeValueListElement(AASSubmodelElements.SUBMODEL_ELEMENT) .build()) .submodelElements(new DefaultSubmodelElementCollection.Builder() .idShort("ExampleSubmodelElementCollection") @@ -1294,7 +1288,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example SubmodelElementCollection object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel SubmodelElementCollection Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollection") @@ -1308,7 +1302,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Blob object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Blob Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Blobs/ExampleBlob") @@ -1325,7 +1319,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example File object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel File Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Files/ExampleFile") @@ -1342,7 +1336,7 @@ public static Submodel createSubmodel6() { new DefaultLangStringTextType.Builder().text("Example Reference Element object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Reference Element Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ReferenceElements/ExampleReferenceElement") @@ -1382,7 +1376,7 @@ public static Submodel createSubmodel7() { .version("0") .revision("9") .build()) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelTemplates/ExampleSubmodel") @@ -1397,7 +1391,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example RelationshipElement object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel RelationshipElement Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/RelationshipElements/ExampleRelationshipElement") @@ -1442,7 +1436,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example AnnotatedRelationshipElement object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel AnnotatedRelationshipElement Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement") @@ -1487,7 +1481,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Operation object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Operation Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Operations/ExampleOperation") @@ -1502,7 +1496,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -1510,7 +1504,7 @@ public static Submodel createSubmodel7() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value(null) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .outputVariables(new DefaultOperationVariable.Builder() @@ -1521,7 +1515,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -1529,7 +1523,7 @@ public static Submodel createSubmodel7() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value(null) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .inoutputVariables(new DefaultOperationVariable.Builder() @@ -1540,7 +1534,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -1548,7 +1542,7 @@ public static Submodel createSubmodel7() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value(null) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .build()) .build()) @@ -1559,7 +1553,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Capability object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Capability Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Capabilities/ExampleCapability") @@ -1576,7 +1570,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example BasicEvent object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel BasicEvent Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Events/ExampleBasicEvent") @@ -1607,14 +1601,14 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example SubmodelElementListOrdered object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel SubmodelElementListOrdered Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelElementLists/ExampleSubmodelElementListOrdered") .build()) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) - .typeValueListElement(AASSubmodelElements.SUBMODEL_ELEMENT) + .typeValueListElement(AasSubmodelElements.SUBMODEL_ELEMENT) .value(new DefaultProperty.Builder() .idShort("ExampleProperty") .category("CONSTANT") @@ -1622,7 +1616,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Property object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Property Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Properties/ExampleProperty") @@ -1630,7 +1624,7 @@ public static Submodel createSubmodel7() { .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .value(null) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value(new DefaultMultiLanguageProperty.Builder() .idShort("ExampleMultiLanguageProperty") @@ -1639,7 +1633,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example MultiLanguageProperty object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel MultiLanguageProperty Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE).value( "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty") @@ -1654,7 +1648,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Range object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Range Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Ranges/ExampleRange") @@ -1663,7 +1657,7 @@ public static Submodel createSubmodel7() { .build()) .min(null) .max("100") - .valueType(DataTypeDefXSD.INT) + .valueType(DataTypeDefXsd.INT) .build()) .value(new DefaultRange.Builder() .idShort("ExampleRange2") @@ -1672,7 +1666,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Range object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Range Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Ranges/ExampleRange") @@ -1681,9 +1675,8 @@ public static Submodel createSubmodel7() { .build()) .min("0") .max(null) - .valueType(DataTypeDefXSD.INT) + .valueType(DataTypeDefXsd.INT) .build()) - .typeValueListElement(AASSubmodelElements.SUBMODEL_ELEMENT) .build()) .submodelElements(new DefaultSubmodelElementCollection.Builder() .idShort("ExampleSubmodelElementCollection") @@ -1692,7 +1685,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example SubmodelElementCollection object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel SubmodelElementCollection Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollection") @@ -1706,7 +1699,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Blob object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Blob Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Blobs/ExampleBlob") @@ -1722,7 +1715,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example File object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel File Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Files/ExampleFile") @@ -1739,7 +1732,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example Reference Element object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel Reference Element Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ReferenceElements/ExampleReferenceElement") @@ -1755,7 +1748,7 @@ public static Submodel createSubmodel7() { new DefaultLangStringTextType.Builder().text("Example SubmodelElementCollection object").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Beispiel SubmodelElementCollection Element").language("de").build() )) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollection") @@ -1802,8 +1795,8 @@ public static ConceptDescription createConceptDescription3() { new DefaultLangStringTextType.Builder().text("An example concept description for the test application").language("en-us").build(), new DefaultLangStringTextType.Builder().text("Ein Beispiel-ConceptDescription für eine Test-Anwendung").language("de").build() )) - .category("PROPERTY") .id("https://acplt.org/Test_ConceptDescription_Missing") + .category("PROPERTY") .administration(new DefaultAdministrativeInformation.Builder() .version("0") .revision("9") @@ -1845,7 +1838,7 @@ public static ConceptDescription createConceptDescription4() { .shortName(new DefaultLangStringShortNameTypeIec61360.Builder().text("Test Spec").language("de").build()) .shortName(new DefaultLangStringShortNameTypeIec61360.Builder().text("TestSpec").language("en-us").build()) .unit("SpaceUnit") - .unitID(new DefaultReference.Builder() + .unitId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/Units/SpaceUnit") @@ -1856,10 +1849,11 @@ public static ConceptDescription createConceptDescription4() { .symbol("SU") .valueFormat("string") .value("TEST") + .levelType(new DefaultLevelType.Builder().max(true).build()) .valueList(new DefaultValueList.Builder() .valueReferencePairs(new DefaultValueReferencePair.Builder() .value("http://acplt.org/ValueId/ExampleValueId") - .valueID(new DefaultReference.Builder() + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleValueId") @@ -1869,7 +1863,7 @@ public static ConceptDescription createConceptDescription4() { .build()) .valueReferencePairs(new DefaultValueReferencePair.Builder() .value("http://acplt.org/ValueId/ExampleValueId2") - .valueID(new DefaultReference.Builder() + .valueId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("http://acplt.org/ValueId/ExampleValueId2") @@ -1906,4 +1900,4 @@ public static Environment createEnvironment() { .build(); } -} +} \ No newline at end of file diff --git a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/AASSimple.java b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/AASSimple.java index 73681dc8b..b93f676a1 100644 --- a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/AASSimple.java +++ b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/AASSimple.java @@ -15,15 +15,12 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core; -import java.util.List; - import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; import org.eclipse.digitaltwin.aas4j.v3.model.AssetKind; import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.Extension; import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; import org.eclipse.digitaltwin.aas4j.v3.model.ModellingKind; import org.eclipse.digitaltwin.aas4j.v3.model.ReferenceTypes; @@ -43,11 +40,11 @@ import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultResource; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSpecificAssetID; +import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSpecificAssetId; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodel; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodelElementCollection; -import org.junit.Assert; -import org.junit.Test; + +import java.util.Arrays; public class AASSimple { @@ -58,7 +55,7 @@ public class AASSimple { private static final String WWW_VDI2770_COM_BLATT1_ENTWURF_OKT18_CD_DOCUMENT = "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document"; private static final String ACTUAL_ROTATIONSPEED_WITH_WHICH_THE_MOTOR_OR_FEEDINGUNIT_IS_OPERATED = "Actual rotationspeed with which the motor or feedingunit is operated"; private static final String AKTUELLE_DREHZAHL_MITWELCHER_DER_MOTOR_ODER_DIE_SPEISEINHEIT_BETRIEBEN_WIRD = "Aktuelle Drehzahl, mitwelcher der Motor oder die Speiseinheit betrieben wird"; - private static final String ACTUAL_ROTATION_SPEED = "ActRotationSpeed"; + private static final String ACTUAL_ROTATION_SPEED = "ActualRotationSpeed"; private static final String ACTUALROTATIONSPEED = "Actualrotationspeed"; private static final String AKTUELLE_DREHZAHL = "AktuelleDrehzahl"; private static final String _1_MIN = "1/min"; @@ -80,8 +77,10 @@ public class AASSimple { private static final String TITEL = "Titel"; private static final String WWW_VDI2770_COM_BLATT1_ENTWURF_OKT18_CD_DESCRIPTION_TITLE = "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title"; private static final String TITLE = "Title"; + private static final String SERVO_DC_MOTOR = "ServoDCMotor"; private static final String FILE_MASTER_VERWALTUNGSSCHALE_DETAIL_PART1_PNG = "file:///master/verwaltungsschale-detail-part1.png"; private static final String IMAGE_PNG = "image/png"; + private static final String THUMBNAIL = "thumbnail"; private static final String HTTP_CUSTOMER_COM_SYSTEMS_IO_T_1 = "http://customer.com/Systems/IoT/1"; private static final String QJ_YG_PGGJWKI_HK4_RR_QI_YS_LG = "QjYgPggjwkiHk4RrQiYSLg=="; private static final String DEVICE_ID = "DeviceID"; @@ -111,6 +110,7 @@ public class AASSimple { private static final String SUBMODEL_DOCUMENTATION_PROPERTY_SEMANTIC_ID = WWW_VDI2770_COM_BLATT1_ENTWURF_OKT18_CD_DESCRIPTION_TITLE; private static final String SUBMODEL_DOCUMENTATION_PROPERTY_ID_SHORT = TITLE; private static final String SUBMODEL_DOCUMENTATION_PROPERTY_VALUE = "OperatingManual"; + private static final String SUBMODEL_DOCUMENTATION_PROPERTY_VALUETYPE = "langString"; private static final String SUBMODEL_DOCUMENTATION_FILE_SEMANTIC_ID = WWW_VDI2770_COM_BLATT1_ENTWURF_OKT18_CD_STORED_DOCUMENT_REPRESENTATION_DIGITAL_FILE; private static final String SUBMODEL_DOCUMENTATION_FILE_ID_SHORT = "DigitalFile_PDF"; private static final String SUBMODEL_DOCUMENTATION_FILE_contentType = "application/pdf"; @@ -123,7 +123,8 @@ public class AASSimple { private static final String SUBMODEL_OPERATIONAL_DATA_PROPERTY_ID_SHORT = ROTATION_SPEED; private static final String SUBMODEL_OPERATIONAL_DATA_PROPERTY_CATEGORY = "VARIABLE"; private static final String SUBMODEL_OPERATIONAL_DATA_PROPERTY_VALUE = "4370"; - public static final String AAS_3_0_RC_02_DATA_SPECIFICATION_IEC_61360 = "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360"; + private static final String SUBMODEL_OPERATIONAL_DATA_PROPERTY_VALUETYPE = "integer"; + public static final String AAS_3_0_RC_02_DATA_SPECIFICATION_IEC_61360 = "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360"; public AASSimple() { } @@ -137,6 +138,7 @@ public AASSimple() { public static final ConceptDescription CONCEPT_DESCRIPTION_MAXROTATIONSPEED = createConceptDescriptionMaxRotationSpeed(); public static final ConceptDescription CONCEPT_DESCRIPTION_ROTATIONSPEED = createConceptDescriptionRotationSpeed(); public static final ConceptDescription CONCEPT_DESCRIPTION_DOCUMENT = createConceptDescriptionDocument(); + public static final Environment ENVIRONMENT = createEnvironment(); public static AssetAdministrationShell createAAS() { return new DefaultAssetAdministrationShell.Builder() @@ -144,22 +146,22 @@ public static AssetAdministrationShell createAAS() { .id(AAS_IDENTIFIER) .assetInformation(new DefaultAssetInformation.Builder() .assetKind(AssetKind.INSTANCE) - .globalAssetID(HTTP_CUSTOMER_COM_ASSETS_KHBVZJSQKIY) - .specificAssetIds(new DefaultSpecificAssetID.Builder() + .globalAssetId(HTTP_CUSTOMER_COM_ASSETS_KHBVZJSQKIY) + .specificAssetIds(new DefaultSpecificAssetId.Builder() .name(EQUIPMENT_ID) .value(_538FD1B3_F99F_4A52_9C75_72E9FA921270) - .externalSubjectID(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() + .externalSubjectId(new DefaultReference.Builder() + .keys(Arrays.asList(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value(HTTP_CUSTOMER_COM_SYSTEMS_ERP_012) - .build()) + .build())) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) .build()) - .specificAssetIds(new DefaultSpecificAssetID.Builder() + .specificAssetIds(new DefaultSpecificAssetId.Builder() .name(DEVICE_ID) .value(QJ_YG_PGGJWKI_HK4_RR_QI_YS_LG) - .externalSubjectID(new DefaultReference.Builder() + .externalSubjectId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value(HTTP_CUSTOMER_COM_SYSTEMS_IO_T_1) @@ -198,19 +200,21 @@ public static AssetAdministrationShell createAAS() { .build(); } + public static Submodel createSubmodelTechnicalData() { return new DefaultSubmodel.Builder() - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value(SUBMODEL_TECHNICAL_DATA_SEMANTIC_ID) .build()) .type(ReferenceTypes.EXTERNAL_REFERENCE) .build()) + .kind(ModellingKind.INSTANCE) .idShort(SUBMODEL_TECHNICAL_DATA_ID_SHORT) .id(SUBMODEL_TECHNICAL_DATA_ID) .submodelElements(new DefaultProperty.Builder() - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.CONCEPT_DESCRIPTION) .value(SUBMODEL_TECHNICAL_DATA_SEMANTIC_ID_PROPERTY) @@ -220,7 +224,7 @@ public static Submodel createSubmodelTechnicalData() { .idShort(SUBMODEL_TECHNICAL_DATA_PROPERTY_ID_SHORT) .category(SUBMODEL_TECHNICAL_DATA_PROPERTY_CATEGORY) .value(SUBMODEL_TECHNICAL_DATA_PROPERTY_VALUE) - .valueType(DataTypeDefXSD.INTEGER) + .valueType(DataTypeDefXsd.INTEGER) .build()) .build(); } @@ -231,7 +235,7 @@ public static Submodel createSubmodelOperationalData() { .idShort(SUBMODEL_OPERATIONAL_DATA_ID_SHORT) .id(SUBMODEL_OPERATIONAL_DATA_ID) .submodelElements(new DefaultProperty.Builder() - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.CONCEPT_DESCRIPTION) .value(SUBMODEL_OPERATIONAL_DATA_SEMANTIC_ID_PROPERTY) @@ -241,7 +245,7 @@ public static Submodel createSubmodelOperationalData() { .idShort(SUBMODEL_OPERATIONAL_DATA_PROPERTY_ID_SHORT) .category(SUBMODEL_OPERATIONAL_DATA_PROPERTY_CATEGORY) .value(SUBMODEL_OPERATIONAL_DATA_PROPERTY_VALUE) - .valueType(DataTypeDefXSD.INTEGER) + .valueType(DataTypeDefXsd.INTEGER) .build()) .build(); } @@ -252,7 +256,7 @@ public static Submodel createSubmodelDocumentation() { .idShort(SUBMODEL_DOCUMENTATION_ID_SHORT) .id(SUBMODEL_DOCUMENTATION_ID) .submodelElements(new DefaultSubmodelElementCollection.Builder() - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.CONCEPT_DESCRIPTION) .value(SUBMODEL_DOCUMENTATION_ELEMENTCOLLECTION_SEMANTIC_ID) @@ -261,7 +265,7 @@ public static Submodel createSubmodelDocumentation() { .build()) .idShort(SUBMODEL_DOCUMENTATION_ELEMENTCOLLECTION_ID_SHORT) .value(new DefaultProperty.Builder() - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.CONCEPT_DESCRIPTION) .value(SUBMODEL_DOCUMENTATION_PROPERTY_SEMANTIC_ID) @@ -270,10 +274,10 @@ public static Submodel createSubmodelDocumentation() { .build()) .idShort(SUBMODEL_DOCUMENTATION_PROPERTY_ID_SHORT) .value(SUBMODEL_DOCUMENTATION_PROPERTY_VALUE) - .valueType(DataTypeDefXSD.STRING) + .valueType(DataTypeDefXsd.STRING) .build()) .value(new DefaultFile.Builder() - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.CONCEPT_DESCRIPTION) .value(SUBMODEL_DOCUMENTATION_FILE_SEMANTIC_ID) @@ -364,7 +368,7 @@ public static ConceptDescription createConceptDescriptionMaxRotationSpeed() { .preferredName(new DefaultLangStringPreferredNameTypeIec61360.Builder().text(MAX_DREHZAHL).language("de").build()) .preferredName(new DefaultLangStringPreferredNameTypeIec61360.Builder().text(MAX_ROTATIONSPEED).language("en").build()) .unit(_1_MIN) - .unitID(new DefaultReference.Builder() + .unitId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value(_0173_1_05_AAA650_002) @@ -401,7 +405,7 @@ public static ConceptDescription createConceptDescriptionRotationSpeed() { .shortName(new DefaultLangStringShortNameTypeIec61360.Builder().text(AKTUELLE_DREHZAHL).language("DE").build()) .shortName(new DefaultLangStringShortNameTypeIec61360.Builder().text(ACTUAL_ROTATION_SPEED).language("EN").build()) .unit(_1_MIN) - .unitID(new DefaultReference.Builder() + .unitId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value(_0173_1_05_AAA650_002) @@ -455,11 +459,4 @@ public static Environment createEnvironment() { .conceptDescriptions(createConceptDescriptionDocument()) .build(); } - - @Test - public void testAasSimpleExtensionsInitialized() { - List extensions = AASSimple.createEnvironment().getAssetAdministrationShells().get(0).getExtensions(); - Assert.assertTrue(extensions != null); - } - } diff --git a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/CustomProperty.java b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/CustomProperty.java index 40652ceb7..65a7029d4 100644 --- a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/CustomProperty.java +++ b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/CustomProperty.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +16,15 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.ModellingKind; +import org.eclipse.digitaltwin.aas4j.v3.model.Property; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; import java.util.Objects; @@ -35,7 +44,7 @@ public class CustomProperty implements Property { protected Reference valueId; - protected DataTypeDefXSD valueType; + protected DataTypeDefXsd valueType; protected List qualifiers; @@ -71,23 +80,27 @@ public boolean equals(Object obj) { return false; } else { CustomProperty other = (CustomProperty) obj; - return Objects.equals(this.valueType, other.valueType) && Objects.equals(this.value, other.value) - && Objects.equals(this.valueId, other.valueId) && Objects.equals(this.category, other.category) + return Objects.equals(this.valueType, other.valueType) + && Objects.equals(this.value, other.value) + && Objects.equals(this.valueId, other.valueId) + && Objects.equals(this.category, other.category) && Objects.equals(this.description, other.description) && Objects.equals(this.displayName, other.displayName) - && Objects.equals(this.idShort, other.idShort) && Objects.equals(this.qualifiers, other.qualifiers) + && Objects.equals(this.idShort, other.idShort) + && Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) - && Objects.equals(this.kind, other.kind) && Objects.equals(this.semanticId, other.semanticId); + && Objects.equals(this.kind, other.kind) + && Objects.equals(this.semanticId, other.semanticId); } } @Override - final public DataTypeDefXSD getValueType() { + final public DataTypeDefXsd getValueType() { return this.valueType; } @Override - final public void setValueType(DataTypeDefXSD dataType) { + final public void setValueType(DataTypeDefXsd dataType) { this.valueType = dataType; } @@ -102,12 +115,12 @@ final public void setValue(String value) { } @Override - final public Reference getValueID() { + final public Reference getValueId() { return valueId; } @Override - final public void setValueID(Reference valueId) { + final public void setValueId(Reference valueId) { this.valueId = valueId; } @@ -172,12 +185,12 @@ final public void setEmbeddedDataSpecifications(List } @Override - final public Reference getSemanticID() { + final public Reference getSemanticId() { return semanticId; } @Override - final public void setSemanticID(Reference semanticId) { + final public void setSemanticId(Reference semanticId) { this.semanticId = semanticId; } diff --git a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/EnumDeserializerTest.java b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/EnumDeserializerTest.java index 5908adfb9..93ddbd6cf 100644 --- a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/EnumDeserializerTest.java +++ b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/EnumDeserializerTest.java @@ -1,7 +1,23 @@ +/* + * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core; -import java.io.IOException; - +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer; import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.Direction; @@ -11,8 +27,7 @@ import org.junit.Test; import org.mockito.Mockito; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; +import java.io.IOException; public class EnumDeserializerTest { diff --git a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/EnumSerializerTest.java b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/EnumSerializerTest.java index 2fb858cc0..33cae0017 100644 --- a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/EnumSerializerTest.java +++ b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/EnumSerializerTest.java @@ -1,18 +1,34 @@ +/* + * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core; -import java.io.IOException; - +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.Direction; +import org.eclipse.digitaltwin.aas4j.v3.model.ModellingKind; import org.eclipse.digitaltwin.aas4j.v3.model.StateOfEvent; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; public class EnumSerializerTest { @@ -35,7 +51,7 @@ public void setUp() throws Exception { } @Test - public void whenSerializingEnum_usingDataTypeIEC61360_shouldReturnUpperCase() { + public void whenSerializingEnum_usingDataTypeIec61360_shouldReturnUpperCase() { assertSerialization(DataTypeIec61360.BOOLEAN, "BOOLEAN"); assertSerialization(DataTypeIec61360.DATE, "DATE"); assertSerialization(DataTypeIec61360.INTEGER_CURRENCY, "INTEGER_CURRENCY"); @@ -64,7 +80,13 @@ public void whenSerializingEnum_usingStateOfEvent_shouldReturnLowerCase() { assertSerialization(StateOfEvent.OFF, "off"); } - private void assertSerialization(Enum value, String expected) { + @Test + public void whenSerializingEnum_usingModelingKind_shouldReturnCamelCase() { + assertSerialization(ModellingKind.INSTANCE, "Instance"); + assertSerialization(ModellingKind.TEMPLATE, "Template"); + } + + private void assertSerialization(Enum value, String expected) { this.serializationOutput.setLength(0); try { this.enumSerializer.serialize(value, jsonGeneratorMock, serializerProviderMock); diff --git a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/Examples.java b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/Examples.java index 72261ada7..d8bc3ef3b 100644 --- a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/Examples.java +++ b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/Examples.java @@ -16,7 +16,7 @@ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core; import org.eclipse.digitaltwin.aas4j.v3.model.AssetKind; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Environment; import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; import org.eclipse.digitaltwin.aas4j.v3.model.ReferenceTypes; @@ -37,7 +37,7 @@ public class Examples { .build()) .assetInformation(new DefaultAssetInformation.Builder() .assetKind(AssetKind.NOT_APPLICABLE) - .globalAssetID("something_eea66fa1") + .globalAssetId("something_eea66fa1") .build()) .build()) .build(); @@ -48,7 +48,7 @@ public class Examples { .extensions(new DefaultExtension.Builder() .name("something_aae6caf4") .value("10233") - .valueType(DataTypeDefXSD.UNSIGNED_SHORT) + .valueType(DataTypeDefXsd.UNSIGNED_SHORT) .refersTo(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.SUBMODEL) @@ -56,7 +56,7 @@ public class Examples { .build()) .type(ReferenceTypes.MODEL_REFERENCE) .build()) - .semanticID(new DefaultReference.Builder() + .semanticId(new DefaultReference.Builder() .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) .value("urn:another-company07:4d1bd2cb") @@ -73,7 +73,7 @@ public class Examples { .build()) .assetInformation(new DefaultAssetInformation.Builder() .assetKind(AssetKind.NOT_APPLICABLE) - .globalAssetID("something_eea66fa1") + .globalAssetId("something_eea66fa1") .build()) .build()) .build(); diff --git a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/AasUtilsTest.java b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/AasUtilsTest.java index adcb53463..1659d2e5b 100644 --- a/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/AasUtilsTest.java +++ b/dataformat-core/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/AasUtilsTest.java @@ -15,9 +15,7 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - +import junitparams.JUnitParamsRunner; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASFull; import org.eclipse.digitaltwin.aas4j.v3.model.Environment; import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; @@ -37,7 +35,8 @@ import org.junit.Test; import org.junit.runner.RunWith; -import junitparams.JUnitParamsRunner; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; @RunWith(JUnitParamsRunner.class) public class AasUtilsTest { diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializer.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializer.java index 6b35c1454..bfefb16e2 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializer.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializer.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +16,20 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver; +import com.fasterxml.jackson.databind.module.SimpleModule; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.internal.ReflectionAnnotationIntrospector; +import org.eclipse.digitaltwin.aas4j.v3.model.Environment; +import org.eclipse.digitaltwin.aas4j.v3.model.Referable; + import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; @@ -26,20 +41,6 @@ import java.util.List; import java.util.stream.Collectors; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.internal.ReflectionAnnotationIntrospector; -import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.Referable; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver; -import com.fasterxml.jackson.databind.module.SimpleModule; /** * Class for deserializing/parsing AAS JSON documents. @@ -169,6 +170,7 @@ public Environment read(java.io.File file) throws FileNotFoundException, Deseria return read(file, DEFAULT_CHARSET); } + /** * Enables usage of custom implementation to be used for deserialization instead of default implementation, e.g. * defining a custom implementation of the Submodel interface {@code class @@ -374,4 +376,5 @@ public List readReferables(File src, Class outputCla public List readReferables(File src, Charset charset, Class outputClass) throws DeserializationException, FileNotFoundException { return readReferables(new FileInputStream(src), charset, outputClass); } -} + +} \ No newline at end of file diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializer.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializer.java index 750d83c8e..f370de8c0 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializer.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializer.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,34 +16,34 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.Collection; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.internal.ReflectionAnnotationIntrospector; -import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.Referable; - import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.json.JsonMapper; import com.fasterxml.jackson.databind.module.SimpleModule; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.internal.ReflectionAnnotationIntrospector; +import org.eclipse.digitaltwin.aas4j.v3.model.Environment; +import org.eclipse.digitaltwin.aas4j.v3.model.Referable; + import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; -import java.util.Objects; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.Collection; +import java.util.List; /** - * Class for serializing an instance of AssetAdministrationShellEnvironment or Referables to JSON. + * Class for serializing an instance of AssetAdministrationShellEnvironment or Referables to + * JSON. */ public class JsonSerializer { @@ -59,11 +60,17 @@ protected void buildMapper() { .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) .serializationInclusion(JsonInclude.Include.NON_NULL) .addModule(buildEnumModule()) + .addModule(buildCustomSerializerModule()) .annotationIntrospector(new ReflectionAnnotationIntrospector()) .build(); ReflectionHelper.JSON_MIXINS.entrySet().forEach(x -> mapper.addMixIn(x.getKey(), x.getValue())); } + protected SimpleModule buildCustomSerializerModule() { + SimpleModule module = new SimpleModule(); + return module; + } + protected SimpleModule buildEnumModule() { SimpleModule module = new SimpleModule(); module.addSerializer(Enum.class, new EnumSerializer()); @@ -214,4 +221,28 @@ public JsonNode toNode(Collection referables) { } return mapper.valueToTree(referables); } + + public String writeReferable(Referable referable) throws SerializationException { + try { + return mapper.writeValueAsString(mapper.valueToTree(referable)); + } catch (JsonProcessingException ex) { + throw new SerializationException("error serializing Referable", ex); + } + } + + public String writeReferables(List referables) throws SerializationException { + if(referables.isEmpty()){ + return "[]"; + } + + try { + ObjectWriter objectWriter = mapper.writerFor(mapper.getTypeFactory().constructCollectionType(List.class, referables.get(0).getClass())); + String json = objectWriter.writeValueAsString(referables); + + return mapper.writeValueAsString(this.mapper.readTree(json)); + + } catch (JsonProcessingException ex) { + throw new SerializationException("error serializing list of Referables", ex); + } + } } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/internal/ReflectionAnnotationIntrospector.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/internal/ReflectionAnnotationIntrospector.java index 7aa2d6560..a461709b8 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/internal/ReflectionAnnotationIntrospector.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/internal/ReflectionAnnotationIntrospector.java @@ -26,6 +26,7 @@ import com.fasterxml.jackson.databind.jsontype.NamedType; import com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; + import java.util.Collection; import java.util.List; import java.util.stream.Collectors; diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AnnotatedRelationshipElementMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AnnotatedRelationshipElementMixin.java index 59f49b8de..434115819 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AnnotatedRelationshipElementMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AnnotatedRelationshipElementMixin.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.eclipse.digitaltwin.aas4j.v3.model.DataElement; + import java.util.List; public interface AnnotatedRelationshipElementMixin { diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AssetAdministrationShellMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AssetAdministrationShellMixin.java index 9d5e8c215..01f4f53a1 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AssetAdministrationShellMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AssetAdministrationShellMixin.java @@ -16,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json.mixins; import com.fasterxml.jackson.annotation.JsonInclude; - import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; public interface AssetAdministrationShellMixin { diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AssetInformationMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AssetInformationMixin.java index 1e88c6d7f..810b7232c 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AssetInformationMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/AssetInformationMixin.java @@ -17,7 +17,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; - import org.eclipse.digitaltwin.aas4j.v3.model.AssetKind; public interface AssetInformationMixin { @@ -26,8 +25,8 @@ public interface AssetInformationMixin { public AssetKind getAssetKind(); @JsonProperty("globalAssetId") - public String getGlobalAssetID(); + public String getGlobalAssetId(); @JsonProperty("globalAssetId") - public void setGlobalAssetID(String globalAssetID); + public void setGlobalAssetId(String globalAssetId); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/ConceptDescriptionMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/ConceptDescriptionMixin.java index f5aadcd1b..3b31ea790 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/ConceptDescriptionMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/ConceptDescriptionMixin.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; + import java.util.List; public interface ConceptDescriptionMixin { @@ -25,5 +26,5 @@ public interface ConceptDescriptionMixin { public List getIsCaseOf(); @JsonProperty("isCaseOf") - public void setIsCaseOfs(List isCaseOf); + public void setIsCaseOf(List isCaseOf); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/DataSpecificationIec61360Mixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/DataSpecificationIec61360Mixin.java index 88ec3908d..2d3281b2c 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/DataSpecificationIec61360Mixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/DataSpecificationIec61360Mixin.java @@ -17,11 +17,11 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringPreferredNameTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.LevelType; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import org.eclipse.digitaltwin.aas4j.v3.model.LangStringPreferredNameTypeIec61360; public interface DataSpecificationIec61360Mixin { @@ -39,8 +39,8 @@ public interface DataSpecificationIec61360Mixin { public void setPreferredName(List preferredName); @JsonProperty("unitId") - public Reference getUnitID(); + public Reference getUnitId(); - public @JsonProperty("unitId") - void setUnitID(Reference unitID); + @JsonProperty("unitId") + public void setUnitId(Reference unitId); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/EntityMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/EntityMixin.java index c6d9a89ef..edc862bf9 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/EntityMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/EntityMixin.java @@ -25,8 +25,8 @@ public interface EntityMixin { public EntityType getEntityType(); @JsonProperty("globalAssetId") - public String getGlobalAssetID(); + public String getGlobalAssetId(); @JsonProperty("globalAssetId") - public void setGlobalAssetID(String globalAssetID); + public void setGlobalAssetId(String globalAssetId); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/EnvironmentMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/EnvironmentMixin.java index 878589f67..c4aacb2c8 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/EnvironmentMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/EnvironmentMixin.java @@ -15,15 +15,14 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json.mixins; -import java.util.List; -import java.util.Set; - import com.fasterxml.jackson.annotation.JsonInclude; - import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; +import java.util.List; +import java.util.Set; + public interface EnvironmentMixin { @JsonInclude(JsonInclude.Include.NON_EMPTY) diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/HasSemanticsMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/HasSemanticsMixin.java index 6398cc152..574e3e035 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/HasSemanticsMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/HasSemanticsMixin.java @@ -20,8 +20,8 @@ public interface HasSemanticsMixin { @JsonProperty("semanticId") - public Reference getSemanticID(); + public Reference getSemanticId(); - @JsonProperty("semanticId") - public void setSemanticID(Reference semanticID); + @JsonProperty("semanticId") + public void setSemanticId(Reference semanticId); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/MultiLanguagePropertyMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/MultiLanguagePropertyMixin.java index cacb010eb..50f7c3383 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/MultiLanguagePropertyMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/MultiLanguagePropertyMixin.java @@ -17,9 +17,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; public interface MultiLanguagePropertyMixin { @@ -30,8 +30,8 @@ public interface MultiLanguagePropertyMixin { public void setValue(LangStringTextType value); @JsonProperty("valueId") - public Reference getValueID(); + public Reference getValueId(); @JsonProperty("valueId") - public void setValueID(Reference valueID); + public void setValueId(Reference valueId); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/OperationMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/OperationMixin.java index 26aefde1d..ffb0316f7 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/OperationMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/OperationMixin.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; + import java.util.List; public interface OperationMixin { diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/PropertyMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/PropertyMixin.java index 7321e805f..328276991 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/PropertyMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/PropertyMixin.java @@ -21,8 +21,8 @@ public interface PropertyMixin { @JsonProperty("valueId") - public Reference getValueID(); + public Reference getValueId(); @JsonProperty("valueId") - void setValueID(Reference valueID); + public void setValueId(Reference valueId); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/QualifierMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/QualifierMixin.java index 6cdd8c2a3..3e1efbdef 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/QualifierMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/QualifierMixin.java @@ -25,8 +25,8 @@ public interface QualifierMixin { public String getType(); @JsonProperty("valueId") - public Reference getValueID(); + public Reference getValueId(); @JsonProperty("valueId") - void setValueID(Reference valueID); + public void setValueId(Reference valueId); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SpecificAssetIDMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SpecificAssetIdMixin.java similarity index 83% rename from dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SpecificAssetIDMixin.java rename to dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SpecificAssetIdMixin.java index a6a59f46f..ae379d373 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SpecificAssetIDMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SpecificAssetIdMixin.java @@ -18,11 +18,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -public interface SpecificAssetIDMixin { +public interface SpecificAssetIdMixin { @JsonProperty("externalSubjectId") - public Reference getExternalSubjectID(); + public Reference getExternalSubjectId(); @JsonProperty("externalSubjectId") - public void setExternalSubjectID(Reference reference); + public void setExternalSubjectId(Reference reference); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelElementCollectionMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelElementCollectionMixin.java index 95cfa1469..f56304f81 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelElementCollectionMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelElementCollectionMixin.java @@ -17,13 +17,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; + import java.util.Collection; public interface SubmodelElementCollectionMixin { @JsonProperty("value") - public Collection getValues(); + public Collection getValue(); @JsonProperty("value") - public void setValues(Collection values); + public void setValue(Collection values); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelElementListMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelElementListMixin.java index e420e8e53..7f3492674 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelElementListMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelElementListMixin.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +18,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import org.eclipse.digitaltwin.aas4j.v3.model.AasSubmodelElements; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import java.util.Collection; -import org.eclipse.digitaltwin.aas4j.v3.model.AASSubmodelElements; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; public interface SubmodelElementListMixin { @@ -41,20 +42,20 @@ public interface SubmodelElementListMixin { public void setSemanticIdListElement(Reference semanticIdListElement); @JsonProperty("typeValueListElement") - public AASSubmodelElements getTypeValueListElement(); + public AasSubmodelElements getTypeValueListElement(); @JsonProperty("typeValueListElement") - public void setTypeValueListElement(AASSubmodelElements typeValueListElement); + public void setTypeValueListElement(AasSubmodelElements typeValueListElement); @JsonProperty("valueTypeListElement") - public DataTypeDefXSD getValueTypeListElement(); + public DataTypeDefXsd getValueTypeListElement(); @JsonProperty("valueTypeListElement") - public void setValueTypeListElement(DataTypeDefXSD valueTypeListElement); + public void setValueTypeListElement(DataTypeDefXsd valueTypeListElement); @JsonProperty("value") - public Collection getValues(); + public Collection getValue(); @JsonProperty("value") - public void setValues(Collection values); -} + public void setValue(Collection value); +} \ No newline at end of file diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/HasExtensionsMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelMixin.java similarity index 52% rename from dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/HasExtensionsMixin.java rename to dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelMixin.java index 73ee6b923..1d8f7a03c 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/HasExtensionsMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/SubmodelMixin.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,17 +16,28 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json.mixins; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; + import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; +public interface SubmodelMixin { + @JsonProperty("idShort") + public String getIdShort(); + + @JsonProperty("idShort") + public void setIdShort(String idShort); -import org.eclipse.digitaltwin.aas4j.v3.model.Extension; + @JsonProperty("description") + public List getDescription(); -public interface HasExtensionsMixin { + @JsonProperty("description") + public void setDescription(List description); - @JsonProperty("extensions") - public List getExtensions(); + @JsonProperty("displayName") + public List getDisplayName(); - @JsonProperty("extensions") - public void setExtensions(List extensions); + @JsonProperty("displayName") + public void setDisplayName(List displayName); } diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/ValueReferencePairMixin.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/ValueReferencePairMixin.java index 163467672..8a8b08338 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/ValueReferencePairMixin.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/mixins/ValueReferencePairMixin.java @@ -21,8 +21,8 @@ public interface ValueReferencePairMixin { @JsonProperty("valueId") - public Reference getValueID(); + public Reference getValueId(); @JsonProperty("valueId") - public void setValueID(Reference valueID); + public void setValueId(Reference valueId); } diff --git a/dataformat-json/src/main/resources/aas.json b/dataformat-json/src/main/resources/aas.json index 496811106..2fe18a193 100644 --- a/dataformat-json/src/main/resources/aas.json +++ b/dataformat-json/src/main/resources/aas.json @@ -879,7 +879,7 @@ { "properties": { "text": { - "maxLength": 18 + "maxLength": 64 } } } diff --git a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializerTest.java b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializerTest.java index 6fe6d1140..b4f819499 100644 --- a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializerTest.java +++ b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializerTest.java @@ -17,8 +17,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import static org.junit.Assert.assertEquals; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASSimple; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomSubmodel; @@ -32,6 +30,8 @@ import org.junit.Assert; import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class JsonDeserializerTest { @Test diff --git a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableDeserializerTest.java b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableDeserializerTest.java index 363d9ada5..bb21cfec8 100644 --- a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableDeserializerTest.java +++ b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableDeserializerTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,29 +18,29 @@ import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.util.Collections; -import java.util.List; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.util.ExampleData; import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.util.Examples; import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; +import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; import org.eclipse.digitaltwin.aas4j.v3.model.Environment; import org.eclipse.digitaltwin.aas4j.v3.model.Property; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; import org.eclipse.digitaltwin.aas4j.v3.model.Referable; import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList; +import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; +import org.junit.Assert; +import org.junit.Ignore; import org.junit.Test; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.util.Examples; +import java.io.IOException; +import java.io.InputStream; +import java.util.Collections; +import java.util.List; -import org.junit.Assert; +import static org.junit.Assert.assertEquals; public class JsonReferableDeserializerTest { @@ -108,6 +109,18 @@ public void testReadEmptyReferableList() throws DeserializationException { assertEquals(emptyList, deserialized); } + @Test + @Ignore("Physical Unit has been removed from the V3.0 metamodel. Might be added later again.") + public void testDeserializeConceptDescriptionWithPhysicalUnit() throws IOException, DeserializationException { + ExampleData exampleData = Examples.CONCEPT_DESCRIPTION_DATA_SPECIFICATION_PHYSICAL_UNIT; + Object expected = exampleData.getModel(); + try (InputStream fileContent = exampleData.fileContentStream()) { + Object actual = new JsonDeserializer().readReferable(fileContent, (Class) exampleData.getModel().getClass()); + Assert.assertEquals(expected, actual); + } + } + + @Test public void testPropertyFromNode() throws Exception { Property expected = new DefaultProperty.Builder() diff --git a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableSerializerTest.java b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableSerializerTest.java index 643677f4a..1ff5d1114 100644 --- a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableSerializerTest.java +++ b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableSerializerTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (C) 2023 SAP SE or an SAP affiliate company. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +16,21 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; -import java.io.IOException; -import java.util.Collection; - +import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.util.ExampleData; import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.util.Examples; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Environment; import org.eclipse.digitaltwin.aas4j.v3.model.Property; import org.eclipse.digitaltwin.aas4j.v3.model.Referable; +import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; +import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultExtension; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; import org.json.JSONException; import org.junit.Assert; @@ -35,6 +39,9 @@ import org.skyscreamer.jsonassert.JSONAssert; import org.skyscreamer.jsonassert.JSONCompareMode; +import java.io.IOException; +import java.util.Collection; + public class JsonReferableSerializerTest { @Test @@ -63,6 +70,17 @@ public void testSerializeSubmodel() throws IOException, SerializationException, compare(Examples.SUBMODEL); } + @Test + public void testSerializeSubmodelWithExtensions() throws DeserializationException, SerializationException, JsonProcessingException { + Submodel submodel = new JsonDeserializer().readReferable(Examples.SUBMODEL.fileContentStream(), Submodel.class); + submodel.getExtensions().add(new DefaultExtension.Builder() + .name("myExtension").value("my extension value").valueType(DataTypeDefXsd.STRING) + .build()); + JsonNode jsonNode = new ObjectMapper().readTree(new JsonSerializer().writeReferable(submodel)); + Assert.assertTrue(jsonNode.has("extensions")); + } + + @Test public void testSerializeSubmodelList() throws IOException, SerializationException, JSONException { compare(Examples.SUBMODEL_ELEMENT_LIST_OF); diff --git a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializerTest.java b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializerTest.java index 7b51487f1..bc4597532 100644 --- a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializerTest.java +++ b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializerTest.java @@ -15,15 +15,9 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.File; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Set; - +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASSimple; import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.util.ExampleData; @@ -39,9 +33,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.File; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class JsonSerializerTest { diff --git a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonValidationTest.java b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonValidationTest.java index ed0e9b08e..150dc793d 100644 --- a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonValidationTest.java +++ b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonValidationTest.java @@ -15,20 +15,19 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; -import static org.junit.Assert.assertTrue; +import junitparams.JUnitParamsRunner; +import junitparams.Parameters; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Set; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; - -import junitparams.JUnitParamsRunner; -import junitparams.Parameters; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; @RunWith(JUnitParamsRunner.class) public class JsonValidationTest { diff --git a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/ReflectionAnnotationIntrospectorTest.java b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/ReflectionAnnotationIntrospectorTest.java index a020dd4a9..7b659c9f8 100644 --- a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/ReflectionAnnotationIntrospectorTest.java +++ b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/ReflectionAnnotationIntrospectorTest.java @@ -15,23 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.List; -import java.util.Map; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomProperty; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomSubProperty; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomSubmodel; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomSubmodel2; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.internal.ReflectionAnnotationIntrospector; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.mixins.ReferenceMixin; -import org.junit.Before; -import org.junit.Test; - import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.AnnotatedClass; @@ -40,7 +23,12 @@ import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; import com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder; import com.fasterxml.jackson.databind.jsontype.impl.TypeNameIdResolver; - +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomSubProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomSubmodel; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.CustomSubmodel2; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.internal.ReflectionAnnotationIntrospector; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.mixins.ReferenceMixin; import org.eclipse.digitaltwin.aas4j.v3.model.ClassA; import org.eclipse.digitaltwin.aas4j.v3.model.ClassB; import org.eclipse.digitaltwin.aas4j.v3.model.DataElement; @@ -52,6 +40,16 @@ import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import org.eclipse.digitaltwin.aas4j.v3.model.TypedProperty; import org.eclipse.digitaltwin.aas4j.v3.model.TypedSubProperty; +import org.junit.Before; +import org.junit.Test; + +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; //review AAS-134: some basic, rather simple tests would be helpful to understand/document the cases for which the introspector is build for //also some javadoc could help diff --git a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/util/Examples.java b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/util/Examples.java index 6d35239d7..0f6a667c0 100644 --- a/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/util/Examples.java +++ b/dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/util/Examples.java @@ -1,5 +1,6 @@ /* * Copyright 2022 jab. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +16,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.json.util; -import java.util.List; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASFull; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASSimple; import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; @@ -37,9 +36,12 @@ import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultResource; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSpecificAssetID; +import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSpecificAssetId; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodelElementList; +import java.util.List; + + public class Examples { public static final ExampleData EXAMPLE_FULL = ExampleData.of(AASFull.createEnvironment(), "Example-Full.json"); @@ -58,11 +60,11 @@ public class Examples { .id("https://example.org/AssetAdministrationShell") .assetInformation(new DefaultAssetInformation.Builder() .assetKind(AssetKind.INSTANCE) - .globalAssetID("https://example.org/Asset") - .specificAssetIds(new DefaultSpecificAssetID.Builder() + .globalAssetId("https://example.org/Asset") + .specificAssetIds(new DefaultSpecificAssetId.Builder() .name("ExampleAssetId") .value("ExampleValue") - .externalSubjectID(new DefaultReference.Builder() + .externalSubjectId(new DefaultReference.Builder() .type(ReferenceTypes.EXTERNAL_REFERENCE) .keys(new DefaultKey.Builder() .type(KeyTypes.GLOBAL_REFERENCE) @@ -83,6 +85,7 @@ public class Examples { public static final ExampleData CONCEPT_DESCRIPTION_DATA_SPECIFICATION_PHYSICAL_UNIT = ExampleData.of( new DefaultConceptDescription.Builder() .id("https://example.org/ConceptDescription") + .category("PROPERTY") .embeddedDataSpecifications(new DefaultEmbeddedDataSpecification.Builder() .dataSpecification(new DefaultReference.Builder() .type(ReferenceTypes.EXTERNAL_REFERENCE) diff --git a/dataformat-json/src/test/resources/Example-Full.json b/dataformat-json/src/test/resources/Example-Full.json index d805d2c41..75c0cd989 100644 --- a/dataformat-json/src/test/resources/Example-Full.json +++ b/dataformat-json/src/test/resources/Example-Full.json @@ -215,7 +215,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360" } ], "type": "ExternalReference" @@ -235,6 +235,12 @@ ], "type": "ExternalReference" }, + "levelType": { + "max": true, + "min": false, + "nom": false, + "typ": false + }, "value": "TEST", "valueFormat": "string", "valueList": { @@ -346,12 +352,14 @@ { "type": "http://acplt.org/Qualifier/ExampleQualifier", "value": "100", - "valueType": "xs:int" + "valueType": "xs:int", + "kind": "ConceptQualifier" }, { "type": "http://acplt.org/Qualifier/ExampleQualifier2", "value": "50", - "valueType": "xs:int" + "valueType": "xs:int", + "kind": "ConceptQualifier" } ], "idShort": "ManufacturerName", @@ -1547,7 +1555,8 @@ "qualifiers": [ { "type": "http://acplt.org/Qualifier/ExampleQualifier", - "valueType": "xs:string" + "valueType": "xs:string", + "kind": "ConceptQualifier" } ], "category": "CONSTANT", @@ -1583,7 +1592,8 @@ "qualifiers": [ { "type": "http://acplt.org/Qualifier/ExampleQualifier", - "valueType": "xs:string" + "valueType": "xs:string", + "kind": "ConceptQualifier" } ], "category": "CONSTANT", @@ -1619,7 +1629,8 @@ "qualifiers": [ { "type": "http://acplt.org/Qualifier/ExampleQualifier", - "valueType": "xs:string" + "valueType": "xs:string", + "kind": "ConceptQualifier" } ], "category": "CONSTANT", @@ -1757,7 +1768,8 @@ "qualifiers": [ { "type": "http://acplt.org/Qualifier/ExampleQualifier", - "valueType": "xs:string" + "valueType": "xs:string", + "kind": "ConceptQualifier" } ], "category": "CONSTANT", diff --git a/dataformat-json/src/test/resources/Example-Simple.json b/dataformat-json/src/test/resources/Example-Simple.json index c6e66ec23..6b9f78c2d 100644 --- a/dataformat-json/src/test/resources/Example-Simple.json +++ b/dataformat-json/src/test/resources/Example-Simple.json @@ -84,7 +84,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360" } ], "type": "ExternalReference" @@ -135,7 +135,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360" } ], "type": "ExternalReference" @@ -186,7 +186,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360" } ], "type": "ExternalReference" @@ -247,7 +247,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360" } ], "type": "ExternalReference" @@ -295,7 +295,7 @@ }, { "language": "EN", - "text": "ActRotationSpeed" + "text": "ActualRotationSpeed" } ] } @@ -313,7 +313,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360" } ], "type": "ExternalReference" @@ -368,6 +368,7 @@ }, "id": "http://i40.customer.com/type/1/1/7A7104BDAB57E184", "idShort": "TechnicalData", + "kind": "Instance", "submodelElements": [ { "modelType": "Property", diff --git a/dataformat-json/src/test/resources/MotorAAS_reduced.json b/dataformat-json/src/test/resources/MotorAAS_reduced.json new file mode 100644 index 000000000..895605423 --- /dev/null +++ b/dataformat-json/src/test/resources/MotorAAS_reduced.json @@ -0,0 +1,262 @@ +{ + "assetAdministrationShells": [ + { + "modelType": "AssetAdministrationShell", + "idShort": "ExampleMotor", + "id": "http://customer.com/aas/9175_7013_7091_9168", + "assetInformation": { + "assetKind": "Instance", + "globalAssetId": { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "http://customer.com/assets/KHBVZJSQKIY" + } + ], + "type": "GlobalReference" + }, + "specificAssetIds": [ + { + "name": "EquipmentID", + "value": "538fd1b3-f99f-4a52-9c75-72e9fa921270", + "externalSubjectId": { + "keys": [ + { + "type": "GlobalReference", + "value": "http://customer.com/Systems/ERP/012" + } + ], + "type": "GlobalReference" + } + }, + { + "name": "DeviceID", + "value": "QjYgPggjwkiHk4RrQiYSLg==", + "externalSubjectId": { + "keys": [ + { + "type": "GlobalReference", + "value": "http://customer.com/Systems/IoT/1" + } + ], + "type": "GlobalReference" + } + } + ], + "thumbnail": { + "modelType": "File", + "kind": "Instance", + "idShort": "thumbnail", + "mimeType": "image/png", + "path": "https://github.com/admin-shell/io/blob/master/verwaltungsschale-detail-part1.png" + } + }, + "submodels": [ + { + "keys": [ + { + "type": "Submodel", + "value": "http.//i40.customer.com/type/1/1/7A7104BDAB57E184" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + "type": "Submodel", + "value": "http://i40.customer.com/instance/1/1/AC69B1CB44F07935" + } + ], + "type": "GlobalReference" + } + ] + } + ], + "submodels": [ + { + "modelType": "Submodel", + "semanticId": { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#01-AFZ615#016" + } + ], + "type": "GlobalReference" + }, + "kind": "Instance", + "idShort": "TechnicalData", + "id": "http://i40.customer.com/type/1/1/7A7104BDAB57E184", + "submodelElements": [ + { + "modelType": "Property", + "kind": "Instance", + "semanticId": { + "keys": [ + { + "type": "ConceptDescription", + "value": "0173-1#02-BAA120#008" + } + ], + "type": "GlobalReference" + }, + "idShort": "MaxRotationSpeed", + "category": "PARAMETER", + "value": "5000", + "valueType": "xs:integer" + } + ] + }, + { + "modelType": "Submodel", + "kind": "Instance", + "idShort": "OperationalData", + "id": "http://i40.customer.com/instance/1/1/AC69B1CB44F07935", + "submodelElements": [ + { + "modelType": "Property", + "kind": "Instance", + "semanticId": { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://customer.com/cd/1/1/18EBD56F6B43D895" + } + ], + "type": "GlobalReference" + }, + "idShort": "RotationSpeed", + "category": "Variable", + "value": "4370", + "valueType": "xs:integer" + } + ] + } + ], + "conceptDescriptions": [ + { + "modelType": "ConceptDescription", + "idShort": "MaxRotationSpeed", + "category": "PROPERTY", + "administration": { + "version": "0", + "revision": "2" + }, + "id": "0173-1#02-BAA120#008", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": { + "modelType": "DataSpecificationIEC61360", + "preferredName": [ + { + "language": "de", + "text": "max.Drehzahl" + }, + { + "language": "en", + "text": "Max.rotationspeed" + } + ], + "shortNames": [], + "unit": "1/min", + "unitId": { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#05-AAA650#002" + } + ], + "type": "GlobalReference" + }, + "sourceOfDefinition": "", + "dataType": "RealMeasure", + "definition": [ + { + "language": "de", + "text": "HöchstezulässigeDrehzahl,mitwelcherderMotoroderdieSpeiseinheitbetriebenwerdendarf" + }, + { + "language": "en", + "text": "Greatestpermissiblerotationspeedwithwhichthemotororfeedingunitmaybeoperated" + } + ] + } + } + ] + }, + { + "modelType": "ConceptDescription", + "idShort": "RotationSpeed", + "category": "PROPERTY", + "id": "http://customer.com/cd/1/1/18EBD56F6B43D895", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": { + "modelType": "DataSpecificationIEC61360", + "preferredName": [ + { + "language": "DE", + "text": "AktuelleDrehzahl" + }, + { + "language": "EN", + "text": "Actualrotationspeed" + } + ], + "shortNames": [ + { + "language": "DE", + "text": "AktuelleDrehzahl" + }, + { + "language": "EN", + "text": "ActualRotationSpeed" + } + ], + "unit": "1/min", + "unitId": { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#05-AAA650#002" + } + ], + "type": "GlobalReference" + }, + "sourceOfDefinition": "", + "dataType": "RealMeasure", + "definition": [ + { + "language": "DE", + "text": "Aktuelle Drehzahl, mitwelcher der Motor oder die Speiseinheit betrieben wird" + }, + { + "language": "EN", + "text": "Actual rotationspeed with which the motor or feedingunit is operated" + } + ] + } + } + ] + } + ] +} diff --git a/dataformat-json/src/test/resources/Submodel.json b/dataformat-json/src/test/resources/Submodel.json index c3751c085..c49924bd0 100644 --- a/dataformat-json/src/test/resources/Submodel.json +++ b/dataformat-json/src/test/resources/Submodel.json @@ -48,12 +48,14 @@ { "type": "http://acplt.org/Qualifier/ExampleQualifier", "value": "100", - "valueType": "xs:int" + "valueType": "xs:int", + "kind": "ConceptQualifier" }, { "type": "http://acplt.org/Qualifier/ExampleQualifier2", "value": "50", - "valueType": "xs:int" + "valueType": "xs:int", + "kind": "ConceptQualifier" } ], "idShort": "ManufacturerName", diff --git a/dataformat-json/src/test/resources/SubmodelElement-List.json b/dataformat-json/src/test/resources/SubmodelElement-List.json index 1227c8245..9c1f12dcb 100644 --- a/dataformat-json/src/test/resources/SubmodelElement-List.json +++ b/dataformat-json/src/test/resources/SubmodelElement-List.json @@ -33,12 +33,14 @@ { "type": "http://acplt.org/Qualifier/ExampleQualifier", "value": "100", - "valueType": "xs:int" + "valueType": "xs:int", + "kind": "ConceptQualifier" }, { "type": "http://acplt.org/Qualifier/ExampleQualifier2", "value": "50", - "valueType": "xs:int" + "valueType": "xs:int", + "kind": "ConceptQualifier" } ], "idShort": "ManufacturerName", diff --git a/dataformat-json/src/test/resources/SubmodelElement.json b/dataformat-json/src/test/resources/SubmodelElement.json index fb11778ca..18cb4c247 100644 --- a/dataformat-json/src/test/resources/SubmodelElement.json +++ b/dataformat-json/src/test/resources/SubmodelElement.json @@ -27,12 +27,14 @@ { "type": "http://acplt.org/Qualifier/ExampleQualifier", "value": "100", - "valueType": "xs:int" + "valueType": "xs:int", + "kind": "ConceptQualifier" }, { "type": "http://acplt.org/Qualifier/ExampleQualifier2", "value": "50", - "valueType": "xs:int" + "valueType": "xs:int", + "kind": "ConceptQualifier" } ], "idShort": "ManufacturerName", diff --git a/dataformat-json/src/test/resources/admin-shell-io/Extension/Minimal.json b/dataformat-json/src/test/resources/admin-shell-io/Extension/Minimal.json index 831658174..bac844f1b 100644 --- a/dataformat-json/src/test/resources/admin-shell-io/Extension/Minimal.json +++ b/dataformat-json/src/test/resources/admin-shell-io/Extension/Minimal.json @@ -7,7 +7,8 @@ }, "extensions": [ { - "name": "something_aae6caf4" + "name": "something_aae6caf4", + "valueType": "xs:string" } ], "id": "something_142922d6", diff --git a/dataformat-json/src/test/resources/assetAdministrationShellList.json b/dataformat-json/src/test/resources/assetAdministrationShellList.json new file mode 100644 index 000000000..d28d05007 --- /dev/null +++ b/dataformat-json/src/test/resources/assetAdministrationShellList.json @@ -0,0 +1,108 @@ +[ + { + "idShort": "TestAssetAdministrationShell", + "description": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ], + "modelType": "AssetAdministrationShell", + "id": "https://acplt.org/Test_AssetAdministrationShell", + "administration": { + "version": "0.9", + "revision": "0" + }, + "derivedFrom": { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "https://acplt.org/TestAssetAdministrationShell2" + } + ], + "type": "ExternalReference" + }, + "assetInformation": { + "assetKind": "Instance", + "globalAssetId": { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset" + } + ], + "type": "ExternalReference" + } + }, + "submodels": [ + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + } + ], + "type": "ExternalReference" + }, + { + "keys": [ + { + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" + } + ], + "type": "ExternalReference" + }, + { + "keys": [ + { + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/Identification" + } + ], + "type": "ExternalReference" + } + ] + }, + { + "idShort": "Test_AssetAdministrationShell_Mandatory", + "modelType": "AssetAdministrationShell", + "id": "https://acplt.org/Test_AssetAdministrationShell_Mandatory", + "assetInformation": { + "assetKind": "Instance", + "globalAssetId": { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset_Mandatory" + } + ], + "type": "ExternalReference" + } + }, + "submodels": [ + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + } + ], + "type": "ExternalReference" + }, + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel2_Mandatory" + } + ], + "type": "ExternalReference" + } + ] + } +] diff --git a/dataformat-json/src/test/resources/empty_aas.json b/dataformat-json/src/test/resources/empty_aas.json new file mode 100644 index 000000000..7a73a41bf --- /dev/null +++ b/dataformat-json/src/test/resources/empty_aas.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/dataformat-json/src/test/resources/invalidJsonExample.json b/dataformat-json/src/test/resources/invalidJsonExample.json new file mode 100644 index 000000000..e9474c928 --- /dev/null +++ b/dataformat-json/src/test/resources/invalidJsonExample.json @@ -0,0 +1,468 @@ +{ + "assetAdministrationShells": [ + { + "modelType": "AssetAdministrationShell", + "idShort": "ExampleMotor", + "id": "http://customer.com/aas/9175_7013_7091_9168", + "assetInformation": { + "assetKind": "Instance", + "globalAssetId": { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "http://customer.com/assets/KHBVZJSQKIY" + } + ], + "type": "GlobalReference" + }, + "specificAssetIds": [ + { + "name": "EquipmentID", + "value": "538fd1b3-f99f-4a52-9c75-72e9fa921270", + "externalSubjectId": { + "keys": [ + { + "type": "GlobalReference", + "value": "http://customer.com/Systems/ERP/012" + } + ], + "type": "GlobalReference" + } + }, + { + "name": "DeviceID", + "value": "QjYgPggjwkiHk4RrQiYSLg==", + "externalSubjectId": { + "keys": [ + { + "type": "GlobalReference", + "value": "http://customer.com/Systems/IoT/1" + } + ], + "type": "GlobalReference" + } + } + ], + "thumbnail": { + "modelType": "File", + "kind": "Instance", + "idShort": "thumbnail", + "contentType": "image/png", + "path": "https://github.com/admin-shell/io/blob/master/verwaltungsschale-detail-part1.png" + } + }, + "submodels": [ + { + "keys": [ + { + "type": "Submodel", + "value": "http.//i40.customer.com/type/1/1/7A7104BDAB57E184" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + "type": "Submodel", + "value": "http://i40.customer.com/instance/1/1/AC69B1CB44F07935" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + "type": "Submodel", + "value": "http://i40.customer.com/type/1/1/1A7B62B529F19152" + } + ], + "type": "GlobalReference" + } + ] + } + ], + "submodels": [ + { + "modelType": "Submodel", + "semanticId": { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#01-AFZ615#016" + } + ], + "type": "GlobalReference" + }, + "kind": "Instance", + "idShort": "TechnicalData", + "id": "http://i40.customer.com/type/1/1/7A7104BDAB57E184", + "submodelElements": [ + { + "modelType": "Property", + "kind": "Instance", + "semanticId": { + "keys": [ + { + "type": "ConceptDescription", + "value": "0173-1#02-BAA120#008" + } + ], + "type": "GlobalReference" + }, + "idShort": "MaxRotationSpeed", + "category": "PARAMETER", + "value": "5000", + "valueType": "xs:integer" + } + ] + }, + { + "modelType": "Submodel", + "kind": "Instance", + "idShort": "Documentation", + "id": "http://i40.customer.com/type/1/1/1A7B62B529F19152", + "submodelElements": [ + { + "modelType": "SubmodelElementCollection", + "kind": "Instance", + "semanticId": { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document" + } + ], + "type": "GlobalReference" + }, + "idShort": "OperatingManual", + "value": [ + { + "modelType": "Property", + "kind": "Instance", + "semanticId": { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title" + } + ] + }, + "idShort": "Title", + "value": "OperatingManual", + "valueType": "langString" + }, + { + "modelType": "File", + "kind": "Instance", + "semanticId": { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile" + } + ], + "type": "GlobalReference" + }, + "idShort": "DigitalFile_PDF", + "contentType": "application/pdf", + "value": "/aasx/OperatingManual.pdf" + } + ], + "ordered": false, + "allowDuplicates": false + } + ] + }, + { + "modelType": "Submodel", + "kind": "Instance", + "idShort": "OperationalData", + "id": "http://i40.customer.com/instance/1/1/AC69B1CB44F07935", + "submodelElements": [ + { + "modelType": "Property", + "kind": "Instance", + "semanticId": { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://customer.com/cd/1/1/18EBD56F6B43D895" + } + ], + "type": "GlobalReference" + }, + "idShort": "RotationSpeed", + "category": "Variable", + "value": "4370", + "valueType": "xs:integer" + } + ] + } + ], + "conceptDescriptions": [ + { + "modelType": "ConceptDescription", + "idShort": "Title", + "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": { + "modelType": "DataSpecificationIEC61360", + "preferredName": [ + { + "language": "EN", + "text": "Title" + }, + { + "language": "DE", + "text": "Titel" + } + ], + "shortNames": [ + { + "language": "EN", + "text": "Title" + }, + { + "language": "DE", + "text": "Titel" + } + ], + "unit": "", + "sourceOfDefinition": "", + "dataType": "StringTranslatable", + "definition": [ + { + "language": "DE", + "text": "SprachabhängigerTiteldesDokuments." + } + ] + } + } + ] + }, + { + "modelType": "ConceptDescription", + "idShort": "DigitalFile", + "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": { + "modelType": "DataSpecificationIEC61360", + "preferredName": [ + { + "language": "EN", + "text": "DigitalFile" + }, + { + "language": "DE", + "text": "DigitaleDatei" + } + ], + "shortNames": [ + { + "language": "EN", + "text": "DigitalFile" + }, + { + "language": "DE", + "text": "DigitaleDatei" + } + ], + "unit": "", + "sourceOfDefinition": "", + "dataType": "String", + "definition": [ + { + "language": "DE", + "text": "Eine Datei, die die Document Version repräsentiert. Neben der obligatorischen PDF Datei können weitere Dateien angegeben werden." + } + ] + } + } + ] + }, + { + "modelType": "ConceptDescription", + "idShort": "MaxRotationSpeed", + "category": "PROPERTY", + "administration": { + "version": "", + "revision": "2" + }, + "id": "0173-1#02-BAA120#008", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": { + "modelType": "DataSpecificationIEC61360", + "preferredName": [ + { + "language": "de", + "text": "max.Drehzahl" + }, + { + "language": "en", + "text": "Max.rotationspeed" + } + ], + "unit": "1/min", + "unitId": { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#05-AAA650#002" + } + ], + "type": "GlobalReference" + }, + "sourceOfDefinition": "", + "dataType": "RealMeasure", + "definition": [ + { + "language": "de", + "text": "HöchstezulässigeDrehzahl,mitwelcherderMotoroderdieSpeiseinheitbetriebenwerdendarf" + }, + { + "language": "en", + "text": "Greatestpermissiblerotationspeedwithwhichthemotororfeedingunitmaybeoperated" + } + ] + } + } + ] + }, + { + "modelType": "ConceptDescription", + "idShort": "RotationSpeed", + "category": "PROPERTY", + "id": "http://customer.com/cd/1/1/18EBD56F6B43D895", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": { + "modelType": "DataSpecificationIEC61360", + "preferredName": [ + { + "language": "DE", + "text": "AktuelleDrehzahl" + }, + { + "language": "EN", + "text": "Actualrotationspeed" + } + ], + "shortNames": [ + { + "language": "DE", + "text": "AktuelleDrehzahl" + }, + { + "language": "EN", + "text": "ActualRotationSpeed" + } + ], + "unit": "1/min", + "unitId": { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#05-AAA650#002" + } + ], + "type": "GlobalReference" + }, + "sourceOfDefinition": "", + "dataType": "RealMeasure", + "definition": [ + { + "language": "DE", + "text": "Aktuelle Drehzahl, mitwelcher der Motor oder die Speiseinheit betrieben wird" + }, + { + "language": "EN", + "text": "Actual rotationspeed with which the motor or feedingunit is operated" + } + ] + } + } + ] + }, + { + "idShort": "Document", + "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": { + "modelType": "DataSpecificationIEC61360", + "preferredName": [ + ], + "shortNames": [ + { + "language": "EN", + "text": "Document" + }, + { + "language": "DE", + "text": "Dokument" + } + ], + "unit": "", + "sourceOfDefinition": "[ISO15519-1:2010]", + "dataType": "String", + "definition": [ + { + "language": "DE", + "text": "Feste und geordnete Menge von für die Verwendung durch Personen bestimmte Informationen, die verwaltet und als Einheit zwischen Benutzern und System ausgetauscht werden kann." + } + ] + } + } + ] + } + ] +} diff --git a/dataformat-json/src/test/resources/jsonExample.json b/dataformat-json/src/test/resources/jsonExample.json new file mode 100644 index 000000000..41fefacbd --- /dev/null +++ b/dataformat-json/src/test/resources/jsonExample.json @@ -0,0 +1,493 @@ + +{ + "assetAdministrationShells": [ + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "http://customer.com/assets/KHBVZJSQKIY" + } + ], + "type": "GlobalReference" + }, + "specificAssetIds": [ + { + "name": "EquipmentID", + "value": "538fd1b3-f99f-4a52-9c75-72e9fa921270", + "externalSubjectId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://customer.com/Systems/ERP/012" + } + ], + "type": "GlobalReference" + } + }, + { + "name": "DeviceID", + "value": "QjYgPggjwkiHk4RrQiYSLg==", + "externalSubjectId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://customer.com/Systems/IoT/1" + } + ], + "type": "GlobalReference" + } + } + ], + "thumbnail": { + "contentType": "image/png", + "path": "file:///master/verwaltungsschale-detail-part1.png" + } + }, + "submodels": [ + { + "keys": [ + { + "type": "Submodel", + "value": "http://i40.customer.com/type/1/1/7A7104BDAB57E184" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + "type": "Submodel", + "value": "http://i40.customer.com/instance/1/1/AC69B1CB44F07935" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + "type": "Submodel", + "value": "http://i40.customer.com/type/1/1/1A7B62B529F19152" + } + ], + "type": "GlobalReference" + } + ], + "id": "http://customer.com/aas/9175_7013_7091_9168", + "idShort": "ExampleMotor" + } + ], + "conceptDescriptions": [ + { + "modelType": "ConceptDescription", + "category": "PROPERTY", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": + { + "modelType": "DataSpecificationIEC61360", + "dataType": "STRING_TRANSLATABLE", + "sourceOfDefinition": "ExampleString", + "unit": "ExampleString", + "definition": [ + { + "language": "EN", + "text": "SprachabhängigerTiteldesDokuments." + } + ], + "preferredName": [ + { + "language": "EN", + "text": "Title" + }, + { + "language": "DE", + "text": "Titel" + } + ], + "shortName": [ + { + "language": "EN", + "text": "Title" + }, + { + "language": "DE", + "text": "Titel" + } + ] + } + } + ], + "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title", + "idShort": "Title" + }, + { + "modelType": "ConceptDescription", + "category": "PROPERTY", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": + { + "modelType": "DataSpecificationIEC61360", + "dataType": "STRING", + "sourceOfDefinition": "ExampleString", + "unit": "ExampleString", + "definition": [ + { + "language": "EN", + "text": "A file representing the document version. In addition to the mandatory PDF file, other files can be specified." + } + ], + "preferredName": [ + { + "language": "EN", + "text": "DigitalFile" + }, + { + "language": "EN", + "text": "DigitalFile" + } + ], + "shortName": [ + { + "language": "EN", + "text": "DigitalFile" + }, + { + "language": "DE", + "text": "DigitaleDatei" + } + ] + } + } + ], + "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile", + "idShort": "DigitalFile" + }, + { + "modelType": "ConceptDescription", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": + { + "modelType": "DataSpecificationIEC61360", + "dataType": "REAL_MEASURE", + "sourceOfDefinition": "ExampleString", + "unit": "1/min", + "unitId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#05-AAA650#002" + } + ], + "type": "GlobalReference" + }, + "definition": [ + { + "language": "de", + "text": "HöchstezulässigeDrehzahl,mitwelcherderMotoroderdieSpeiseinheitbetriebenwerdendarf" + }, + { + "language": "EN", + "text": "Greatestpermissiblerotationspeedwithwhichthemotororfeedingunitmaybeoperated" + } + ], + "preferredName": [ + { + "language": "de", + "text": "max.Drehzahl" + }, + { + "language": "en", + "text": "Max.rotationspeed" + } + ] + } + } + ], + "administration": + { + "revision": "2.1", + "version": "2" + }, + "id": "0173-1#02-BAA120#008", + "category": "PROPERTY", + "idShort": "MaxRotationSpeed" + }, + { + "modelType": "ConceptDescription", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": + { + "modelType": "DataSpecificationIEC61360", + "dataType": "REAL_MEASURE", + "sourceOfDefinition": "ExampleString", + "unit": "1/min", + "unitId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#05-AAA650#002" + } + ], + "type": "GlobalReference" + }, + "definition": [ + { + "language": "DE", + "text": "Aktuelle Drehzahl, mitwelcher der Motor oder die Speiseinheit betrieben wird" + }, + { + "language": "EN", + "text": "Actual rotationspeed with which the motor or feedingunit is operated" + } + ], + "preferredName": [ + { + "language": "DE", + "text": "AktuelleDrehzahl" + }, + { + "language": "EN", + "text": "Actualrotationspeed" + } + ], + "shortName": [ + { + "language": "DE", + "text": "AktuelleDrehzahl" + }, + { + "language": "EN", + "text": "ActualRotationSpeed" + } + ] + } + } + ], + "id": "http://customer.com/cd/1/1/18EBD56F6B43D895", + "category": "PROPERTY", + "idShort": "RotationSpeed" + }, + { + "modelType": "ConceptDescription", + "category": "PROPERTY", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": + { + "modelType": "DataSpecificationIEC61360", + "dataType": "STRING", + "sourceOfDefinition": "[ISO15519-1:2010]", + "unit": "ExampleString", + "definition": [ + { + "language": "EN", + "text": "Feste und geordnete Menge von für die Verwendung durch Personen bestimmte Informationen, die verwaltet und als Einheit zwischen Benutzern und System ausgetauscht werden kann." + } + ], + "preferredName": [ + { + "language": "EN", + "text": "Document" + } + ], + "shortName": [ + { + "language": "EN", + "text": "Document" + }, + { + "language": "DE", + "text": "Dokument" + } + ] + } + } + ], + "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document", + "idShort": "Document" + } + ], + "submodels": [ + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#01-AFZ615#016" + } + ], + "type": "GlobalReference" + }, + "id": "http://i40.customer.com/type/1/1/7A7104BDAB57E184", + "idShort": "TechnicalData", + "submodelElements": [ + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "ConceptDescription", + "value": "0173-1#02-BAA120#008" + } + ], + "type": "GlobalReference" + }, + "value": "5000", + "valueType": "xs:integer", + "category": "PARAMETER", + "idShort": "MaxRotationSpeed" + } + ] + }, + { + "modelType": "Submodel", + "kind": "Instance", + "id": "http://i40.customer.com/type/1/1/1A7B62B529F19152", + "idShort": "Documentation", + "submodelElements": [ + { + "modelType":"SubmodelElementCollection", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document" + } + ], + "type": "GlobalReference" + }, + "idShort": "OperatingManual", + "value": [ + { + "modelType": "Property", + "category": "VARIABLE", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title" + } + ], + "type": "GlobalReference" + }, + "value": "OperatingManual", + "valueType": "xs:string", + "idShort": "Title" + }, + { + "modelType": "File", + "category": "VARIABLE", + "contentType": "application/pdf", + "value": "file:///aasx/OperatingManual.pdf", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile" + } + ], + "type": "GlobalReference" + }, + "idShort": "DigitalFile_PDF" + } + ] + } + ] + }, + { + "modelType": "Submodel", + "kind": "Instance", + "id": "http://i40.customer.com/instance/1/1/AC69B1CB44F07935", + "idShort": "OperationalData", + "submodelElements": [ + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "ConceptDescription", + "value": "http://customer.com/cd/1/1/18EBD56F6B43D895" + } + ], + "type": "GlobalReference" + }, + "value": "4370", + "valueType": "xs:integer", + "category": "VARIABLE", + "idShort": "RotationSpeed" + } + ] + } + ] +} diff --git a/dataformat-json/src/test/resources/listOfSubmodelElements.json b/dataformat-json/src/test/resources/listOfSubmodelElements.json new file mode 100644 index 000000000..8073bcbe8 --- /dev/null +++ b/dataformat-json/src/test/resources/listOfSubmodelElements.json @@ -0,0 +1,92 @@ +[ + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ACPLT", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ACPLT" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "qualifiers": [ + { + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "value": "100", + "valueType": "xs:int", + "kind": "ConceptQualifier" + }, + { + "type": "http://acplt.org/Qualifier/ExampleQualifier2", + "value": "50", + "valueType": "xs:int", + "kind": "ConceptQualifier" + } + ], + "idShort": "ManufacturerName", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + }, + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "value": "978-8234-234-342", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "978-8234-234-342" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "idShort": "InstanceId", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + } +] diff --git a/dataformat-json/src/test/resources/submodelElementListEmpty.json b/dataformat-json/src/test/resources/submodelElementListEmpty.json new file mode 100644 index 000000000..ca37a7d6a --- /dev/null +++ b/dataformat-json/src/test/resources/submodelElementListEmpty.json @@ -0,0 +1,6 @@ +{ + "modelType" : "SubmodelElementList", + "idShort" : "submodelElementList", + "orderRelevant" : true, + "kind": "Instance" +} \ No newline at end of file diff --git a/dataformat-json/src/test/resources/submodelList.json b/dataformat-json/src/test/resources/submodelList.json new file mode 100644 index 000000000..9337b3480 --- /dev/null +++ b/dataformat-json/src/test/resources/submodelList.json @@ -0,0 +1,297 @@ +[ + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "Submodel", + "value": "http://acplt.org/SubmodelTemplates/AssetIdentification" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "http://acplt.org/Submodels/Assets/TestAsset/Identification", + "idShort": "Identification", + "submodelElements": [ + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ACPLT", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ACPLT" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "qualifiers": [ + { + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "value": "100", + "valueType": "xs:int", + "kind": "ConceptQualifier" + }, + { + "type": "http://acplt.org/Qualifier/ExampleQualifier2", + "value": "50", + "valueType": "xs:int", + "kind": "ConceptQualifier" + } + ], + "idShort": "ManufacturerName", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + }, + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "value": "978-8234-234-342", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "978-8234-234-342" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "idShort": "InstanceId", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + } + ], + "description": [ + { + "language": "en-us", + "text": "An example asset identification submodel for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Identifikations-Submodel für eine Test-Anwendung" + } + ] + }, + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "Submodel", + "value": "http://acplt.org/SubmodelTemplates/BillOfMaterial" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "version": "0.9" + }, + "id": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial", + "idShort": "BillOfMaterial", + "submodelElements": [ + { + "modelType": "Entity", + "kind": "Instance", + "entityType": "CoManagedEntity", + "statements": [ + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValue2", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValue2" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty2", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + }, + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + ], + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "idShort": "ExampleEntity", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + }, + { + "modelType": "Entity", + "entityType": "SelfManagedEntity", + "kind": "Instance", + "globalAssetId": + { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset2" + } + ], + "type": "GlobalReference" + }, + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "idShort": "ExampleEntity2", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + } + ], + "description": [ + { + "language": "en-us", + "text": "An example bill of material submodel for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-BillofMaterial-Submodel für eine Test-Anwendung" + } + ] + } +] diff --git a/dataformat-json/src/test/resources/test_demo_full_example.json b/dataformat-json/src/test/resources/test_demo_full_example.json new file mode 100644 index 000000000..5a6adcd08 --- /dev/null +++ b/dataformat-json/src/test/resources/test_demo_full_example.json @@ -0,0 +1,2878 @@ + +{ + "assetAdministrationShells": [ + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset" + } + ], + "type": "GlobalReference" + } + }, + "derivedFrom": + { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "https://acplt.org/TestAssetAdministrationShell2" + } + ], + "type": "GlobalReference" + }, + "submodels": [ + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/Identification" + } + ], + "type": "GlobalReference" + } + ], + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_AssetAdministrationShell", + "idShort": "TestAssetAdministrationShell", + "description": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + + }, + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset_Mandatory" + } + ], + "type": "GlobalReference" + } + }, + "submodels": [ + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel2_Mandatory" + } + ], + "type": "GlobalReference" + } + ], + "id": "https://acplt.org/Test_AssetAdministrationShell_Mandatory", + "idShort": "Test_AssetAdministrationShell_Mandatory" + }, + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset_Mandatory" + } + ], + "type": "GlobalReference" + } + }, + "id": "https://acplt.org/Test_AssetAdministrationShell2_Mandatory", + "idShort": "Test_AssetAdministrationShell2_Mandatory" + }, + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset_Missing" + } + ], + "type": "GlobalReference" + } + }, + "submodels": [ + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + } + ], + "type": "GlobalReference" + } + ], + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_AssetAdministrationShell_Missing", + "idShort": "TestAssetAdministrationShell", + "description": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + + } + ], + "conceptDescriptions": [ + { + "modelType": "ConceptDescription", + "category": "PROPERTY", + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_ConceptDescription", + "idShort": "TestConceptDescription", + "isCaseOf": [ + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/DataSpecifications/Conceptdescription/TestConceptDescription" + } + ], + "type": "GlobalReference" + } + ], + "description": [ + { + "language": "en-us", + "text": "An example concept description for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-ConceptDescription für eine Test-Anwendung" + } + ] + + }, + { + "modelType": "ConceptDescription", + "category": "PROPERTY", + "id": "https://acplt.org/Test_ConceptDescription_Mandatory", + "idShort": "Test_ConceptDescription_Mandatory" + }, + { + "modelType": "ConceptDescription", + "category": "PROPERTY", + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_ConceptDescription_Missing", + "idShort": "TestConceptDescription1", + "description": [ + { + "language": "en-us", + "text": "An example concept description for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-ConceptDescription für eine Test-Anwendung" + } + ] + + }, + { + "modelType": "ConceptDescription", + "category": "PROPERTY", + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "http://acplt.org/DataSpecifciations/Example/Identification", + "idShort": "TestSpec_01", + "isCaseOf": [ + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ReferenceElements/ConceptDescriptionX" + } + ], + "type": "GlobalReference" + } + ], + "embeddedDataSpecifications": + [ + { + "dataSpecification": { + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": { + "modelType": "DataSpecificationIEC61360", + "dataType": "REAL_MEASURE", + "sourceOfDefinition": "http://acplt.org/DataSpec/ExampleDef", + "symbol": "SU", + "unit": "SpaceUnit", + "unitId": { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Units/SpaceUnit" + } + ], + "type": "GlobalReference" + }, + "value": "TEST", + "valueFormat": "string", + "valueList": { + "valueReferencePairs": [ + { + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + } + }, + { + "value": "http://acplt.org/ValueId/ExampleValueId2", + "valueId": { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId2" + } + ], + "type": "GlobalReference" + } + } + ] + }, + "definition": [ + { + "language": "de", + "text": "Dies ist eine Data Specification für Testzwecke" + }, + { + "language": "en-us", + "text": "This is a DataSpecification for testing purposes" + } + ], + "levelType": "Max", + "preferredName": [ + { + "language": "de", + "text": "Test Specification" + }, + { + "language": "en-us", + "text": "TestSpecification" + } + ], + "shortName": [ + { + "language": "de", + "text": "Test Spec" + }, + { + "language": "en-us", + "text": "TestSpec" + } + ] + } + } + ] + } + ], + "submodels": [ + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "Submodel", + "value": "http://acplt.org/SubmodelTemplates/AssetIdentification" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "http://acplt.org/Submodels/Assets/TestAsset/Identification", + "idShort": "Identification", + "submodelElements": [ + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ACPLT", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ACPLT" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "qualifiers": [ + { + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "value": "100", + "valueType": "xs:int", + "kind": "ConceptQualifier" + }, + { + "type": "http://acplt.org/Qualifier/ExampleQualifier2", + "value": "50", + "valueType": "xs:int", + "kind": "ConceptQualifier" + } + ], + "idShort": "ManufacturerName", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + + }, + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "value": "978-8234-234-342", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "978-8234-234-342" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "idShort": "InstanceId", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + + } + ], + "description": [ + { + "language": "en-us", + "text": "An example asset identification submodel for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Identifikations-Submodel für eine Test-Anwendung" + } + ] + + }, + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/SubmodelTemplates/BillOfMaterial" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "version": "0.9" + }, + "id": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial", + "idShort": "BillOfMaterial", + "submodelElements": [ + { + "modelType": "Entity", + "kind": "Instance", + "entityType": "CoManagedEntity", + "statements": [ + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValue2", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValue2" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty2", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + }, + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + ], + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "idShort": "ExampleEntity", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + + }, + { + "modelType": "Entity", + "kind": "Instance", + "entityType": "SelfManagedEntity", + "globalAssetId": + { + "keys": [ + { + + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset2" + } + ], + "type": "GlobalReference" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "idShort": "ExampleEntity2", + "description": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + + } + ], + "description": [ + { + "language": "en-us", + "text": "An example bill of material submodel for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-BillofMaterial-Submodel für eine Test-Anwendung" + } + ] + + }, + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_Submodel", + "idShort": "TestSubmodel", + "submodelElements": [ + { + "modelType": "RelationshipElement", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleRelationshipElement", + "first": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "second": + { + "keys": [ + { + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" + }, + { + "type": "Entity", + "value": "ExampleEntity" + }, + { + "type": "Property", + "value": "ExampleProperty2" + } + ], + "type": "ModelReference" + }, + "description": [ + { + "language": "en-us", + "text": "Example RelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel RelationshipElement Element" + } + ] + + }, + { + "modelType": "AnnotatedRelationshipElement", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleAnnotatedRelationshipElement", + "first": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "second": + { + "keys": [ + { + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" + }, + { + "type": "Entity", + "value": "ExampleEntity" + }, + { + "type": "Property", + "value": "ExampleProperty2" + } + ], + "type": "ModelReference" + }, + "annotations": [ + { + "modelType": "Property", + "kind": "Instance", + "value": "some example annotation", + "valueType": "xs:string", + "category": "PARAMETER", + "idShort": "ExampleProperty3" + } + ], + "description": [ + { + "language": "en-us", + "text": "Example AnnotatedRelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel AnnotatedRelationshipElement Element" + } + ] + + }, + { + "modelType": "Operation", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Operations/ExampleOperation" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleOperation", + "inoutputVariables": [ + { + "value": + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty3", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + } + ], + "inputVariables": [ + { + "value": + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty1", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + } + ], + "outputVariables": [ + { + "value": + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty2", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + } + ], + "description": [ + { + "language": "en-us", + "text": "Example Operation object" + }, + { + "language": "de", + "text": "Beispiel Operation Element" + } + ] + + }, + { + "modelType": "Capability", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Capabilities/ExampleCapability" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleCapability", + "description": [ + { + "language": "en-us", + "text": "Example Capability object" + }, + { + "language": "de", + "text": "Beispiel Capability Element" + } + ] + + }, + { + "modelType": "BasicEventElement", + "kind": "Instance", + "observed": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Events/ExampleBasicEvent" + } + ], + "type": "GlobalReference" + }, + "direction": "INPUT", + "state": "ON", + "category": "PARAMETER", + "idShort": "ExampleBasicEvent", + "description": [ + { + "language": "en-us", + "text": "Example BasicEvent object" + }, + { + "language": "de", + "text": "Beispiel BasicEvent Element" + } + ], + "direction": "INPUT", + "state": "ON" + }, + { + "modelType": "SubmodelElementList", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementLists/ExampleSubmodelElementListOrdered" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleSubmodelElementListOrdered", + "orderRelevant": true, + "description": [ + { + "language": "en-us", + "text": "Example ExampleSubmodelElementListOrdered object" + }, + { + "language": "de", + "text": "Beispiel ExampleSubmodelElementListOrdered Element" + } + ], + "typeValueListElement": "SubmodelElement", + "value": [ + { + "modelType": "Property", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + }, + { + "modelType": "MultiLanguageProperty", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + }, + "valueId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleMultiLanguageValueId" + } + ], + "type": "GlobalReference" + }, + "category": "CONSTANT", + "idShort": "ExampleMultiLanguageProperty", + "value": [ + { + "language": "en-us", + "text": "Example value of a MultiLanguageProperty element" + }, + { + "language": "de", + "text": "Beispielswert für ein MultiLanguageProperty-Element" + } + ], + "description": [ + { + "language": "en-us", + "text": "Example MultiLanguageProperty object" + }, + { + "language": "de", + "text": "Beispiel MultiLanguageProperty Element" + } + ] + + }, + { + "modelType": "Range", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Ranges/ExampleRange" + } + ], + "type": "GlobalReference" + }, + "max": "100", + "min": "0", + "valueType": "xs:int", + "category": "PARAMETER", + "idShort": "ExampleRange", + "description": [ + { + "language": "en-us", + "text": "Example Range object" + }, + { + "language": "de", + "text": "Beispiel Range Element" + } + ] + + } + ] + }, + { + "modelType": "SubmodelElementCollection", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollection" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleSubmodelElementCollection", + "description": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollection object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollection Element" + } + ], + "value": [ + { + "modelType": "Blob", + "kind": "Instance", + + "contentType": "application/pdf", + "value": "AQIDBAU=", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Blobs/ExampleBlob" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleBlob", + "description": [ + { + "language": "en-us", + "text": "Example Blob object" + }, + { + "language": "de", + "text": "Beispiel Blob Element" + } + ] + + }, + { + "modelType": "File", + "kind": "Instance", + + "contentType": "application/pdf", + "value": "file:///TestFile.pdf", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Files/ExampleFile" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleFile", + "description": [ + { + "language": "en-us", + "text": "Example File object" + }, + { + "language": "de", + "text": "Beispiel File Element" + } + ] + + }, + { + "modelType": "ReferenceElement", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleReferenceElement", + "value": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "description": [ + { + "language": "en-us", + "text": "Example Reference Element object" + }, + { + "language": "de", + "text": "Beispiel Reference Element Element" + } + ] + + } + ] + } + ], + "description": [ + { + "language": "en-us", + "text": "An example submodel for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Teilmodell für eine Test-Anwendung" + } + ] + + }, + { + "modelType": "Submodel", + "kind": "Template", + "id": "https://acplt.org/Test_Submodel_Mandatory", + "idShort": "Test_Submodel_Mandatory", + "submodelElements": [ + { + "modelType": "RelationshipElement", + "kind": "Instance", + "idShort": "ExampleRelationshipElement", + "first": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListUnordered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "second": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListUnordered" + }, + { + "type": "MultiLanguageProperty", + "value": "ExampleMultiLanguageProperty" + } + ], + "type": "ModelReference" + } + }, + { + "modelType": "AnnotatedRelationshipElement", + "kind": "Instance", + "idShort": "ExampleAnnotatedRelationshipElement", + "first": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelElementCollection" + }, + { + "type": "Blob", + "value": "ExampleBlob" + } + ], + "type": "ModelReference" + }, + "second": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListUnordered" + }, + { + "type": "MultiLanguageProperty", + "value": "ExampleMultiLanguageProperty" + } + ], + "type": "ModelReference" + } + }, + { + "modelType": "Operation", + "kind": "Template", + "idShort": "ExampleOperation" + }, + { + "modelType": "Capability", + "kind": "Instance", + + "idShort": "ExampleCapability" + }, + { + "modelType": "BasicEventElement", + "kind": "Instance", + + "observed": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListUnordered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "idShort": "ExampleBasicEvent", + "direction": "OUTPUT", + "state": "OFF" + }, + { + "modelType": "SubmodelElementList", + "kind": "Instance", + + "idShort": "ExampleSubmodelElementListUnordered", + "orderRelevant": false, + "typeValueListElement": "SubmodelElement", + "value": [ + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "valueType": "xs:string", + "idShort": "ExampleProperty" + }, + { + "modelType": "MultiLanguageProperty", + "kind": "Instance", + "category": "VARIABLE", + "idShort": "ExampleMultiLanguageProperty" + }, + { + "modelType": "Range", + "kind": "Instance", + "category": "VARIABLE", + "valueType": "xs:int", + "idShort": "ExampleRange" + } + ] + }, + { + "modelType": "SubmodelElementCollection", + "kind": "Instance", + "idShort": "ExampleSubmodelElementCollection", + "value": [ + { + "modelType": "Blob", + "kind": "Instance", + "category": "VARIABLE", + "contentType": "application/pdf", + "idShort": "ExampleBlob" + }, + { + "modelType": "File", + "kind": "Instance", + "category": "VARIABLE", + "contentType": "application/pdf", + "idShort": "ExampleFile" + }, + { + "modelType": "ReferenceElement", + "kind": "Instance", + "category": "VARIABLE", + "idShort": "ExampleReferenceElement" + } + ] + }, + { + "modelType": "SubmodelElementCollection", + "kind": "Instance", + "idShort": "ExampleSubmodelElementCollection2" + } + ] + }, + { + "modelType": "Submodel", + "kind": "Instance", + "id": "https://acplt.org/Test_Submodel2_Mandatory", + "idShort": "Test_Submodel2_Mandatory" + }, + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_Submodel_Missing", + "idShort": "TestSubmodelMissing", + "submodelElements": [ + { + "modelType": "RelationshipElement", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleRelationshipElement", + "first": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "second": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "MultiLanguageProperty", + "value": "ExampleMultiLanguageProperty" + } + ], + "type": "ModelReference" + }, + "description": [ + { + "language": "en-us", + "text": "Example RelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel RelationshipElement Element" + } + ] + + }, + { + "modelType": "AnnotatedRelationshipElement", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleAnnotatedRelationshipElement", + "first": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "second": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "MultiLanguageProperty", + "value": "ExampleMultiLanguageProperty" + } + ], + "type": "ModelReference" + }, + "annotations": [ + { + "modelType": "Property", + "kind": "Instance", + "category": "VARIABLE", + "value": "some example annotation", + "valueType": "xs:string", + "category": "PARAMETER", + "idShort": "ExampleProperty" + } + ], + "description": [ + { + "language": "en-us", + "text": "Example AnnotatedRelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel AnnotatedRelationshipElement Element" + } + ] + + }, + { + "modelType": "Operation", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Operations/ExampleOperation" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleOperation", + "inoutputVariables": [ + { + "value": + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "exampleValue", + "valueType": "xs:string", + "qualifiers": [ + { + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "valueType": "xs:string", + "kind": "ConceptQualifier" + } + ], + "category": "CONSTANT", + "idShort": "ExampleProperty3", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + } + ], + "inputVariables": [ + { + "value": { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "exampleValue", + "valueType": "xs:string", + "qualifiers": [ + { + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "valueType": "xs:string", + "kind": "ConceptQualifier" + } + ], + "category": "CONSTANT", + "idShort": "ExampleProperty1", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + ], + "outputVariables": [ + { + "value": + { + "modelType": "Property", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "exampleValue", + "valueType": "xs:string", + "qualifiers": [ + { + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "valueType": "xs:string", + "kind": "ConceptQualifier" + } + ], + "category": "CONSTANT", + "idShort": "ExampleProperty2", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + } + ], + "description": [ + { + "language": "en-us", + "text": "Example Operation object" + }, + { + "language": "de", + "text": "Beispiel Operation Element" + } + ] + + }, + { + "modelType": "Capability", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Capabilities/ExampleCapability" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleCapability", + "description": [ + { + "language": "en-us", + "text": "Example Capability object" + }, + { + "language": "de", + "text": "Beispiel Capability Element" + } + ] + + }, + { + "modelType": "BasicEventElement", + "kind": "Instance", + + "observed": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementList", + "value": "ExampleSubmodelElementListOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Events/ExampleBasicEvent" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleBasicEvent", + "direction": "INPUT", + "state": "ON", + "description": [ + { + "language": "en-us", + "text": "Example BasicEvent object" + }, + { + "language": "de", + "text": "Beispiel BasicEvent Element" + } + ], + "direction": "INPUT", + "state": "ON" + }, + { + "kind": "Instance", + + "modelType": "SubmodelElementList", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementLists/ExampleSubmodelElementListOrdered" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleSubmodelElementListOrdered", + "orderRelevant": true, + "description": [ + { + "language": "en-us", + "text": "Example SubmodelElementListOrdered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementListOrdered Element" + } + ], + "typeValueListElement": "SubmodelElement", + "value": [ + { + "modelType": "Property", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "exampleValue", + "valueType": "xs:string", + "qualifiers": [ + { + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "valueType": "xs:string", + "kind": "ConceptQualifier" + } + ], + "category": "CONSTANT", + "idShort": "ExampleProperty", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + }, + { + "modelType": "MultiLanguageProperty", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + }, + "category": "CONSTANT", + "idShort": "ExampleMultiLanguageProperty", + "value": [ + { + "language": "en-us", + "text": "Example value of a MultiLanguageProperty element" + }, + { + "language": "de", + "text": "Beispielswert für ein MultiLanguageProperty-Element" + } + ], + "description": [ + { + "language": "en-us", + "text": "Example MultiLanguageProperty object" + }, + { + "language": "de", + "text": "Beispiel MultiLanguageProperty Element" + } + ] + }, + { + "modelType": "Range", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Ranges/ExampleRange" + } + ], + "type": "GlobalReference" + }, + "max": "100", + "min": "0", + "valueType": "xs:int", + "category": "PARAMETER", + "idShort": "ExampleRange", + "description": [ + { + "language": "en-us", + "text": "Example Range object" + }, + { + "language": "de", + "text": "Beispiel Range Element" + } + ] + + } + ] + }, + { + "modelType": "SubmodelElementCollection", + "kind": "Instance", + + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollection" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleSubmodelElementCollection", + "description": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollection object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollection Element" + } + ], + "value": [ + { + "modelType": "Blob", + "kind": "Instance", + + "contentType": "application/pdf", + "value": "AQIDBAU=", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Blobs/ExampleBlob" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleBlob", + "description": [ + { + "language": "en-us", + "text": "Example Blob object" + }, + { + "language": "de", + "text": "Beispiel Blob Element" + } + ] + + }, + { + "modelType": "File", + "kind": "Instance", + "contentType": "application/pdf", + "value": "file:///TestFile.pdf", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Files/ExampleFile" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleFile", + "description": [ + { + "language": "en-us", + "text": "Example File object" + }, + { + "language": "de", + "text": "Beispiel File Element" + } + ] + + }, + { + "modelType": "ReferenceElement", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleReferenceElement", + "value": { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelElementCollection" + }, + { + "type": "File", + "value": "ExampleFile" + } + ], + "type": "ModelReference" + }, + "description": [ + { + "language": "en-us", + "text": "Example Reference Element object" + }, + { + "language": "de", + "text": "Beispiel Reference Element Element" + } + ] + + } + ] + } + ], + "description": [ + { + "language": "en-us", + "text": "An example submodel for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Teilmodell für eine Test-Anwendung" + } + ] + + }, + { + "modelType": "Submodel", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_Submodel_Template", + "idShort": "TestSubmodelTemplate", + "submodelElements": [ + { + "modelType": "RelationshipElement", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleRelationshipElement", + "first": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Template" + }, + { + "type": "Operation", + "value": "ExampleOperation" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "second": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Template" + }, + { + "type": "Operation", + "value": "ExampleOperation" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "description": [ + { + "language": "en-us", + "text": "Example RelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel RelationshipElement Element" + } + ] + + }, + { + "modelType": "AnnotatedRelationshipElement", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleAnnotatedRelationshipElement", + "first": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Template" + }, + { + "type": "Operation", + "value": "ExampleOperation" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "second": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Template" + }, + { + "type": "Operation", + "value": "ExampleOperation" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "description": [ + { + "language": "en-us", + "text": "Example AnnotatedRelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel AnnotatedRelationshipElement Element" + } + ] + }, + { + "modelType": "Operation", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Operations/ExampleOperation" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleOperation", + "inoutputVariables": [ + { + "value": + { + "modelType": "Property", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + } + ], + "inputVariables": [ + { + "value": + { + "modelType": "Property", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + } + ], + "outputVariables": [ + { + "value": + { + "modelType": "Property", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + } + } + ], + "description": [ + { + "language": "en-us", + "text": "Example Operation object" + }, + { + "language": "de", + "text": "Beispiel Operation Element" + } + ] + + }, + { + "modelType": "Capability", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Capabilities/ExampleCapability" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleCapability", + "description": [ + { + "language": "en-us", + "text": "Example Capability object" + }, + { + "language": "de", + "text": "Beispiel Capability Element" + } + ] + + }, + { + "modelType": "BasicEventElement", + "observed": + { + "keys": [ + { + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Template" + }, + { + "type": "Operation", + "value": "ExampleOperation" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "ModelReference" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Events/ExampleBasicEvent" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleBasicEvent", + "direction": "OUTPUT", + "state": "OFF", + "description": [ + { + "language": "en-us", + "text": "Example BasicEvent object" + }, + { + "language": "de", + "text": "Beispiel BasicEvent Element" + } + ], + "direction": "OUTPUT", + "state": "OFF" + }, + { + "modelType": "SubmodelElementList", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementLists/ExampleSubmodelElementListOrdered" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleSubmodelElementListOrdered", + "orderRelevant": true, + "description": [ + { + "language": "en-us", + "text": "Example SubmodelElementListOrdered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementListOrdered Element" + } + ], + "typeValueListElement": "SubmodelElement", + "value": [ + { + "modelType": "Property", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "CONSTANT", + "idShort": "ExampleProperty", + "description": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + + }, + { + "modelType": "MultiLanguageProperty", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + }, + "category": "CONSTANT", + "idShort": "ExampleMultiLanguageProperty", + "description": [ + { + "language": "en-us", + "text": "Example MultiLanguageProperty object" + }, + { + "language": "de", + "text": "Beispiel MultiLanguageProperty Element" + } + ] + + }, + { + "modelType": "Range", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Ranges/ExampleRange" + } + ], + "type": "GlobalReference" + }, + "max": "100", + "valueType": "xs:int", + "category": "PARAMETER", + "idShort": "ExampleRange", + "description": [ + { + "language": "en-us", + "text": "Example Range object" + }, + { + "language": "de", + "text": "Beispiel Range Element" + } + ] + + }, + { + "modelType": "Range", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Ranges/ExampleRange" + } + ], + "type": "GlobalReference" + }, + "min": "0", + "valueType": "xs:int", + "category": "PARAMETER", + "idShort": "ExampleRange2", + "description": [ + { + "language": "en-us", + "text": "Example Range object" + }, + { + "language": "de", + "text": "Beispiel Range Element" + } + ] + + } + ] + }, + { + "modelType": "SubmodelElementCollection", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollection" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleSubmodelElementCollection", + "description": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollection object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollection Element" + } + ], + "value": [ + { + "modelType": "Blob", + "contentType": "application/pdf", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Blobs/ExampleBlob" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleBlob", + "description": [ + { + "language": "en-us", + "text": "Example Blob object" + }, + { + "language": "de", + "text": "Beispiel Blob Element" + } + ] + + }, + { + "modelType": "File", + "contentType": "application/pdf", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/Files/ExampleFile" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleFile", + "description": [ + { + "language": "en-us", + "text": "Example File object" + }, + { + "language": "de", + "text": "Beispiel File Element" + } + ] + + }, + { + "modelType": "ReferenceElement", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleReferenceElement", + "description": [ + { + "language": "en-us", + "text": "Example Reference Element object" + }, + { + "language": "de", + "text": "Beispiel Reference Element Element" + } + ] + + } + ] + }, + { + "modelType": "SubmodelElementCollection", + "kind": "Template", + "semanticId": + { + "keys": [ + { + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollection" + } + ], + "type": "GlobalReference" + }, + "category": "PARAMETER", + "idShort": "ExampleSubmodelElementCollection2", + "description": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollection object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollection Element" + } + ] + + } + ], + "description": [ + { + "language": "en-us", + "text": "An example submodel for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Teilmodell für eine Test-Anwendung" + } + ] + + } + ] +} diff --git a/dataformat-json/src/test/resources/test_demo_full_example_withEmbeddedConceptDescription.json b/dataformat-json/src/test/resources/test_demo_full_example_withEmbeddedConceptDescription.json new file mode 100644 index 000000000..16a24778e --- /dev/null +++ b/dataformat-json/src/test/resources/test_demo_full_example_withEmbeddedConceptDescription.json @@ -0,0 +1,3135 @@ + +{ + "assetAdministrationShells": [ + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset" + } + ], + "type": "GlobalReference" + } + }, + "derivedFrom": + { + "keys": [ + { + "type": "AssetAdministrationShell", + "value": "https://acplt.org/TestAssetAdministrationShell2" + } + ], + "type": "GlobalReference" + }, + "submodels": [ + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/Identification" + } + ], + "type": "GlobalReference" + } + ], + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_AssetAdministrationShell", + "idShort": "TestAssetAdministrationShell", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + }, + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset_Mandatory" + } + ], + "type": "GlobalReference" + } + }, + "submodels": [ + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + } + ], + "type": "GlobalReference" + }, + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel2_Mandatory" + } + ], + "type": "GlobalReference" + } + ], + "id": "https://acplt.org/Test_AssetAdministrationShell_Mandatory", + "idShort": "Test_AssetAdministrationShell_Mandatory" + }, + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset_Mandatory" + } + ], + "type": "GlobalReference" + } + }, + "id": "https://acplt.org/Test_AssetAdministrationShell2_Mandatory", + "idShort": "Test_AssetAdministrationShell2_Mandatory" + }, + { + "modelType": "AssetAdministrationShell", + "assetInformation": + { + "assetKind": "Instance", + "globalAssetId": + { + "keys": [ + { + + "type": "AssetAdministrationShell", + "value": "https://acplt.org/Test_Asset_Missing" + } + ], + "type": "GlobalReference" + } + }, + "submodels": [ + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + } + ], + "type": "GlobalReference" + } + ], + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_AssetAdministrationShell_Missing", + "idShort": "TestAssetAdministrationShell", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + } + ], + "conceptDescriptions": [ + { + "modelType": "ConceptDescription", + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_ConceptDescription", + "idShort": "TestConceptDescription", + "isCaseOf": [ + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/DataSpecifications/ConceptDescriptions/TestConceptDescription" + } + ], + "type": "GlobalReference" + } + ], + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + }, + { + "modelType": "ConceptDescription", + "id": "https://acplt.org/Test_ConceptDescription_Mandatory", + "idShort": "Test_ConceptDescription_Mandatory" + }, + { + "modelType": "ConceptDescription", + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_ConceptDescription_Missing", + "idShort": "TestConceptDescription1", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + }, + { + "modelType": "ConceptDescription", + "embeddedDataSpecifications": [ + { + "dataSpecification": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0" + } + ], + "type": "GlobalReference" + }, + "dataSpecificationContent": + { + "dataType": "RealMeasure", + "sourceOfDefinition": "http://acplt.org/DataSpec/ExampleDef", + "symbol": "SU", + "unit": "SpaceUnit", + "unitId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Units/SpaceUnit" + } + ], + "type": "GlobalReference" + }, + "value": "TEST", + "valueFormat": "xs:string", + "valueList": + { + "valueReferencePairTypes": [ + { + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + } + }, + { + "value": "http://acplt.org/ValueId/ExampleValueId2", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId2" + } + ], + "type": "GlobalReference" + } + } + ] + }, + "definition": [ + { + "language": "de", + "text": "Dies ist eine Data Specification für Testzwecke" + }, + { + "language": "en-us", + "text": "This is a DataSpecification for testing purposes" + } + ], + "levelType": ["Min", "Max"], + "preferredName": [ + { + "language": "de", + "text": "Test Specification" + }, + { + "language": "en-us", + "text": "TestSpecification" + } + ], + "shortNames": [ + { + "language": "de", + "text": "Test Spec" + }, + { + "language": "en-us", + "text": "TestSpec" + } + ] + } + } + ], + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "http://acplt.org/DataSpecifciations/Example/Identification", + "idShort": "TestSpec_01", + "isCaseOf": [ + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ReferenceElements/ConceptDescriptionX" + } + ], + "type": "GlobalReference" + } + ] + } + ], + "submodels": [ + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/SubmodelTemplates/AssetIdentification" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "http://acplt.org/Submodels/Assets/TestAsset/Identification", + "idShort": "Identification", + "submodelElements": [ + { + "modelType": "Property", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "0173-1#02-AAO677#002" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ACPLT", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ACPLT" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "qualifiers": [ + { + "modelType": "Qualifier", + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "value": "100", + "valueType": "Int" + }, + { + "modelType": + { + "name": "Qualifier" + }, + "type": "http://acplt.org/Qualifier/ExampleQualifier2", + "value": "50", + "valueType": "Int" + } + ], + "idShort": "ManufacturerName", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + } + }, + { + "modelType": "Property", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "value": "978-8234-234-342", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "978-8234-234-342" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "idShort": "InstanceId", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + } + } + ], + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + }, + { + "modelType": "Submodel", + "kind": "Instance", + "semanticId": + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/SubmodelTemplates/BillOfMaterial" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "version": "0.9" + }, + "id": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial", + "idShort": "BillOfMaterial", + "submodelElements": [ + { + "modelType": "Entity", + "entityType": "CoManagedEntity", + "statements": [ + { + "modelType": "Property", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValue2", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValue2" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty2", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + }, + { + "modelType": "Property", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + ], + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "idShort": "ExampleEntity", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + } + }, + { + "modelType": + { + "name": "Entity" + }, + "entityType": "SelfManagedEntity", + "globalAssetId": + { + "keys": [ + { + + "type": "Asset", + "value": "https://acplt.org/Test_Asset2" + } + ], + "type": "GlobalReference" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" + } + ], + "type": "GlobalReference" + }, + "idShort": "ExampleEntity2", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." + }, + { + "language": "de", + "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" + } + ] + } + } + ], + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + }, + { + "modelType": + { + "name": "Submodel" + }, + "kind": "Instance", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_Submodel", + "idShort": "TestSubmodel", + "submodelElements": [ + { + "modelType": + { + "name": "RelationshipElement" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleRelationshipElement", + "first": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "second": + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" + }, + { + "type": "Entity", + "value": "ExampleEntity" + }, + { + "type": "Property", + "value": "ExampleProperty2" + } + ], + "type": "GlobalReference" + }, +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example RelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel RelationshipElement Element" + } + ] + } + }, + { + "modelType": + { + "name": "AnnotatedRelationshipElement" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleAnnotatedRelationshipElement", + "first": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "second": + { + "keys": [ + { + + "type": "Submodel", + "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" + }, + { + "type": "Entity", + "value": "ExampleEntity" + }, + { + "type": "Property", + "value": "ExampleProperty2" + } + ], + "type": "GlobalReference" + }, + "annotation": [ + { + "modelType": + { + "name": "Property" + }, + "kind": "Instance", + "value": "some example annotation", + "valueType": "xs:string", + "category": "Parameter", + "idShort": "ExampleProperty3" + } + ], +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example AnnotatedRelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel AnnotatedRelationshipElement Element" + } + ] + } + }, + { + "modelType": + { + "name": "Operation" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Operations/ExampleOperation" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleOperation", + "inoutputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty3", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], + "inputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty1", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], + "outputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty2", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Operation object" + }, + { + "language": "de", + "text": "Beispiel Operation Element" + } + ] + } + }, + { + "modelType": + { + "name": "Capability" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Capabilities/ExampleCapability" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleCapability", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Capability object" + }, + { + "language": "de", + "text": "Beispiel Capability Element" + } + ] + } + }, + { + "modelType": + { + "name": "BasicEventElement" + }, + "observed": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Events/ExampleBasicEvent" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleBasicEvent", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example BasicEvent object" + }, + { + "language": "de", + "text": "Beispiel BasicEvent Element" + } + ] + } + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionOrdered" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleSubmodelCollectionOrdered", + "ordered": true, + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollectionOrdered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollectionOrdered Element" + } + ] + }, + "value": [ + { + "modelType": + { + "name": "Property" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "http://acplt.org/ValueId/ExampleValueId", + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleValueId" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + }, + { + "modelType": + { + "name": "MultiLanguageProperty" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + }, + "valueId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ValueId/ExampleMultiLanguageValueId" + } + ], + "type": "GlobalReference" + }, + "category": "Constant", + "idShort": "ExampleMultiLanguageProperty", + "value": [ + { + "language": "en-us", + "text": "Example value of a MultiLanguageProperty element" + }, + { + "language": "de", + "text": "Beispielswert für ein MulitLanguageProperty-Element" + } + ], + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example MulitLanguageProperty object" + }, + { + "language": "de", + "text": "Beispiel MulitLanguageProperty Element" + } + ] + } + }, + { + "modelType": + { + "name": "Range" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Ranges/ExampleRange" + } + ], + "type": "GlobalReference" + }, + "max": "100", + "min": "0", + "valueType": "Int", + "category": "Parameter", + "idShort": "ExampleRange", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Range object" + }, + { + "language": "de", + "text": "Beispiel Range Element" + } + ] + } + } + ] + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionUnordered" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleSubmodelCollectionUnordered", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollectionUnordered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollectionUnordered Element" + } + ] + }, + "value": [ + { + "modelType": + { + "name": "Blob" + }, + "mimeType": "application/pdf", + "value": "AQIDBAU=", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Blobs/ExampleBlob" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleBlob", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Blob object" + }, + { + "language": "de", + "text": "Beispiel Blob Element" + } + ] + } + }, + { + "modelType": + { + "name": "File" + }, + "mimeType": "application/pdf", + "value": "/TestFile.pdf", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Files/ExampleFile" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleFile", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example File object" + }, + { + "language": "de", + "text": "Beispiel File Element" + } + ] + } + }, + { + "modelType": + { + "name": "ReferenceElement" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleReferenceElement", + "value": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel" + }, + { + "idType": "IdShort", + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "idType": "IdShort", + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Reference Element object" + }, + { + "language": "de", + "text": "Beispiel Reference Element Element" + } + ] + } + } + ] + } + ], + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + }, + { + "modelType": + { + "name": "Submodel" + }, + "kind": "Template", + "id": "https://acplt.org/Test_Submodel_Mandatory", + "idShort": "Test_Submodel_Mandatory", + "submodelElements": [ + { + "modelType": + { + "name": "RelationshipElement" + }, + "idShort": "ExampleRelationshipElement", + "first": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "second": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "MultiLanguageProperty", + "value": "ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + } + }, + { + "modelType": + { + "name": "AnnotatedRelationshipElement" + }, + "idShort": "ExampleAnnotatedRelationshipElement", + "first": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "second": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "MultiLanguageProperty", + "value": "ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + } + }, + { + "modelType": + { + "name": "Operation" + }, + "kind": "Template", + "idShort": "ExampleOperation" + }, + { + "modelType": + { + "name": "Capability" + }, + "idShort": "ExampleCapability" + }, + { + "modelType": + { + "name": "BasicEventElement" + }, + "observed": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Mandatory" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "idShort": "ExampleBasicEvent" + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "idShort": "ExampleSubmodelCollectionOrdered", + "ordered": true, + "value": [ + { + "modelType": + { + "name": "Property" + }, + "valueType": "xs:string", + "idShort": "ExampleProperty" + }, + { + "modelType": + { + "name": "MultiLanguageProperty" + }, + "idShort": "ExampleMultiLanguageProperty" + }, + { + "modelType": + { + "name": "Range" + }, + "valueType": "Int", + "idShort": "ExampleRange" + } + ] + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "idShort": "ExampleSubmodelCollectionUnordered", + "value": [ + { + "modelType": + { + "name": "Blob" + }, + "mimeType": "application/pdf", + "idShort": "ExampleBlob" + }, + { + "modelType": + { + "name": "File" + }, + "mimeType": "application/pdf", + "idShort": "ExampleFile" + }, + { + "modelType": + { + "name": "ReferenceElement" + }, + "idShort": "ExampleReferenceElement" + } + ] + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "idShort": "ExampleSubmodelCollectionUnordered2" + } + ] + }, + { + "modelType": + { + "name": "Submodel" + }, + "kind": "Instance", + "id": "https://acplt.org/Test_Submodel2_Mandatory", + "idShort": "Test_Submodel2_Mandatory" + }, + { + "modelType": + { + "name": "Submodel" + }, + "kind": "Instance", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_Submodel_Missing", + "idShort": "TestSubmodel", + "submodelElements": [ + { + "modelType": + { + "name": "RelationshipElement" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleRelationshipElement", + "first": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "second": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "MultiLanguageProperty", + "value": "ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + }, +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example RelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel RelationshipElement Element" + } + ] + } + }, + { + "modelType": + { + "name": "AnnotatedRelationshipElement" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleAnnotatedRelationshipElement", + "first": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "second": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "MultiLanguageProperty", + "value": "ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + }, + "annotation": [ + { + "modelType": + { + "name": "Property" + }, + "kind": "Instance", + "value": "some example annotation", + "valueType": "xs:string", + "category": "Parameter", + "idShort": "ExampleProperty" + } + ], +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example AnnotatedRelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel AnnotatedRelationshipElement Element" + } + ] + } + }, + { + "modelType": + { + "name": "Operation" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Operations/ExampleOperation" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleOperation", + "inoutputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "exampleValue", + "valueType": "xs:string", + "qualifiers": [ + { + "modelType": + { + "name": "Qualifier" + }, + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "valueType": "xs:string" + } + ], + "category": "Constant", + "idShort": "ExampleProperty3", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], + "inputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "exampleValue", + "valueType": "xs:string", + "qualifiers": [ + { + "modelType": + { + "name": "Qualifier" + }, + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "valueType": "xs:string" + } + ], + "category": "Constant", + "idShort": "ExampleProperty1", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], + "outputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "exampleValue", + "valueType": "xs:string", + "qualifiers": [ + { + "modelType": + { + "name": "Qualifier" + }, + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "valueType": "xs:string" + } + ], + "category": "Constant", + "idShort": "ExampleProperty2", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Operation object" + }, + { + "language": "de", + "text": "Beispiel Operation Element" + } + ] + } + }, + { + "modelType": + { + "name": "Capability" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Capabilities/ExampleCapability" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleCapability", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Capability object" + }, + { + "language": "de", + "text": "Beispiel Capability Element" + } + ] + } + }, + { + "modelType": + { + "name": "BasicEventElement" + }, + "observed": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Events/ExampleBasicEvent" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleBasicEvent", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example BasicEvent object" + }, + { + "language": "de", + "text": "Beispiel BasicEvent Element" + } + ] + } + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionOrdered" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleSubmodelCollectionOrdered", + "ordered": true, + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollectionOrdered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollectionOrdered Element" + } + ] + }, + "value": [ + { + "modelType": + { + "name": "Property" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "value": "exampleValue", + "valueType": "xs:string", + "qualifiers": [ + { + "modelType": + { + "name": "Qualifier" + }, + "type": "http://acplt.org/Qualifier/ExampleQualifier", + "valueType": "xs:string" + } + ], + "category": "Constant", + "idShort": "ExampleProperty", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + }, + { + "modelType": + { + "name": "MultiLanguageProperty" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + }, + "category": "Constant", + "idShort": "ExampleMultiLanguageProperty", + "value": [ + { + "language": "en-us", + "text": "Example value of a MultiLanguageProperty element" + }, + { + "language": "de", + "text": "Beispielswert für ein MulitLanguageProperty-Element" + } + ], + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example MulitLanguageProperty object" + }, + { + "language": "de", + "text": "Beispiel MulitLanguageProperty Element" + } + ] + } + }, + { + "modelType": + { + "name": "Range" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Ranges/ExampleRange" + } + ], + "type": "GlobalReference" + }, + "max": "100", + "min": "0", + "valueType": "Int", + "category": "Parameter", + "idShort": "ExampleRange", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Range object" + }, + { + "language": "de", + "text": "Beispiel Range Element" + } + ] + } + } + ] + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionUnordered" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleSubmodelCollectionUnordered", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollectionUnordered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollectionUnordered Element" + } + ] + }, + "value": [ + { + "modelType": + { + "name": "Blob" + }, + "mimeType": "application/pdf", + "value": "AQIDBAU=", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Blobs/ExampleBlob" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleBlob", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Blob object" + }, + { + "language": "de", + "text": "Beispiel Blob Element" + } + ] + } + }, + { + "modelType": + { + "name": "File" + }, + "mimeType": "application/pdf", + "value": "/TestFile.pdf", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Files/ExampleFile" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleFile", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example File object" + }, + { + "language": "de", + "text": "Beispiel File Element" + } + ] + } + }, + { + "modelType": + { + "name": "ReferenceElement" + }, + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleReferenceElement", + "value": + { + "keys": [ + { + + "type": "Submodel", + "value": "https://acplt.org/Test_Submodel_Missing" + }, + { + "idType": "IdShort", + "type": "SubmodelElementCollection", + "value": "ExampleSubmodelCollectionOrdered" + }, + { + "idType": "IdShort", + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Reference Element object" + }, + { + "language": "de", + "text": "Beispiel Reference Element Element" + } + ] + } + } + ] + } + ], + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + }, + { + "modelType": + { + "name": "Submodel" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" + } + ], + "type": "GlobalReference" + }, + "administration": + { + "revision": "0", + "version": "0.9" + }, + "id": "https://acplt.org/Test_Submodel_Template", + "idShort": "TestSubmodel", + "submodelElements": [ + { + "modelType": + { + "name": "RelationshipElement" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleRelationshipElement", + "first": + { + "keys": [ + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "second": + { + "keys": [ + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example RelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel RelationshipElement Element" + } + ] + } + }, + { + "modelType": + { + "name": "AnnotatedRelationshipElement" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleAnnotatedRelationshipElement", + "first": + { + "keys": [ + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "second": + { + "keys": [ + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example AnnotatedRelationshipElement object" + }, + { + "language": "de", + "text": "Beispiel AnnotatedRelationshipElement Element" + } + ] + } + }, + { + "modelType": + { + "name": "Operation" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Operations/ExampleOperation" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleOperation", + "inoutputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], + "inputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], + "outputVariable": [ + { + "value": + { + "modelType": + { + "name": "Property" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + } + } + ], +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Operation object" + }, + { + "language": "de", + "text": "Beispiel Operation Element" + } + ] + } + }, + { + "modelType": + { + "name": "Capability" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Capabilities/ExampleCapability" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleCapability", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Capability object" + }, + { + "language": "de", + "text": "Beispiel Capability Element" + } + ] + } + }, + { + "modelType": + { + "name": "BasicEventElement" + }, + "observed": + { + "keys": [ + { + "type": "Property", + "value": "ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Events/ExampleBasicEvent" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleBasicEvent", +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example BasicEvent object" + }, + { + "language": "de", + "text": "Beispiel BasicEvent Element" + } + ] + } + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionOrdered" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleSubmodelCollectionOrdered", + "ordered": true, +"description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollectionOrdered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollectionOrdered Element" + } + ] + }, + "value": [ + { + "modelType": + { + "name": "Property" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Properties/ExampleProperty" + } + ], + "type": "GlobalReference" + }, + "valueType": "xs:string", + "category": "Constant", + "idShort": "ExampleProperty", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Property object" + }, + { + "language": "de", + "text": "Beispiel Property Element" + } + ] + } + }, + { + "modelType": + { + "name": "MultiLanguageProperty" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" + } + ], + "type": "GlobalReference" + }, + "category": "Constant", + "idShort": "ExampleMultiLanguageProperty", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example MulitLanguageProperty object" + }, + { + "language": "de", + "text": "Beispiel MulitLanguageProperty Element" + } + ] + } + }, + { + "modelType": + { + "name": "Range" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Ranges/ExampleRange" + } + ], + "type": "GlobalReference" + }, + "max": "100", + "valueType": "Int", + "category": "Parameter", + "idShort": "ExampleRange", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Range object" + }, + { + "language": "de", + "text": "Beispiel Range Element" + } + ] + } + }, + { + "modelType": + { + "name": "Range" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Ranges/ExampleRange" + } + ], + "type": "GlobalReference" + }, + "min": "0", + "valueType": "Int", + "category": "Parameter", + "idShort": "ExampleRange2", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Range object" + }, + { + "language": "de", + "text": "Beispiel Range Element" + } + ] + } + } + ] + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionUnordered" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleSubmodelCollectionUnordered", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollectionUnordered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollectionUnordered Element" + } + ] + }, + "value": [ + { + "modelType": + { + "name": "Blob" + }, + "mimeType": "application/pdf", + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Blobs/ExampleBlob" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleBlob", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Blob object" + }, + { + "language": "de", + "text": "Beispiel Blob Element" + } + ] + } + }, + { + "modelType": + { + "name": "File" + }, + "mimeType": "application/pdf", + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/Files/ExampleFile" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleFile", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example File object" + }, + { + "language": "de", + "text": "Beispiel File Element" + } + ] + } + }, + { + "modelType": + { + "name": "ReferenceElement" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleReferenceElement", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example Reference Element object" + }, + { + "language": "de", + "text": "Beispiel Reference Element Element" + } + ] + } + } + ] + }, + { + "modelType": + { + "name": "SubmodelElementCollection" + }, + "kind": "Template", + "semanticId": + { + "keys": [ + { + + "type": "GlobalReference", + "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionUnordered" + } + ], + "type": "GlobalReference" + }, + "category": "Parameter", + "idShort": "ExampleSubmodelCollectionUnordered2", + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "Example SubmodelElementCollectionUnordered object" + }, + { + "language": "de", + "text": "Beispiel SubmodelElementCollectionUnordered Element" + } + ] + } + } + ], + "description": { + "langStrings": [ + { + "language": "en-us", + "text": "An Example Asset Administration Shell for the test application" + }, + { + "language": "de", + "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" + } + ] + } + } + ] +} diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlDeserializer.java index 42ec3687b..38965664a 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlDeserializer.java @@ -15,20 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml; -import java.io.*; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.Map; -import java.util.stream.Collectors; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementDeserializer; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.XmlDataformatAnnotationIntrospector; -import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; - import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -37,6 +23,23 @@ import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.dataformat.xml.XmlFactory; import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementDeserializer; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.XmlDataformatAnnotationIntrospector; +import org.eclipse.digitaltwin.aas4j.v3.model.Environment; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.Map; +import java.util.stream.Collectors; public class XmlDeserializer { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSchemaValidator.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSchemaValidator.java index 4c921ee4b..35dd015bb 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSchemaValidator.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSchemaValidator.java @@ -15,17 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml; -import java.io.IOException; -import java.util.HashSet; -import java.util.Set; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.SchemaValidator; +import org.xml.sax.SAXException; import javax.xml.XMLConstants; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.SchemaValidator; -import org.xml.sax.SAXException; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; public class XmlSchemaValidator implements SchemaValidator { private static final String SCHEMA = "/AAS.xsd"; diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializer.java index e7b28aafa..eda8f98f7 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializer.java @@ -15,20 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml; -import java.io.*; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.Map; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.XmlDataformatAnnotationIntrospector; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.AssetAdministrationShellEnvironmentSerializer; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.OperationVariableSerializer; -import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; - import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -38,6 +24,23 @@ import com.fasterxml.jackson.dataformat.xml.XmlFactory; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.XmlDataformatAnnotationIntrospector; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.AssetAdministrationShellEnvironmentSerializer; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.OperationVariableSerializer; +import org.eclipse.digitaltwin.aas4j.v3.model.Environment; +import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; + +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.Map; public class XmlSerializer { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/AbstractLangStringsDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/AbstractLangStringsDeserializer.java index 011f9f147..dec133fca 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/AbstractLangStringsDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/AbstractLangStringsDeserializer.java @@ -16,17 +16,16 @@ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.helper.LangStringContent; -import org.eclipse.digitaltwin.aas4j.v3.model.AbstractLangString; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.JsonNode; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.helper.LangStringContent; +import org.eclipse.digitaltwin.aas4j.v3.model.AbstractLangString; + +import java.io.IOException; +import java.util.List; /** * diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/CustomJsonNodeDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/CustomJsonNodeDeserializer.java index 954c4c11d..7d15fab24 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/CustomJsonNodeDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/CustomJsonNodeDeserializer.java @@ -15,11 +15,11 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; +import java.io.IOException; + public interface CustomJsonNodeDeserializer { public T readValue(JsonNode node, JsonParser parser) throws IOException; } diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/DataElementsDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/DataElementsDeserializer.java index e1214804b..cc3972177 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/DataElementsDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/DataElementsDeserializer.java @@ -15,12 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.TreeNode; @@ -29,10 +23,15 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.TextNode; - import org.eclipse.digitaltwin.aas4j.v3.model.DataElement; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + public class DataElementsDeserializer extends JsonDeserializer> { SubmodelElementDeserializer deserializer = new SubmodelElementDeserializer(); diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/DeserializationHelper.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/DeserializationHelper.java index 00e93da6e..6b5e559c6 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/DeserializationHelper.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/DeserializationHelper.java @@ -15,16 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.TreeNode; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + public class DeserializationHelper { public static T createInstanceFromNode(JsonParser parser, JsonNode node, Class clazz) throws IOException { JsonParser parserContent = parser.getCodec().getFactory().getCodec().treeAsTokens(node); diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/EmbeddedDataSpecificationsDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/EmbeddedDataSpecificationsDeserializer.java index 1deec93b2..7aa3b263b 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/EmbeddedDataSpecificationsDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/EmbeddedDataSpecificationsDeserializer.java @@ -15,10 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; - -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultDataSpecificationIec61360; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; @@ -26,6 +22,9 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import org.eclipse.digitaltwin.aas4j.v3.model.DataSpecificationIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultDataSpecificationIec61360; + +import java.io.IOException; public class EmbeddedDataSpecificationsDeserializer extends JsonDeserializer { @@ -44,7 +43,7 @@ public DataSpecificationIec61360 deserialize(JsonParser parser, DeserializationC private DataSpecificationIec61360 createEmbeddedDataSpecificationsFromContent(JsonParser parser, JsonNode node) throws IOException { JsonNode nodeContent = node.get(PROP_DATA_SPECIFICATION_CONTENT); - return createDefaultDataSpecificationIec61360FromNode(parser, nodeContent); + return createDefaultDataSpecificationIec61360FromNode(parser, nodeContent); } private DataSpecificationIec61360 createDefaultDataSpecificationIec61360FromNode(JsonParser parser, JsonNode nodeContent) throws IOException { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/KeyDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/KeyDeserializer.java index a71562200..044fc3f1c 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/KeyDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/KeyDeserializer.java @@ -15,15 +15,14 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; - import org.eclipse.digitaltwin.aas4j.v3.model.Key; import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; +import java.io.IOException; + public class KeyDeserializer implements CustomJsonNodeDeserializer { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/LangStringContentDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/LangStringContentDeserializer.java index 99fb61634..000fcd369 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/LangStringContentDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/LangStringContentDeserializer.java @@ -15,12 +15,11 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.helper.LangStringContent; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.helper.LangStringContent; + +import java.io.IOException; public class LangStringContentDeserializer implements CustomJsonNodeDeserializer { @Override diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/NoEntryWrapperListDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/NoEntryWrapperListDeserializer.java index 5009fa0f6..3134a00a4 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/NoEntryWrapperListDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/NoEntryWrapperListDeserializer.java @@ -15,11 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; @@ -28,6 +23,11 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + /** * Custom deserializer for lists without individual list entry wrappers for parametrized classes. * diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/OperationVariableDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/OperationVariableDeserializer.java index 94c505b12..441a20e85 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/OperationVariableDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/OperationVariableDeserializer.java @@ -16,12 +16,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; -import java.util.Collections; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; @@ -29,6 +23,11 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; + +import java.io.IOException; +import java.util.Collections; +import java.util.List; public class OperationVariableDeserializer extends JsonDeserializer> { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/QualifierDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/QualifierDeserializer.java index a1930c8ea..c20002096 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/QualifierDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/QualifierDeserializer.java @@ -41,12 +41,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; -import java.util.Collections; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; @@ -54,6 +48,11 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; + +import java.io.IOException; +import java.util.Collections; +import java.util.List; public class QualifierDeserializer extends JsonDeserializer> { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/ReferencesDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/ReferencesDeserializer.java index 1fed0147e..6aac5f8ba 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/ReferencesDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/ReferencesDeserializer.java @@ -15,13 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.TreeNode; @@ -29,6 +22,12 @@ import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; public class ReferencesDeserializer extends JsonDeserializer> { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/SubmodelElementDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/SubmodelElementDeserializer.java index df65da5af..ee5a2c233 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/SubmodelElementDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/SubmodelElementDeserializer.java @@ -15,8 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; @@ -24,10 +22,11 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import java.io.IOException; + public class SubmodelElementDeserializer extends JsonDeserializer { @Override diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/SubmodelElementsDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/SubmodelElementsDeserializer.java index cad350fb0..987ade7a3 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/SubmodelElementsDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/SubmodelElementsDeserializer.java @@ -15,14 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; - import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.TreeNode; @@ -33,6 +25,13 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.TextNode; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; public class SubmodelElementsDeserializer extends JsonDeserializer> { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/ValueReferencePairNodeDeserializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/ValueReferencePairNodeDeserializer.java index e795faa56..0d4c23a07 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/ValueReferencePairNodeDeserializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/deserialization/ValueReferencePairNodeDeserializer.java @@ -1,19 +1,35 @@ -package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; +/* + * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ -import java.io.IOException; +package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.JsonNode; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.ValueReferencePair; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultValueReferencePair; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.JsonNode; +import java.io.IOException; public class ValueReferencePairNodeDeserializer implements CustomJsonNodeDeserializer { @Override public ValueReferencePair readValue(JsonNode node, JsonParser parser) throws IOException { String value = node.get("value").asText(); Reference valueId = DeserializationHelper.createInstanceFromNode(parser, node.get("valueId"), Reference.class); - return new DefaultValueReferencePair.Builder().value(value).valueID(valueId).build(); + return new DefaultValueReferencePair.Builder().value(value).valueId(valueId).build(); } } diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/internal/SubmodelElementManager.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/internal/SubmodelElementManager.java index dc4dbda68..e2ac8bcc2 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/internal/SubmodelElementManager.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/internal/SubmodelElementManager.java @@ -15,10 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal; -import java.util.HashMap; -import java.util.Map; -import java.util.stream.Collectors; - import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultAnnotatedRelationshipElement; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultBasicEventElement; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultBlob; @@ -41,6 +37,10 @@ import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodelElementCollection; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodelElementList; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + public class SubmodelElementManager { public static Map, String> CLASS_TO_NAME = new HashMap<>(); diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/internal/XmlDataformatAnnotationIntrospector.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/internal/XmlDataformatAnnotationIntrospector.java index 0b886d776..2fc785819 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/internal/XmlDataformatAnnotationIntrospector.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/internal/XmlDataformatAnnotationIntrospector.java @@ -15,17 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal; -import java.util.Collection; - import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.cfg.MapperConfig; import com.fasterxml.jackson.databind.introspect.Annotated; import com.fasterxml.jackson.databind.introspect.AnnotatedClass; import com.fasterxml.jackson.databind.introspect.AnnotatedMethod; import com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; +import java.util.Collection; + /** * This class helps to dynamically decide how to de-/serialize classes and * properties defined in the AAS model library. It will automatically add a default namespace diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AdministrativeInformationMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AdministrativeInformationMixin.java index acbb8e933..4a2eaa89f 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AdministrativeInformationMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AdministrativeInformationMixin.java @@ -15,13 +15,12 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonIgnore; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import java.util.List; + @JsonPropertyOrder({"dataSpecifications", "embeddedDataSpecifications", "version", "revision"}) public interface AdministrativeInformationMixin { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AnnotatedRelationshipElementMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AnnotatedRelationshipElementMixin.java index 45e7d375c..ae16bbcb3 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AnnotatedRelationshipElementMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AnnotatedRelationshipElementMixin.java @@ -15,15 +15,14 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.DataElementsDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.DataElementsSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.DataElement; +import java.util.List; + public interface AnnotatedRelationshipElementMixin { @JsonSerialize(using = DataElementsSerializer.class) diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AssetAdministrationShellMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AssetAdministrationShellMixin.java index fd7579737..83f36a12a 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AssetAdministrationShellMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AssetAdministrationShellMixin.java @@ -15,14 +15,13 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; + +import java.util.List; @JsonPropertyOrder({ "extension", "category", "idShort", "displayNames", "description", "checksum", "administration", "id", "dataSpecifications", "embeddedDataSpecifications", "derivedFrom", "assetInformation", "submodels" }) public interface AssetAdministrationShellMixin { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AssetInformationMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AssetInformationMixin.java index 19304faf5..ae73124a9 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AssetInformationMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/AssetInformationMixin.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,29 +16,28 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.File; -import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetID; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; +import org.eclipse.digitaltwin.aas4j.v3.model.File; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; + +import java.util.List; @JsonPropertyOrder({ "assetKind", "globalAssetId", "specificAssetIds", "defaultThumbnail"}) public interface AssetInformationMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "specificAssetId") @JacksonXmlElementWrapper(namespace = AasXmlNamespaceContext.AAS_URI, localName = "specificAssetIds") - public List getSpecificAssetIds(); + public List getSpecificAssetIds(); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "specificAssetId") @JacksonXmlElementWrapper(namespace = AasXmlNamespaceContext.AAS_URI, localName = "specificAssetIds") - public void setSpecificAssetIds(List specificAssetIds); + public void setSpecificAssetIds(List specificAssetIds); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "globalAssetId") @JacksonXmlElementWrapper(namespace = AasXmlNamespaceContext.AAS_URI, localName = "globalAssetId") - public String getGlobalAssetID(); + public String getGlobalAssetId(); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "defaultThumbnail") public File getDefaultThumbnail(); diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ConceptDescriptionMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ConceptDescriptionMixin.java index 1081f1130..f7d7f7643 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ConceptDescriptionMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ConceptDescriptionMixin.java @@ -15,14 +15,13 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; + +import java.util.List; @JsonPropertyOrder({"hasExtension", "category", "idShort", "displayName", "description", "checksum", "administration", "id", "embeddedDataSpecification", "isCaseOf"}) diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/DataSpecificationIec61360Mixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/DataSpecificationIec61360Mixin.java index eefb98b28..64cf17940 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/DataSpecificationIec61360Mixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/DataSpecificationIec61360Mixin.java @@ -15,8 +15,10 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.LangStringsDefinitionTypeIec61360Deserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.LangStringsPreferredNameTypeIec61360Deserializer; @@ -33,10 +35,7 @@ import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.ValueList; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; @JsonPropertyOrder({"preferredName", "shortName", "unit", "unitId", "sourceOfDefinition", "symbol", "dataType", "definition", "valueFormat", "valueList", "value", "valueId", "levelType"}) public interface DataSpecificationIec61360Mixin { @@ -101,6 +100,4 @@ public interface DataSpecificationIec61360Mixin { @JsonSerialize(using = EnumSerializer.class) public DataTypeIec61360 getDataType(); - - } diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EmbeddedDataSpecificationMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EmbeddedDataSpecificationMixin.java index 8832434c2..ed615bf18 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EmbeddedDataSpecificationMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EmbeddedDataSpecificationMixin.java @@ -15,17 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.EmbeddedDataSpecificationsDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.EmbeddedDataSpecificationSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.DataSpecificationContent; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - @JsonPropertyOrder({"dataSpecification", "dataSpecificationContent"}) public interface EmbeddedDataSpecificationMixin { @@ -43,4 +42,4 @@ public interface EmbeddedDataSpecificationMixin { @JsonDeserialize(using = EmbeddedDataSpecificationsDeserializer.class) public void setDataSpecificationContent(DataSpecificationContent dataSpecificationIEC61360); -} +} \ No newline at end of file diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EntityMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EntityMixin.java index 461fb73c5..0a2f38932 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EntityMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EntityMixin.java @@ -15,17 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.SubmodelElementsSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; public interface EntityMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "statements") diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EnvironmentMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EnvironmentMixin.java index 9ccd1bfc1..31e29a9b0 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EnvironmentMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/EnvironmentMixin.java @@ -17,9 +17,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; +import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; import java.util.List; diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ExtensionMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ExtensionMixin.java index 21e27d0cb..2c279d707 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ExtensionMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ExtensionMixin.java @@ -15,13 +15,12 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.RefersToSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; @JsonPropertyOrder({ "semanticId", "supplementalSemanticIds", "name", "valueType", "value", "refersTo" }) public interface ExtensionMixin { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasDataSpecificationMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasDataSpecificationMixin.java index 7e801c9e1..ca344f604 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasDataSpecificationMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasDataSpecificationMixin.java @@ -15,13 +15,12 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; public interface HasDataSpecificationMixin { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasExtensionsMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasExtensionsMixin.java index f4489b4f7..c5228f9a0 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasExtensionsMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasExtensionsMixin.java @@ -15,14 +15,13 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import java.util.List; + public interface HasExtensionsMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "extension") @JacksonXmlElementWrapper(namespace = AasXmlNamespaceContext.AAS_URI, localName = "extensions") diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasSemanticsMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasSemanticsMixin.java index 9bf5216df..cd2ae17ee 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasSemanticsMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/HasSemanticsMixin.java @@ -15,19 +15,21 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.ReferencesDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; + +@JsonPropertyOrder("semanticId, supplementalSemanticIds") public interface HasSemanticsMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "semanticId") - void setSemanticID(Reference semanticID); + void setSemanticId(Reference semanticId); @JsonDeserialize(using = ReferencesDeserializer.class) void setSupplementalSemanticIds(List supplementalSemanticIds); diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/KeyMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/KeyMixin.java index 34e5864a5..78190506e 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/KeyMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/KeyMixin.java @@ -17,7 +17,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/LevelTypeMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/LevelTypeMixin.java new file mode 100644 index 000000000..db54e96eb --- /dev/null +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/LevelTypeMixin.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; + +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; + + +@JsonPropertyOrder({"min", "nom", "typ", "max"}) +public interface LevelTypeMixin { + + @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "min") + public boolean getMin(); + + @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "min") + void setMin(boolean min); + + @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "nom") + public boolean getNom(); + + @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "nom") + void setNom(boolean nom); + + @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "typ") + public boolean getTyp(); + + @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "typ") + void setTyp(boolean typ); + + @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "max") + public boolean getMax(); + + @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "max") + void setMax(boolean max); +} diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/MultiLanguagePropertyMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/MultiLanguagePropertyMixin.java index da43b241a..66437999d 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/MultiLanguagePropertyMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/MultiLanguagePropertyMixin.java @@ -15,16 +15,15 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.LangStringsTextTypeDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; public interface MultiLanguagePropertyMixin { @JacksonXmlElementWrapper(namespace = AasXmlNamespaceContext.AAS_URI, localName = "value") diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/OperationMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/OperationMixin.java index cb5002f92..14926181b 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/OperationMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/OperationMixin.java @@ -15,12 +15,11 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.OperationVariableDeserializer; import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.List; public interface OperationMixin { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/OperationVariableMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/OperationVariableMixin.java index 91af44668..582926deb 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/OperationVariableMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/OperationVariableMixin.java @@ -17,9 +17,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; - import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.SubmodelElementSerializer; diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/PropertyMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/PropertyMixin.java index 385e36446..68a0c229e 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/PropertyMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/PropertyMixin.java @@ -15,11 +15,10 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - /** * * @author schnicke @@ -27,5 +26,5 @@ */ public interface PropertyMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "valueId") - void setValueID(Reference valueID); + void setValueId(Reference valueId); } diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/QualifiableMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/QualifiableMixin.java index 0028e520d..871c4daba 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/QualifiableMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/QualifiableMixin.java @@ -15,15 +15,14 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.QualifierDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; public interface QualifiableMixin { @JacksonXmlElementWrapper(namespace = AasXmlNamespaceContext.AAS_URI, localName = "qualifiers") diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/QualifierMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/QualifierMixin.java index ab98d6027..29f0b0775 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/QualifierMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/QualifierMixin.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,14 +16,13 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.QualifierKind; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - @JsonPropertyOrder({ "semanticId", "supplementalSemanticIds", // --> HasSemantics "kind", "type", "valueType", "value", "valueId" @@ -36,7 +36,7 @@ public interface QualifierMixin { void setType(String type); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "valueType") - void setType(DataTypeDefXSD valueType); + void setType(DataTypeDefXsd valueType); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "value") void setValue(String value); diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ReferableMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ReferableMixin.java index 552eb1d3e..af190e8f5 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ReferableMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ReferableMixin.java @@ -15,8 +15,10 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.LangStringsNameTypeDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.LangStringsTextTypeDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; @@ -25,29 +27,26 @@ import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; @JsonPropertyOrder({"hasExtensions", "category", "idShort", "displayName", "description", "checksum"}) public interface ReferableMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "description") @JsonSerialize(using = LangStringsTextTypeSerializer.class) - public List getDescription(); + List getDescription(); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "description") @JsonDeserialize(using = LangStringsTextTypeDeserializer.class) - public void setDescription(List descriptions); + void setDescription(List descriptions); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "displayName") @JsonDeserialize(using = LangStringsNameTypeDeserializer.class) - public List getDisplayName(); + List getDisplayName(); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "displayName") @JsonSerialize(using = LangStringsNameTypeSerializer.class) - public void setDisplayName(List displayNames); + void setDisplayName(List displayNames); - public String getIdShort(); + String getIdShort(); } diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ReferenceMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ReferenceMixin.java index 41d8dce6c..c6a2a26b8 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ReferenceMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ReferenceMixin.java @@ -15,18 +15,17 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.KeysDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.Key; import org.eclipse.digitaltwin.aas4j.v3.model.ReferenceTypes; +import java.util.List; + @JsonPropertyOrder({"type", "key"}) public interface ReferenceMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "key") diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ResourceMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ResourceMixin.java index 0af6f1b47..21a6963e8 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ResourceMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ResourceMixin.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +16,10 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; @JsonPropertyOrder({"path", "contentType"}) public interface ResourceMixin { @@ -28,5 +28,5 @@ public interface ResourceMixin { public String getPath(); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "contentType") - public DataTypeDefXSD getContentType(); + public DataTypeDefXsd getContentType(); } diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SpecificAssetIDMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SpecificAssetIdMixin.java similarity index 94% rename from dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SpecificAssetIDMixin.java rename to dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SpecificAssetIdMixin.java index 511735600..cc15f92f7 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SpecificAssetIDMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SpecificAssetIdMixin.java @@ -15,14 +15,13 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; @JsonPropertyOrder({"hasSemantics", "name", "value", "externalSubjectId"}) -public interface SpecificAssetIDMixin { +public interface SpecificAssetIdMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "name") public String getName(); @@ -31,5 +30,5 @@ public interface SpecificAssetIDMixin { public String getValue(); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "externalSubjectId") - public Reference getExternalSubjectID(); + public Reference getExternalSubjectId(); } diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelElementCollectionMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelElementCollectionMixin.java index 102e1f4d8..511c53779 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelElementCollectionMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelElementCollectionMixin.java @@ -15,17 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.SubmodelElementsSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import java.util.List; + public interface SubmodelElementCollectionMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "value") @JsonSerialize(using = SubmodelElementsSerializer.class) diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelElementListMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelElementListMixin.java index bd95e887b..9ee63793f 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelElementListMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelElementListMixin.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,19 +16,18 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.SubmodelElementsSerializer; -import org.eclipse.digitaltwin.aas4j.v3.model.AASSubmodelElements; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.AasSubmodelElements; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; public interface SubmodelElementListMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "value") @@ -48,14 +48,14 @@ public interface SubmodelElementListMixin { public void setSemanticIdListElement(Reference semanticIdListElement); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "typeValueListElement") - public AASSubmodelElements getTypeValueListElement(); + public AasSubmodelElements getTypeValueListElement(); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "typeValueListElement") - public void setTypeValueListElement(AASSubmodelElements typeValueListElement); + public void setTypeValueListElement(AasSubmodelElements typeValueListElement); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "valueTypeListElement") - public DataTypeDefXSD getValueTypeListElement(); + public DataTypeDefXsd getValueTypeListElement(); @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "valueTypeListElement") - public void setValueTypeListElement(DataTypeDefXSD valueTypeListElement); + public void setValueTypeListElement(DataTypeDefXsd valueTypeListElement); } diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelMixin.java index bcb0845e9..4e9525647 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/SubmodelMixin.java @@ -15,18 +15,17 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.SubmodelElementsDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization.SubmodelElementsSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import java.util.List; + @JsonPropertyOrder({ "hasExtension", "category", "idShort", "displayNames", "description", "checksum", "administration", "id", "kind", "semanticId", "supplementalSemanticIds", "qualifier", "dataSpecifications", "embeddedDataSpecifications", "submodelElements"}) public interface SubmodelMixin { @JacksonXmlProperty(namespace = AasXmlNamespaceContext.AAS_URI, localName = "submodelElements") diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ValueListMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ValueListMixin.java index d13a78bbb..6121f1230 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ValueListMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ValueListMixin.java @@ -15,15 +15,14 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import java.util.List; - +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.deserialization.ValueReferencePairsDeserializer; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.ValueReferencePair; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; public interface ValueListMixin { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ValueReferencePairMixin.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ValueReferencePairMixin.java index 52fc57b22..a09a92494 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ValueReferencePairMixin.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/mixins/ValueReferencePairMixin.java @@ -15,11 +15,10 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; - import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; @JsonPropertyOrder({ "value", "valueID" }) public interface ValueReferencePairMixin { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AbstractLangStringSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AbstractLangStringSerializer.java index 8f2e2c085..4f88b81ee 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AbstractLangStringSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AbstractLangStringSerializer.java @@ -19,18 +19,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.lang.reflect.Field; - -import javax.xml.namespace.QName; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; -import org.eclipse.digitaltwin.aas4j.v3.model.AbstractLangString; - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; +import org.eclipse.digitaltwin.aas4j.v3.model.AbstractLangString; + +import javax.xml.namespace.QName; +import java.io.IOException; +import java.lang.reflect.Field; public class AbstractLangStringSerializer extends JsonSerializer { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AbstractLangStringsSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AbstractLangStringsSerializer.java index 899130619..5937ab007 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AbstractLangStringsSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AbstractLangStringsSerializer.java @@ -16,16 +16,15 @@ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.util.List; - +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; import org.eclipse.digitaltwin.aas4j.v3.model.AbstractLangString; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import java.io.IOException; +import java.util.List; /** * diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AssetAdministrationShellEnvironmentSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AssetAdministrationShellEnvironmentSerializer.java index b9f0f0b14..ea3261e55 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AssetAdministrationShellEnvironmentSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/AssetAdministrationShellEnvironmentSerializer.java @@ -15,16 +15,10 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamWriter; - +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; @@ -32,10 +26,14 @@ import org.eclipse.digitaltwin.aas4j.v3.model.Environment; import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; public class AssetAdministrationShellEnvironmentSerializer extends JsonSerializer { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/DataElementsSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/DataElementsSerializer.java index 800e7e233..3e0a20e5a 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/DataElementsSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/DataElementsSerializer.java @@ -15,17 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.util.List; - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import java.io.IOException; +import java.util.List; + public class DataElementsSerializer extends JsonSerializer> { SubmodelElementSerializer ser = new SubmodelElementSerializer(); diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/EmbeddedDataSpecificationSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/EmbeddedDataSpecificationSerializer.java index 1208a07d6..cfad82bb1 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/EmbeddedDataSpecificationSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/EmbeddedDataSpecificationSerializer.java @@ -15,9 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; - - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonSerializer; @@ -25,6 +22,8 @@ import com.fasterxml.jackson.databind.jsontype.TypeSerializer; import org.eclipse.digitaltwin.aas4j.v3.model.DataSpecificationIec61360; +import java.io.IOException; + /** * Custom Serializer for class DataSpecification. Adds type information in form @@ -47,7 +46,7 @@ public void serialize(DataSpecificationIec61360 data, JsonGenerator generator, S @Override public void serializeWithType(DataSpecificationIec61360 data, JsonGenerator generator, SerializerProvider provider, - TypeSerializer typedSerializer) throws IOException, JsonProcessingException { + TypeSerializer typedSerializer) throws IOException, JsonProcessingException { serialize(data, generator, provider); } -} +} \ No newline at end of file diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/LangStringsNameTypeSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/LangStringsNameTypeSerializer.java index 918581f31..f22a61c91 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/LangStringsNameTypeSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/LangStringsNameTypeSerializer.java @@ -15,16 +15,15 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.util.List; - +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import java.io.IOException; +import java.util.List; /** * diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/NoEntryWrapperListSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/NoEntryWrapperListSerializer.java index 9530685c4..ca6c57055 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/NoEntryWrapperListSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/NoEntryWrapperListSerializer.java @@ -15,14 +15,14 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.util.List; - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import java.io.IOException; +import java.util.List; + /** * Custom serializer for lists without individual list entry wrappers for parametrized classes. * diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/OperationVariableSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/OperationVariableSerializer.java index 5ca546993..cb79710fa 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/OperationVariableSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/OperationVariableSerializer.java @@ -15,15 +15,14 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; -import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; +import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; + +import java.io.IOException; public class OperationVariableSerializer extends JsonSerializer { @Override diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/RefersToSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/RefersToSerializer.java index be0acf819..653fc24f2 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/RefersToSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/RefersToSerializer.java @@ -25,17 +25,16 @@ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins.HasSemanticsMixin; -import org.eclipse.digitaltwin.aas4j.v3.model.Extension; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.mixins.HasSemanticsMixin; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; + +import java.io.IOException; +import java.util.List; /** * Serializes the RefersTo value of {@link Extension}.
diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/SubmodelElementSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/SubmodelElementSerializer.java index 39c94f386..75361c374 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/SubmodelElementSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/SubmodelElementSerializer.java @@ -15,18 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.lang.reflect.Field; - -import javax.xml.namespace.QName; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; -import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; + +import javax.xml.namespace.QName; +import java.io.IOException; +import java.lang.reflect.Field; public class SubmodelElementSerializer extends JsonSerializer { diff --git a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/SubmodelElementsSerializer.java b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/SubmodelElementsSerializer.java index f7ba02196..66e2b626f 100644 --- a/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/SubmodelElementsSerializer.java +++ b/dataformat-xml/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/serialization/SubmodelElementsSerializer.java @@ -15,17 +15,16 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.serialization; -import java.io.IOException; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; -import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper; +import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.SubmodelElementManager; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; + +import java.io.IOException; +import java.util.List; public class SubmodelElementsSerializer extends JsonSerializer> { diff --git a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XMLDeserializerTest.java b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XMLDeserializerTest.java index 8da48bc62..f3d698768 100644 --- a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XMLDeserializerTest.java +++ b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XMLDeserializerTest.java @@ -15,9 +15,6 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml; -import java.io.FileNotFoundException; -import java.util.List; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASFull; @@ -33,6 +30,9 @@ import org.junit.Test; import org.xml.sax.SAXException; +import java.io.FileNotFoundException; +import java.util.List; + public class XMLDeserializerTest { @Test diff --git a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java index 042484289..aaa6b2e13 100644 --- a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java +++ b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023 SAP SE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,15 +17,6 @@ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASFull; import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.AASSimple; @@ -32,7 +24,7 @@ import org.eclipse.digitaltwin.aas4j.v3.dataformat.xml.internal.AasXmlNamespaceContext; import org.eclipse.digitaltwin.aas4j.v3.model.AssetKind; import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Environment; import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultAssetAdministrationShell; @@ -55,6 +47,15 @@ import org.xmlunit.matchers.CompareMatcher; import org.xmlunit.util.Predicate; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + public class XmlSerializerTest { public static final java.io.File AASFULL_FILE = new java.io.File("src/test/resources/test_demo_full_example.xml"); @@ -136,7 +137,7 @@ public void validateMinimalOperationAgainstXsdSchema() throws SerializationExcep .value(new DefaultProperty.Builder() .idShort("inputProperty") .value("1") - .valueType(DataTypeDefXSD.INT) + .valueType(DataTypeDefXsd.INT) .build()) .build()) .build()) @@ -146,9 +147,10 @@ public void validateMinimalOperationAgainstXsdSchema() throws SerializationExcep assertTrue(errors.isEmpty()); } + @Test public void validateGYearAgainstXsdSchema() throws SerializationException, SAXException { - Submodel submodel = new DefaultSubmodel.Builder().id("yearTestSm").submodelElements(new DefaultProperty.Builder().idShort("yearTestProp").valueType(DataTypeDefXSD.GYEAR).build()).build(); + Submodel submodel = new DefaultSubmodel.Builder().id("yearTestSm").submodelElements(new DefaultProperty.Builder().idShort("yearTestProp").valueType(DataTypeDefXsd.GYEAR).build()).build(); String xml = new XmlSerializer().write(new DefaultEnvironment.Builder().submodels(submodel).build()); Set errors = validateAgainstXsdSchema(xml); assertTrue(errors.isEmpty()); @@ -172,6 +174,7 @@ public void validateIsCaseOfAgainstXsdSchema() throws SerializationException, SA assertTrue(errors.isEmpty()); } + @Test public void serializeAASWithExtensionMinimal() throws SerializationException, SAXException { validateXmlSerializer(AAS_WITH_EXTENSION_MINIMAL, Examples.EXTENSION_MINIMAL, new XmlSerializer()); @@ -182,6 +185,7 @@ public void serializeAASWithExtensionMaximal() throws SerializationException, SA validateXmlSerializer(AAS_WITH_EXTENSION_MAXIMAL, Examples.EXTENSION_MAXIMAL, new XmlSerializer()); } + private Set validateAgainstXsdSchema(String xml) throws SAXException { return new XmlSchemaValidator().validateSchema(xml); } @@ -215,8 +219,8 @@ private String removeDefaults(String aasXml) { aasXml = aasXml.replace("Instance", ""); aasXml = aasXml.replace("VARIABLE", ""); aasXml = aasXml.replace("VARIABLE", ""); - aasXml = aasXml.replace("PROPERTY", ""); // TODO: only for ConceptDescriptions - aasXml = aasXml.replace("PROPERTY", ""); // TODO: only for ConceptDescriptions + aasXml = aasXml.replace("PROPERTY", ""); + aasXml = aasXml.replace("PROPERTY", ""); aasXml = aasXml.replace("ConceptQualifier", ""); aasXml = aasXml.replace("ConceptQualifier", ""); aasXml = aasXml.replace("true", ""); @@ -239,7 +243,7 @@ private boolean ignoreDefaults(Node node) { if (node.getLocalName() != null && node.getLocalName().equals("category") - && node.getFirstChild().getNodeValue().equals("PROPERTY")) { // TODO: only for ConceptDescriptions + && node.getFirstChild().getNodeValue().equals("PROPERTY")) { return false; } diff --git a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlValidationTest.java b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlValidationTest.java index 6db0f8f26..67940aa60 100644 --- a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlValidationTest.java +++ b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlValidationTest.java @@ -15,14 +15,8 @@ */ package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.Set; - +import junitparams.JUnitParamsRunner; +import junitparams.Parameters; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -30,8 +24,13 @@ import org.slf4j.LoggerFactory; import org.xml.sax.SAXException; -import junitparams.JUnitParamsRunner; -import junitparams.Parameters; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.Set; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; @RunWith(JUnitParamsRunner.class) public class XmlValidationTest { diff --git a/dataformat-xml/src/test/resources/Example_AAS_ServoDCMotor - Simplified V2.0.xml b/dataformat-xml/src/test/resources/Example_AAS_ServoDCMotor - Simplified V2.0.xml new file mode 100644 index 000000000..4d4a18d3d --- /dev/null +++ b/dataformat-xml/src/test/resources/Example_AAS_ServoDCMotor - Simplified V2.0.xml @@ -0,0 +1,436 @@ + + + + + ExampleMotor + + http://customer.com/aas/9175_7013_7091_9168 + + + Instance + + GlobalReference + + + AssetAdministrationShell + http://customer.com/assets/KHBVZJSQKIY + + + + + + + GlobalReference + + + Submodel + http://i40.customer.com/instance/1/1/AC69B1CB44F07935 + + + + + GlobalReference + + + Submodel + http://i40.customer.com/type/1/1/1A7B62B529F19152 + + + + + GlobalReference + + + Submodel + http://i40.customer.com/type/1/1/7A7104BDAB57E184 + + + + + + + + + Documentation + + http://i40.customer.com/type/1/1/1A7B62B529F19152 + + Instance + + + OperatingManual + Instance + + GlobalReference + + + ConceptDescription + http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document + + + + + + Parameter + DigitalFile_PDF + Instance + + GlobalReference + + + ConceptDescription + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile + + + + file:///aasx/OperatingManual.pdf + application/pdf + + + Title + Instance + + GlobalReference + + + ConceptDescription + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title + + + + + + en + Operating Manual + + + + + + + + + TechnicalData + + http://i40.customer.com/type/1/1/7A7104BDAB57E184 + + Instance + + GlobalReference + + + ConceptDescription + 0173-1#01-AFZ615#016 + + + + + + Parameter + MaxRotationSpeed + Instance + + GlobalReference + + + ConceptDescription + 0173-1#02-BAA120#008 + + + + xs:int + 5000 + + + + + OperationalData + + http://i40.customer.com/instance/1/1/AC69B1CB44F07935 + + Instance + + + Variable + RotationSpeed + Instance + + GlobalReference + + + ConceptDescription + http://customer.com/cd/1/1/18EBD56F6B43D895 + + + + xs:int + 4370 + + + + + + + MaxRotationSpeed + + 2 + 0 + + + 0173-1#02-BAA120#008 + + + + + GlobalReference + + + ConceptDescription + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationaas + + + + + + + + de + max. Drehzahl + + + en + Max. rotation speed + + + + 1/min + + + GlobalReference + + + ConceptDescription + 0173-1#05-AAA650#002 + + + + REAL_MEASURE + + + de + Höchste zulässige Drehzahl, mit welcher der Motor oder die Speiseinheit betrieben werden darf + + + en + Greatest permissible rotation speed with which the motor or feeding unit may be operated + + + + + + + + + + Title + + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title + + + + + GlobalReference + + + ConceptDescription + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360 + + + + + + + + de + Titel + + + en + Title + + + + + de + Titel + + + STRING_TRANSLATABLE + + + de + Sprachabhängiger Titel des Dokuments. + + + + + + + + + RotationSpeed + + http://customer.com/cd/1/1/18EBD56F6B43D895 + + + + + GlobalReference + + + ConceptDescription + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationaas + + + + + + + + de + Aktuelle Drehzahl + + + en + Actual rotation speed + + + + + en + RotationSpeed + + + + 1/min + + + GlobalReference + + + ConceptDescription + 0173-1#05-AAA650#002 + + + + REAL_MEASURE + + + de + Aktuelle Drehzahl, mit welcher der Motor oder die Speiseinheit betrieben wird + + + en + Actual rotation speed with which the motor or feeding unit is operated + + + + + + + + + Document + + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/Document + + + + + GlobalReference + + + ConceptDescription + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationaas + + + + + + + + de + Dokument + + + en + Document + + + + + en + Document + + + + [ISO 15519-1:2010] + + IRI + + + de + Feste und geordnete Menge von für die Verwendung durch Personen bestimmte Informationen, die verwaltet und als Einheit zwischen Benutzern und System ausgetauscht werden kann. + + + + + + + + + DigitalFile + + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile + + + + + GlobalReference + + + ConceptDescription + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationaas + + + + + + + + de + Digitale Datei + + + + + de + digitale Datei + + + IRI + + + de + Eine Datei, die die DocumentVersion repräsentiert. Neben der obligatorischen PDF/A Datei können weitere Dateien angegeben werden. + + + + + + + + + \ No newline at end of file diff --git a/dataformat-xml/src/test/resources/Example_AAS_ServoDCMotor - Simplified.xml b/dataformat-xml/src/test/resources/Example_AAS_ServoDCMotor - Simplified.xml index fa5409f8c..455ad0fc0 100644 --- a/dataformat-xml/src/test/resources/Example_AAS_ServoDCMotor - Simplified.xml +++ b/dataformat-xml/src/test/resources/Example_AAS_ServoDCMotor - Simplified.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=""> ExampleMotor diff --git a/dataformat-xml/src/test/resources/ServoDCMotor_invalid.xml b/dataformat-xml/src/test/resources/ServoDCMotor_invalid.xml index 5e790ec5f..2c5257a5a 100644 --- a/dataformat-xml/src/test/resources/ServoDCMotor_invalid.xml +++ b/dataformat-xml/src/test/resources/ServoDCMotor_invalid.xml @@ -1,9 +1,8 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:IEC61360="http://www.admin-shell.io/IEC61360/3/0" xmlns="https://admin-shell.io/aas/3/0" + xsi:schemaLocation="http://www.admin-shell.io/IEC61360/3/0 IEC61360.xsd"> diff --git a/dataformat-xml/src/test/resources/ServoDCMotor_invalid_V2.0.xml b/dataformat-xml/src/test/resources/ServoDCMotor_invalid_V2.0.xml new file mode 100644 index 000000000..ba39af8bd --- /dev/null +++ b/dataformat-xml/src/test/resources/ServoDCMotor_invalid_V2.0.xml @@ -0,0 +1,469 @@ + + + + + + ExampleMotor + + CONSTANT + + http://customer.com/aas/9175_7013_7091_9168 + + + + + http://customer.com/assets/KHBVZJSQKIY + + + + + + + + + http://i40.customer.com/instance/1/1/AC69B1CB44F07935 + + + + + + + http://i40.customer.com/type/1/1/1A7B62B529F19152 + + + + + + + http://i40.customer.com/type/1/1/7A7104BDAB57E184 + + + + + + + + + + Documentation + + + CONSTANT + + + http://i40.customer.com/type/1/1/1A7B62B529F19152 + + Instance + + + + + + OperatingManual + + Instance + + + + www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document + + + + + + + + DigitalFile_PDF + + + PARAMETER + + Instance + + + + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile + + + + + application/pdf + + + /aasx/OperatingManual.pdf + + + + + + + Title + + Instance + + + + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title + + + + + + Operating Manual + + + + + + false + false + + + + + + + TechnicalData + + + CONSTANT + + + http://i40.customer.com/type/1/1/7A7104BDAB57E184 + + Instance + + + + 0173-1#01-AFZ615#016 + + + + + + + + MaxRotationSpeed + + + PARAMETER + + Instance + + + + 0173-1#02-BAA120#008 + + + + + integer + + + 5000 + + + + + + + + + OperationalData + + + VARIABLE + + + http://i40.customer.com/instance/1/1/AC69B1CB44F07935 + + + Instance + + + + + + + + RotationSpeed + + + VARIABLE + + Instance + + + + http://customer.com/cd/1/1/18EBD56F6B43D895 + + + + + + + + + + integer + + + 4370 + + + + + + + + + + + MaxRotationSpeed + + PROPERTY + + 0173-1#02-BAA120#008 + + + 2 + 0 + + + + + REAL_MEASURE + + + Höchste zulässige Drehzahl, mit welcher der Motor oder die Speiseinheit betrieben werden darf + + + Greatest permissible rotation speed with which the motor or feeding unit may be operated + + + + + max. Drehzahl + + + Max. rotation speed + + + + + + + + 1/min + + + + + 0173-1#05-AAA650#002 + + + + + + + + + + + + + Title + + PROPERTY + + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title + + + + + STRING_TRANSLATABLE + + + Sprachabhängiger Titel des Dokuments. + + + + + Titel + + + Title + + + + + Titel + + + + + + + + + + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360 + + + + + + + + RotationSpeed + + PROPERTY + + http://customer.com/cd/1/1/18EBD56F6B43D895 + + + + + + REAL_MEASURE + + + Aktuelle Drehzahl, mit welcher der Motor oder die Speiseinheit betrieben wird + + + Actual rotation speed with which the motor or feeding unit is operated + + + + + Aktuelle Drehzahl + + + Actual rotation speed + + + + + RotationSpeed + + + + + 1/min + + + + + 0173-1#05-AAA650#002 + + + + + + + + + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360 + + + + + + + + Document + + + COLLECTION + + + + + + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/Document + + + + + URL + + + Feste und geordnete Menge von für die Verwendung durch Personen bestimmte Informationen, die verwaltet und als Einheit zwischen Benutzern und System ausgetauscht werden kann. + + + + + Dokument + + + Document + + + + + Document + + + + [ISO 15519-1:2010] + + + + + + + + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360 + + + + + + + + + DigitalFile + + + DOCUMENT + + + http://vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile + + + + + URL + + + Eine Datei, die die DocumentVersion repräsentiert. Neben der obligatorischen PDF/A Datei können weitere Dateien angegeben werden. + + + + + Digitale Datei + + + + + digitale Datei + + + + + + + + + + http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360 + + + + + + + diff --git a/dataformat-xml/src/test/resources/admin-shell-io/Extension/minimal.xml b/dataformat-xml/src/test/resources/admin-shell-io/Extension/minimal.xml index cf753d6f1..07d884e80 100644 --- a/dataformat-xml/src/test/resources/admin-shell-io/Extension/minimal.xml +++ b/dataformat-xml/src/test/resources/admin-shell-io/Extension/minimal.xml @@ -7,6 +7,7 @@ something_aae6caf4 + xs:string something_142922d6 diff --git a/dataformat-xml/src/test/resources/annotated_relationship_example.xml b/dataformat-xml/src/test/resources/annotated_relationship_example.xml index 3573866cb..de92be7f0 100644 --- a/dataformat-xml/src/test/resources/annotated_relationship_example.xml +++ b/dataformat-xml/src/test/resources/annotated_relationship_example.xml @@ -1,5 +1,6 @@ - + TestSubmodel diff --git a/dataformat-xml/src/test/resources/invalidXmlExample.xml b/dataformat-xml/src/test/resources/invalidXmlExample.xml index b7b77781f..d8824c2cd 100644 --- a/dataformat-xml/src/test/resources/invalidXmlExample.xml +++ b/dataformat-xml/src/test/resources/invalidXmlExample.xml @@ -1,8 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.admin-shell.io/IEC61360/3/0 IEC61360.xsd"> \ No newline at end of file diff --git a/dataformat-xml/src/test/resources/operation_example.xml b/dataformat-xml/src/test/resources/operation_example.xml index bbc5798bb..c24ddbc1a 100644 --- a/dataformat-xml/src/test/resources/operation_example.xml +++ b/dataformat-xml/src/test/resources/operation_example.xml @@ -1,5 +1,5 @@ - diff --git a/dataformat-xml/src/test/resources/qualifier_example.xml b/dataformat-xml/src/test/resources/qualifier_example.xml index 93b4cc661..632f22211 100644 --- a/dataformat-xml/src/test/resources/qualifier_example.xml +++ b/dataformat-xml/src/test/resources/qualifier_example.xml @@ -1,5 +1,6 @@ - + TestSubmodel diff --git a/dataformat-xml/src/test/resources/test_demo_full_example.xml b/dataformat-xml/src/test/resources/test_demo_full_example.xml index 26fbaefe4..404d23319 100644 --- a/dataformat-xml/src/test/resources/test_demo_full_example.xml +++ b/dataformat-xml/src/test/resources/test_demo_full_example.xml @@ -2386,7 +2386,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -2465,6 +2465,12 @@ TEST + + false + false + false + true + diff --git a/dataformat-xml/src/test/resources/xmlExample.xml b/dataformat-xml/src/test/resources/xmlExample.xml index 5e37d5016..57e811b6f 100644 --- a/dataformat-xml/src/test/resources/xmlExample.xml +++ b/dataformat-xml/src/test/resources/xmlExample.xml @@ -77,6 +77,7 @@ TechnicalData http://i40.customer.com/type/1/1/7A7104BDAB57E184 + Instance ExternalReference @@ -187,7 +188,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -237,7 +238,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -292,7 +293,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -346,7 +347,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -369,7 +370,7 @@ EN - ActRotationSpeed + ActualRotationSpeed 1/min @@ -409,7 +410,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 diff --git a/dataformat-xml/src/test/resources/xmlExampleWithModifiedPrefix.xml b/dataformat-xml/src/test/resources/xmlExampleWithModifiedPrefix.xml index 2db066ec3..f0b3b70b5 100644 --- a/dataformat-xml/src/test/resources/xmlExampleWithModifiedPrefix.xml +++ b/dataformat-xml/src/test/resources/xmlExampleWithModifiedPrefix.xml @@ -187,7 +187,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -237,7 +237,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -292,7 +292,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -346,7 +346,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 @@ -369,7 +369,7 @@ EN - ActRotationSpeed + ActualRotationSpeed 1/min @@ -409,7 +409,7 @@ GlobalReference - https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 + https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360 diff --git a/model/pom.xml b/model/pom.xml index af5720aa9..f28613aa8 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -22,6 +22,7 @@ 1.5.0 3.6.0 3.4.5 + 0xDFCC34A6 diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AASSubmodelElements.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AasSubmodelElements.java similarity index 58% rename from model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AASSubmodelElements.java rename to model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AasSubmodelElements.java index 23009d63b..15425fdd0 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AASSubmodelElements.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AasSubmodelElements.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,99 +16,98 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; /** * Enumeration of all possible elements of a 'SubmodelElementList'. */ -@IRI("aas:AASSubmodelElements") -public enum AASSubmodelElements { +@IRI("aas:AasSubmodelElements") +public enum AasSubmodelElements { /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/AnnotatedRelationshipElement") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/AnnotatedRelationshipElement") ANNOTATED_RELATIONSHIP_ELEMENT, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/BasicEventElement") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/BasicEventElement") BASIC_EVENT_ELEMENT, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/Blob") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/Blob") BLOB, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/Capability") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/Capability") CAPABILITY, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/DataElement") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/DataElement") DATA_ELEMENT, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/Entity") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/Entity") ENTITY, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/EventElement") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/EventElement") EVENT_ELEMENT, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/File") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/File") FILE, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/MultiLanguageProperty") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/MultiLanguageProperty") MULTI_LANGUAGE_PROPERTY, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/Operation") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/Operation") OPERATION, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/Property") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/Property") PROPERTY, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/Range") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/Range") RANGE, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/ReferenceElement") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/ReferenceElement") REFERENCE_ELEMENT, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/RelationshipElement") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/RelationshipElement") RELATIONSHIP_ELEMENT, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/SubmodelElement") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/SubmodelElement") SUBMODEL_ELEMENT, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/SubmodelElementCollection") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/SubmodelElementCollection") SUBMODEL_ELEMENT_COLLECTION, /** */ - @IRI("https://admin-shell.io/aas/3/0/AASSubmodelElements/SubmodelElementList") + @IRI("https://admin-shell.io/aas/3/0/AasSubmodelElements/SubmodelElementList") SUBMODEL_ELEMENT_LIST; } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AbstractLangString.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AbstractLangString.java index c50f75ab4..80d41621f 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AbstractLangString.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AbstractLangString.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; @@ -24,9 +24,9 @@ * Strings with language tags */ @KnownSubtypes({ - @KnownSubtypes.Type(value = LangStringDefinitionTypeIec61360.class), @KnownSubtypes.Type(value = LangStringPreferredNameTypeIec61360.class), @KnownSubtypes.Type(value = LangStringShortNameTypeIec61360.class), + @KnownSubtypes.Type(value = LangStringDefinitionTypeIec61360.class), @KnownSubtypes.Type(value = LangStringNameType.class), @KnownSubtypes.Type(value = LangStringTextType.class) }) diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AdministrativeInformation.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AdministrativeInformation.java index e5c3ff60f..25e8457fd 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AdministrativeInformation.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AdministrativeInformation.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -29,23 +30,23 @@ public interface AdministrativeInformation extends HasDataSpecification { /** - * The subject ID of the subject responsible for making the element. + * Version of the element. * - * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/creator + * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/version * - * @return Returns the Reference for the property creator. + * @return Returns the String for the property version. */ - @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/creator") - Reference getCreator(); + @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/version") + String getVersion(); /** - * The subject ID of the subject responsible for making the element. + * Version of the element. * - * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/creator + * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/version * - * @param creator desired value for the property creator. + * @param version desired value for the property version. */ - void setCreator(Reference creator); + void setVersion(String version); /** * Revision of the element. @@ -67,41 +68,41 @@ public interface AdministrativeInformation extends HasDataSpecification { void setRevision(String revision); /** - * Identifier of the template that guided the creation of the element. + * The subject ID of the subject responsible for making the element. * - * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/templateID + * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/creator * - * @return Returns the String for the property templateID. + * @return Returns the Reference for the property creator. */ - @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/templateID") - String getTemplateID(); + @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/creator") + Reference getCreator(); /** - * Identifier of the template that guided the creation of the element. + * The subject ID of the subject responsible for making the element. * - * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/templateID + * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/creator * - * @param templateID desired value for the property templateID. + * @param creator desired value for the property creator. */ - void setTemplateID(String templateID); + void setCreator(Reference creator); /** - * Version of the element. + * Identifier of the template that guided the creation of the element. * - * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/version + * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/templateId * - * @return Returns the String for the property version. + * @return Returns the String for the property templateId. */ - @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/version") - String getVersion(); + @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/templateId") + String getTemplateId(); /** - * Version of the element. + * Identifier of the template that guided the creation of the element. * - * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/version + * More information under https://admin-shell.io/aas/3/0/AdministrativeInformation/templateId * - * @param version desired value for the property version. + * @param templateId desired value for the property templateId. */ - void setVersion(String version); + void setTemplateId(String templateId); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AnnotatedRelationshipElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AnnotatedRelationshipElement.java index 841ea2032..987cc7a15 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AnnotatedRelationshipElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AnnotatedRelationshipElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetAdministrationShell.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetAdministrationShell.java index 238314362..2b51a7a67 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetAdministrationShell.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetAdministrationShell.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -30,42 +31,42 @@ public interface AssetAdministrationShell extends HasDataSpecification, Identifiable { /** - * Meta-information about the asset the AAS is representing. + * The reference to the AAS the AAS was derived from. * - * More information under https://admin-shell.io/aas/3/0/AssetAdministrationShell/assetInformation + * More information under https://admin-shell.io/aas/3/0/AssetAdministrationShell/derivedFrom * - * @return Returns the AssetInformation for the property assetInformation. + * @return Returns the Reference for the property derivedFrom. */ - @IRI("https://admin-shell.io/aas/3/0/AssetAdministrationShell/assetInformation") - AssetInformation getAssetInformation(); + @IRI("https://admin-shell.io/aas/3/0/AssetAdministrationShell/derivedFrom") + Reference getDerivedFrom(); /** - * Meta-information about the asset the AAS is representing. + * The reference to the AAS the AAS was derived from. * - * More information under https://admin-shell.io/aas/3/0/AssetAdministrationShell/assetInformation + * More information under https://admin-shell.io/aas/3/0/AssetAdministrationShell/derivedFrom * - * @param assetInformation desired value for the property assetInformation. + * @param derivedFrom desired value for the property derivedFrom. */ - void setAssetInformation(AssetInformation assetInformation); + void setDerivedFrom(Reference derivedFrom); /** - * The reference to the AAS the AAS was derived from. + * Meta-information about the asset the AAS is representing. * - * More information under https://admin-shell.io/aas/3/0/AssetAdministrationShell/derivedFrom + * More information under https://admin-shell.io/aas/3/0/AssetAdministrationShell/assetInformation * - * @return Returns the Reference for the property derivedFrom. + * @return Returns the AssetInformation for the property assetInformation. */ - @IRI("https://admin-shell.io/aas/3/0/AssetAdministrationShell/derivedFrom") - Reference getDerivedFrom(); + @IRI("https://admin-shell.io/aas/3/0/AssetAdministrationShell/assetInformation") + AssetInformation getAssetInformation(); /** - * The reference to the AAS the AAS was derived from. + * Meta-information about the asset the AAS is representing. * - * More information under https://admin-shell.io/aas/3/0/AssetAdministrationShell/derivedFrom + * More information under https://admin-shell.io/aas/3/0/AssetAdministrationShell/assetInformation * - * @param derivedFrom desired value for the property derivedFrom. + * @param assetInformation desired value for the property assetInformation. */ - void setDerivedFrom(Reference derivedFrom); + void setAssetInformation(AssetInformation assetInformation); /** * References to submodels of the AAS. diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetInformation.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetInformation.java index 517cb9db6..61ce8f421 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetInformation.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetInformation.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -50,83 +51,83 @@ public interface AssetInformation { void setAssetKind(AssetKind assetKind); /** - * In case 'assetKind' is applicable the 'assetType' is the asset ID of the type asset of the asset - * under consideration as identified by 'globalAssetID'. + * Global identifier of the asset the AAS is representing. * - * More information under https://admin-shell.io/aas/3/0/AssetInformation/assetType + * More information under https://admin-shell.io/aas/3/0/AssetInformation/globalAssetId * - * @return Returns the String for the property assetType. + * @return Returns the String for the property globalAssetId. */ - @IRI("https://admin-shell.io/aas/3/0/AssetInformation/assetType") - String getAssetType(); + @IRI("https://admin-shell.io/aas/3/0/AssetInformation/globalAssetId") + String getGlobalAssetId(); /** - * In case 'assetKind' is applicable the 'assetType' is the asset ID of the type asset of the asset - * under consideration as identified by 'globalAssetID'. + * Global identifier of the asset the AAS is representing. * - * More information under https://admin-shell.io/aas/3/0/AssetInformation/assetType + * More information under https://admin-shell.io/aas/3/0/AssetInformation/globalAssetId * - * @param assetType desired value for the property assetType. + * @param globalAssetId desired value for the property globalAssetId. */ - void setAssetType(String assetType); + void setGlobalAssetId(String globalAssetId); /** - * Thumbnail of the asset represented by the Asset Administration Shell. + * Additional domain-specific, typically proprietary identifier for the asset like e.g., serial + * number etc. * - * More information under https://admin-shell.io/aas/3/0/AssetInformation/defaultThumbnail + * More information under https://admin-shell.io/aas/3/0/AssetInformation/specificAssetIds * - * @return Returns the Resource for the property defaultThumbnail. + * @return Returns the List of SpecificAssetIds for the property specificAssetIds. */ - @IRI("https://admin-shell.io/aas/3/0/AssetInformation/defaultThumbnail") - Resource getDefaultThumbnail(); + @IRI("https://admin-shell.io/aas/3/0/AssetInformation/specificAssetIds") + List getSpecificAssetIds(); /** - * Thumbnail of the asset represented by the Asset Administration Shell. + * Additional domain-specific, typically proprietary identifier for the asset like e.g., serial + * number etc. * - * More information under https://admin-shell.io/aas/3/0/AssetInformation/defaultThumbnail + * More information under https://admin-shell.io/aas/3/0/AssetInformation/specificAssetIds * - * @param defaultThumbnail desired value for the property defaultThumbnail. + * @param specificAssetIds desired value for the property specificAssetIds. */ - void setDefaultThumbnail(Resource defaultThumbnail); + void setSpecificAssetIds(List specificAssetIds); /** - * Global identifier of the asset the AAS is representing. + * In case 'assetKind' is applicable the 'assetType' is the asset ID of the type asset of the asset + * under consideration as identified by 'globalAssetId'. * - * More information under https://admin-shell.io/aas/3/0/AssetInformation/globalAssetID + * More information under https://admin-shell.io/aas/3/0/AssetInformation/assetType * - * @return Returns the String for the property globalAssetID. + * @return Returns the String for the property assetType. */ - @IRI("https://admin-shell.io/aas/3/0/AssetInformation/globalAssetID") - String getGlobalAssetID(); + @IRI("https://admin-shell.io/aas/3/0/AssetInformation/assetType") + String getAssetType(); /** - * Global identifier of the asset the AAS is representing. + * In case 'assetKind' is applicable the 'assetType' is the asset ID of the type asset of the asset + * under consideration as identified by 'globalAssetId'. * - * More information under https://admin-shell.io/aas/3/0/AssetInformation/globalAssetID + * More information under https://admin-shell.io/aas/3/0/AssetInformation/assetType * - * @param globalAssetID desired value for the property globalAssetID. + * @param assetType desired value for the property assetType. */ - void setGlobalAssetID(String globalAssetID); + void setAssetType(String assetType); /** - * Additional domain-specific, typically proprietary identifier for the asset like e.g., serial - * number etc. + * Thumbnail of the asset represented by the Asset Administration Shell. * - * More information under https://admin-shell.io/aas/3/0/AssetInformation/specificAssetIds + * More information under https://admin-shell.io/aas/3/0/AssetInformation/defaultThumbnail * - * @return Returns the List of SpecificAssetIDs for the property specificAssetIds. + * @return Returns the Resource for the property defaultThumbnail. */ - @IRI("https://admin-shell.io/aas/3/0/AssetInformation/specificAssetIds") - List getSpecificAssetIds(); + @IRI("https://admin-shell.io/aas/3/0/AssetInformation/defaultThumbnail") + Resource getDefaultThumbnail(); /** - * Additional domain-specific, typically proprietary identifier for the asset like e.g., serial - * number etc. + * Thumbnail of the asset represented by the Asset Administration Shell. * - * More information under https://admin-shell.io/aas/3/0/AssetInformation/specificAssetIds + * More information under https://admin-shell.io/aas/3/0/AssetInformation/defaultThumbnail * - * @param specificAssetIds desired value for the property specificAssetIds. + * @param defaultThumbnail desired value for the property defaultThumbnail. */ - void setSpecificAssetIds(List specificAssetIds); + void setDefaultThumbnail(Resource defaultThumbnail); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetKind.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetKind.java index 70ea05c93..4ab977420 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetKind.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetKind.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/BasicEventElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/BasicEventElement.java index 2364f88f2..b4544ceef 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/BasicEventElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/BasicEventElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -28,6 +29,27 @@ }) public interface BasicEventElement extends EventElement { + /** + * Reference to the 'Referable', which defines the scope of the event. Can be + * 'AssetAdministrationShell', 'Submodel', or 'SubmodelElement'. + * + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/observed + * + * @return Returns the Reference for the property observed. + */ + @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/observed") + Reference getObserved(); + + /** + * Reference to the 'Referable', which defines the scope of the event. Can be + * 'AssetAdministrationShell', 'Submodel', or 'SubmodelElement'. + * + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/observed + * + * @param observed desired value for the property observed. + */ + void setObserved(Reference observed); + /** * Direction of event. * @@ -48,42 +70,44 @@ public interface BasicEventElement extends EventElement { void setDirection(Direction direction); /** - * Timestamp in UTC, when the last event was received (input direction) or sent (output direction). + * State of event. * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/lastUpdate + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/state * - * @return Returns the String for the property lastUpdate. + * @return Returns the StateOfEvent for the property state. */ - @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/lastUpdate") - String getLastUpdate(); + @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/state") + StateOfEvent getState(); /** - * Timestamp in UTC, when the last event was received (input direction) or sent (output direction). + * State of event. * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/lastUpdate + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/state * - * @param lastUpdate desired value for the property lastUpdate. + * @param state desired value for the property state. */ - void setLastUpdate(String lastUpdate); + void setState(StateOfEvent state); /** - * For input direction: not applicable. + * Information for the outer message infrastructure for scheduling the event to the respective + * communication channel. * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/maxInterval + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/messageTopic * - * @return Returns the String for the property maxInterval. + * @return Returns the String for the property messageTopic. */ - @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/maxInterval") - String getMaxInterval(); + @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/messageTopic") + String getMessageTopic(); /** - * For input direction: not applicable. + * Information for the outer message infrastructure for scheduling the event to the respective + * communication channel. * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/maxInterval + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/messageTopic * - * @param maxInterval desired value for the property maxInterval. + * @param messageTopic desired value for the property messageTopic. */ - void setMaxInterval(String maxInterval); + void setMessageTopic(String messageTopic); /** * Information, which outer message infrastructure shall handle messages for the 'EventElement'. @@ -109,25 +133,23 @@ public interface BasicEventElement extends EventElement { void setMessageBroker(Reference messageBroker); /** - * Information for the outer message infrastructure for scheduling the event to the respective - * communication channel. + * Timestamp in UTC, when the last event was received (input direction) or sent (output direction). * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/messageTopic + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/lastUpdate * - * @return Returns the String for the property messageTopic. + * @return Returns the String for the property lastUpdate. */ - @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/messageTopic") - String getMessageTopic(); + @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/lastUpdate") + String getLastUpdate(); /** - * Information for the outer message infrastructure for scheduling the event to the respective - * communication channel. + * Timestamp in UTC, when the last event was received (input direction) or sent (output direction). * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/messageTopic + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/lastUpdate * - * @param messageTopic desired value for the property messageTopic. + * @param lastUpdate desired value for the property lastUpdate. */ - void setMessageTopic(String messageTopic); + void setLastUpdate(String lastUpdate); /** * For input direction, reports on the maximum frequency, the software entity behind the respective @@ -151,43 +173,22 @@ public interface BasicEventElement extends EventElement { void setMinInterval(String minInterval); /** - * Reference to the 'Referable', which defines the scope of the event. Can be - * 'AssetAdministrationShell', 'Submodel', or 'SubmodelElement'. - * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/observed - * - * @return Returns the Reference for the property observed. - */ - @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/observed") - Reference getObserved(); - - /** - * Reference to the 'Referable', which defines the scope of the event. Can be - * 'AssetAdministrationShell', 'Submodel', or 'SubmodelElement'. - * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/observed - * - * @param observed desired value for the property observed. - */ - void setObserved(Reference observed); - - /** - * State of event. + * For input direction: not applicable. * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/state + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/maxInterval * - * @return Returns the StateOfEvent for the property state. + * @return Returns the String for the property maxInterval. */ - @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/state") - StateOfEvent getState(); + @IRI("https://admin-shell.io/aas/3/0/BasicEventElement/maxInterval") + String getMaxInterval(); /** - * State of event. + * For input direction: not applicable. * - * More information under https://admin-shell.io/aas/3/0/BasicEventElement/state + * More information under https://admin-shell.io/aas/3/0/BasicEventElement/maxInterval * - * @param state desired value for the property state. + * @param maxInterval desired value for the property maxInterval. */ - void setState(StateOfEvent state); + void setMaxInterval(String maxInterval); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Blob.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Blob.java index 8ea957078..1edb58bed 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Blob.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Blob.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -30,41 +31,41 @@ public interface Blob extends DataElement { /** - * Content type of the content of the 'Blob'. + * The value of the 'Blob' instance of a blob data element. * - * More information under https://admin-shell.io/aas/3/0/Blob/contentType + * More information under https://admin-shell.io/aas/3/0/Blob/value * - * @return Returns the String for the property contentType. + * @return Returns the byte[] for the property value. */ - @IRI("https://admin-shell.io/aas/3/0/Blob/contentType") - String getContentType(); + @IRI("https://admin-shell.io/aas/3/0/Blob/value") + byte[] getValue(); /** - * Content type of the content of the 'Blob'. + * The value of the 'Blob' instance of a blob data element. * - * More information under https://admin-shell.io/aas/3/0/Blob/contentType + * More information under https://admin-shell.io/aas/3/0/Blob/value * - * @param contentType desired value for the property contentType. + * @param value desired value for the property value. */ - void setContentType(String contentType); + void setValue(byte[] value); /** - * The value of the 'Blob' instance of a blob data element. + * Content type of the content of the 'Blob'. * - * More information under https://admin-shell.io/aas/3/0/Blob/value + * More information under https://admin-shell.io/aas/3/0/Blob/contentType * - * @return Returns the byte[] for the property value. + * @return Returns the String for the property contentType. */ - @IRI("https://admin-shell.io/aas/3/0/Blob/value") - byte[] getValue(); + @IRI("https://admin-shell.io/aas/3/0/Blob/contentType") + String getContentType(); /** - * The value of the 'Blob' instance of a blob data element. + * Content type of the content of the 'Blob'. * - * More information under https://admin-shell.io/aas/3/0/Blob/value + * More information under https://admin-shell.io/aas/3/0/Blob/contentType * - * @param value desired value for the property value. + * @param contentType desired value for the property contentType. */ - void setValue(byte[] value); + void setContentType(String contentType); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Capability.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Capability.java index 26cb02ec6..0dc242c2f 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Capability.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Capability.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ConceptDescription.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ConceptDescription.java index a18fe9266..724d31fed 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ConceptDescription.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ConceptDescription.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -45,8 +46,8 @@ public interface ConceptDescription extends HasDataSpecification, Identifiable { * * More information under https://admin-shell.io/aas/3/0/ConceptDescription/isCaseOf * - * @param isCaseOf desired value for the property isCaseOf. + * @param isCaseOfs desired value for the property isCaseOf. */ - void setIsCaseOf(List isCaseOf); + void setIsCaseOf(List isCaseOfs); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataElement.java index 3c848efab..d2cfd8bf7 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,11 +15,8 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; - /** * A data element is a submodel element that is not further composed out of other submodel elements. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataSpecificationContent.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataSpecificationContent.java index c6ba9d955..7fd9aaeec 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataSpecificationContent.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataSpecificationContent.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataSpecificationIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataSpecificationIec61360.java index c0b5a1b18..182a70102 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataSpecificationIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataSpecificationIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -31,99 +32,80 @@ public interface DataSpecificationIec61360 extends DataSpecificationContent { /** - * Data Type - * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/dataType - * - * @return Returns the DataTypeIec61360 for the property dataType. - */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/dataType") - DataTypeIec61360 getDataType(); - - /** - * Data Type - * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/dataType - * - * @param dataType desired value for the property dataType. - */ - void setDataType(DataTypeIec61360 dataType); - - /** - * Definition in different languages + * Preferred name * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/definition + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/preferredName * - * @return Returns the List of LangStringDefinitionTypeIEC61360s for the property definition. + * @return Returns the List of LangStringPreferredNameTypeIec61360s for the property preferredName. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/definition") - List getDefinition(); + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/preferredName") + List getPreferredName(); /** - * Definition in different languages + * Preferred name * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/definition + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/preferredName * - * @param definition desired value for the property definition. + * @param preferredNames desired value for the property preferredName. */ - void setDefinition(List definition); + void setPreferredName(List preferredNames); /** - * Set of levels. + * Short name * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/levelType + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/shortName * - * @return Returns the LevelType for the property levelType. + * @return Returns the List of LangStringShortNameTypeIec61360s for the property shortName. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/levelType") - LevelType getLevelType(); + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/shortName") + List getShortName(); /** - * Set of levels. + * Short name * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/levelType + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/shortName * - * @param levelType desired value for the property levelType. + * @param shortNames desired value for the property shortName. */ - void setLevelType(LevelType levelType); + void setShortName(List shortNames); /** - * Preferred name + * Unit * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/preferredName + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unit * - * @return Returns the List of LangStringPreferredNameTypeIEC61360s for the property preferredName. + * @return Returns the String for the property unit. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/preferredName") - List getPreferredName(); + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unit") + String getUnit(); /** - * Preferred name + * Unit * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/preferredName + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unit * - * @param preferredName desired value for the property preferredName. + * @param unit desired value for the property unit. */ - void setPreferredName(List preferredName); + void setUnit(String unit); /** - * Short name + * Unique unit id * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/shortName + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unitId * - * @return Returns the List of LangStringShortNameTypeIEC61360s for the property shortName. + * @return Returns the Reference for the property unitId. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/shortName") - List getShortName(); + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unitId") + Reference getUnitId(); /** - * Short name + * Unique unit id * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/shortName + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unitId * - * @param shortName desired value for the property shortName. + * @param unitId desired value for the property unitId. */ - void setShortName(List shortName); + void setUnitId(Reference unitId); /** * Source of definition @@ -133,7 +115,7 @@ public interface DataSpecificationIec61360 extends DataSpecificationContent { * * @return Returns the String for the property sourceOfDefinition. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/sourceOfDefinition") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/sourceOfDefinition") String getSourceOfDefinition(); /** @@ -153,7 +135,7 @@ public interface DataSpecificationIec61360 extends DataSpecificationContent { * * @return Returns the String for the property symbol. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/symbol") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/symbol") String getSymbol(); /** @@ -166,61 +148,42 @@ public interface DataSpecificationIec61360 extends DataSpecificationContent { void setSymbol(String symbol); /** - * Unit - * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unit - * - * @return Returns the String for the property unit. - */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/unit") - String getUnit(); - - /** - * Unit - * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unit - * - * @param unit desired value for the property unit. - */ - void setUnit(String unit); - - /** - * Unique unit id + * Data Type * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unitID + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/dataType * - * @return Returns the Reference for the property unitID. + * @return Returns the DataTypeIec61360 for the property dataType. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/unitID") - Reference getUnitID(); + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/dataType") + DataTypeIec61360 getDataType(); /** - * Unique unit id + * Data Type * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unitID + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/dataType * - * @param unitID desired value for the property unitID. + * @param dataType desired value for the property dataType. */ - void setUnitID(Reference unitID); + void setDataType(DataTypeIec61360 dataType); /** - * Value + * Definition in different languages * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/value + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/definition * - * @return Returns the String for the property value. + * @return Returns the List of LangStringDefinitionTypeIec61360s for the property definition. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/value") - String getValue(); + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/definition") + List getDefinition(); /** - * Value + * Definition in different languages * - * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/value + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/definition * - * @param value desired value for the property value. + * @param definitions desired value for the property definition. */ - void setValue(String value); + void setDefinition(List definitions); /** * Value Format @@ -229,7 +192,7 @@ public interface DataSpecificationIec61360 extends DataSpecificationContent { * * @return Returns the String for the property valueFormat. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/valueFormat") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/valueFormat") String getValueFormat(); /** @@ -248,7 +211,7 @@ public interface DataSpecificationIec61360 extends DataSpecificationContent { * * @return Returns the ValueList for the property valueList. */ - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/valueList") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/valueList") ValueList getValueList(); /** @@ -260,4 +223,42 @@ public interface DataSpecificationIec61360 extends DataSpecificationContent { */ void setValueList(ValueList valueList); + /** + * Value + * + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/value + * + * @return Returns the String for the property value. + */ + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/value") + String getValue(); + + /** + * Value + * + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/value + * + * @param value desired value for the property value. + */ + void setValue(String value); + + /** + * Set of levels. + * + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/levelType + * + * @return Returns the LevelType for the property levelType. + */ + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/levelType") + LevelType getLevelType(); + + /** + * Set of levels. + * + * More information under https://admin-shell.io/aas/3/0/DataSpecificationIec61360/levelType + * + * @param levelType desired value for the property levelType. + */ + void setLevelType(LevelType levelType); + } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeDefXSD.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeDefXSD.java deleted file mode 100644 index 7452b2596..000000000 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeDefXSD.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model; - - - -import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; - - -/** - * Enumeration listing all XSD anySimpleTypes - */ -@IRI("aas:DataTypeDefXSD") -public enum DataTypeDefXSD { - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/AnyUri") - ANY_URI, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Base64Binary") - BASE64BINARY, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Boolean") - BOOLEAN, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Byte") - BYTE, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Date") - DATE, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/DateTime") - DATE_TIME, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Decimal") - DECIMAL, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Double") - DOUBLE, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Duration") - DURATION, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Float") - FLOAT, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/GDay") - GDAY, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/GMonth") - GMONTH, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/GMonthDay") - GMONTH_DAY, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/GYear") - GYEAR, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/GYearMonth") - GYEAR_MONTH, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/HexBinary") - HEX_BINARY, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Int") - INT, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Integer") - INTEGER, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Long") - LONG, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/NegativeInteger") - NEGATIVE_INTEGER, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/NonNegativeInteger") - NON_NEGATIVE_INTEGER, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/NonPositiveInteger") - NON_POSITIVE_INTEGER, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/PositiveInteger") - POSITIVE_INTEGER, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Short") - SHORT, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/String") - STRING, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/Time") - TIME, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/UnsignedByte") - UNSIGNED_BYTE, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/UnsignedInt") - UNSIGNED_INT, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/UnsignedLong") - UNSIGNED_LONG, - - /** - */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXSD/UnsignedShort") - UNSIGNED_SHORT; - -} diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeDefXsd.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeDefXsd.java new file mode 100644 index 000000000..bf328a198 --- /dev/null +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeDefXsd.java @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.eclipse.digitaltwin.aas4j.v3.model; + + +import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; + + +/** + * Enumeration listing all XSD anySimpleTypes + */ +@IRI("aas:DataTypeDefXsd") +public enum DataTypeDefXsd { + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/AnyUri") + ANY_URI, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Base64Binary") + BASE64BINARY, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Boolean") + BOOLEAN, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Byte") + BYTE, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Date") + DATE, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/DateTime") + DATE_TIME, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Decimal") + DECIMAL, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Double") + DOUBLE, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Duration") + DURATION, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Float") + FLOAT, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/GDay") + GDAY, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/GMonth") + GMONTH, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/GMonthDay") + GMONTH_DAY, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/GYear") + GYEAR, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/GYearMonth") + GYEAR_MONTH, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/HexBinary") + HEX_BINARY, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Int") + INT, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Integer") + INTEGER, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Long") + LONG, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/NegativeInteger") + NEGATIVE_INTEGER, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/NonNegativeInteger") + NON_NEGATIVE_INTEGER, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/NonPositiveInteger") + NON_POSITIVE_INTEGER, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/PositiveInteger") + POSITIVE_INTEGER, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Short") + SHORT, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/String") + STRING, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/Time") + TIME, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/UnsignedByte") + UNSIGNED_BYTE, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/UnsignedInt") + UNSIGNED_INT, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/UnsignedLong") + UNSIGNED_LONG, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/DataTypeDefXsd/UnsignedShort") + UNSIGNED_SHORT; + +} diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeIec61360.java index a77873cda..704b1929b 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/DataTypeIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,135 +16,134 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; /** */ -@IRI("aas:DataTypeIEC61360") +@IRI("aas:DataTypeIec61360") public enum DataTypeIec61360 { /** * values containing the content of a file. Values may be binaries. */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Blob") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Blob") BLOB, /** * values representing truth of logic or Boolean algebra (TRUE, FALSE) */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Boolean") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Boolean") BOOLEAN, /** * values containing a calendar date, conformant to ISO 8601:2004 Format yyyy-mm-dd Example from IEC * 61360-1:2017: "1999-05-31" is the [DATE] representation of: "31 May 1999". */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Date") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Date") DATE, /** * values containing an address to a file. The values are of type URI and can represent an absolute * or relative path. */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/File") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/File") FILE, /** * Values containing string with any sequence of characters, using the syntax of HTML5 (see W3C * Recommendation 28:2014) */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Html") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Html") HTML, /** * values containing values of type INTEGER but are no currencies or measures */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/IntegerCount") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/IntegerCount") INTEGER_COUNT, /** * values containing values of type INTEGER that are currencies */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/IntegerCurrency") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/IntegerCurrency") INTEGER_CURRENCY, /** * values containing values that are measure of type INTEGER. In addition such a value comes with a * physical unit. */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/IntegerMeasure") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/IntegerMeasure") INTEGER_MEASURE, /** * values conforming to ISO/IEC 11179 series global identifier sequences */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Irdi") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Irdi") IRDI, /** * values containing values of type STRING conformant to Rfc 3987 */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Iri") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Iri") IRI, /** * values containing values of type rational */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Rational") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Rational") RATIONAL, /** * values containing values of type rational. In addition such a value comes with a physical unit. */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/RationalMeasure") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/RationalMeasure") RATIONAL_MEASURE, /** * values containing numbers that can be written as a terminating or non-terminating decimal; a * rational or irrational number but are no currencies or measures */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/RealCount") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/RealCount") REAL_COUNT, /** * values containing values of type REAL that are currencies */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/RealCurrency") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/RealCurrency") REAL_CURRENCY, /** * values containing values that are measures of type REAL. In addition such a value comes with a * physical unit. */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/RealMeasure") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/RealMeasure") REAL_MEASURE, /** * values consisting of sequence of characters but cannot be translated into other languages */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/String") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/String") STRING, /** * values containing string but shall be represented as different string in different languages */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/StringTranslatable") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/StringTranslatable") STRING_TRANSLATABLE, /** * values containing a time, conformant to ISO 8601:2004 but restricted to what is allowed in the * corresponding type in xml. */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Time") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Time") TIME, /** * values containing a time, conformant to ISO 8601:2004 but restricted to what is allowed in the * corresponding type in xml. */ - @IRI("https://admin-shell.io/aas/3/0/DataTypeIEC61360/Timestamp") + @IRI("https://admin-shell.io/aas/3/0/DataTypeIec61360/Timestamp") TIMESTAMP; } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Direction.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Direction.java index 9a556a503..5b8d0a575 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Direction.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Direction.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EmbeddedDataSpecification.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EmbeddedDataSpecification.java index 5be85af48..48c3a2ccb 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EmbeddedDataSpecification.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EmbeddedDataSpecification.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Entity.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Entity.java index 17c09503a..c29c453e2 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Entity.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Entity.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -29,6 +30,27 @@ }) public interface Entity extends SubmodelElement { + /** + * Describes statements applicable to the entity by a set of submodel elements, typically with a + * qualified value. + * + * More information under https://admin-shell.io/aas/3/0/Entity/statements + * + * @return Returns the List of SubmodelElements for the property statements. + */ + @IRI("https://admin-shell.io/aas/3/0/Entity/statements") + List getStatements(); + + /** + * Describes statements applicable to the entity by a set of submodel elements, typically with a + * qualified value. + * + * More information under https://admin-shell.io/aas/3/0/Entity/statements + * + * @param statements desired value for the property statements. + */ + void setStatements(List statements); + /** * Describes whether the entity is a co-managed entity or a self-managed entity. * @@ -51,21 +73,21 @@ public interface Entity extends SubmodelElement { /** * Global identifier of the asset the entity is representing. * - * More information under https://admin-shell.io/aas/3/0/Entity/globalAssetID + * More information under https://admin-shell.io/aas/3/0/Entity/globalAssetId * - * @return Returns the String for the property globalAssetID. + * @return Returns the String for the property globalAssetId. */ - @IRI("https://admin-shell.io/aas/3/0/Entity/globalAssetID") - String getGlobalAssetID(); + @IRI("https://admin-shell.io/aas/3/0/Entity/globalAssetId") + String getGlobalAssetId(); /** * Global identifier of the asset the entity is representing. * - * More information under https://admin-shell.io/aas/3/0/Entity/globalAssetID + * More information under https://admin-shell.io/aas/3/0/Entity/globalAssetId * - * @param globalAssetID desired value for the property globalAssetID. + * @param globalAssetId desired value for the property globalAssetId. */ - void setGlobalAssetID(String globalAssetID); + void setGlobalAssetId(String globalAssetId); /** * Reference to a specific asset ID representing a supplementary identifier of the asset represented @@ -73,10 +95,10 @@ public interface Entity extends SubmodelElement { * * More information under https://admin-shell.io/aas/3/0/Entity/specificAssetIds * - * @return Returns the List of SpecificAssetIDs for the property specificAssetIds. + * @return Returns the List of SpecificAssetIds for the property specificAssetIds. */ @IRI("https://admin-shell.io/aas/3/0/Entity/specificAssetIds") - List getSpecificAssetIds(); + List getSpecificAssetIds(); /** * Reference to a specific asset ID representing a supplementary identifier of the asset represented @@ -86,27 +108,6 @@ public interface Entity extends SubmodelElement { * * @param specificAssetIds desired value for the property specificAssetIds. */ - void setSpecificAssetIds(List specificAssetIds); - - /** - * Describes statements applicable to the entity by a set of submodel elements, typically with a - * qualified value. - * - * More information under https://admin-shell.io/aas/3/0/Entity/statements - * - * @return Returns the List of SubmodelElements for the property statements. - */ - @IRI("https://admin-shell.io/aas/3/0/Entity/statements") - List getStatements(); - - /** - * Describes statements applicable to the entity by a set of submodel elements, typically with a - * qualified value. - * - * More information under https://admin-shell.io/aas/3/0/Entity/statements - * - * @param statements desired value for the property statements. - */ - void setStatements(List statements); + void setSpecificAssetIds(List specificAssetIds); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EntityType.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EntityType.java index 5fec4fe06..31441465f 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EntityType.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EntityType.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Environment.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Environment.java index 5485872b9..e41524972 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Environment.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Environment.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -49,41 +50,41 @@ public interface Environment { void setAssetAdministrationShells(List assetAdministrationShells); /** - * Concept description + * Submodel * - * More information under https://admin-shell.io/aas/3/0/Environment/conceptDescriptions + * More information under https://admin-shell.io/aas/3/0/Environment/submodels * - * @return Returns the List of ConceptDescriptions for the property conceptDescriptions. + * @return Returns the List of Submodels for the property submodels. */ - @IRI("https://admin-shell.io/aas/3/0/Environment/conceptDescriptions") - List getConceptDescriptions(); + @IRI("https://admin-shell.io/aas/3/0/Environment/submodels") + List getSubmodels(); /** - * Concept description + * Submodel * - * More information under https://admin-shell.io/aas/3/0/Environment/conceptDescriptions + * More information under https://admin-shell.io/aas/3/0/Environment/submodels * - * @param conceptDescriptions desired value for the property conceptDescriptions. + * @param submodels desired value for the property submodels. */ - void setConceptDescriptions(List conceptDescriptions); + void setSubmodels(List submodels); /** - * Submodel + * Concept description * - * More information under https://admin-shell.io/aas/3/0/Environment/submodels + * More information under https://admin-shell.io/aas/3/0/Environment/conceptDescriptions * - * @return Returns the List of Submodels for the property submodels. + * @return Returns the List of ConceptDescriptions for the property conceptDescriptions. */ - @IRI("https://admin-shell.io/aas/3/0/Environment/submodels") - List getSubmodels(); + @IRI("https://admin-shell.io/aas/3/0/Environment/conceptDescriptions") + List getConceptDescriptions(); /** - * Submodel + * Concept description * - * More information under https://admin-shell.io/aas/3/0/Environment/submodels + * More information under https://admin-shell.io/aas/3/0/Environment/conceptDescriptions * - * @param submodels desired value for the property submodels. + * @param conceptDescriptions desired value for the property conceptDescriptions. */ - void setSubmodels(List submodels); + void setConceptDescriptions(List conceptDescriptions); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EventElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EventElement.java index 02818c712..c8756c97e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EventElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EventElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EventPayload.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EventPayload.java index f971df611..42720b37c 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EventPayload.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/EventPayload.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -29,120 +30,122 @@ public interface EventPayload { /** - * Reference to the referable, which defines the scope of the event. + * Reference to the source event element, including identification of 'AssetAdministrationShell', + * 'Submodel', 'SubmodelElement''s. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/observableReference + * More information under https://admin-shell.io/aas/3/0/EventPayload/source * - * @return Returns the Reference for the property observableReference. + * @return Returns the Reference for the property source. */ - @IRI("https://admin-shell.io/aas/3/0/EventPayload/observableReference") - Reference getObservableReference(); + @IRI("https://admin-shell.io/aas/3/0/EventPayload/source") + Reference getSource(); /** - * Reference to the referable, which defines the scope of the event. + * Reference to the source event element, including identification of 'AssetAdministrationShell', + * 'Submodel', 'SubmodelElement''s. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/observableReference + * More information under https://admin-shell.io/aas/3/0/EventPayload/source * - * @param observableReference desired value for the property observableReference. + * @param source desired value for the property source. */ - void setObservableReference(Reference observableReference); + void setSource(Reference source); /** - * 'semanticID' of the referable which defines the scope of the event, if available. + * 'semanticId' of the source event element, if available * - * More information under https://admin-shell.io/aas/3/0/EventPayload/observableSemanticID + * More information under https://admin-shell.io/aas/3/0/EventPayload/sourceSemanticId * - * @return Returns the Reference for the property observableSemanticID. + * @return Returns the Reference for the property sourceSemanticId. */ - @IRI("https://admin-shell.io/aas/3/0/EventPayload/observableSemanticID") - Reference getObservableSemanticID(); + @IRI("https://admin-shell.io/aas/3/0/EventPayload/sourceSemanticId") + Reference getSourceSemanticId(); /** - * 'semanticID' of the referable which defines the scope of the event, if available. + * 'semanticId' of the source event element, if available * - * More information under https://admin-shell.io/aas/3/0/EventPayload/observableSemanticID + * More information under https://admin-shell.io/aas/3/0/EventPayload/sourceSemanticId * - * @param observableSemanticID desired value for the property observableSemanticID. + * @param sourceSemanticId desired value for the property sourceSemanticId. */ - void setObservableSemanticID(Reference observableSemanticID); + void setSourceSemanticId(Reference sourceSemanticId); /** - * Event specific payload. + * Reference to the referable, which defines the scope of the event. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/payload + * More information under https://admin-shell.io/aas/3/0/EventPayload/observableReference * - * @return Returns the byte[] for the property payload. + * @return Returns the Reference for the property observableReference. */ - @IRI("https://admin-shell.io/aas/3/0/EventPayload/payload") - byte[] getPayload(); + @IRI("https://admin-shell.io/aas/3/0/EventPayload/observableReference") + Reference getObservableReference(); /** - * Event specific payload. + * Reference to the referable, which defines the scope of the event. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/payload + * More information under https://admin-shell.io/aas/3/0/EventPayload/observableReference * - * @param payload desired value for the property payload. + * @param observableReference desired value for the property observableReference. */ - void setPayload(byte[] payload); + void setObservableReference(Reference observableReference); /** - * Reference to the source event element, including identification of 'AssetAdministrationShell', - * 'Submodel', 'SubmodelElement''s. + * 'semanticId' of the referable which defines the scope of the event, if available. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/source + * More information under https://admin-shell.io/aas/3/0/EventPayload/observableSemanticId * - * @return Returns the Reference for the property source. + * @return Returns the Reference for the property observableSemanticId. */ - @IRI("https://admin-shell.io/aas/3/0/EventPayload/source") - Reference getSource(); + @IRI("https://admin-shell.io/aas/3/0/EventPayload/observableSemanticId") + Reference getObservableSemanticId(); /** - * Reference to the source event element, including identification of 'AssetAdministrationShell', - * 'Submodel', 'SubmodelElement''s. + * 'semanticId' of the referable which defines the scope of the event, if available. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/source + * More information under https://admin-shell.io/aas/3/0/EventPayload/observableSemanticId * - * @param source desired value for the property source. + * @param observableSemanticId desired value for the property observableSemanticId. */ - void setSource(Reference source); + void setObservableSemanticId(Reference observableSemanticId); /** - * 'semanticID' of the source event element, if available + * Information for the outer message infrastructure for scheduling the event to the respective + * communication channel. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/sourceSemanticID + * More information under https://admin-shell.io/aas/3/0/EventPayload/topic * - * @return Returns the Reference for the property sourceSemanticID. + * @return Returns the String for the property topic. */ - @IRI("https://admin-shell.io/aas/3/0/EventPayload/sourceSemanticID") - Reference getSourceSemanticID(); + @IRI("https://admin-shell.io/aas/3/0/EventPayload/topic") + String getTopic(); /** - * 'semanticID' of the source event element, if available + * Information for the outer message infrastructure for scheduling the event to the respective + * communication channel. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/sourceSemanticID + * More information under https://admin-shell.io/aas/3/0/EventPayload/topic * - * @param sourceSemanticID desired value for the property sourceSemanticID. + * @param topic desired value for the property topic. */ - void setSourceSemanticID(Reference sourceSemanticID); + void setTopic(String topic); /** * Subject, who/which initiated the creation. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/subjectID + * More information under https://admin-shell.io/aas/3/0/EventPayload/subjectId * - * @return Returns the Reference for the property subjectID. + * @return Returns the Reference for the property subjectId. */ - @IRI("https://admin-shell.io/aas/3/0/EventPayload/subjectID") - Reference getSubjectID(); + @IRI("https://admin-shell.io/aas/3/0/EventPayload/subjectId") + Reference getSubjectId(); /** * Subject, who/which initiated the creation. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/subjectID + * More information under https://admin-shell.io/aas/3/0/EventPayload/subjectId * - * @param subjectID desired value for the property subjectID. + * @param subjectId desired value for the property subjectId. */ - void setSubjectID(Reference subjectID); + void setSubjectId(Reference subjectId); /** * Timestamp in UTC, when this event was triggered. @@ -164,24 +167,22 @@ public interface EventPayload { void setTimeStamp(String timeStamp); /** - * Information for the outer message infrastructure for scheduling the event to the respective - * communication channel. + * Event specific payload. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/topic + * More information under https://admin-shell.io/aas/3/0/EventPayload/payload * - * @return Returns the String for the property topic. + * @return Returns the byte[] for the property payload. */ - @IRI("https://admin-shell.io/aas/3/0/EventPayload/topic") - String getTopic(); + @IRI("https://admin-shell.io/aas/3/0/EventPayload/payload") + byte[] getPayload(); /** - * Information for the outer message infrastructure for scheduling the event to the respective - * communication channel. + * Event specific payload. * - * More information under https://admin-shell.io/aas/3/0/EventPayload/topic + * More information under https://admin-shell.io/aas/3/0/EventPayload/payload * - * @param topic desired value for the property topic. + * @param payload desired value for the property payload. */ - void setTopic(String topic); + void setPayload(byte[] payload); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Extension.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Extension.java index 9638fe412..c3c5f2659 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Extension.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Extension.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -49,23 +50,23 @@ public interface Extension extends HasSemantics { void setName(String name); /** - * Reference to an element the extension refers to. + * Type of the value of the extension. * - * More information under https://admin-shell.io/aas/3/0/Extension/refersTo + * More information under https://admin-shell.io/aas/3/0/Extension/valueType * - * @return Returns the List of References for the property refersTo. + * @return Returns the DataTypeDefXsd for the property valueType. */ - @IRI("https://admin-shell.io/aas/3/0/Extension/refersTo") - List getRefersTo(); + @IRI("https://admin-shell.io/aas/3/0/Extension/valueType") + DataTypeDefXsd getValueType(); /** - * Reference to an element the extension refers to. + * Type of the value of the extension. * - * More information under https://admin-shell.io/aas/3/0/Extension/refersTo + * More information under https://admin-shell.io/aas/3/0/Extension/valueType * - * @param refersTo desired value for the property refersTo. + * @param valueType desired value for the property valueType. */ - void setRefersTo(List refersTo); + void setValueType(DataTypeDefXsd valueType); /** * Value of the extension @@ -87,22 +88,22 @@ public interface Extension extends HasSemantics { void setValue(String value); /** - * Type of the value of the extension. + * Reference to an element the extension refers to. * - * More information under https://admin-shell.io/aas/3/0/Extension/valueType + * More information under https://admin-shell.io/aas/3/0/Extension/refersTo * - * @return Returns the DataTypeDefXSD for the property valueType. + * @return Returns the List of References for the property refersTo. */ - @IRI("https://admin-shell.io/aas/3/0/Extension/valueType") - DataTypeDefXSD getValueType(); + @IRI("https://admin-shell.io/aas/3/0/Extension/refersTo") + List getRefersTo(); /** - * Type of the value of the extension. + * Reference to an element the extension refers to. * - * More information under https://admin-shell.io/aas/3/0/Extension/valueType + * More information under https://admin-shell.io/aas/3/0/Extension/refersTo * - * @param valueType desired value for the property valueType. + * @param refersTos desired value for the property refersTo. */ - void setValueType(DataTypeDefXSD valueType); + void setRefersTo(List refersTos); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/File.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/File.java index 6bf0dfc6c..ed40d2d1e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/File.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/File.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -29,41 +30,41 @@ public interface File extends DataElement { /** - * Content type of the content of the file. + * Path and name of the referenced file (with file extension). * - * More information under https://admin-shell.io/aas/3/0/File/contentType + * More information under https://admin-shell.io/aas/3/0/File/value * - * @return Returns the String for the property contentType. + * @return Returns the String for the property value. */ - @IRI("https://admin-shell.io/aas/3/0/File/contentType") - String getContentType(); + @IRI("https://admin-shell.io/aas/3/0/File/value") + String getValue(); /** - * Content type of the content of the file. + * Path and name of the referenced file (with file extension). * - * More information under https://admin-shell.io/aas/3/0/File/contentType + * More information under https://admin-shell.io/aas/3/0/File/value * - * @param contentType desired value for the property contentType. + * @param value desired value for the property value. */ - void setContentType(String contentType); + void setValue(String value); /** - * Path and name of the referenced file (with file extension). + * Content type of the content of the file. * - * More information under https://admin-shell.io/aas/3/0/File/value + * More information under https://admin-shell.io/aas/3/0/File/contentType * - * @return Returns the String for the property value. + * @return Returns the String for the property contentType. */ - @IRI("https://admin-shell.io/aas/3/0/File/value") - String getValue(); + @IRI("https://admin-shell.io/aas/3/0/File/contentType") + String getContentType(); /** - * Path and name of the referenced file (with file extension). + * Content type of the content of the file. * - * More information under https://admin-shell.io/aas/3/0/File/value + * More information under https://admin-shell.io/aas/3/0/File/contentType * - * @param value desired value for the property value. + * @param contentType desired value for the property contentType. */ - void setValue(String value); + void setContentType(String contentType); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasDataSpecification.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasDataSpecification.java index c266eda1c..5887c38e5 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasDataSpecification.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasDataSpecification.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -26,8 +27,8 @@ @KnownSubtypes({ @KnownSubtypes.Type(value = AdministrativeInformation.class), @KnownSubtypes.Type(value = AssetAdministrationShell.class), - @KnownSubtypes.Type(value = SubmodelElement.class), @KnownSubtypes.Type(value = ConceptDescription.class), + @KnownSubtypes.Type(value = SubmodelElement.class), @KnownSubtypes.Type(value = Submodel.class) }) public interface HasDataSpecification { diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasExtensions.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasExtensions.java index 4da4a2342..761b5baca 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasExtensions.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasExtensions.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasKind.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasKind.java index 420fed252..a8e19c0cd 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasKind.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasKind.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasSemantics.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasSemantics.java index a5933022c..41f9b9978 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasSemantics.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/HasSemantics.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -24,7 +25,7 @@ * Element that can have a semantic definition plus some supplemental semantic definitions. */ @KnownSubtypes({ - @KnownSubtypes.Type(value = SpecificAssetID.class), + @KnownSubtypes.Type(value = SpecificAssetId.class), @KnownSubtypes.Type(value = SubmodelElement.class), @KnownSubtypes.Type(value = Submodel.class), @KnownSubtypes.Type(value = Extension.class), @@ -36,22 +37,22 @@ public interface HasSemantics { * Identifier of the semantic definition of the element. It is called semantic ID of the element or * also main semantic ID of the element. * - * More information under https://admin-shell.io/aas/3/0/HasSemantics/semanticID + * More information under https://admin-shell.io/aas/3/0/HasSemantics/semanticId * - * @return Returns the Reference for the property semanticID. + * @return Returns the Reference for the property semanticId. */ - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - Reference getSemanticID(); + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + Reference getSemanticId(); /** * Identifier of the semantic definition of the element. It is called semantic ID of the element or * also main semantic ID of the element. * - * More information under https://admin-shell.io/aas/3/0/HasSemantics/semanticID + * More information under https://admin-shell.io/aas/3/0/HasSemantics/semanticId * - * @param semanticID desired value for the property semanticID. + * @param semanticId desired value for the property semanticId. */ - void setSemanticID(Reference semanticID); + void setSemanticId(Reference semanticId); /** * Identifier of a supplemental semantic definition of the element. It is called supplemental diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Identifiable.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Identifiable.java index 325a3d6d8..f878c8cbb 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Identifiable.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Identifiable.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Key.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Key.java index e58033a6a..f91b08a96 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Key.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Key.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/KeyTypes.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/KeyTypes.java index c08fef3b8..a83148985 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/KeyTypes.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/KeyTypes.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringDefinitionTypeIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringDefinitionTypeIec61360.java index a2153c56c..fb49700bd 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringDefinitionTypeIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringDefinitionTypeIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringNameType.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringNameType.java index 510fa9ff7..1fe4604ef 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringNameType.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringNameType.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringPreferredNameTypeIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringPreferredNameTypeIec61360.java index 970690271..e03afda72 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringPreferredNameTypeIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringPreferredNameTypeIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringShortNameTypeIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringShortNameTypeIec61360.java index dfa79c706..98fcdaf14 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringShortNameTypeIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringShortNameTypeIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringTextType.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringTextType.java index dc960b950..2ff44c065 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringTextType.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LangStringTextType.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LevelType.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LevelType.java index 36ca14e5b..4f3931d96 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LevelType.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/LevelType.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -29,25 +30,6 @@ }) public interface LevelType { - /** - * Maximum of the value - * - * More information under https://admin-shell.io/aas/3/0/LevelType/max - * - * @return Returns the boolean for the property max. - */ - @IRI("https://admin-shell.io/aas/3/0/LevelType/max") - boolean getMax(); - - /** - * Maximum of the value - * - * More information under https://admin-shell.io/aas/3/0/LevelType/max - * - * @param max desired value for the property max. - */ - void setMax(boolean max); - /** * Minimum of the value * @@ -105,4 +87,23 @@ public interface LevelType { */ void setTyp(boolean typ); + /** + * Maximum of the value + * + * More information under https://admin-shell.io/aas/3/0/LevelType/max + * + * @return Returns the boolean for the property max. + */ + @IRI("https://admin-shell.io/aas/3/0/LevelType/max") + boolean getMax(); + + /** + * Maximum of the value + * + * More information under https://admin-shell.io/aas/3/0/LevelType/max + * + * @param max desired value for the property max. + */ + void setMax(boolean max); + } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ModelType.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ModelType.java new file mode 100644 index 000000000..575cbda96 --- /dev/null +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ModelType.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.eclipse.digitaltwin.aas4j.v3.model; + + +import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; + + +/** +*/ +@IRI("aas:ModelType") +public enum ModelType { + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/AnnotatedRelationshipElement") + ANNOTATED_RELATIONSHIP_ELEMENT, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/AssetAdministrationShell") + ASSET_ADMINISTRATION_SHELL, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/BasicEventElement") + BASIC_EVENT_ELEMENT, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Blob") + BLOB, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Capability") + CAPABILITY, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/ConceptDescription") + CONCEPT_DESCRIPTION, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Entity") + ENTITY, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/File") + FILE, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/MultiLanguageProperty") + MULTI_LANGUAGE_PROPERTY, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Operation") + OPERATION, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Property") + PROPERTY, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Qualifier") + QUALIFIER, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Range") + RANGE, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Reference") + REFERENCE, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/ReferenceElement") + REFERENCE_ELEMENT, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/RelationshipElement") + RELATIONSHIP_ELEMENT, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/Submodel") + SUBMODEL, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/SubmodelElementCollection") + SUBMODEL_ELEMENT_COLLECTION, + + /** + */ + @IRI("https://admin-shell.io/aas/3/0/ModelType/SubmodelElementList") + SUBMODEL_ELEMENT_LIST; + +} diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ModellingKind.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ModellingKind.java index 070e48af7..4fc98a180 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ModellingKind.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ModellingKind.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/MultiLanguageProperty.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/MultiLanguageProperty.java index e2ca85aa4..5058811c4 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/MultiLanguageProperty.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/MultiLanguageProperty.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -44,27 +45,27 @@ public interface MultiLanguageProperty extends DataElement { * * More information under https://admin-shell.io/aas/3/0/MultiLanguageProperty/value * - * @param value desired value for the property value. + * @param values desired value for the property value. */ - void setValue(List value); + void setValue(List values); /** * Reference to the global unique ID of a coded value. * - * More information under https://admin-shell.io/aas/3/0/MultiLanguageProperty/valueID + * More information under https://admin-shell.io/aas/3/0/MultiLanguageProperty/valueId * - * @return Returns the Reference for the property valueID. + * @return Returns the Reference for the property valueId. */ - @IRI("https://admin-shell.io/aas/3/0/MultiLanguageProperty/valueID") - Reference getValueID(); + @IRI("https://admin-shell.io/aas/3/0/MultiLanguageProperty/valueId") + Reference getValueId(); /** * Reference to the global unique ID of a coded value. * - * More information under https://admin-shell.io/aas/3/0/MultiLanguageProperty/valueID + * More information under https://admin-shell.io/aas/3/0/MultiLanguageProperty/valueId * - * @param valueID desired value for the property valueID. + * @param valueId desired value for the property valueId. */ - void setValueID(Reference valueID); + void setValueId(Reference valueId); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Operation.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Operation.java index 18bb33559..093835165 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Operation.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Operation.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -29,25 +30,6 @@ }) public interface Operation extends SubmodelElement { - /** - * Parameter that is input and output of the operation. - * - * More information under https://admin-shell.io/aas/3/0/Operation/inoutputVariables - * - * @return Returns the List of OperationVariables for the property inoutputVariables. - */ - @IRI("https://admin-shell.io/aas/3/0/Operation/inoutputVariables") - List getInoutputVariables(); - - /** - * Parameter that is input and output of the operation. - * - * More information under https://admin-shell.io/aas/3/0/Operation/inoutputVariables - * - * @param inoutputVariables desired value for the property inoutputVariables. - */ - void setInoutputVariables(List inoutputVariables); - /** * Input parameter of the operation. * @@ -86,4 +68,23 @@ public interface Operation extends SubmodelElement { */ void setOutputVariables(List outputVariables); + /** + * Parameter that is input and output of the operation. + * + * More information under https://admin-shell.io/aas/3/0/Operation/inoutputVariables + * + * @return Returns the List of OperationVariables for the property inoutputVariables. + */ + @IRI("https://admin-shell.io/aas/3/0/Operation/inoutputVariables") + List getInoutputVariables(); + + /** + * Parameter that is input and output of the operation. + * + * More information under https://admin-shell.io/aas/3/0/Operation/inoutputVariables + * + * @param inoutputVariables desired value for the property inoutputVariables. + */ + void setInoutputVariables(List inoutputVariables); + } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/OperationVariable.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/OperationVariable.java index 7b5cf13d6..c61563481 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/OperationVariable.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/OperationVariable.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Property.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Property.java index 13a195fb3..72fc83156 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Property.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Property.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -28,6 +29,25 @@ }) public interface Property extends DataElement { + /** + * Data type of the value + * + * More information under https://admin-shell.io/aas/3/0/Property/valueType + * + * @return Returns the DataTypeDefXsd for the property valueType. + */ + @IRI("https://admin-shell.io/aas/3/0/Property/valueType") + DataTypeDefXsd getValueType(); + + /** + * Data type of the value + * + * More information under https://admin-shell.io/aas/3/0/Property/valueType + * + * @param valueType desired value for the property valueType. + */ + void setValueType(DataTypeDefXsd valueType); + /** * The value of the property instance. * @@ -50,39 +70,20 @@ public interface Property extends DataElement { /** * Reference to the global unique ID of a coded value. * - * More information under https://admin-shell.io/aas/3/0/Property/valueID + * More information under https://admin-shell.io/aas/3/0/Property/valueId * - * @return Returns the Reference for the property valueID. + * @return Returns the Reference for the property valueId. */ - @IRI("https://admin-shell.io/aas/3/0/Property/valueID") - Reference getValueID(); + @IRI("https://admin-shell.io/aas/3/0/Property/valueId") + Reference getValueId(); /** * Reference to the global unique ID of a coded value. * - * More information under https://admin-shell.io/aas/3/0/Property/valueID + * More information under https://admin-shell.io/aas/3/0/Property/valueId * - * @param valueID desired value for the property valueID. - */ - void setValueID(Reference valueID); - - /** - * Data type of the value - * - * More information under https://admin-shell.io/aas/3/0/Property/valueType - * - * @return Returns the DataTypeDefXSD for the property valueType. - */ - @IRI("https://admin-shell.io/aas/3/0/Property/valueType") - DataTypeDefXSD getValueType(); - - /** - * Data type of the value - * - * More information under https://admin-shell.io/aas/3/0/Property/valueType - * - * @param valueType desired value for the property valueType. + * @param valueId desired value for the property valueId. */ - void setValueType(DataTypeDefXSD valueType); + void setValueId(Reference valueId); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Qualifiable.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Qualifiable.java index c7dcf966d..d8f0e2e84 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Qualifiable.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Qualifiable.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Qualifier.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Qualifier.java index d78e990a8..fd3876c9d 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Qualifier.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Qualifier.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -67,6 +68,25 @@ public interface Qualifier extends HasSemantics { */ void setType(String type); + /** + * Data type of the qualifier value. + * + * More information under https://admin-shell.io/aas/3/0/Qualifier/valueType + * + * @return Returns the DataTypeDefXsd for the property valueType. + */ + @IRI("https://admin-shell.io/aas/3/0/Qualifier/valueType") + DataTypeDefXsd getValueType(); + + /** + * Data type of the qualifier value. + * + * More information under https://admin-shell.io/aas/3/0/Qualifier/valueType + * + * @param valueType desired value for the property valueType. + */ + void setValueType(DataTypeDefXsd valueType); + /** * The qualifier value is the value of the qualifier. * @@ -89,39 +109,20 @@ public interface Qualifier extends HasSemantics { /** * Reference to the global unique ID of a coded value. * - * More information under https://admin-shell.io/aas/3/0/Qualifier/valueID + * More information under https://admin-shell.io/aas/3/0/Qualifier/valueId * - * @return Returns the Reference for the property valueID. + * @return Returns the Reference for the property valueId. */ - @IRI("https://admin-shell.io/aas/3/0/Qualifier/valueID") - Reference getValueID(); + @IRI("https://admin-shell.io/aas/3/0/Qualifier/valueId") + Reference getValueId(); /** * Reference to the global unique ID of a coded value. * - * More information under https://admin-shell.io/aas/3/0/Qualifier/valueID + * More information under https://admin-shell.io/aas/3/0/Qualifier/valueId * - * @param valueID desired value for the property valueID. - */ - void setValueID(Reference valueID); - - /** - * Data type of the qualifier value. - * - * More information under https://admin-shell.io/aas/3/0/Qualifier/valueType - * - * @return Returns the DataTypeDefXSD for the property valueType. - */ - @IRI("https://admin-shell.io/aas/3/0/Qualifier/valueType") - DataTypeDefXSD getValueType(); - - /** - * Data type of the qualifier value. - * - * More information under https://admin-shell.io/aas/3/0/Qualifier/valueType - * - * @param valueType desired value for the property valueType. + * @param valueId desired value for the property valueId. */ - void setValueType(DataTypeDefXSD valueType); + void setValueId(Reference valueId); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/QualifierKind.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/QualifierKind.java index 776c50f89..e9ac14084 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/QualifierKind.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/QualifierKind.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; @@ -26,7 +26,7 @@ public enum QualifierKind { /** - * qualifies the semantic definition the element is referring to ('semanticID') + * qualifies the semantic definition the element is referring to ('semanticId') */ @IRI("https://admin-shell.io/aas/3/0/QualifierKind/ConceptQualifier") CONCEPT_QUALIFIER, diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Range.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Range.java index c9d70b9eb..9c9c60f51 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Range.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Range.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -29,23 +30,23 @@ public interface Range extends DataElement { /** - * The maximum value of the range. + * Data type of the min und max * - * More information under https://admin-shell.io/aas/3/0/Range/max + * More information under https://admin-shell.io/aas/3/0/Range/valueType * - * @return Returns the String for the property max. + * @return Returns the DataTypeDefXsd for the property valueType. */ - @IRI("https://admin-shell.io/aas/3/0/Range/max") - String getMax(); + @IRI("https://admin-shell.io/aas/3/0/Range/valueType") + DataTypeDefXsd getValueType(); /** - * The maximum value of the range. + * Data type of the min und max * - * More information under https://admin-shell.io/aas/3/0/Range/max + * More information under https://admin-shell.io/aas/3/0/Range/valueType * - * @param max desired value for the property max. + * @param valueType desired value for the property valueType. */ - void setMax(String max); + void setValueType(DataTypeDefXsd valueType); /** * The minimum value of the range. @@ -67,22 +68,22 @@ public interface Range extends DataElement { void setMin(String min); /** - * Data type of the min und max + * The maximum value of the range. * - * More information under https://admin-shell.io/aas/3/0/Range/valueType + * More information under https://admin-shell.io/aas/3/0/Range/max * - * @return Returns the DataTypeDefXSD for the property valueType. + * @return Returns the String for the property max. */ - @IRI("https://admin-shell.io/aas/3/0/Range/valueType") - DataTypeDefXSD getValueType(); + @IRI("https://admin-shell.io/aas/3/0/Range/max") + String getMax(); /** - * Data type of the min und max + * The maximum value of the range. * - * More information under https://admin-shell.io/aas/3/0/Range/valueType + * More information under https://admin-shell.io/aas/3/0/Range/max * - * @param valueType desired value for the property valueType. + * @param max desired value for the property max. */ - void setValueType(DataTypeDefXSD valueType); + void setMax(String max); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Referable.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Referable.java index b8a84a829..71c5e6ad8 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Referable.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Referable.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -24,8 +25,8 @@ * An element that is referable by its 'idShort'. */ @KnownSubtypes({ - @KnownSubtypes.Type(value = Identifiable.class), - @KnownSubtypes.Type(value = SubmodelElement.class) + @KnownSubtypes.Type(value = SubmodelElement.class), + @KnownSubtypes.Type(value = Identifiable.class) }) public interface Referable extends HasExtensions { @@ -51,23 +52,25 @@ public interface Referable extends HasExtensions { void setCategory(String category); /** - * Description or comments on the element. + * In case of identifiables this attribute is a short name of the element. In case of referable this + * ID is an identifying string of the element within its name space. * - * More information under https://admin-shell.io/aas/3/0/Referable/description + * More information under https://admin-shell.io/aas/3/0/Referable/idShort * - * @return Returns the List of LangStringTextTypes for the property description. + * @return Returns the String for the property idShort. */ - @IRI("https://admin-shell.io/aas/3/0/Referable/description") - List getDescription(); + @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") + String getIdShort(); /** - * Description or comments on the element. + * In case of identifiables this attribute is a short name of the element. In case of referable this + * ID is an identifying string of the element within its name space. * - * More information under https://admin-shell.io/aas/3/0/Referable/description + * More information under https://admin-shell.io/aas/3/0/Referable/idShort * - * @param description desired value for the property description. + * @param idShort desired value for the property idShort. */ - void setDescription(List description); + void setIdShort(String idShort); /** * Display name. Can be provided in several languages. @@ -84,29 +87,27 @@ public interface Referable extends HasExtensions { * * More information under https://admin-shell.io/aas/3/0/Referable/displayName * - * @param displayName desired value for the property displayName. + * @param displayNames desired value for the property displayName. */ - void setDisplayName(List displayName); + void setDisplayName(List displayNames); /** - * In case of identifiables this attribute is a short name of the element. In case of referable this - * ID is an identifying string of the element within its name space. + * Description or comments on the element. * - * More information under https://admin-shell.io/aas/3/0/Referable/idShort + * More information under https://admin-shell.io/aas/3/0/Referable/description * - * @return Returns the String for the property idShort. + * @return Returns the List of LangStringTextTypes for the property description. */ - @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") - String getIdShort(); + @IRI("https://admin-shell.io/aas/3/0/Referable/description") + List getDescription(); /** - * In case of identifiables this attribute is a short name of the element. In case of referable this - * ID is an identifying string of the element within its name space. + * Description or comments on the element. * - * More information under https://admin-shell.io/aas/3/0/Referable/idShort + * More information under https://admin-shell.io/aas/3/0/Referable/description * - * @param idShort desired value for the property idShort. + * @param descriptions desired value for the property description. */ - void setIdShort(String idShort); + void setDescription(List descriptions); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Reference.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Reference.java index e338f7e63..ee6ceffda 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Reference.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Reference.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -30,60 +31,60 @@ public interface Reference { /** - * Unique references in their name space. + * Type of the reference. * - * More information under https://admin-shell.io/aas/3/0/Reference/keys + * More information under https://admin-shell.io/aas/3/0/Reference/type * - * @return Returns the List of Keys for the property keys. + * @return Returns the ReferenceTypes for the property type. */ - @IRI("https://admin-shell.io/aas/3/0/Reference/keys") - List getKeys(); + @IRI("https://admin-shell.io/aas/3/0/Reference/type") + ReferenceTypes getType(); /** - * Unique references in their name space. + * Type of the reference. * - * More information under https://admin-shell.io/aas/3/0/Reference/keys + * More information under https://admin-shell.io/aas/3/0/Reference/type * - * @param keys desired value for the property keys. + * @param type desired value for the property type. */ - void setKeys(List keys); + void setType(ReferenceTypes type); /** - * 'semanticID' of the referenced model element ('type' = 'ModelReference'). + * 'semanticId' of the referenced model element ('type' = 'ModelReference'). * - * More information under https://admin-shell.io/aas/3/0/Reference/referredSemanticID + * More information under https://admin-shell.io/aas/3/0/Reference/referredSemanticId * - * @return Returns the Reference for the property referredSemanticID. + * @return Returns the Reference for the property referredSemanticId. */ - @IRI("https://admin-shell.io/aas/3/0/Reference/referredSemanticID") - Reference getReferredSemanticID(); + @IRI("https://admin-shell.io/aas/3/0/Reference/referredSemanticId") + Reference getReferredSemanticId(); /** - * 'semanticID' of the referenced model element ('type' = 'ModelReference'). + * 'semanticId' of the referenced model element ('type' = 'ModelReference'). * - * More information under https://admin-shell.io/aas/3/0/Reference/referredSemanticID + * More information under https://admin-shell.io/aas/3/0/Reference/referredSemanticId * - * @param referredSemanticID desired value for the property referredSemanticID. + * @param referredSemanticId desired value for the property referredSemanticId. */ - void setReferredSemanticID(Reference referredSemanticID); + void setReferredSemanticId(Reference referredSemanticId); /** - * Type of the reference. + * Unique references in their name space. * - * More information under https://admin-shell.io/aas/3/0/Reference/type + * More information under https://admin-shell.io/aas/3/0/Reference/keys * - * @return Returns the ReferenceTypes for the property type. + * @return Returns the List of Keys for the property keys. */ - @IRI("https://admin-shell.io/aas/3/0/Reference/type") - ReferenceTypes getType(); + @IRI("https://admin-shell.io/aas/3/0/Reference/keys") + List getKeys(); /** - * Type of the reference. + * Unique references in their name space. * - * More information under https://admin-shell.io/aas/3/0/Reference/type + * More information under https://admin-shell.io/aas/3/0/Reference/keys * - * @param type desired value for the property type. + * @param keys desired value for the property keys. */ - void setType(ReferenceTypes type); + void setKeys(List keys); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ReferenceElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ReferenceElement.java index f94d3b5f9..40a6de3a5 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ReferenceElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ReferenceElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ReferenceTypes.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ReferenceTypes.java index 6182c32e0..54509783f 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ReferenceTypes.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ReferenceTypes.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/RelationshipElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/RelationshipElement.java index ab0b90430..986c78aa2 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/RelationshipElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/RelationshipElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Resource.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Resource.java index 78e144ece..4534c1408 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Resource.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Resource.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -30,41 +31,41 @@ public interface Resource { /** - * Content type of the content of the file. + * Path and name of the resource (with file extension). * - * More information under https://admin-shell.io/aas/3/0/Resource/contentType + * More information under https://admin-shell.io/aas/3/0/Resource/path * - * @return Returns the String for the property contentType. + * @return Returns the String for the property path. */ - @IRI("https://admin-shell.io/aas/3/0/Resource/contentType") - String getContentType(); + @IRI("https://admin-shell.io/aas/3/0/Resource/path") + String getPath(); /** - * Content type of the content of the file. + * Path and name of the resource (with file extension). * - * More information under https://admin-shell.io/aas/3/0/Resource/contentType + * More information under https://admin-shell.io/aas/3/0/Resource/path * - * @param contentType desired value for the property contentType. + * @param path desired value for the property path. */ - void setContentType(String contentType); + void setPath(String path); /** - * Path and name of the resource (with file extension). + * Content type of the content of the file. * - * More information under https://admin-shell.io/aas/3/0/Resource/path + * More information under https://admin-shell.io/aas/3/0/Resource/contentType * - * @return Returns the String for the property path. + * @return Returns the String for the property contentType. */ - @IRI("https://admin-shell.io/aas/3/0/Resource/path") - String getPath(); + @IRI("https://admin-shell.io/aas/3/0/Resource/contentType") + String getContentType(); /** - * Path and name of the resource (with file extension). + * Content type of the content of the file. * - * More information under https://admin-shell.io/aas/3/0/Resource/path + * More information under https://admin-shell.io/aas/3/0/Resource/contentType * - * @param path desired value for the property path. + * @param contentType desired value for the property contentType. */ - void setPath(String path); + void setContentType(String contentType); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SpecificAssetID.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SpecificAssetId.java similarity index 76% rename from model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SpecificAssetID.java rename to model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SpecificAssetId.java index fd90bddd3..c868e3e2b 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SpecificAssetID.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SpecificAssetId.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -17,50 +18,31 @@ import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSpecificAssetID; +import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSpecificAssetId; /** * A specific asset ID describes a generic supplementary identifying attribute of the asset. */ @KnownSubtypes({ - @KnownSubtypes.Type(value = DefaultSpecificAssetID.class) + @KnownSubtypes.Type(value = DefaultSpecificAssetId.class) }) -public interface SpecificAssetID extends HasSemantics { - - /** - * The (external) subject the key belongs to or has meaning to. - * - * More information under https://admin-shell.io/aas/3/0/SpecificAssetID/externalSubjectID - * - * @return Returns the Reference for the property externalSubjectID. - */ - @IRI("https://admin-shell.io/aas/3/0/SpecificAssetID/externalSubjectID") - Reference getExternalSubjectID(); - - /** - * The (external) subject the key belongs to or has meaning to. - * - * More information under https://admin-shell.io/aas/3/0/SpecificAssetID/externalSubjectID - * - * @param externalSubjectID desired value for the property externalSubjectID. - */ - void setExternalSubjectID(Reference externalSubjectID); +public interface SpecificAssetId extends HasSemantics { /** * Name of the identifier * - * More information under https://admin-shell.io/aas/3/0/SpecificAssetID/name + * More information under https://admin-shell.io/aas/3/0/SpecificAssetId/name * * @return Returns the String for the property name. */ - @IRI("https://admin-shell.io/aas/3/0/SpecificAssetID/name") + @IRI("https://admin-shell.io/aas/3/0/SpecificAssetId/name") String getName(); /** * Name of the identifier * - * More information under https://admin-shell.io/aas/3/0/SpecificAssetID/name + * More information under https://admin-shell.io/aas/3/0/SpecificAssetId/name * * @param name desired value for the property name. */ @@ -69,20 +51,39 @@ public interface SpecificAssetID extends HasSemantics { /** * The value of the specific asset identifier with the corresponding name. * - * More information under https://admin-shell.io/aas/3/0/SpecificAssetID/value + * More information under https://admin-shell.io/aas/3/0/SpecificAssetId/value * * @return Returns the String for the property value. */ - @IRI("https://admin-shell.io/aas/3/0/SpecificAssetID/value") + @IRI("https://admin-shell.io/aas/3/0/SpecificAssetId/value") String getValue(); /** * The value of the specific asset identifier with the corresponding name. * - * More information under https://admin-shell.io/aas/3/0/SpecificAssetID/value + * More information under https://admin-shell.io/aas/3/0/SpecificAssetId/value * * @param value desired value for the property value. */ void setValue(String value); + /** + * The (external) subject the key belongs to or has meaning to. + * + * More information under https://admin-shell.io/aas/3/0/SpecificAssetId/externalSubjectId + * + * @return Returns the Reference for the property externalSubjectId. + */ + @IRI("https://admin-shell.io/aas/3/0/SpecificAssetId/externalSubjectId") + Reference getExternalSubjectId(); + + /** + * The (external) subject the key belongs to or has meaning to. + * + * More information under https://admin-shell.io/aas/3/0/SpecificAssetId/externalSubjectId + * + * @param externalSubjectId desired value for the property externalSubjectId. + */ + void setExternalSubjectId(Reference externalSubjectId); + } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/StateOfEvent.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/StateOfEvent.java index 67ec72fe8..3d9069b73 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/StateOfEvent.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/StateOfEvent.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Submodel.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Submodel.java index 132c85b2d..4e8fd3266 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Submodel.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/Submodel.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -27,7 +28,7 @@ @KnownSubtypes({ @KnownSubtypes.Type(value = DefaultSubmodel.class) }) -public interface Submodel extends HasDataSpecification, Identifiable, HasSemantics, HasKind, Qualifiable { +public interface Submodel extends HasDataSpecification, HasKind, HasSemantics, Identifiable, Qualifiable { /** * A submodel consists of zero or more submodel elements. diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElement.java index 8e9f1af77..afb2299d6 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,7 +16,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model; - import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; @@ -23,15 +23,15 @@ * A submodel element is an element suitable for the description and differentiation of assets. */ @KnownSubtypes({ - @KnownSubtypes.Type(value = RelationshipElement.class), @KnownSubtypes.Type(value = DataElement.class), - @KnownSubtypes.Type(value = EventElement.class), @KnownSubtypes.Type(value = Capability.class), @KnownSubtypes.Type(value = Entity.class), + @KnownSubtypes.Type(value = EventElement.class), @KnownSubtypes.Type(value = Operation.class), + @KnownSubtypes.Type(value = RelationshipElement.class), @KnownSubtypes.Type(value = SubmodelElementCollection.class), @KnownSubtypes.Type(value = SubmodelElementList.class) }) -public interface SubmodelElement extends HasDataSpecification, HasSemantics, Referable, Qualifiable { +public interface SubmodelElement extends HasDataSpecification, HasSemantics, Qualifiable, Referable { } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElementCollection.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElementCollection.java index ccfffd58b..2080567bd 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElementCollection.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElementCollection.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -18,7 +19,7 @@ import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodelElementCollection; -import java.util.Collection; +import java.util.List; /** @@ -35,18 +36,18 @@ public interface SubmodelElementCollection extends SubmodelElement { * * More information under https://admin-shell.io/aas/3/0/SubmodelElementCollection/value * - * @return Returns the Collection of SubmodelElements for the property value. + * @return Returns the List of SubmodelElements for the property value. */ @IRI("https://admin-shell.io/aas/3/0/SubmodelElementCollection/value") - Collection getValue(); + List getValue(); /** * Submodel element contained in the collection. * * More information under https://admin-shell.io/aas/3/0/SubmodelElementCollection/value * - * @param value desired value for the property value. + * @param values desired value for the property value. */ - void setValue(Collection value); + void setValue(List values); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElementList.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElementList.java index f83b4eb55..7e94212b4 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElementList.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/SubmodelElementList.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -53,31 +54,31 @@ public interface SubmodelElementList extends SubmodelElement { /** * Semantic ID the submodel elements contained in the list match to. * - * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/semanticIDListElement + * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/semanticIdListElement * - * @return Returns the Reference for the property semanticIDListElement. + * @return Returns the Reference for the property semanticIdListElement. */ - @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/semanticIDListElement") - Reference getSemanticIDListElement(); + @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/semanticIdListElement") + Reference getSemanticIdListElement(); /** * Semantic ID the submodel elements contained in the list match to. * - * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/semanticIDListElement + * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/semanticIdListElement * - * @param semanticIDListElement desired value for the property semanticIDListElement. + * @param semanticIdListElement desired value for the property semanticIdListElement. */ - void setSemanticIDListElement(Reference semanticIDListElement); + void setSemanticIdListElement(Reference semanticIdListElement); /** * The submodel element type of the submodel elements contained in the list. * * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/typeValueListElement * - * @return Returns the AASSubmodelElements for the property typeValueListElement. + * @return Returns the AasSubmodelElements for the property typeValueListElement. */ @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/typeValueListElement") - AASSubmodelElements getTypeValueListElement(); + AasSubmodelElements getTypeValueListElement(); /** * The submodel element type of the submodel elements contained in the list. @@ -86,44 +87,44 @@ public interface SubmodelElementList extends SubmodelElement { * * @param typeValueListElement desired value for the property typeValueListElement. */ - void setTypeValueListElement(AASSubmodelElements typeValueListElement); + void setTypeValueListElement(AasSubmodelElements typeValueListElement); /** - * Submodel element contained in the list. + * The value type of the submodel element contained in the list. * - * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/value + * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/valueTypeListElement * - * @return Returns the List of SubmodelElements for the property value. + * @return Returns the DataTypeDefXsd for the property valueTypeListElement. */ - @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/value") - List getValue(); + @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/valueTypeListElement") + DataTypeDefXsd getValueTypeListElement(); /** - * Submodel element contained in the list. + * The value type of the submodel element contained in the list. * - * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/value + * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/valueTypeListElement * - * @param value desired value for the property value. + * @param valueTypeListElement desired value for the property valueTypeListElement. */ - void setValue(List value); + void setValueTypeListElement(DataTypeDefXsd valueTypeListElement); /** - * The value type of the submodel element contained in the list. + * Submodel element contained in the list. * - * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/valueTypeListElement + * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/value * - * @return Returns the DataTypeDefXSD for the property valueTypeListElement. + * @return Returns the List of SubmodelElements for the property value. */ - @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/valueTypeListElement") - DataTypeDefXSD getValueTypeListElement(); + @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/value") + List getValue(); /** - * The value type of the submodel element contained in the list. + * Submodel element contained in the list. * - * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/valueTypeListElement + * More information under https://admin-shell.io/aas/3/0/SubmodelElementList/value * - * @param valueTypeListElement desired value for the property valueTypeListElement. + * @param values desired value for the property value. */ - void setValueTypeListElement(DataTypeDefXSD valueTypeListElement); + void setValue(List values); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ValueList.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ValueList.java index 3fa7f75ce..9313bc322 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ValueList.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ValueList.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ValueReferencePair.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ValueReferencePair.java index 8b432070b..53d12d3bf 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ValueReferencePair.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/ValueReferencePair.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -30,7 +31,7 @@ public interface ValueReferencePair { /** - * The value of the referenced concept definition of the value in 'valueID'. + * The value of the referenced concept definition of the value in 'valueId'. * * More information under https://admin-shell.io/aas/3/0/ValueReferencePair/value * @@ -40,7 +41,7 @@ public interface ValueReferencePair { String getValue(); /** - * The value of the referenced concept definition of the value in 'valueID'. + * The value of the referenced concept definition of the value in 'valueId'. * * More information under https://admin-shell.io/aas/3/0/ValueReferencePair/value * @@ -51,20 +52,20 @@ public interface ValueReferencePair { /** * Global unique id of the value. * - * More information under https://admin-shell.io/aas/3/0/ValueReferencePair/valueID + * More information under https://admin-shell.io/aas/3/0/ValueReferencePair/valueId * - * @return Returns the Reference for the property valueID. + * @return Returns the Reference for the property valueId. */ - @IRI("https://admin-shell.io/aas/3/0/ValueReferencePair/valueID") - Reference getValueID(); + @IRI("https://admin-shell.io/aas/3/0/ValueReferencePair/valueId") + Reference getValueId(); /** * Global unique id of the value. * - * More information under https://admin-shell.io/aas/3/0/ValueReferencePair/valueID + * More information under https://admin-shell.io/aas/3/0/ValueReferencePair/valueId * - * @param valueID desired value for the property valueID. + * @param valueId desired value for the property valueId. */ - void setValueID(Reference valueID); + void setValueId(Reference valueId); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/annotations/IRI.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/annotations/IRI.java index a16de81f0..075f2353a 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/annotations/IRI.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/annotations/IRI.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/annotations/KnownSubtypes.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/annotations/KnownSubtypes.java index 14a7ca309..535f8e991 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/annotations/KnownSubtypes.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/annotations/KnownSubtypes.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -27,7 +28,7 @@ * * @return List of known implementing subtypes */ - public Type[] value(); + public KnownSubtypes.Type[] value(); public @interface Type { Class value(); diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AbstractBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AbstractBuilder.java index 283f216a7..2090757dc 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AbstractBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AbstractBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AdministrativeInformationBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AdministrativeInformationBuilder.java index 25ccb9399..f75faf333 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AdministrativeInformationBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AdministrativeInformationBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -25,13 +26,13 @@ public abstract class AdministrativeInformationBuilder { /** - * This function allows setting a value for creator + * This function allows setting a value for version * - * @param creator desired value to be set - * @return Builder object with new value for creator + * @param version desired value to be set + * @return Builder object with new value for version */ - public B creator(Reference creator) { - getBuildingInstance().setCreator(creator); + public B version(String version) { + getBuildingInstance().setVersion(version); return getSelf(); } @@ -47,24 +48,24 @@ public B revision(String revision) { } /** - * This function allows setting a value for templateID + * This function allows setting a value for creator * - * @param templateID desired value to be set - * @return Builder object with new value for templateID + * @param creator desired value to be set + * @return Builder object with new value for creator */ - public B templateID(String templateID) { - getBuildingInstance().setTemplateID(templateID); + public B creator(Reference creator) { + getBuildingInstance().setCreator(creator); return getSelf(); } /** - * This function allows setting a value for version + * This function allows setting a value for templateId * - * @param version desired value to be set - * @return Builder object with new value for version + * @param templateId desired value to be set + * @return Builder object with new value for templateId */ - public B version(String version) { - getBuildingInstance().setVersion(version); + public B templateId(String templateId) { + getBuildingInstance().setTemplateId(templateId); return getSelf(); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AnnotatedRelationshipElementBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AnnotatedRelationshipElementBuilder.java index 663bd819f..0a3067f18 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AnnotatedRelationshipElementBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AnnotatedRelationshipElementBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AnnotatedRelationshipElement; +import org.eclipse.digitaltwin.aas4j.v3.model.DataElement; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -89,13 +97,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -122,46 +130,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -177,13 +196,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -208,26 +238,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AssetAdministrationShellBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AssetAdministrationShellBuilder.java index 45b103666..e2820dc4c 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AssetAdministrationShellBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AssetAdministrationShellBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AdministrativeInformation; +import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; +import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -23,24 +31,24 @@ public abstract class AssetAdministrationShellBuilder { /** - * This function allows setting a value for assetInformation + * This function allows setting a value for derivedFrom * - * @param assetInformation desired value to be set - * @return Builder object with new value for assetInformation + * @param derivedFrom desired value to be set + * @return Builder object with new value for derivedFrom */ - public B assetInformation(AssetInformation assetInformation) { - getBuildingInstance().setAssetInformation(assetInformation); + public B derivedFrom(Reference derivedFrom) { + getBuildingInstance().setDerivedFrom(derivedFrom); return getSelf(); } /** - * This function allows setting a value for derivedFrom + * This function allows setting a value for assetInformation * - * @param derivedFrom desired value to be set - * @return Builder object with new value for derivedFrom + * @param assetInformation desired value to be set + * @return Builder object with new value for assetInformation */ - public B derivedFrom(Reference derivedFrom) { - getBuildingInstance().setDerivedFrom(derivedFrom); + public B assetInformation(AssetInformation assetInformation) { + getBuildingInstance().setAssetInformation(assetInformation); return getSelf(); } @@ -122,35 +130,24 @@ public B category(String category) { } /** - * This function allows setting a value for description - * - * @param description desired value to be set - * @return Builder object with new value for description - */ - public B description(List description) { - getBuildingInstance().setDescription(description); - return getSelf(); - } - - /** - * This function allows adding a value to the List description + * This function allows setting a value for idShort * - * @param description desired value to be added - * @return Builder object with new value for description + * @param idShort desired value to be set + * @return Builder object with new value for idShort */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -166,13 +163,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AssetInformationBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AssetInformationBuilder.java index cb3798301..974bbcae2 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AssetInformationBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/AssetInformationBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -17,7 +18,7 @@ import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; import org.eclipse.digitaltwin.aas4j.v3.model.AssetKind; import org.eclipse.digitaltwin.aas4j.v3.model.Resource; -import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetID; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; import java.util.List; @@ -37,57 +38,57 @@ public B assetKind(AssetKind assetKind) { } /** - * This function allows setting a value for assetType + * This function allows setting a value for globalAssetId * - * @param assetType desired value to be set - * @return Builder object with new value for assetType + * @param globalAssetId desired value to be set + * @return Builder object with new value for globalAssetId */ - public B assetType(String assetType) { - getBuildingInstance().setAssetType(assetType); + public B globalAssetId(String globalAssetId) { + getBuildingInstance().setGlobalAssetId(globalAssetId); return getSelf(); } /** - * This function allows setting a value for defaultThumbnail + * This function allows setting a value for specificAssetIds * - * @param defaultThumbnail desired value to be set - * @return Builder object with new value for defaultThumbnail + * @param specificAssetIds desired value to be set + * @return Builder object with new value for specificAssetIds */ - public B defaultThumbnail(Resource defaultThumbnail) { - getBuildingInstance().setDefaultThumbnail(defaultThumbnail); + public B specificAssetIds(List specificAssetIds) { + getBuildingInstance().setSpecificAssetIds(specificAssetIds); return getSelf(); } /** - * This function allows setting a value for globalAssetID + * This function allows adding a value to the List specificAssetIds * - * @param globalAssetID desired value to be set - * @return Builder object with new value for globalAssetID + * @param specificAssetIds desired value to be added + * @return Builder object with new value for specificAssetIds */ - public B globalAssetID(String globalAssetID) { - getBuildingInstance().setGlobalAssetID(globalAssetID); + public B specificAssetIds(SpecificAssetId specificAssetIds) { + getBuildingInstance().getSpecificAssetIds().add(specificAssetIds); return getSelf(); } /** - * This function allows setting a value for specificAssetIds + * This function allows setting a value for assetType * - * @param specificAssetIds desired value to be set - * @return Builder object with new value for specificAssetIds + * @param assetType desired value to be set + * @return Builder object with new value for assetType */ - public B specificAssetIds(List specificAssetIds) { - getBuildingInstance().setSpecificAssetIds(specificAssetIds); + public B assetType(String assetType) { + getBuildingInstance().setAssetType(assetType); return getSelf(); } /** - * This function allows adding a value to the List specificAssetIds + * This function allows setting a value for defaultThumbnail * - * @param specificAssetIds desired value to be added - * @return Builder object with new value for specificAssetIds + * @param defaultThumbnail desired value to be set + * @return Builder object with new value for defaultThumbnail */ - public B specificAssetIds(SpecificAssetID specificAssetIds) { - getBuildingInstance().getSpecificAssetIds().add(specificAssetIds); + public B defaultThumbnail(Resource defaultThumbnail) { + getBuildingInstance().setDefaultThumbnail(defaultThumbnail); return getSelf(); } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/BasicEventElementBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/BasicEventElementBuilder.java index 01edbf0a3..181f1199a 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/BasicEventElementBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/BasicEventElementBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,15 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.BasicEventElement; +import org.eclipse.digitaltwin.aas4j.v3.model.Direction; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.StateOfEvent; import java.util.List; @@ -22,6 +31,17 @@ public abstract class BasicEventElementBuilder> extends ExtendableBuilder { + /** + * This function allows setting a value for observed + * + * @param observed desired value to be set + * @return Builder object with new value for observed + */ + public B observed(Reference observed) { + getBuildingInstance().setObserved(observed); + return getSelf(); + } + /** * This function allows setting a value for direction * @@ -34,24 +54,24 @@ public B direction(Direction direction) { } /** - * This function allows setting a value for lastUpdate + * This function allows setting a value for state * - * @param lastUpdate desired value to be set - * @return Builder object with new value for lastUpdate + * @param state desired value to be set + * @return Builder object with new value for state */ - public B lastUpdate(String lastUpdate) { - getBuildingInstance().setLastUpdate(lastUpdate); + public B state(StateOfEvent state) { + getBuildingInstance().setState(state); return getSelf(); } /** - * This function allows setting a value for maxInterval + * This function allows setting a value for messageTopic * - * @param maxInterval desired value to be set - * @return Builder object with new value for maxInterval + * @param messageTopic desired value to be set + * @return Builder object with new value for messageTopic */ - public B maxInterval(String maxInterval) { - getBuildingInstance().setMaxInterval(maxInterval); + public B messageTopic(String messageTopic) { + getBuildingInstance().setMessageTopic(messageTopic); return getSelf(); } @@ -67,13 +87,13 @@ public B messageBroker(Reference messageBroker) { } /** - * This function allows setting a value for messageTopic + * This function allows setting a value for lastUpdate * - * @param messageTopic desired value to be set - * @return Builder object with new value for messageTopic + * @param lastUpdate desired value to be set + * @return Builder object with new value for lastUpdate */ - public B messageTopic(String messageTopic) { - getBuildingInstance().setMessageTopic(messageTopic); + public B lastUpdate(String lastUpdate) { + getBuildingInstance().setLastUpdate(lastUpdate); return getSelf(); } @@ -89,24 +109,13 @@ public B minInterval(String minInterval) { } /** - * This function allows setting a value for observed - * - * @param observed desired value to be set - * @return Builder object with new value for observed - */ - public B observed(Reference observed) { - getBuildingInstance().setObserved(observed); - return getSelf(); - } - - /** - * This function allows setting a value for state + * This function allows setting a value for maxInterval * - * @param state desired value to be set - * @return Builder object with new value for state + * @param maxInterval desired value to be set + * @return Builder object with new value for maxInterval */ - public B state(StateOfEvent state) { - getBuildingInstance().setState(state); + public B maxInterval(String maxInterval) { + getBuildingInstance().setMaxInterval(maxInterval); return getSelf(); } @@ -133,13 +142,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -166,46 +175,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -221,13 +241,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -252,26 +283,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/BlobBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/BlobBuilder.java index 43f20de00..7859c310e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/BlobBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/BlobBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.Blob; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -22,24 +29,24 @@ public abstract class BlobBuilder> extends ExtendableBuilder { /** - * This function allows setting a value for contentType + * This function allows setting a value for value * - * @param contentType desired value to be set - * @return Builder object with new value for contentType + * @param value desired value to be set + * @return Builder object with new value for value */ - public B contentType(String contentType) { - getBuildingInstance().setContentType(contentType); + public B value(byte[] value) { + getBuildingInstance().setValue(value); return getSelf(); } /** - * This function allows setting a value for value + * This function allows setting a value for contentType * - * @param value desired value to be set - * @return Builder object with new value for value + * @param contentType desired value to be set + * @return Builder object with new value for contentType */ - public B value(byte[] value) { - getBuildingInstance().setValue(value); + public B contentType(String contentType) { + getBuildingInstance().setContentType(contentType); return getSelf(); } @@ -66,13 +73,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -99,46 +106,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -154,13 +172,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -185,26 +214,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/Builder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/Builder.java index 7e27dad1f..cdc11013e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/Builder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/Builder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/CapabilityBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/CapabilityBuilder.java index f62d73756..548d57037 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/CapabilityBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/CapabilityBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.Capability; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -44,13 +51,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -77,46 +84,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -132,13 +150,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -163,26 +192,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ConceptDescriptionBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ConceptDescriptionBuilder.java index 65e871bb3..57919df59 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ConceptDescriptionBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ConceptDescriptionBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AdministrativeInformation; +import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -25,11 +32,11 @@ public abstract class ConceptDescriptionBuilder isCaseOf) { - getBuildingInstance().setIsCaseOf(isCaseOf); + public B isCaseOf(List isCaseOfs) { + getBuildingInstance().setIsCaseOf(isCaseOfs); return getSelf(); } @@ -100,35 +107,24 @@ public B category(String category) { } /** - * This function allows setting a value for description - * - * @param description desired value to be set - * @return Builder object with new value for description - */ - public B description(List description) { - getBuildingInstance().setDescription(description); - return getSelf(); - } - - /** - * This function allows adding a value to the List description + * This function allows setting a value for idShort * - * @param description desired value to be added - * @return Builder object with new value for description + * @param idShort desired value to be set + * @return Builder object with new value for idShort */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -144,13 +140,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/DataSpecificationIec61360Builder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/DataSpecificationIec61360Builder.java index d02d832fe..361b5cb1b 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/DataSpecificationIec61360Builder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/DataSpecificationIec61360Builder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.DataSpecificationIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringDefinitionTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringPreferredNameTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringShortNameTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LevelType; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.ValueList; import java.util.List; @@ -22,58 +30,14 @@ public abstract class DataSpecificationIec61360Builder> extends ExtendableBuilder { - /** - * This function allows setting a value for dataType - * - * @param dataType desired value to be set - * @return Builder object with new value for dataType - */ - public B dataType(DataTypeIec61360 dataType) { - getBuildingInstance().setDataType(dataType); - return getSelf(); - } - - /** - * This function allows setting a value for definition - * - * @param definition desired value to be set - * @return Builder object with new value for definition - */ - public B definition(List definition) { - getBuildingInstance().setDefinition(definition); - return getSelf(); - } - - /** - * This function allows adding a value to the List definition - * - * @param definition desired value to be added - * @return Builder object with new value for definition - */ - public B definition(LangStringDefinitionTypeIec61360 definition) { - getBuildingInstance().getDefinition().add(definition); - return getSelf(); - } - - /** - * This function allows setting a value for levelType - * - * @param levelType desired value to be set - * @return Builder object with new value for levelType - */ - public B levelType(LevelType levelType) { - getBuildingInstance().setLevelType(levelType); - return getSelf(); - } - /** * This function allows setting a value for preferredName * - * @param preferredName desired value to be set + * @param preferredNames desired value to be set * @return Builder object with new value for preferredName */ - public B preferredName(List preferredName) { - getBuildingInstance().setPreferredName(preferredName); + public B preferredName(List preferredNames) { + getBuildingInstance().setPreferredName(preferredNames); return getSelf(); } @@ -91,11 +55,11 @@ public B preferredName(LangStringPreferredNameTypeIec61360 preferredName) { /** * This function allows setting a value for shortName * - * @param shortName desired value to be set + * @param shortNames desired value to be set * @return Builder object with new value for shortName */ - public B shortName(List shortName) { - getBuildingInstance().setShortName(shortName); + public B shortName(List shortNames) { + getBuildingInstance().setShortName(shortNames); return getSelf(); } @@ -110,6 +74,28 @@ public B shortName(LangStringShortNameTypeIec61360 shortName) { return getSelf(); } + /** + * This function allows setting a value for unit + * + * @param unit desired value to be set + * @return Builder object with new value for unit + */ + public B unit(String unit) { + getBuildingInstance().setUnit(unit); + return getSelf(); + } + + /** + * This function allows setting a value for unitId + * + * @param unitId desired value to be set + * @return Builder object with new value for unitId + */ + public B unitId(Reference unitId) { + getBuildingInstance().setUnitId(unitId); + return getSelf(); + } + /** * This function allows setting a value for sourceOfDefinition * @@ -133,35 +119,35 @@ public B symbol(String symbol) { } /** - * This function allows setting a value for unit + * This function allows setting a value for dataType * - * @param unit desired value to be set - * @return Builder object with new value for unit + * @param dataType desired value to be set + * @return Builder object with new value for dataType */ - public B unit(String unit) { - getBuildingInstance().setUnit(unit); + public B dataType(DataTypeIec61360 dataType) { + getBuildingInstance().setDataType(dataType); return getSelf(); } /** - * This function allows setting a value for unitID + * This function allows setting a value for definition * - * @param unitID desired value to be set - * @return Builder object with new value for unitID + * @param definitions desired value to be set + * @return Builder object with new value for definition */ - public B unitID(Reference unitID) { - getBuildingInstance().setUnitID(unitID); + public B definition(List definitions) { + getBuildingInstance().setDefinition(definitions); return getSelf(); } /** - * This function allows setting a value for value + * This function allows adding a value to the List definition * - * @param value desired value to be set - * @return Builder object with new value for value + * @param definition desired value to be added + * @return Builder object with new value for definition */ - public B value(String value) { - getBuildingInstance().setValue(value); + public B definition(LangStringDefinitionTypeIec61360 definition) { + getBuildingInstance().getDefinition().add(definition); return getSelf(); } @@ -187,4 +173,26 @@ public B valueList(ValueList valueList) { return getSelf(); } + /** + * This function allows setting a value for value + * + * @param value desired value to be set + * @return Builder object with new value for value + */ + public B value(String value) { + getBuildingInstance().setValue(value); + return getSelf(); + } + + /** + * This function allows setting a value for levelType + * + * @param levelType desired value to be set + * @return Builder object with new value for levelType + */ + public B levelType(LevelType levelType) { + getBuildingInstance().setLevelType(levelType); + return getSelf(); + } + } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EmbeddedDataSpecificationBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EmbeddedDataSpecificationBuilder.java index f88b3561e..f92f45fe4 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EmbeddedDataSpecificationBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EmbeddedDataSpecificationBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EntityBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EntityBuilder.java index 92e516e17..98511ba99 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EntityBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EntityBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,13 +15,44 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Entity; +import org.eclipse.digitaltwin.aas4j.v3.model.EntityType; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import java.util.List; public abstract class EntityBuilder> extends ExtendableBuilder { + /** + * This function allows setting a value for statements + * + * @param statements desired value to be set + * @return Builder object with new value for statements + */ + public B statements(List statements) { + getBuildingInstance().setStatements(statements); + return getSelf(); + } + + /** + * This function allows adding a value to the List statements + * + * @param statements desired value to be added + * @return Builder object with new value for statements + */ + public B statements(SubmodelElement statements) { + getBuildingInstance().getStatements().add(statements); + return getSelf(); + } + /** * This function allows setting a value for entityType * @@ -33,13 +65,13 @@ public B entityType(EntityType entityType) { } /** - * This function allows setting a value for globalAssetID + * This function allows setting a value for globalAssetId * - * @param globalAssetID desired value to be set - * @return Builder object with new value for globalAssetID + * @param globalAssetId desired value to be set + * @return Builder object with new value for globalAssetId */ - public B globalAssetID(String globalAssetID) { - getBuildingInstance().setGlobalAssetID(globalAssetID); + public B globalAssetId(String globalAssetId) { + getBuildingInstance().setGlobalAssetId(globalAssetId); return getSelf(); } @@ -49,7 +81,7 @@ public B globalAssetID(String globalAssetID) { * @param specificAssetIds desired value to be set * @return Builder object with new value for specificAssetIds */ - public B specificAssetIds(List specificAssetIds) { + public B specificAssetIds(List specificAssetIds) { getBuildingInstance().setSpecificAssetIds(specificAssetIds); return getSelf(); } @@ -60,33 +92,11 @@ public B specificAssetIds(List specificAssetIds) { * @param specificAssetIds desired value to be added * @return Builder object with new value for specificAssetIds */ - public B specificAssetIds(SpecificAssetID specificAssetIds) { + public B specificAssetIds(SpecificAssetId specificAssetIds) { getBuildingInstance().getSpecificAssetIds().add(specificAssetIds); return getSelf(); } - /** - * This function allows setting a value for statements - * - * @param statements desired value to be set - * @return Builder object with new value for statements - */ - public B statements(List statements) { - getBuildingInstance().setStatements(statements); - return getSelf(); - } - - /** - * This function allows adding a value to the List statements - * - * @param statements desired value to be added - * @return Builder object with new value for statements - */ - public B statements(SubmodelElement statements) { - getBuildingInstance().getStatements().add(statements); - return getSelf(); - } - /** * This function allows setting a value for embeddedDataSpecifications * @@ -110,13 +120,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -143,46 +153,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers + */ + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); + return getSelf(); + } + + /** + * This function allows setting a value for category + * + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B category(String category) { + getBuildingInstance().setCategory(category); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for idShort * - * @param description desired value to be added - * @return Builder object with new value for description + * @param idShort desired value to be set + * @return Builder object with new value for idShort */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -198,13 +219,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -229,26 +261,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EnvironmentBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EnvironmentBuilder.java index d33b72b90..60288ffc2 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EnvironmentBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EnvironmentBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -47,46 +48,46 @@ public B assetAdministrationShells(AssetAdministrationShell assetAdministrationS } /** - * This function allows setting a value for conceptDescriptions + * This function allows setting a value for submodels * - * @param conceptDescriptions desired value to be set - * @return Builder object with new value for conceptDescriptions + * @param submodels desired value to be set + * @return Builder object with new value for submodels */ - public B conceptDescriptions(List conceptDescriptions) { - getBuildingInstance().setConceptDescriptions(conceptDescriptions); + public B submodels(List submodels) { + getBuildingInstance().setSubmodels(submodels); return getSelf(); } /** - * This function allows adding a value to the List conceptDescriptions + * This function allows adding a value to the List submodels * - * @param conceptDescriptions desired value to be added - * @return Builder object with new value for conceptDescriptions + * @param submodels desired value to be added + * @return Builder object with new value for submodels */ - public B conceptDescriptions(ConceptDescription conceptDescriptions) { - getBuildingInstance().getConceptDescriptions().add(conceptDescriptions); + public B submodels(Submodel submodels) { + getBuildingInstance().getSubmodels().add(submodels); return getSelf(); } /** - * This function allows setting a value for submodels + * This function allows setting a value for conceptDescriptions * - * @param submodels desired value to be set - * @return Builder object with new value for submodels + * @param conceptDescriptions desired value to be set + * @return Builder object with new value for conceptDescriptions */ - public B submodels(List submodels) { - getBuildingInstance().setSubmodels(submodels); + public B conceptDescriptions(List conceptDescriptions) { + getBuildingInstance().setConceptDescriptions(conceptDescriptions); return getSelf(); } /** - * This function allows adding a value to the List submodels + * This function allows adding a value to the List conceptDescriptions * - * @param submodels desired value to be added - * @return Builder object with new value for submodels + * @param conceptDescriptions desired value to be added + * @return Builder object with new value for conceptDescriptions */ - public B submodels(Submodel submodels) { - getBuildingInstance().getSubmodels().add(submodels); + public B conceptDescriptions(ConceptDescription conceptDescriptions) { + getBuildingInstance().getConceptDescriptions().add(conceptDescriptions); return getSelf(); } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EventPayloadBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EventPayloadBuilder.java index d00833379..b3e691032 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EventPayloadBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/EventPayloadBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -22,68 +23,68 @@ public abstract class EventPayloadBuilder> extends ExtendableBuilder { /** - * This function allows setting a value for observableReference + * This function allows setting a value for source * - * @param observableReference desired value to be set - * @return Builder object with new value for observableReference + * @param source desired value to be set + * @return Builder object with new value for source */ - public B observableReference(Reference observableReference) { - getBuildingInstance().setObservableReference(observableReference); + public B source(Reference source) { + getBuildingInstance().setSource(source); return getSelf(); } /** - * This function allows setting a value for observableSemanticID + * This function allows setting a value for sourceSemanticId * - * @param observableSemanticID desired value to be set - * @return Builder object with new value for observableSemanticID + * @param sourceSemanticId desired value to be set + * @return Builder object with new value for sourceSemanticId */ - public B observableSemanticID(Reference observableSemanticID) { - getBuildingInstance().setObservableSemanticID(observableSemanticID); + public B sourceSemanticId(Reference sourceSemanticId) { + getBuildingInstance().setSourceSemanticId(sourceSemanticId); return getSelf(); } /** - * This function allows setting a value for payload + * This function allows setting a value for observableReference * - * @param payload desired value to be set - * @return Builder object with new value for payload + * @param observableReference desired value to be set + * @return Builder object with new value for observableReference */ - public B payload(byte[] payload) { - getBuildingInstance().setPayload(payload); + public B observableReference(Reference observableReference) { + getBuildingInstance().setObservableReference(observableReference); return getSelf(); } /** - * This function allows setting a value for source + * This function allows setting a value for observableSemanticId * - * @param source desired value to be set - * @return Builder object with new value for source + * @param observableSemanticId desired value to be set + * @return Builder object with new value for observableSemanticId */ - public B source(Reference source) { - getBuildingInstance().setSource(source); + public B observableSemanticId(Reference observableSemanticId) { + getBuildingInstance().setObservableSemanticId(observableSemanticId); return getSelf(); } /** - * This function allows setting a value for sourceSemanticID + * This function allows setting a value for topic * - * @param sourceSemanticID desired value to be set - * @return Builder object with new value for sourceSemanticID + * @param topic desired value to be set + * @return Builder object with new value for topic */ - public B sourceSemanticID(Reference sourceSemanticID) { - getBuildingInstance().setSourceSemanticID(sourceSemanticID); + public B topic(String topic) { + getBuildingInstance().setTopic(topic); return getSelf(); } /** - * This function allows setting a value for subjectID + * This function allows setting a value for subjectId * - * @param subjectID desired value to be set - * @return Builder object with new value for subjectID + * @param subjectId desired value to be set + * @return Builder object with new value for subjectId */ - public B subjectID(Reference subjectID) { - getBuildingInstance().setSubjectID(subjectID); + public B subjectId(Reference subjectId) { + getBuildingInstance().setSubjectId(subjectId); return getSelf(); } @@ -99,13 +100,13 @@ public B timeStamp(String timeStamp) { } /** - * This function allows setting a value for topic + * This function allows setting a value for payload * - * @param topic desired value to be set - * @return Builder object with new value for topic + * @param payload desired value to be set + * @return Builder object with new value for payload */ - public B topic(String topic) { - getBuildingInstance().setTopic(topic); + public B payload(byte[] payload) { + getBuildingInstance().setPayload(payload); return getSelf(); } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ExtendableBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ExtendableBuilder.java index 57cf35007..f11f39f72 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ExtendableBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ExtendableBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ExtensionBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ExtensionBuilder.java index bff2490ca..d6dc6f4b4 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ExtensionBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ExtensionBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,7 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Extension; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; @@ -35,57 +36,57 @@ public B name(String name) { } /** - * This function allows setting a value for refersTo + * This function allows setting a value for valueType * - * @param refersTo desired value to be set - * @return Builder object with new value for refersTo + * @param valueType desired value to be set + * @return Builder object with new value for valueType */ - public B refersTo(List refersTo) { - getBuildingInstance().setRefersTo(refersTo); + public B valueType(DataTypeDefXsd valueType) { + getBuildingInstance().setValueType(valueType); return getSelf(); } /** - * This function allows adding a value to the List refersTo + * This function allows setting a value for value * - * @param refersTo desired value to be added - * @return Builder object with new value for refersTo + * @param value desired value to be set + * @return Builder object with new value for value */ - public B refersTo(Reference refersTo) { - getBuildingInstance().getRefersTo().add(refersTo); + public B value(String value) { + getBuildingInstance().setValue(value); return getSelf(); } /** - * This function allows setting a value for value + * This function allows setting a value for refersTo * - * @param value desired value to be set - * @return Builder object with new value for value + * @param refersTos desired value to be set + * @return Builder object with new value for refersTo */ - public B value(String value) { - getBuildingInstance().setValue(value); + public B refersTo(List refersTos) { + getBuildingInstance().setRefersTo(refersTos); return getSelf(); } /** - * This function allows setting a value for valueType + * This function allows adding a value to the List refersTo * - * @param valueType desired value to be set - * @return Builder object with new value for valueType + * @param refersTo desired value to be added + * @return Builder object with new value for refersTo */ - public B valueType(DataTypeDefXSD valueType) { - getBuildingInstance().setValueType(valueType); + public B refersTo(Reference refersTo) { + getBuildingInstance().getRefersTo().add(refersTo); return getSelf(); } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/FileBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/FileBuilder.java index 347317d65..ff1eacc8b 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/FileBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/FileBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.File; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -22,24 +29,24 @@ public abstract class FileBuilder> extends ExtendableBuilder { /** - * This function allows setting a value for contentType + * This function allows setting a value for value * - * @param contentType desired value to be set - * @return Builder object with new value for contentType + * @param value desired value to be set + * @return Builder object with new value for value */ - public B contentType(String contentType) { - getBuildingInstance().setContentType(contentType); + public B value(String value) { + getBuildingInstance().setValue(value); return getSelf(); } /** - * This function allows setting a value for value + * This function allows setting a value for contentType * - * @param value desired value to be set - * @return Builder object with new value for value + * @param contentType desired value to be set + * @return Builder object with new value for contentType */ - public B value(String value) { - getBuildingInstance().setValue(value); + public B contentType(String contentType) { + getBuildingInstance().setContentType(contentType); return getSelf(); } @@ -66,13 +73,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -99,46 +106,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -154,13 +172,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -185,26 +214,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/KeyBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/KeyBuilder.java index f04e9a96c..131e0ee5d 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/KeyBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/KeyBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringDefinitionTypeIec61360Builder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringDefinitionTypeIec61360Builder.java index 29b8d3f92..b6d43e28e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringDefinitionTypeIec61360Builder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringDefinitionTypeIec61360Builder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringNameTypeBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringNameTypeBuilder.java index 8b541147d..2df57ae9c 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringNameTypeBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringNameTypeBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringPreferredNameTypeIec61360Builder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringPreferredNameTypeIec61360Builder.java index dedd6c541..685de3530 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringPreferredNameTypeIec61360Builder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringPreferredNameTypeIec61360Builder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringShortNameTypeIec61360Builder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringShortNameTypeIec61360Builder.java index 697ef25fc..2b37bb3d5 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringShortNameTypeIec61360Builder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringShortNameTypeIec61360Builder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringTextTypeBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringTextTypeBuilder.java index b84b045d8..55e927566 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringTextTypeBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LangStringTextTypeBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LevelTypeBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LevelTypeBuilder.java index 48246a400..47bc13d6c 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LevelTypeBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/LevelTypeBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -20,17 +21,6 @@ public abstract class LevelTypeBuilder> extends ExtendableBuilder { - /** - * This function allows setting a value for max - * - * @param max desired value to be set - * @return Builder object with new value for max - */ - public B max(boolean max) { - getBuildingInstance().setMax(max); - return getSelf(); - } - /** * This function allows setting a value for min * @@ -63,4 +53,15 @@ public B typ(boolean typ) { getBuildingInstance().setTyp(typ); return getSelf(); } + + /** + * This function allows setting a value for max + * + * @param max desired value to be set + * @return Builder object with new value for max + */ + public B max(boolean max) { + getBuildingInstance().setMax(max); + return getSelf(); + } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/MultiLanguagePropertyBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/MultiLanguagePropertyBuilder.java index ac14d8c29..85f30d76a 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/MultiLanguagePropertyBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/MultiLanguagePropertyBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.MultiLanguageProperty; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -25,11 +32,11 @@ public abstract class MultiLanguagePropertyBuilder value) { - getBuildingInstance().setValue(value); + public B value(List values) { + getBuildingInstance().setValue(values); return getSelf(); } @@ -45,13 +52,13 @@ public B value(LangStringTextType value) { } /** - * This function allows setting a value for valueID + * This function allows setting a value for valueId * - * @param valueID desired value to be set - * @return Builder object with new value for valueID + * @param valueId desired value to be set + * @return Builder object with new value for valueId */ - public B valueID(Reference valueID) { - getBuildingInstance().setValueID(valueID); + public B valueId(Reference valueId) { + getBuildingInstance().setValueId(valueId); return getSelf(); } @@ -78,13 +85,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -111,46 +118,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -166,13 +184,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -197,26 +226,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/OperationBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/OperationBuilder.java index 767c3bd8e..f7d0a63a9 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/OperationBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/OperationBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,35 +15,20 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Operation; +import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; public abstract class OperationBuilder> extends ExtendableBuilder { - /** - * This function allows setting a value for inoutputVariables - * - * @param inoutputVariables desired value to be set - * @return Builder object with new value for inoutputVariables - */ - public B inoutputVariables(List inoutputVariables) { - getBuildingInstance().setInoutputVariables(inoutputVariables); - return getSelf(); - } - - /** - * This function allows adding a value to the List inoutputVariables - * - * @param inoutputVariables desired value to be added - * @return Builder object with new value for inoutputVariables - */ - public B inoutputVariables(OperationVariable inoutputVariables) { - getBuildingInstance().getInoutputVariables().add(inoutputVariables); - return getSelf(); - } - /** * This function allows setting a value for inputVariables * @@ -87,6 +73,28 @@ public B outputVariables(OperationVariable outputVariables) { return getSelf(); } + /** + * This function allows setting a value for inoutputVariables + * + * @param inoutputVariables desired value to be set + * @return Builder object with new value for inoutputVariables + */ + public B inoutputVariables(List inoutputVariables) { + getBuildingInstance().setInoutputVariables(inoutputVariables); + return getSelf(); + } + + /** + * This function allows adding a value to the List inoutputVariables + * + * @param inoutputVariables desired value to be added + * @return Builder object with new value for inoutputVariables + */ + public B inoutputVariables(OperationVariable inoutputVariables) { + getBuildingInstance().getInoutputVariables().add(inoutputVariables); + return getSelf(); + } + /** * This function allows setting a value for embeddedDataSpecifications * @@ -110,13 +118,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -143,46 +151,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers + */ + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); + return getSelf(); + } + + /** + * This function allows setting a value for category + * + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B category(String category) { + getBuildingInstance().setCategory(category); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for idShort * - * @param description desired value to be added - * @return Builder object with new value for description + * @param idShort desired value to be set + * @return Builder object with new value for idShort */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -198,13 +217,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -229,26 +259,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/OperationVariableBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/OperationVariableBuilder.java index 790ee3960..cddb89a47 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/OperationVariableBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/OperationVariableBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/PropertyBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/PropertyBuilder.java index 234ebf561..dc6fd05b1 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/PropertyBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/PropertyBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Property; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -22,35 +30,35 @@ public abstract class PropertyBuilder> extends ExtendableBuilder { /** - * This function allows setting a value for value + * This function allows setting a value for valueType * - * @param value desired value to be set - * @return Builder object with new value for value + * @param valueType desired value to be set + * @return Builder object with new value for valueType */ - public B value(String value) { - getBuildingInstance().setValue(value); + public B valueType(DataTypeDefXsd valueType) { + getBuildingInstance().setValueType(valueType); return getSelf(); } /** - * This function allows setting a value for valueID + * This function allows setting a value for value * - * @param valueID desired value to be set - * @return Builder object with new value for valueID + * @param value desired value to be set + * @return Builder object with new value for value */ - public B valueID(Reference valueID) { - getBuildingInstance().setValueID(valueID); + public B value(String value) { + getBuildingInstance().setValue(value); return getSelf(); } /** - * This function allows setting a value for valueType + * This function allows setting a value for valueId * - * @param valueType desired value to be set - * @return Builder object with new value for valueType + * @param valueId desired value to be set + * @return Builder object with new value for valueId */ - public B valueType(DataTypeDefXSD valueType) { - getBuildingInstance().setValueType(valueType); + public B valueId(Reference valueId) { + getBuildingInstance().setValueId(valueId); return getSelf(); } @@ -77,13 +85,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -110,46 +118,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -165,13 +184,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -196,26 +226,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/QualifierBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/QualifierBuilder.java index ed8646d44..24427c217 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/QualifierBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/QualifierBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,7 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; import org.eclipse.digitaltwin.aas4j.v3.model.QualifierKind; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; @@ -47,46 +48,46 @@ public B type(String type) { } /** - * This function allows setting a value for value + * This function allows setting a value for valueType * - * @param value desired value to be set - * @return Builder object with new value for value + * @param valueType desired value to be set + * @return Builder object with new value for valueType */ - public B value(String value) { - getBuildingInstance().setValue(value); + public B valueType(DataTypeDefXsd valueType) { + getBuildingInstance().setValueType(valueType); return getSelf(); } /** - * This function allows setting a value for valueID + * This function allows setting a value for value * - * @param valueID desired value to be set - * @return Builder object with new value for valueID + * @param value desired value to be set + * @return Builder object with new value for value */ - public B valueID(Reference valueID) { - getBuildingInstance().setValueID(valueID); + public B value(String value) { + getBuildingInstance().setValue(value); return getSelf(); } /** - * This function allows setting a value for valueType + * This function allows setting a value for valueId * - * @param valueType desired value to be set - * @return Builder object with new value for valueType + * @param valueId desired value to be set + * @return Builder object with new value for valueId */ - public B valueType(DataTypeDefXSD valueType) { - getBuildingInstance().setValueType(valueType); + public B valueId(Reference valueId) { + getBuildingInstance().setValueId(valueId); return getSelf(); } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/RangeBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/RangeBuilder.java index f265d1700..e6bf48fc8 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/RangeBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/RangeBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Range; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import java.util.List; @@ -22,13 +30,13 @@ public abstract class RangeBuilder> extends ExtendableBuilder { /** - * This function allows setting a value for max + * This function allows setting a value for valueType * - * @param max desired value to be set - * @return Builder object with new value for max + * @param valueType desired value to be set + * @return Builder object with new value for valueType */ - public B max(String max) { - getBuildingInstance().setMax(max); + public B valueType(DataTypeDefXsd valueType) { + getBuildingInstance().setValueType(valueType); return getSelf(); } @@ -44,13 +52,13 @@ public B min(String min) { } /** - * This function allows setting a value for valueType + * This function allows setting a value for max * - * @param valueType desired value to be set - * @return Builder object with new value for valueType + * @param max desired value to be set + * @return Builder object with new value for max */ - public B valueType(DataTypeDefXSD valueType) { - getBuildingInstance().setValueType(valueType); + public B max(String max) { + getBuildingInstance().setMax(max); return getSelf(); } @@ -77,13 +85,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -110,46 +118,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -165,13 +184,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -196,26 +226,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ReferenceBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ReferenceBuilder.java index 734afc5dc..afec436d6 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ReferenceBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ReferenceBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -24,46 +25,46 @@ public abstract class ReferenceBuilder> extends ExtendableBuilder { /** - * This function allows setting a value for keys + * This function allows setting a value for type * - * @param keys desired value to be set - * @return Builder object with new value for keys + * @param type desired value to be set + * @return Builder object with new value for type */ - public B keys(List keys) { - getBuildingInstance().setKeys(keys); + public B type(ReferenceTypes type) { + getBuildingInstance().setType(type); return getSelf(); } /** - * This function allows adding a value to the List keys + * This function allows setting a value for referredSemanticId * - * @param keys desired value to be added - * @return Builder object with new value for keys + * @param referredSemanticId desired value to be set + * @return Builder object with new value for referredSemanticId */ - public B keys(Key keys) { - getBuildingInstance().getKeys().add(keys); + public B referredSemanticId(Reference referredSemanticId) { + getBuildingInstance().setReferredSemanticId(referredSemanticId); return getSelf(); } /** - * This function allows setting a value for referredSemanticID + * This function allows setting a value for keys * - * @param referredSemanticID desired value to be set - * @return Builder object with new value for referredSemanticID + * @param keys desired value to be set + * @return Builder object with new value for keys */ - public B referredSemanticID(Reference referredSemanticID) { - getBuildingInstance().setReferredSemanticID(referredSemanticID); + public B keys(List keys) { + getBuildingInstance().setKeys(keys); return getSelf(); } /** - * This function allows setting a value for type + * This function allows adding a value to the List keys * - * @param type desired value to be set - * @return Builder object with new value for type + * @param keys desired value to be added + * @return Builder object with new value for keys */ - public B type(ReferenceTypes type) { - getBuildingInstance().setType(type); + public B keys(Key keys) { + getBuildingInstance().getKeys().add(keys); return getSelf(); } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ReferenceElementBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ReferenceElementBuilder.java index 35af6b641..6aa98e110 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ReferenceElementBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ReferenceElementBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.ReferenceElement; import java.util.List; @@ -56,13 +63,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -89,46 +96,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -144,13 +162,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -175,26 +204,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/RelationshipElementBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/RelationshipElementBuilder.java index 40079a339..081547980 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/RelationshipElementBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/RelationshipElementBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.RelationshipElement; import java.util.List; @@ -67,13 +74,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -100,46 +107,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -155,13 +173,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -186,26 +215,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ResourceBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ResourceBuilder.java index 94a8f727e..9fd9b7d69 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ResourceBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ResourceBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -21,24 +22,24 @@ public abstract class ResourceBuilder> extends ExtendableBuilder { /** - * This function allows setting a value for contentType + * This function allows setting a value for path * - * @param contentType desired value to be set - * @return Builder object with new value for contentType + * @param path desired value to be set + * @return Builder object with new value for path */ - public B contentType(String contentType) { - getBuildingInstance().setContentType(contentType); + public B path(String path) { + getBuildingInstance().setPath(path); return getSelf(); } /** - * This function allows setting a value for path + * This function allows setting a value for contentType * - * @param path desired value to be set - * @return Builder object with new value for path + * @param contentType desired value to be set + * @return Builder object with new value for contentType */ - public B path(String path) { - getBuildingInstance().setPath(path); + public B contentType(String contentType) { + getBuildingInstance().setContentType(contentType); return getSelf(); } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SpecificAssetIDBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SpecificAssetIdBuilder.java similarity index 78% rename from model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SpecificAssetIDBuilder.java rename to model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SpecificAssetIdBuilder.java index 4db2e0991..508446f79 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SpecificAssetIDBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SpecificAssetIdBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,25 +16,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetID; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; import java.util.List; -public abstract class SpecificAssetIDBuilder> +public abstract class SpecificAssetIdBuilder> extends ExtendableBuilder { - /** - * This function allows setting a value for externalSubjectID - * - * @param externalSubjectID desired value to be set - * @return Builder object with new value for externalSubjectID - */ - public B externalSubjectID(Reference externalSubjectID) { - getBuildingInstance().setExternalSubjectID(externalSubjectID); - return getSelf(); - } - /** * This function allows setting a value for name * @@ -57,13 +47,24 @@ public B value(String value) { } /** - * This function allows setting a value for semanticID + * This function allows setting a value for externalSubjectId + * + * @param externalSubjectId desired value to be set + * @return Builder object with new value for externalSubjectId + */ + public B externalSubjectId(Reference externalSubjectId) { + getBuildingInstance().setExternalSubjectId(externalSubjectId); + return getSelf(); + } + + /** + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelBuilder.java index 583367d60..c3c970250 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,16 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AdministrativeInformation; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.ModellingKind; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import java.util.List; @@ -66,79 +76,79 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for administration + * This function allows setting a value for kind * - * @param administration desired value to be set - * @return Builder object with new value for administration + * @param kind desired value to be set + * @return Builder object with new value for kind */ - public B administration(AdministrativeInformation administration) { - getBuildingInstance().setAdministration(administration); + public B kind(ModellingKind kind) { + getBuildingInstance().setKind(kind); return getSelf(); } /** - * This function allows setting a value for id + * This function allows setting a value for semanticId * - * @param id desired value to be set - * @return Builder object with new value for id + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B id(String id) { - getBuildingInstance().setId(id); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } /** - * This function allows setting a value for category + * This function allows setting a value for supplementalSemanticIds * - * @param category desired value to be set - * @return Builder object with new value for category + * @param supplementalSemanticIds desired value to be set + * @return Builder object with new value for supplementalSemanticIds */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B supplementalSemanticIds(List supplementalSemanticIds) { + getBuildingInstance().setSupplementalSemanticIds(supplementalSemanticIds); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List supplementalSemanticIds * - * @param description desired value to be set - * @return Builder object with new value for description + * @param supplementalSemanticIds desired value to be added + * @return Builder object with new value for supplementalSemanticIds */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B supplementalSemanticIds(Reference supplementalSemanticIds) { + getBuildingInstance().getSupplementalSemanticIds().add(supplementalSemanticIds); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for administration * - * @param description desired value to be added - * @return Builder object with new value for description + * @param administration desired value to be set + * @return Builder object with new value for administration */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B administration(AdministrativeInformation administration) { + getBuildingInstance().setAdministration(administration); return getSelf(); } /** - * This function allows setting a value for displayName + * This function allows setting a value for id * - * @param displayName desired value to be set - * @return Builder object with new value for displayName + * @param id desired value to be set + * @return Builder object with new value for id */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B id(String id) { + getBuildingInstance().setId(id); return getSelf(); } /** - * This function allows adding a value to the List displayName + * This function allows setting a value for category * - * @param displayName desired value to be added - * @return Builder object with new value for displayName + * @param category desired value to be set + * @return Builder object with new value for category */ - public B displayName(LangStringNameType displayName) { - getBuildingInstance().getDisplayName().add(displayName); + public B category(String category) { + getBuildingInstance().setCategory(category); return getSelf(); } @@ -154,68 +164,68 @@ public B idShort(String idShort) { } /** - * This function allows setting a value for extensions + * This function allows setting a value for displayName * - * @param extensions desired value to be set - * @return Builder object with new value for extensions + * @param displayNames desired value to be set + * @return Builder object with new value for displayName */ - public B extensions(List extensions) { - getBuildingInstance().setExtensions(extensions); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } /** - * This function allows adding a value to the List extensions + * This function allows adding a value to the List displayName * - * @param extensions desired value to be added - * @return Builder object with new value for extensions + * @param displayName desired value to be added + * @return Builder object with new value for displayName */ - public B extensions(Extension extensions) { - getBuildingInstance().getExtensions().add(extensions); + public B displayName(LangStringNameType displayName) { + getBuildingInstance().getDisplayName().add(displayName); return getSelf(); } /** - * This function allows setting a value for semanticID + * This function allows setting a value for description * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); return getSelf(); } /** - * This function allows setting a value for supplementalSemanticIds + * This function allows adding a value to the List description * - * @param supplementalSemanticIds desired value to be set - * @return Builder object with new value for supplementalSemanticIds + * @param description desired value to be added + * @return Builder object with new value for description */ - public B supplementalSemanticIds(List supplementalSemanticIds) { - getBuildingInstance().setSupplementalSemanticIds(supplementalSemanticIds); + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } /** - * This function allows adding a value to the List supplementalSemanticIds + * This function allows setting a value for extensions * - * @param supplementalSemanticIds desired value to be added - * @return Builder object with new value for supplementalSemanticIds + * @param extensions desired value to be set + * @return Builder object with new value for extensions */ - public B supplementalSemanticIds(Reference supplementalSemanticIds) { - getBuildingInstance().getSupplementalSemanticIds().add(supplementalSemanticIds); + public B extensions(List extensions) { + getBuildingInstance().setExtensions(extensions); return getSelf(); } /** - * This function allows setting a value for kind + * This function allows adding a value to the List extensions * - * @param kind desired value to be set - * @return Builder object with new value for kind + * @param extensions desired value to be added + * @return Builder object with new value for extensions */ - public B kind(ModellingKind kind) { - getBuildingInstance().setKind(kind); + public B extensions(Extension extensions) { + getBuildingInstance().getExtensions().add(extensions); return getSelf(); } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelElementCollectionBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelElementCollectionBuilder.java index 44b318ea5..e1c8e980c 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelElementCollectionBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelElementCollectionBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,9 +15,15 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; -import java.util.Collection; import java.util.List; @@ -26,11 +33,11 @@ public abstract class SubmodelElementCollectionBuilder value) { - getBuildingInstance().setValue(value); + public B value(List values) { + getBuildingInstance().setValue(values); return getSelf(); } @@ -68,13 +75,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -101,46 +108,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -156,13 +174,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -187,26 +216,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelElementListBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelElementListBuilder.java index c81241e0a..f50442fee 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelElementListBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/SubmodelElementListBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,16 @@ package org.eclipse.digitaltwin.aas4j.v3.model.builder; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AasSubmodelElements; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList; import java.util.List; @@ -34,13 +44,13 @@ public B orderRelevant(boolean orderRelevant) { } /** - * This function allows setting a value for semanticIDListElement + * This function allows setting a value for semanticIdListElement * - * @param semanticIDListElement desired value to be set - * @return Builder object with new value for semanticIDListElement + * @param semanticIdListElement desired value to be set + * @return Builder object with new value for semanticIdListElement */ - public B semanticIDListElement(Reference semanticIDListElement) { - getBuildingInstance().setSemanticIDListElement(semanticIDListElement); + public B semanticIdListElement(Reference semanticIdListElement) { + getBuildingInstance().setSemanticIdListElement(semanticIdListElement); return getSelf(); } @@ -50,41 +60,41 @@ public B semanticIDListElement(Reference semanticIDListElement) { * @param typeValueListElement desired value to be set * @return Builder object with new value for typeValueListElement */ - public B typeValueListElement(AASSubmodelElements typeValueListElement) { + public B typeValueListElement(AasSubmodelElements typeValueListElement) { getBuildingInstance().setTypeValueListElement(typeValueListElement); return getSelf(); } /** - * This function allows setting a value for value + * This function allows setting a value for valueTypeListElement * - * @param value desired value to be set - * @return Builder object with new value for value + * @param valueTypeListElement desired value to be set + * @return Builder object with new value for valueTypeListElement */ - public B value(List value) { - getBuildingInstance().setValue(value); + public B valueTypeListElement(DataTypeDefXsd valueTypeListElement) { + getBuildingInstance().setValueTypeListElement(valueTypeListElement); return getSelf(); } /** - * This function allows adding a value to the List value + * This function allows setting a value for value * - * @param value desired value to be added + * @param values desired value to be set * @return Builder object with new value for value */ - public B value(SubmodelElement value) { - getBuildingInstance().getValue().add(value); + public B value(List values) { + getBuildingInstance().setValue(values); return getSelf(); } /** - * This function allows setting a value for valueTypeListElement + * This function allows adding a value to the List value * - * @param valueTypeListElement desired value to be set - * @return Builder object with new value for valueTypeListElement + * @param value desired value to be added + * @return Builder object with new value for value */ - public B valueTypeListElement(DataTypeDefXSD valueTypeListElement) { - getBuildingInstance().setValueTypeListElement(valueTypeListElement); + public B value(SubmodelElement value) { + getBuildingInstance().getValue().add(value); return getSelf(); } @@ -111,13 +121,13 @@ public B embeddedDataSpecifications(EmbeddedDataSpecification embeddedDataSpecif } /** - * This function allows setting a value for semanticID + * This function allows setting a value for semanticId * - * @param semanticID desired value to be set - * @return Builder object with new value for semanticID + * @param semanticId desired value to be set + * @return Builder object with new value for semanticId */ - public B semanticID(Reference semanticID) { - getBuildingInstance().setSemanticID(semanticID); + public B semanticId(Reference semanticId) { + getBuildingInstance().setSemanticId(semanticId); return getSelf(); } @@ -144,46 +154,57 @@ public B supplementalSemanticIds(Reference supplementalSemanticIds) { } /** - * This function allows setting a value for category + * This function allows setting a value for qualifiers * - * @param category desired value to be set - * @return Builder object with new value for category + * @param qualifiers desired value to be set + * @return Builder object with new value for qualifiers */ - public B category(String category) { - getBuildingInstance().setCategory(category); + public B qualifiers(List qualifiers) { + getBuildingInstance().setQualifiers(qualifiers); return getSelf(); } /** - * This function allows setting a value for description + * This function allows adding a value to the List qualifiers * - * @param description desired value to be set - * @return Builder object with new value for description + * @param qualifiers desired value to be added + * @return Builder object with new value for qualifiers */ - public B description(List description) { - getBuildingInstance().setDescription(description); + public B qualifiers(Qualifier qualifiers) { + getBuildingInstance().getQualifiers().add(qualifiers); return getSelf(); } /** - * This function allows adding a value to the List description + * This function allows setting a value for category * - * @param description desired value to be added - * @return Builder object with new value for description + * @param category desired value to be set + * @return Builder object with new value for category */ - public B description(LangStringTextType description) { - getBuildingInstance().getDescription().add(description); + public B category(String category) { + getBuildingInstance().setCategory(category); + return getSelf(); + } + + /** + * This function allows setting a value for idShort + * + * @param idShort desired value to be set + * @return Builder object with new value for idShort + */ + public B idShort(String idShort) { + getBuildingInstance().setIdShort(idShort); return getSelf(); } /** * This function allows setting a value for displayName * - * @param displayName desired value to be set + * @param displayNames desired value to be set * @return Builder object with new value for displayName */ - public B displayName(List displayName) { - getBuildingInstance().setDisplayName(displayName); + public B displayName(List displayNames) { + getBuildingInstance().setDisplayName(displayNames); return getSelf(); } @@ -199,13 +220,24 @@ public B displayName(LangStringNameType displayName) { } /** - * This function allows setting a value for idShort + * This function allows setting a value for description * - * @param idShort desired value to be set - * @return Builder object with new value for idShort + * @param descriptions desired value to be set + * @return Builder object with new value for description */ - public B idShort(String idShort) { - getBuildingInstance().setIdShort(idShort); + public B description(List descriptions) { + getBuildingInstance().setDescription(descriptions); + return getSelf(); + } + + /** + * This function allows adding a value to the List description + * + * @param description desired value to be added + * @return Builder object with new value for description + */ + public B description(LangStringTextType description) { + getBuildingInstance().getDescription().add(description); return getSelf(); } @@ -230,26 +262,4 @@ public B extensions(Extension extensions) { getBuildingInstance().getExtensions().add(extensions); return getSelf(); } - - /** - * This function allows setting a value for qualifiers - * - * @param qualifiers desired value to be set - * @return Builder object with new value for qualifiers - */ - public B qualifiers(List qualifiers) { - getBuildingInstance().setQualifiers(qualifiers); - return getSelf(); - } - - /** - * This function allows adding a value to the List qualifiers - * - * @param qualifiers desired value to be added - * @return Builder object with new value for qualifiers - */ - public B qualifiers(Qualifier qualifiers) { - getBuildingInstance().getQualifiers().add(qualifiers); - return getSelf(); - } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ValueListBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ValueListBuilder.java index 3cc977501..5050fe0a7 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ValueListBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ValueListBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ValueReferencePairBuilder.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ValueReferencePairBuilder.java index a3589053e..8dfb746d3 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ValueReferencePairBuilder.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/builder/ValueReferencePairBuilder.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -34,13 +35,13 @@ public B value(String value) { } /** - * This function allows setting a value for valueID + * This function allows setting a value for valueId * - * @param valueID desired value to be set - * @return Builder object with new value for valueID + * @param valueId desired value to be set + * @return Builder object with new value for valueId */ - public B valueID(Reference valueID) { - getBuildingInstance().setValueID(valueID); + public B valueId(Reference valueId) { + getBuildingInstance().setValueId(valueId); return getSelf(); } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAdministrativeInformation.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAdministrativeInformation.java index 236a00239..e13dbd853 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAdministrativeInformation.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAdministrativeInformation.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -41,8 +42,8 @@ public class DefaultAdministrativeInformation implements AdministrativeInformati @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/revision") protected String revision; - @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/templateID") - protected String templateID; + @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/templateId") + protected String templateId; @IRI("https://admin-shell.io/aas/3/0/AdministrativeInformation/version") protected String version; @@ -50,16 +51,14 @@ public class DefaultAdministrativeInformation implements AdministrativeInformati @IRI("https://admin-shell.io/aas/3/0/HasDataSpecification/embeddedDataSpecifications") protected List embeddedDataSpecifications = new ArrayList<>(); - public DefaultAdministrativeInformation() { - - } + public DefaultAdministrativeInformation() {} @Override public int hashCode() { - return Objects.hash(this.creator, + return Objects.hash(this.version, this.revision, - this.templateID, - this.version, + this.creator, + this.templateId, this.embeddedDataSpecifications); } @@ -73,22 +72,22 @@ public boolean equals(Object obj) { return false; } else { DefaultAdministrativeInformation other = (DefaultAdministrativeInformation) obj; - return Objects.equals(this.creator, other.creator) && + return Objects.equals(this.version, other.version) && Objects.equals(this.revision, other.revision) && - Objects.equals(this.templateID, other.templateID) && - Objects.equals(this.version, other.version) && + Objects.equals(this.creator, other.creator) && + Objects.equals(this.templateId, other.templateId) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications); } } @Override - public Reference getCreator() { - return creator; + public String getVersion() { + return version; } @Override - public void setCreator(Reference creator) { - this.creator = creator; + public void setVersion(String version) { + this.version = version; } @Override @@ -102,23 +101,23 @@ public void setRevision(String revision) { } @Override - public String getTemplateID() { - return templateID; + public Reference getCreator() { + return creator; } @Override - public void setTemplateID(String templateID) { - this.templateID = templateID; + public void setCreator(Reference creator) { + this.creator = creator; } @Override - public String getVersion() { - return version; + public String getTemplateId() { + return templateId; } @Override - public void setVersion(String version) { - this.version = version; + public void setTemplateId(String templateId) { + this.templateId = templateId; } @Override @@ -131,6 +130,16 @@ public void setEmbeddedDataSpecifications(List embedd this.embeddedDataSpecifications = embeddedDataSpecifications; } + public String toString() { + return String.format( + "DefaultAdministrativeInformation (" + "version=%s," + + "revision=%s," + + "creator=%s," + + "templateId=%s," + + ")", + this.version, this.revision, this.creator, this.templateId); + } + /** * This builder class can be used to construct a DefaultAdministrativeInformation bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAnnotatedRelationshipElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAnnotatedRelationshipElement.java index 722d4ab26..6ae2c1d6a 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAnnotatedRelationshipElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAnnotatedRelationshipElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AnnotatedRelationshipElement; +import org.eclipse.digitaltwin.aas4j.v3.model.DataElement; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.AnnotatedRelationshipElementBuilder; @@ -43,8 +51,8 @@ public class DefaultAnnotatedRelationshipElement implements AnnotatedRelationshi @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -70,9 +78,7 @@ public class DefaultAnnotatedRelationshipElement implements AnnotatedRelationshi @IRI("https://admin-shell.io/aas/3/0/RelationshipElement/second") protected Reference second; - public DefaultAnnotatedRelationshipElement() { - - } + public DefaultAnnotatedRelationshipElement() {} @Override public int hashCode() { @@ -80,14 +86,14 @@ public int hashCode() { this.first, this.second, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -104,14 +110,14 @@ public boolean equals(Object obj) { Objects.equals(this.first, other.first) && Objects.equals(this.second, other.second) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @@ -156,13 +162,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -175,6 +181,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -186,13 +202,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -201,18 +217,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -225,14 +241,11 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultAnnotatedRelationshipElement (" + "annotations=%s," + + ")", + this.annotations); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAssetAdministrationShell.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAssetAdministrationShell.java index f9d5a7d03..7fc97b452 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAssetAdministrationShell.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAssetAdministrationShell.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,10 +15,6 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - import org.eclipse.digitaltwin.aas4j.v3.model.AdministrativeInformation; import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; @@ -29,6 +26,10 @@ import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.AssetAdministrationShellBuilder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + /** * Default implementation of package org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell @@ -72,21 +73,20 @@ public class DefaultAssetAdministrationShell implements AssetAdministrationShell @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultAssetAdministrationShell() { - } + public DefaultAssetAdministrationShell() {} @Override public int hashCode() { - return Objects.hash(this.assetInformation, - this.derivedFrom, + return Objects.hash(this.derivedFrom, + this.assetInformation, this.submodels, this.embeddedDataSpecifications, this.administration, this.id, this.category, - this.description, - this.displayName, this.idShort, + this.displayName, + this.description, this.extensions); } @@ -100,38 +100,38 @@ public boolean equals(Object obj) { return false; } else { DefaultAssetAdministrationShell other = (DefaultAssetAdministrationShell) obj; - return Objects.equals(this.assetInformation, other.assetInformation) && - Objects.equals(this.derivedFrom, other.derivedFrom) && + return Objects.equals(this.derivedFrom, other.derivedFrom) && + Objects.equals(this.assetInformation, other.assetInformation) && Objects.equals(this.submodels, other.submodels) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && Objects.equals(this.administration, other.administration) && Objects.equals(this.id, other.id) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && Objects.equals(this.extensions, other.extensions); } } @Override - public AssetInformation getAssetInformation() { - return assetInformation; + public Reference getDerivedFrom() { + return derivedFrom; } @Override - public void setAssetInformation(AssetInformation assetInformation) { - this.assetInformation = assetInformation; + public void setDerivedFrom(Reference derivedFrom) { + this.derivedFrom = derivedFrom; } @Override - public Reference getDerivedFrom() { - return derivedFrom; + public AssetInformation getAssetInformation() { + return assetInformation; } @Override - public void setDerivedFrom(Reference derivedFrom) { - this.derivedFrom = derivedFrom; + public void setAssetInformation(AssetInformation assetInformation) { + this.assetInformation = assetInformation; } @Override @@ -185,13 +185,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -200,18 +200,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -224,6 +224,15 @@ public void setExtensions(List extensions) { this.extensions = extensions; } + public String toString() { + return String.format( + "DefaultAssetAdministrationShell (" + "derivedFrom=%s," + + "assetInformation=%s," + + "submodels=%s," + + ")", + this.derivedFrom, this.assetInformation, this.submodels); + } + /** * This builder class can be used to construct a DefaultAssetAdministrationShell bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAssetInformation.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAssetInformation.java index ade88005b..0dbc4be34 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAssetInformation.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultAssetInformation.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -17,7 +18,7 @@ import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; import org.eclipse.digitaltwin.aas4j.v3.model.AssetKind; import org.eclipse.digitaltwin.aas4j.v3.model.Resource; -import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetID; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.AssetInformationBuilder; @@ -45,23 +46,21 @@ public class DefaultAssetInformation implements AssetInformation { @IRI("https://admin-shell.io/aas/3/0/AssetInformation/defaultThumbnail") protected Resource defaultThumbnail; - @IRI("https://admin-shell.io/aas/3/0/AssetInformation/globalAssetID") - protected String globalAssetID; + @IRI("https://admin-shell.io/aas/3/0/AssetInformation/globalAssetId") + protected String globalAssetId; @IRI("https://admin-shell.io/aas/3/0/AssetInformation/specificAssetIds") - protected List specificAssetIds = new ArrayList<>(); + protected List specificAssetIds = new ArrayList<>(); - public DefaultAssetInformation() { - - } + public DefaultAssetInformation() {} @Override public int hashCode() { return Objects.hash(this.assetKind, + this.globalAssetId, + this.specificAssetIds, this.assetType, - this.defaultThumbnail, - this.globalAssetID, - this.specificAssetIds); + this.defaultThumbnail); } @Override @@ -75,10 +74,10 @@ public boolean equals(Object obj) { } else { DefaultAssetInformation other = (DefaultAssetInformation) obj; return Objects.equals(this.assetKind, other.assetKind) && + Objects.equals(this.globalAssetId, other.globalAssetId) && + Objects.equals(this.specificAssetIds, other.specificAssetIds) && Objects.equals(this.assetType, other.assetType) && - Objects.equals(this.defaultThumbnail, other.defaultThumbnail) && - Objects.equals(this.globalAssetID, other.globalAssetID) && - Objects.equals(this.specificAssetIds, other.specificAssetIds); + Objects.equals(this.defaultThumbnail, other.defaultThumbnail); } } @@ -93,43 +92,54 @@ public void setAssetKind(AssetKind assetKind) { } @Override - public String getAssetType() { - return assetType; + public String getGlobalAssetId() { + return globalAssetId; } @Override - public void setAssetType(String assetType) { - this.assetType = assetType; + public void setGlobalAssetId(String globalAssetId) { + this.globalAssetId = globalAssetId; } @Override - public Resource getDefaultThumbnail() { - return defaultThumbnail; + public List getSpecificAssetIds() { + return specificAssetIds; } @Override - public void setDefaultThumbnail(Resource defaultThumbnail) { - this.defaultThumbnail = defaultThumbnail; + public void setSpecificAssetIds(List specificAssetIds) { + this.specificAssetIds = specificAssetIds; } @Override - public String getGlobalAssetID() { - return globalAssetID; + public String getAssetType() { + return assetType; } @Override - public void setGlobalAssetID(String globalAssetID) { - this.globalAssetID = globalAssetID; + public void setAssetType(String assetType) { + this.assetType = assetType; } @Override - public List getSpecificAssetIds() { - return specificAssetIds; + public Resource getDefaultThumbnail() { + return defaultThumbnail; } @Override - public void setSpecificAssetIds(List specificAssetIds) { - this.specificAssetIds = specificAssetIds; + public void setDefaultThumbnail(Resource defaultThumbnail) { + this.defaultThumbnail = defaultThumbnail; + } + + public String toString() { + return String.format( + "DefaultAssetInformation (" + "assetKind=%s," + + "globalAssetId=%s," + + "specificAssetIds=%s," + + "assetType=%s," + + "defaultThumbnail=%s," + + ")", + this.assetKind, this.globalAssetId, this.specificAssetIds, this.assetType, this.defaultThumbnail); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultBasicEventElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultBasicEventElement.java index 035a2c7b0..0763b8ba6 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultBasicEventElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultBasicEventElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,15 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.BasicEventElement; +import org.eclipse.digitaltwin.aas4j.v3.model.Direction; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.StateOfEvent; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.BasicEventElementBuilder; @@ -62,8 +71,8 @@ public class DefaultBasicEventElement implements BasicEventElement { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -83,29 +92,27 @@ public class DefaultBasicEventElement implements BasicEventElement { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultBasicEventElement() { - - } + public DefaultBasicEventElement() {} @Override public int hashCode() { - return Objects.hash(this.direction, - this.lastUpdate, - this.maxInterval, - this.messageBroker, + return Objects.hash(this.observed, + this.direction, + this.state, this.messageTopic, + this.messageBroker, + this.lastUpdate, this.minInterval, - this.observed, - this.state, + this.maxInterval, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -118,26 +125,36 @@ public boolean equals(Object obj) { return false; } else { DefaultBasicEventElement other = (DefaultBasicEventElement) obj; - return Objects.equals(this.direction, other.direction) && - Objects.equals(this.lastUpdate, other.lastUpdate) && - Objects.equals(this.maxInterval, other.maxInterval) && - Objects.equals(this.messageBroker, other.messageBroker) && + return Objects.equals(this.observed, other.observed) && + Objects.equals(this.direction, other.direction) && + Objects.equals(this.state, other.state) && Objects.equals(this.messageTopic, other.messageTopic) && + Objects.equals(this.messageBroker, other.messageBroker) && + Objects.equals(this.lastUpdate, other.lastUpdate) && Objects.equals(this.minInterval, other.minInterval) && - Objects.equals(this.observed, other.observed) && - Objects.equals(this.state, other.state) && + Objects.equals(this.maxInterval, other.maxInterval) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } + @Override + public Reference getObserved() { + return observed; + } + + @Override + public void setObserved(Reference observed) { + this.observed = observed; + } + @Override public Direction getDirection() { return direction; @@ -149,23 +166,23 @@ public void setDirection(Direction direction) { } @Override - public String getLastUpdate() { - return lastUpdate; + public StateOfEvent getState() { + return state; } @Override - public void setLastUpdate(String lastUpdate) { - this.lastUpdate = lastUpdate; + public void setState(StateOfEvent state) { + this.state = state; } @Override - public String getMaxInterval() { - return maxInterval; + public String getMessageTopic() { + return messageTopic; } @Override - public void setMaxInterval(String maxInterval) { - this.maxInterval = maxInterval; + public void setMessageTopic(String messageTopic) { + this.messageTopic = messageTopic; } @Override @@ -179,13 +196,13 @@ public void setMessageBroker(Reference messageBroker) { } @Override - public String getMessageTopic() { - return messageTopic; + public String getLastUpdate() { + return lastUpdate; } @Override - public void setMessageTopic(String messageTopic) { - this.messageTopic = messageTopic; + public void setLastUpdate(String lastUpdate) { + this.lastUpdate = lastUpdate; } @Override @@ -199,23 +216,13 @@ public void setMinInterval(String minInterval) { } @Override - public Reference getObserved() { - return observed; - } - - @Override - public void setObserved(Reference observed) { - this.observed = observed; - } - - @Override - public StateOfEvent getState() { - return state; + public String getMaxInterval() { + return maxInterval; } @Override - public void setState(StateOfEvent state) { - this.state = state; + public void setMaxInterval(String maxInterval) { + this.maxInterval = maxInterval; } @Override @@ -229,13 +236,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -248,6 +255,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -259,13 +276,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -274,18 +291,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -298,14 +315,19 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultBasicEventElement (" + "observed=%s," + + "direction=%s," + + "state=%s," + + "messageTopic=%s," + + "messageBroker=%s," + + "lastUpdate=%s," + + "minInterval=%s," + + "maxInterval=%s," + + ")", + this.observed, this.direction, this.state, this.messageTopic, this.messageBroker, this.lastUpdate, this.minInterval, + this.maxInterval); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultBlob.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultBlob.java index bcb565022..ebf7e4ca4 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultBlob.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultBlob.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.Blob; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.BlobBuilder; @@ -46,8 +53,8 @@ public class DefaultBlob implements Blob { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -67,23 +74,21 @@ public class DefaultBlob implements Blob { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultBlob() { - - } + public DefaultBlob() {} @Override public int hashCode() { - return Objects.hash(this.contentType, - Arrays.hashCode(this.value), + return Objects.hash(Arrays.hashCode(this.value), + this.contentType, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -96,38 +101,38 @@ public boolean equals(Object obj) { return false; } else { DefaultBlob other = (DefaultBlob) obj; - return Objects.equals(this.contentType, other.contentType) && - Arrays.equals(this.value, other.value) && + return Arrays.equals(this.value, other.value) && + Objects.equals(this.contentType, other.contentType) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @Override - public String getContentType() { - return contentType; + public byte[] getValue() { + return value; } @Override - public void setContentType(String contentType) { - this.contentType = contentType; + public void setValue(byte[] value) { + this.value = value; } @Override - public byte[] getValue() { - return value; + public String getContentType() { + return contentType; } @Override - public void setValue(byte[] value) { - this.value = value; + public void setContentType(String contentType) { + this.contentType = contentType; } @Override @@ -141,13 +146,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -160,6 +165,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -171,13 +186,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -186,18 +201,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -210,14 +225,12 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultBlob (" + "value=%s," + + "contentType=%s," + + ")", + Arrays.toString(this.value), this.contentType); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultCapability.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultCapability.java index 77c89e298..d4167b66a 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultCapability.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultCapability.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.Capability; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.CapabilityBuilder; @@ -39,8 +46,8 @@ public class DefaultCapability implements Capability { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -60,21 +67,19 @@ public class DefaultCapability implements Capability { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultCapability() { - - } + public DefaultCapability() {} @Override public int hashCode() { return Objects.hash(this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -88,14 +93,14 @@ public boolean equals(Object obj) { } else { DefaultCapability other = (DefaultCapability) obj; return Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @@ -110,13 +115,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -129,6 +134,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -140,13 +155,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -155,18 +170,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -179,14 +194,12 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } + public String toString() { + return String.format( + "DefaultCapability (" + + ")" - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + ); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultConceptDescription.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultConceptDescription.java index 558778b24..51ad68c22 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultConceptDescription.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultConceptDescription.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AdministrativeInformation; +import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.ConceptDescriptionBuilder; @@ -60,9 +67,7 @@ public class DefaultConceptDescription implements ConceptDescription { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultConceptDescription() { - - } + public DefaultConceptDescription() {} @Override public int hashCode() { @@ -71,9 +76,9 @@ public int hashCode() { this.administration, this.id, this.category, - this.description, - this.displayName, this.idShort, + this.displayName, + this.description, this.extensions); } @@ -92,9 +97,9 @@ public boolean equals(Object obj) { Objects.equals(this.administration, other.administration) && Objects.equals(this.id, other.id) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && Objects.equals(this.extensions, other.extensions); } } @@ -105,8 +110,8 @@ public List getIsCaseOf() { } @Override - public void setIsCaseOf(List isCaseOf) { - this.isCaseOf = isCaseOf; + public void setIsCaseOf(List isCaseOfs) { + this.isCaseOf = isCaseOfs; } @Override @@ -150,13 +155,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -165,18 +170,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -189,6 +194,13 @@ public void setExtensions(List extensions) { this.extensions = extensions; } + public String toString() { + return String.format( + "DefaultConceptDescription (" + "isCaseOf=%s," + + ")", + this.isCaseOf); + } + /** * This builder class can be used to construct a DefaultConceptDescription bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultDataSpecificationIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultDataSpecificationIec61360.java index 168d88f21..a92cab507 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultDataSpecificationIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultDataSpecificationIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.DataSpecificationIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringDefinitionTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringPreferredNameTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringShortNameTypeIec61360; +import org.eclipse.digitaltwin.aas4j.v3.model.LevelType; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.ValueList; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.DataSpecificationIec61360Builder; @@ -31,63 +39,61 @@ * lists conformant to IEC 61360. */ -@IRI("aas:DataSpecificationIEC61360") +@IRI("aas:DataSpecificationIec61360") public class DefaultDataSpecificationIec61360 implements DataSpecificationIec61360 { - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/dataType") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/dataType") protected DataTypeIec61360 dataType; - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/definition") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/definition") protected List definition = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/levelType") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/levelType") protected LevelType levelType; - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/preferredName") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/preferredName") protected List preferredName = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/shortName") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/shortName") protected List shortName = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/sourceOfDefinition") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/sourceOfDefinition") protected String sourceOfDefinition; - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/symbol") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/symbol") protected String symbol; - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/unit") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unit") protected String unit; - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/unitID") - protected Reference unitID; + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/unitId") + protected Reference unitId; - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/value") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/value") protected String value; - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/valueFormat") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/valueFormat") protected String valueFormat; - @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIEC61360/valueList") + @IRI("https://admin-shell.io/aas/3/0/DataSpecificationIec61360/valueList") protected ValueList valueList; - public DefaultDataSpecificationIec61360() { - - } + public DefaultDataSpecificationIec61360() {} @Override public int hashCode() { - return Objects.hash(this.dataType, - this.definition, - this.levelType, - this.preferredName, + return Objects.hash(this.preferredName, this.shortName, + this.unit, + this.unitId, this.sourceOfDefinition, this.symbol, - this.unit, - this.unitID, - this.value, + this.dataType, + this.definition, this.valueFormat, - this.valueList); + this.valueList, + this.value, + this.levelType); } @Override @@ -100,69 +106,59 @@ public boolean equals(Object obj) { return false; } else { DefaultDataSpecificationIec61360 other = (DefaultDataSpecificationIec61360) obj; - return Objects.equals(this.dataType, other.dataType) && - Objects.equals(this.definition, other.definition) && - Objects.equals(this.levelType, other.levelType) && - Objects.equals(this.preferredName, other.preferredName) && + return Objects.equals(this.preferredName, other.preferredName) && Objects.equals(this.shortName, other.shortName) && + Objects.equals(this.unit, other.unit) && + Objects.equals(this.unitId, other.unitId) && Objects.equals(this.sourceOfDefinition, other.sourceOfDefinition) && Objects.equals(this.symbol, other.symbol) && - Objects.equals(this.unit, other.unit) && - Objects.equals(this.unitID, other.unitID) && - Objects.equals(this.value, other.value) && + Objects.equals(this.dataType, other.dataType) && + Objects.equals(this.definition, other.definition) && Objects.equals(this.valueFormat, other.valueFormat) && - Objects.equals(this.valueList, other.valueList); + Objects.equals(this.valueList, other.valueList) && + Objects.equals(this.value, other.value) && + Objects.equals(this.levelType, other.levelType); } } @Override - public DataTypeIec61360 getDataType() { - return dataType; - } - - @Override - public void setDataType(DataTypeIec61360 dataType) { - this.dataType = dataType; - } - - @Override - public List getDefinition() { - return definition; + public List getPreferredName() { + return preferredName; } @Override - public void setDefinition(List definition) { - this.definition = definition; + public void setPreferredName(List preferredNames) { + this.preferredName = preferredNames; } @Override - public LevelType getLevelType() { - return levelType; + public List getShortName() { + return shortName; } @Override - public void setLevelType(LevelType levelType) { - this.levelType = levelType; + public void setShortName(List shortNames) { + this.shortName = shortNames; } @Override - public List getPreferredName() { - return preferredName; + public String getUnit() { + return unit; } @Override - public void setPreferredName(List preferredName) { - this.preferredName = preferredName; + public void setUnit(String unit) { + this.unit = unit; } @Override - public List getShortName() { - return shortName; + public Reference getUnitId() { + return unitId; } @Override - public void setShortName(List shortName) { - this.shortName = shortName; + public void setUnitId(Reference unitId) { + this.unitId = unitId; } @Override @@ -186,33 +182,23 @@ public void setSymbol(String symbol) { } @Override - public String getUnit() { - return unit; - } - - @Override - public void setUnit(String unit) { - this.unit = unit; - } - - @Override - public Reference getUnitID() { - return unitID; + public DataTypeIec61360 getDataType() { + return dataType; } @Override - public void setUnitID(Reference unitID) { - this.unitID = unitID; + public void setDataType(DataTypeIec61360 dataType) { + this.dataType = dataType; } @Override - public String getValue() { - return value; + public List getDefinition() { + return definition; } @Override - public void setValue(String value) { - this.value = value; + public void setDefinition(List definitions) { + this.definition = definitions; } @Override @@ -235,6 +221,45 @@ public void setValueList(ValueList valueList) { this.valueList = valueList; } + @Override + public String getValue() { + return value; + } + + @Override + public void setValue(String value) { + this.value = value; + } + + @Override + public LevelType getLevelType() { + return levelType; + } + + @Override + public void setLevelType(LevelType levelType) { + this.levelType = levelType; + } + + public String toString() { + return String.format( + "DefaultDataSpecificationIec61360 (" + "preferredName=%s," + + "shortName=%s," + + "unit=%s," + + "unitId=%s," + + "sourceOfDefinition=%s," + + "symbol=%s," + + "dataType=%s," + + "definition=%s," + + "valueFormat=%s," + + "valueList=%s," + + "value=%s," + + "levelType=%s," + + ")", + this.preferredName, this.shortName, this.unit, this.unitId, this.sourceOfDefinition, this.symbol, this.dataType, + this.definition, this.valueFormat, this.valueList, this.value, this.levelType); + } + /** * This builder class can be used to construct a DefaultDataSpecificationIec61360 bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEmbeddedDataSpecification.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEmbeddedDataSpecification.java index 4d3135579..0235e810d 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEmbeddedDataSpecification.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEmbeddedDataSpecification.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -39,9 +40,7 @@ public class DefaultEmbeddedDataSpecification implements EmbeddedDataSpecificati @IRI("https://admin-shell.io/aas/3/0/EmbeddedDataSpecification/dataSpecificationContent") protected DataSpecificationContent dataSpecificationContent; - public DefaultEmbeddedDataSpecification() { - - } + public DefaultEmbeddedDataSpecification() {} @Override public int hashCode() { @@ -84,6 +83,14 @@ public void setDataSpecificationContent(DataSpecificationContent dataSpecificati this.dataSpecificationContent = dataSpecificationContent; } + public String toString() { + return String.format( + "DefaultEmbeddedDataSpecification (" + "dataSpecification=%s," + + "dataSpecificationContent=%s," + + ")", + this.dataSpecification, this.dataSpecificationContent); + } + /** * This builder class can be used to construct a DefaultEmbeddedDataSpecification bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEntity.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEntity.java index e3a75f9a8..e39c60717 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEntity.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEntity.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,16 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Entity; +import org.eclipse.digitaltwin.aas4j.v3.model.EntityType; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.EntityBuilder; @@ -35,11 +45,11 @@ public class DefaultEntity implements Entity { @IRI("https://admin-shell.io/aas/3/0/Entity/entityType") protected EntityType entityType; - @IRI("https://admin-shell.io/aas/3/0/Entity/globalAssetID") - protected String globalAssetID; + @IRI("https://admin-shell.io/aas/3/0/Entity/globalAssetId") + protected String globalAssetId; @IRI("https://admin-shell.io/aas/3/0/Entity/specificAssetIds") - protected List specificAssetIds = new ArrayList<>(); + protected List specificAssetIds = new ArrayList<>(); @IRI("https://admin-shell.io/aas/3/0/Entity/statements") protected List statements = new ArrayList<>(); @@ -50,8 +60,8 @@ public class DefaultEntity implements Entity { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -71,25 +81,23 @@ public class DefaultEntity implements Entity { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultEntity() { - - } + public DefaultEntity() {} @Override public int hashCode() { - return Objects.hash(this.entityType, - this.globalAssetID, + return Objects.hash(this.statements, + this.entityType, + this.globalAssetId, this.specificAssetIds, - this.statements, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -102,60 +110,60 @@ public boolean equals(Object obj) { return false; } else { DefaultEntity other = (DefaultEntity) obj; - return Objects.equals(this.entityType, other.entityType) && - Objects.equals(this.globalAssetID, other.globalAssetID) && + return Objects.equals(this.statements, other.statements) && + Objects.equals(this.entityType, other.entityType) && + Objects.equals(this.globalAssetId, other.globalAssetId) && Objects.equals(this.specificAssetIds, other.specificAssetIds) && - Objects.equals(this.statements, other.statements) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @Override - public EntityType getEntityType() { - return entityType; + public List getStatements() { + return statements; } @Override - public void setEntityType(EntityType entityType) { - this.entityType = entityType; + public void setStatements(List statements) { + this.statements = statements; } @Override - public String getGlobalAssetID() { - return globalAssetID; + public EntityType getEntityType() { + return entityType; } @Override - public void setGlobalAssetID(String globalAssetID) { - this.globalAssetID = globalAssetID; + public void setEntityType(EntityType entityType) { + this.entityType = entityType; } @Override - public List getSpecificAssetIds() { - return specificAssetIds; + public String getGlobalAssetId() { + return globalAssetId; } @Override - public void setSpecificAssetIds(List specificAssetIds) { - this.specificAssetIds = specificAssetIds; + public void setGlobalAssetId(String globalAssetId) { + this.globalAssetId = globalAssetId; } @Override - public List getStatements() { - return statements; + public List getSpecificAssetIds() { + return specificAssetIds; } @Override - public void setStatements(List statements) { - this.statements = statements; + public void setSpecificAssetIds(List specificAssetIds) { + this.specificAssetIds = specificAssetIds; } @Override @@ -169,13 +177,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -188,6 +196,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -199,13 +217,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -214,18 +232,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -238,14 +256,14 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultEntity (" + "statements=%s," + + "entityType=%s," + + "globalAssetId=%s," + + "specificAssetIds=%s," + + ")", + this.statements, this.entityType, this.globalAssetId, this.specificAssetIds); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEnvironment.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEnvironment.java index ae4b92b96..30d5f6377 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEnvironment.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEnvironment.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -44,15 +45,13 @@ public class DefaultEnvironment implements Environment { @IRI("https://admin-shell.io/aas/3/0/Environment/submodels") protected List submodels = new ArrayList<>(); - public DefaultEnvironment() { - - } + public DefaultEnvironment() {} @Override public int hashCode() { return Objects.hash(this.assetAdministrationShells, - this.conceptDescriptions, - this.submodels); + this.submodels, + this.conceptDescriptions); } @Override @@ -66,8 +65,8 @@ public boolean equals(Object obj) { } else { DefaultEnvironment other = (DefaultEnvironment) obj; return Objects.equals(this.assetAdministrationShells, other.assetAdministrationShells) && - Objects.equals(this.conceptDescriptions, other.conceptDescriptions) && - Objects.equals(this.submodels, other.submodels); + Objects.equals(this.submodels, other.submodels) && + Objects.equals(this.conceptDescriptions, other.conceptDescriptions); } } @@ -82,23 +81,32 @@ public void setAssetAdministrationShells(List assetAdm } @Override - public List getConceptDescriptions() { - return conceptDescriptions; + public List getSubmodels() { + return submodels; } @Override - public void setConceptDescriptions(List conceptDescriptions) { - this.conceptDescriptions = conceptDescriptions; + public void setSubmodels(List submodels) { + this.submodels = submodels; } @Override - public List getSubmodels() { - return submodels; + public List getConceptDescriptions() { + return conceptDescriptions; } @Override - public void setSubmodels(List submodels) { - this.submodels = submodels; + public void setConceptDescriptions(List conceptDescriptions) { + this.conceptDescriptions = conceptDescriptions; + } + + public String toString() { + return String.format( + "DefaultEnvironment (" + "assetAdministrationShells=%s," + + "submodels=%s," + + "conceptDescriptions=%s," + + ")", + this.assetAdministrationShells, this.submodels, this.conceptDescriptions); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEventPayload.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEventPayload.java index b775a8922..750f1c5ff 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEventPayload.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultEventPayload.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -35,8 +36,8 @@ public class DefaultEventPayload implements EventPayload { @IRI("https://admin-shell.io/aas/3/0/EventPayload/observableReference") protected Reference observableReference; - @IRI("https://admin-shell.io/aas/3/0/EventPayload/observableSemanticID") - protected Reference observableSemanticID; + @IRI("https://admin-shell.io/aas/3/0/EventPayload/observableSemanticId") + protected Reference observableSemanticId; @IRI("https://admin-shell.io/aas/3/0/EventPayload/payload") protected byte[] payload; @@ -44,11 +45,11 @@ public class DefaultEventPayload implements EventPayload { @IRI("https://admin-shell.io/aas/3/0/EventPayload/source") protected Reference source; - @IRI("https://admin-shell.io/aas/3/0/EventPayload/sourceSemanticID") - protected Reference sourceSemanticID; + @IRI("https://admin-shell.io/aas/3/0/EventPayload/sourceSemanticId") + protected Reference sourceSemanticId; - @IRI("https://admin-shell.io/aas/3/0/EventPayload/subjectID") - protected Reference subjectID; + @IRI("https://admin-shell.io/aas/3/0/EventPayload/subjectId") + protected Reference subjectId; @IRI("https://admin-shell.io/aas/3/0/EventPayload/timeStamp") protected String timeStamp; @@ -56,20 +57,18 @@ public class DefaultEventPayload implements EventPayload { @IRI("https://admin-shell.io/aas/3/0/EventPayload/topic") protected String topic; - public DefaultEventPayload() { - - } + public DefaultEventPayload() {} @Override public int hashCode() { - return Objects.hash(this.observableReference, - this.observableSemanticID, - Arrays.hashCode(this.payload), - this.source, - this.sourceSemanticID, - this.subjectID, + return Objects.hash(this.source, + this.sourceSemanticId, + this.observableReference, + this.observableSemanticId, + this.topic, + this.subjectId, this.timeStamp, - this.topic); + Arrays.hashCode(this.payload)); } @Override @@ -82,75 +81,75 @@ public boolean equals(Object obj) { return false; } else { DefaultEventPayload other = (DefaultEventPayload) obj; - return Objects.equals(this.observableReference, other.observableReference) && - Objects.equals(this.observableSemanticID, other.observableSemanticID) && - Arrays.equals(this.payload, other.payload) && - Objects.equals(this.source, other.source) && - Objects.equals(this.sourceSemanticID, other.sourceSemanticID) && - Objects.equals(this.subjectID, other.subjectID) && + return Objects.equals(this.source, other.source) && + Objects.equals(this.sourceSemanticId, other.sourceSemanticId) && + Objects.equals(this.observableReference, other.observableReference) && + Objects.equals(this.observableSemanticId, other.observableSemanticId) && + Objects.equals(this.topic, other.topic) && + Objects.equals(this.subjectId, other.subjectId) && Objects.equals(this.timeStamp, other.timeStamp) && - Objects.equals(this.topic, other.topic); + Arrays.equals(this.payload, other.payload); } } @Override - public Reference getObservableReference() { - return observableReference; + public Reference getSource() { + return source; } @Override - public void setObservableReference(Reference observableReference) { - this.observableReference = observableReference; + public void setSource(Reference source) { + this.source = source; } @Override - public Reference getObservableSemanticID() { - return observableSemanticID; + public Reference getSourceSemanticId() { + return sourceSemanticId; } @Override - public void setObservableSemanticID(Reference observableSemanticID) { - this.observableSemanticID = observableSemanticID; + public void setSourceSemanticId(Reference sourceSemanticId) { + this.sourceSemanticId = sourceSemanticId; } @Override - public byte[] getPayload() { - return payload; + public Reference getObservableReference() { + return observableReference; } @Override - public void setPayload(byte[] payload) { - this.payload = payload; + public void setObservableReference(Reference observableReference) { + this.observableReference = observableReference; } @Override - public Reference getSource() { - return source; + public Reference getObservableSemanticId() { + return observableSemanticId; } @Override - public void setSource(Reference source) { - this.source = source; + public void setObservableSemanticId(Reference observableSemanticId) { + this.observableSemanticId = observableSemanticId; } @Override - public Reference getSourceSemanticID() { - return sourceSemanticID; + public String getTopic() { + return topic; } @Override - public void setSourceSemanticID(Reference sourceSemanticID) { - this.sourceSemanticID = sourceSemanticID; + public void setTopic(String topic) { + this.topic = topic; } @Override - public Reference getSubjectID() { - return subjectID; + public Reference getSubjectId() { + return subjectId; } @Override - public void setSubjectID(Reference subjectID) { - this.subjectID = subjectID; + public void setSubjectId(Reference subjectId) { + this.subjectId = subjectId; } @Override @@ -164,13 +163,28 @@ public void setTimeStamp(String timeStamp) { } @Override - public String getTopic() { - return topic; + public byte[] getPayload() { + return payload; } @Override - public void setTopic(String topic) { - this.topic = topic; + public void setPayload(byte[] payload) { + this.payload = payload; + } + + public String toString() { + return String.format( + "DefaultEventPayload (" + "source=%s," + + "sourceSemanticId=%s," + + "observableReference=%s," + + "observableSemanticId=%s," + + "topic=%s," + + "subjectId=%s," + + "timeStamp=%s," + + "payload=%s," + + ")", + this.source, this.sourceSemanticId, this.observableReference, this.observableSemanticId, this.topic, this.subjectId, + this.timeStamp, this.payload); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultExtension.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultExtension.java index 7f0212ad5..cc7957958 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultExtension.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultExtension.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,7 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Extension; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; @@ -44,25 +45,25 @@ public class DefaultExtension implements Extension { protected String value; @IRI("https://admin-shell.io/aas/3/0/Extension/valueType") - protected DataTypeDefXSD valueType; + protected DataTypeDefXsd valueType; - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); public DefaultExtension() { - + this.valueType = DataTypeDefXsd.STRING; } @Override public int hashCode() { return Objects.hash(this.name, - this.refersTo, - this.value, this.valueType, - this.semanticID, + this.value, + this.refersTo, + this.semanticId, this.supplementalSemanticIds); } @@ -77,10 +78,10 @@ public boolean equals(Object obj) { } else { DefaultExtension other = (DefaultExtension) obj; return Objects.equals(this.name, other.name) && - Objects.equals(this.refersTo, other.refersTo) && - Objects.equals(this.value, other.value) && Objects.equals(this.valueType, other.valueType) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.value, other.value) && + Objects.equals(this.refersTo, other.refersTo) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds); } } @@ -96,13 +97,13 @@ public void setName(String name) { } @Override - public List getRefersTo() { - return refersTo; + public DataTypeDefXsd getValueType() { + return valueType; } @Override - public void setRefersTo(List refersTo) { - this.refersTo = refersTo; + public void setValueType(DataTypeDefXsd valueType) { + this.valueType = valueType; } @Override @@ -116,23 +117,23 @@ public void setValue(String value) { } @Override - public DataTypeDefXSD getValueType() { - return valueType; + public List getRefersTo() { + return refersTo; } @Override - public void setValueType(DataTypeDefXSD valueType) { - this.valueType = valueType; + public void setRefersTo(List refersTos) { + this.refersTo = refersTos; } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -145,6 +146,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + public String toString() { + return String.format( + "DefaultExtension (" + "name=%s," + + "valueType=%s," + + "value=%s," + + "refersTo=%s," + + ")", + this.name, this.valueType, this.value, this.refersTo); + } + /** * This builder class can be used to construct a DefaultExtension bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultFile.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultFile.java index 146fed567..5540d1eb0 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultFile.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultFile.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.File; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.FileBuilder; @@ -44,8 +51,8 @@ public class DefaultFile implements File { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -65,23 +72,21 @@ public class DefaultFile implements File { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultFile() { - - } + public DefaultFile() {} @Override public int hashCode() { - return Objects.hash(this.contentType, - this.value, + return Objects.hash(this.value, + this.contentType, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -94,38 +99,38 @@ public boolean equals(Object obj) { return false; } else { DefaultFile other = (DefaultFile) obj; - return Objects.equals(this.contentType, other.contentType) && - Objects.equals(this.value, other.value) && + return Objects.equals(this.value, other.value) && + Objects.equals(this.contentType, other.contentType) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @Override - public String getContentType() { - return contentType; + public String getValue() { + return value; } @Override - public void setContentType(String contentType) { - this.contentType = contentType; + public void setValue(String value) { + this.value = value; } @Override - public String getValue() { - return value; + public String getContentType() { + return contentType; } @Override - public void setValue(String value) { - this.value = value; + public void setContentType(String contentType) { + this.contentType = contentType; } @Override @@ -139,13 +144,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -158,6 +163,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -169,13 +184,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -184,18 +199,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -208,14 +223,12 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultFile (" + "value=%s," + + "contentType=%s," + + ")", + this.value, this.contentType); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultKey.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultKey.java index d098f2840..45d6d6f7e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultKey.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultKey.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -37,9 +38,7 @@ public class DefaultKey implements Key { @IRI("https://admin-shell.io/aas/3/0/Key/value") protected String value; - public DefaultKey() { - - } + public DefaultKey() {} @Override public int hashCode() { @@ -82,6 +81,14 @@ public void setValue(String value) { this.value = value; } + public String toString() { + return String.format( + "DefaultKey (" + "type=%s," + + "value=%s," + + ")", + this.type, this.value); + } + /** * This builder class can be used to construct a DefaultKey bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringDefinitionTypeIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringDefinitionTypeIec61360.java index ed0a94c2f..4c8a473b9 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringDefinitionTypeIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringDefinitionTypeIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,11 +15,11 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringDefinitionTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.LangStringDefinitionTypeIec61360Builder; import java.util.Objects; -import org.eclipse.digitaltwin.aas4j.v3.model.LangStringDefinitionTypeIec61360; /** @@ -28,7 +29,7 @@ * String with length 1023 maximum and minimum 1 characters and with language tags */ -@IRI("aas:LangStringDefinitionTypeIEC61360") +@IRI("aas:LangStringDefinitionTypeIec61360") public class DefaultLangStringDefinitionTypeIec61360 implements LangStringDefinitionTypeIec61360 { @IRI("https://admin-shell.io/aas/3/0/AbstractLangString/language") @@ -37,9 +38,7 @@ public class DefaultLangStringDefinitionTypeIec61360 implements LangStringDefini @IRI("https://admin-shell.io/aas/3/0/AbstractLangString/text") protected String text; - public DefaultLangStringDefinitionTypeIec61360() { - - } + public DefaultLangStringDefinitionTypeIec61360() {} @Override public int hashCode() { @@ -82,6 +81,14 @@ public void setText(String text) { this.text = text; } + public String toString() { + return String.format( + "DefaultLangStringDefinitionTypeIec61360 (" + + ")" + + ); + } + /** * This builder class can be used to construct a DefaultLangStringDefinitionTypeIec61360 bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringNameType.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringNameType.java index 1d165b23d..cf01867c5 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringNameType.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringNameType.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -36,9 +37,7 @@ public class DefaultLangStringNameType implements LangStringNameType { @IRI("https://admin-shell.io/aas/3/0/AbstractLangString/text") protected String text; - public DefaultLangStringNameType() { - - } + public DefaultLangStringNameType() {} @Override public int hashCode() { @@ -81,6 +80,14 @@ public void setText(String text) { this.text = text; } + public String toString() { + return String.format( + "DefaultLangStringNameType (" + + ")" + + ); + } + /** * This builder class can be used to construct a DefaultLangStringNameType bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringPreferredNameTypeIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringPreferredNameTypeIec61360.java index 6e60307a3..40be9c6fc 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringPreferredNameTypeIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringPreferredNameTypeIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,11 +15,11 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringPreferredNameTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.LangStringPreferredNameTypeIec61360Builder; import java.util.Objects; -import org.eclipse.digitaltwin.aas4j.v3.model.LangStringPreferredNameTypeIec61360; /** @@ -28,7 +29,7 @@ * String with length 255 maximum and minimum 1 characters and with language tags */ -@IRI("aas:LangStringPreferredNameTypeIEC61360") +@IRI("aas:LangStringPreferredNameTypeIec61360") public class DefaultLangStringPreferredNameTypeIec61360 implements LangStringPreferredNameTypeIec61360 { @IRI("https://admin-shell.io/aas/3/0/AbstractLangString/language") @@ -37,9 +38,7 @@ public class DefaultLangStringPreferredNameTypeIec61360 implements LangStringPre @IRI("https://admin-shell.io/aas/3/0/AbstractLangString/text") protected String text; - public DefaultLangStringPreferredNameTypeIec61360() { - - } + public DefaultLangStringPreferredNameTypeIec61360() {} @Override public int hashCode() { @@ -82,6 +81,14 @@ public void setText(String text) { this.text = text; } + public String toString() { + return String.format( + "DefaultLangStringPreferredNameTypeIec61360 (" + + ")" + + ); + } + /** * This builder class can be used to construct a DefaultLangStringPreferredNameTypeIec61360 bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringShortNameTypeIec61360.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringShortNameTypeIec61360.java index adf213af1..f33fc73ee 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringShortNameTypeIec61360.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringShortNameTypeIec61360.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,11 +15,11 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringShortNameTypeIec61360; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.LangStringShortNameTypeIec61360Builder; import java.util.Objects; -import org.eclipse.digitaltwin.aas4j.v3.model.LangStringShortNameTypeIec61360; /** @@ -28,7 +29,7 @@ * String with length 18 maximum and minimum 1 characters and with language tags */ -@IRI("aas:LangStringShortNameTypeIEC61360") +@IRI("aas:LangStringShortNameTypeIec61360") public class DefaultLangStringShortNameTypeIec61360 implements LangStringShortNameTypeIec61360 { @IRI("https://admin-shell.io/aas/3/0/AbstractLangString/language") @@ -37,9 +38,7 @@ public class DefaultLangStringShortNameTypeIec61360 implements LangStringShortNa @IRI("https://admin-shell.io/aas/3/0/AbstractLangString/text") protected String text; - public DefaultLangStringShortNameTypeIec61360() { - - } + public DefaultLangStringShortNameTypeIec61360() {} @Override public int hashCode() { @@ -82,6 +81,14 @@ public void setText(String text) { this.text = text; } + public String toString() { + return String.format( + "DefaultLangStringShortNameTypeIec61360 (" + + ")" + + ); + } + /** * This builder class can be used to construct a DefaultLangStringShortNameTypeIec61360 bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringTextType.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringTextType.java index 90c243c77..196784d6e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringTextType.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLangStringTextType.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -36,9 +37,7 @@ public class DefaultLangStringTextType implements LangStringTextType { @IRI("https://admin-shell.io/aas/3/0/AbstractLangString/text") protected String text; - public DefaultLangStringTextType() { - - } + public DefaultLangStringTextType() {} @Override public int hashCode() { @@ -81,6 +80,14 @@ public void setText(String text) { this.text = text; } + public String toString() { + return String.format( + "DefaultLangStringTextType (" + + ")" + + ); + } + /** * This builder class can be used to construct a DefaultLangStringTextType bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLevelType.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLevelType.java index 5251649b3..5cf2b4ecd 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLevelType.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultLevelType.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -43,16 +44,14 @@ public class DefaultLevelType implements LevelType { @IRI("https://admin-shell.io/aas/3/0/LevelType/typ") protected boolean typ; - public DefaultLevelType() { - - } + public DefaultLevelType() {} @Override public int hashCode() { - return Objects.hash(this.max, - this.min, + return Objects.hash(this.min, this.nom, - this.typ); + this.typ, + this.max); } @Override @@ -65,23 +64,13 @@ public boolean equals(Object obj) { return false; } else { DefaultLevelType other = (DefaultLevelType) obj; - return Objects.equals(this.max, other.max) && - Objects.equals(this.min, other.min) && + return Objects.equals(this.min, other.min) && Objects.equals(this.nom, other.nom) && - Objects.equals(this.typ, other.typ); + Objects.equals(this.typ, other.typ) && + Objects.equals(this.max, other.max); } } - @Override - public boolean getMax() { - return max; - } - - @Override - public void setMax(boolean max) { - this.max = max; - } - @Override public boolean getMin() { return min; @@ -112,6 +101,26 @@ public void setTyp(boolean typ) { this.typ = typ; } + @Override + public boolean getMax() { + return max; + } + + @Override + public void setMax(boolean max) { + this.max = max; + } + + public String toString() { + return String.format( + "DefaultLevelType (" + "min=%s," + + "nom=%s," + + "typ=%s," + + "max=%s," + + ")", + this.min, this.nom, this.typ, this.max); + } + /** * This builder class can be used to construct a DefaultLevelType bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultMultiLanguageProperty.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultMultiLanguageProperty.java index 56f9cb8f7..2c0de4f5f 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultMultiLanguageProperty.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultMultiLanguageProperty.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.MultiLanguageProperty; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.MultiLanguagePropertyBuilder; @@ -38,8 +45,8 @@ public class DefaultMultiLanguageProperty implements MultiLanguageProperty { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -47,8 +54,8 @@ public class DefaultMultiLanguageProperty implements MultiLanguageProperty { @IRI("https://admin-shell.io/aas/3/0/MultiLanguageProperty/value") protected List value = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/MultiLanguageProperty/valueID") - protected Reference valueID; + @IRI("https://admin-shell.io/aas/3/0/MultiLanguageProperty/valueId") + protected Reference valueId; @IRI("https://admin-shell.io/aas/3/0/Qualifiable/qualifiers") protected List qualifiers = new ArrayList<>(); @@ -65,23 +72,21 @@ public class DefaultMultiLanguageProperty implements MultiLanguageProperty { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultMultiLanguageProperty() { - - } + public DefaultMultiLanguageProperty() {} @Override public int hashCode() { return Objects.hash(this.value, - this.valueID, + this.valueId, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -95,16 +100,16 @@ public boolean equals(Object obj) { } else { DefaultMultiLanguageProperty other = (DefaultMultiLanguageProperty) obj; return Objects.equals(this.value, other.value) && - Objects.equals(this.valueID, other.valueID) && + Objects.equals(this.valueId, other.valueId) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @@ -114,18 +119,18 @@ public List getValue() { } @Override - public void setValue(List value) { - this.value = value; + public void setValue(List values) { + this.value = values; } @Override - public Reference getValueID() { - return valueID; + public Reference getValueId() { + return valueId; } @Override - public void setValueID(Reference valueID) { - this.valueID = valueID; + public void setValueId(Reference valueId) { + this.valueId = valueId; } @Override @@ -139,13 +144,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -158,6 +163,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -169,13 +184,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -184,18 +199,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -208,14 +223,12 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultMultiLanguageProperty (" + "value=%s," + + "valueId=%s," + + ")", + this.value, this.valueId); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultOperation.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultOperation.java index 51f9b021d..ff6d65c2e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultOperation.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultOperation.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Operation; +import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.OperationBuilder; @@ -38,8 +46,8 @@ public class DefaultOperation implements Operation { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -68,24 +76,22 @@ public class DefaultOperation implements Operation { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultOperation() { - - } + public DefaultOperation() {} @Override public int hashCode() { - return Objects.hash(this.inoutputVariables, - this.inputVariables, + return Objects.hash(this.inputVariables, this.outputVariables, + this.inoutputVariables, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -98,31 +104,21 @@ public boolean equals(Object obj) { return false; } else { DefaultOperation other = (DefaultOperation) obj; - return Objects.equals(this.inoutputVariables, other.inoutputVariables) && - Objects.equals(this.inputVariables, other.inputVariables) && + return Objects.equals(this.inputVariables, other.inputVariables) && Objects.equals(this.outputVariables, other.outputVariables) && + Objects.equals(this.inoutputVariables, other.inoutputVariables) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } - @Override - public List getInoutputVariables() { - return inoutputVariables; - } - - @Override - public void setInoutputVariables(List inoutputVariables) { - this.inoutputVariables = inoutputVariables; - } - @Override public List getInputVariables() { return inputVariables; @@ -143,6 +139,16 @@ public void setOutputVariables(List outputVariables) { this.outputVariables = outputVariables; } + @Override + public List getInoutputVariables() { + return inoutputVariables; + } + + @Override + public void setInoutputVariables(List inoutputVariables) { + this.inoutputVariables = inoutputVariables; + } + @Override public List getEmbeddedDataSpecifications() { return embeddedDataSpecifications; @@ -154,13 +160,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -173,6 +179,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -184,13 +200,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -199,18 +215,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -223,14 +239,13 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultOperation (" + "inputVariables=%s," + + "outputVariables=%s," + + "inoutputVariables=%s," + + ")", + this.inputVariables, this.outputVariables, this.inoutputVariables); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultOperationVariable.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultOperationVariable.java index 6ba755f0a..17f42b008 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultOperationVariable.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultOperationVariable.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -66,6 +67,13 @@ public void setValue(SubmodelElement value) { this.value = value; } + public String toString() { + return String.format( + "DefaultOperationVariable (" + "value=%s," + + ")", + this.value); + } + /** * This builder class can be used to construct a DefaultOperationVariable bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultProperty.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultProperty.java index 738f5723f..a53eaba9a 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultProperty.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultProperty.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Property; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.PropertyBuilder; @@ -38,8 +46,8 @@ public class DefaultProperty implements Property { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -47,11 +55,11 @@ public class DefaultProperty implements Property { @IRI("https://admin-shell.io/aas/3/0/Property/value") protected String value; - @IRI("https://admin-shell.io/aas/3/0/Property/valueID") - protected Reference valueID; + @IRI("https://admin-shell.io/aas/3/0/Property/valueId") + protected Reference valueId; @IRI("https://admin-shell.io/aas/3/0/Property/valueType") - protected DataTypeDefXSD valueType; + protected DataTypeDefXsd valueType; @IRI("https://admin-shell.io/aas/3/0/Qualifiable/qualifiers") protected List qualifiers = new ArrayList<>(); @@ -68,24 +76,22 @@ public class DefaultProperty implements Property { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultProperty() { - - } + public DefaultProperty() {} @Override public int hashCode() { - return Objects.hash(this.value, - this.valueID, - this.valueType, + return Objects.hash(this.valueType, + this.value, + this.valueId, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -98,49 +104,49 @@ public boolean equals(Object obj) { return false; } else { DefaultProperty other = (DefaultProperty) obj; - return Objects.equals(this.value, other.value) && - Objects.equals(this.valueID, other.valueID) && - Objects.equals(this.valueType, other.valueType) && + return Objects.equals(this.valueType, other.valueType) && + Objects.equals(this.value, other.value) && + Objects.equals(this.valueId, other.valueId) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @Override - public String getValue() { - return value; + public DataTypeDefXsd getValueType() { + return valueType; } @Override - public void setValue(String value) { - this.value = value; + public void setValueType(DataTypeDefXsd valueType) { + this.valueType = valueType; } @Override - public Reference getValueID() { - return valueID; + public String getValue() { + return value; } @Override - public void setValueID(Reference valueID) { - this.valueID = valueID; + public void setValue(String value) { + this.value = value; } @Override - public DataTypeDefXSD getValueType() { - return valueType; + public Reference getValueId() { + return valueId; } @Override - public void setValueType(DataTypeDefXSD valueType) { - this.valueType = valueType; + public void setValueId(Reference valueId) { + this.valueId = valueId; } @Override @@ -154,13 +160,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -173,6 +179,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -184,13 +200,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -199,18 +215,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -223,14 +239,13 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultProperty (" + "valueType=%s," + + "value=%s," + + "valueId=%s," + + ")", + this.valueType, this.value, this.valueId); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultQualifier.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultQualifier.java index fc1d46bb3..69dff5350 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultQualifier.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultQualifier.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,7 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXSD; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; import org.eclipse.digitaltwin.aas4j.v3.model.QualifierKind; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; @@ -36,8 +37,8 @@ @IRI("aas:Qualifier") public class DefaultQualifier implements Qualifier { - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -51,24 +52,24 @@ public class DefaultQualifier implements Qualifier { @IRI("https://admin-shell.io/aas/3/0/Qualifier/value") protected String value; - @IRI("https://admin-shell.io/aas/3/0/Qualifier/valueID") - protected Reference valueID; + @IRI("https://admin-shell.io/aas/3/0/Qualifier/valueId") + protected Reference valueId; @IRI("https://admin-shell.io/aas/3/0/Qualifier/valueType") - protected DataTypeDefXSD valueType; + protected DataTypeDefXsd valueType; public DefaultQualifier() { - + this.kind = QualifierKind.CONCEPT_QUALIFIER; } @Override public int hashCode() { return Objects.hash(this.kind, this.type, - this.value, - this.valueID, this.valueType, - this.semanticID, + this.value, + this.valueId, + this.semanticId, this.supplementalSemanticIds); } @@ -84,10 +85,10 @@ public boolean equals(Object obj) { DefaultQualifier other = (DefaultQualifier) obj; return Objects.equals(this.kind, other.kind) && Objects.equals(this.type, other.type) && - Objects.equals(this.value, other.value) && - Objects.equals(this.valueID, other.valueID) && Objects.equals(this.valueType, other.valueType) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.value, other.value) && + Objects.equals(this.valueId, other.valueId) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds); } } @@ -113,43 +114,43 @@ public void setType(String type) { } @Override - public String getValue() { - return value; + public DataTypeDefXsd getValueType() { + return valueType; } @Override - public void setValue(String value) { - this.value = value; + public void setValueType(DataTypeDefXsd valueType) { + this.valueType = valueType; } @Override - public Reference getValueID() { - return valueID; + public String getValue() { + return value; } @Override - public void setValueID(Reference valueID) { - this.valueID = valueID; + public void setValue(String value) { + this.value = value; } @Override - public DataTypeDefXSD getValueType() { - return valueType; + public Reference getValueId() { + return valueId; } @Override - public void setValueType(DataTypeDefXSD valueType) { - this.valueType = valueType; + public void setValueId(Reference valueId) { + this.valueId = valueId; } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -162,6 +163,17 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + public String toString() { + return String.format( + "DefaultQualifier (" + "kind=%s," + + "type=%s," + + "valueType=%s," + + "value=%s," + + "valueId=%s," + + ")", + this.kind, this.type, this.valueType, this.value, this.valueId); + } + /** * This builder class can be used to construct a DefaultQualifier bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultRange.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultRange.java index 18710604c..4bcc919a3 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultRange.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultRange.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,14 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Range; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.RangeBuilder; @@ -38,8 +46,8 @@ public class DefaultRange implements Range { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -54,7 +62,7 @@ public class DefaultRange implements Range { protected String min; @IRI("https://admin-shell.io/aas/3/0/Range/valueType") - protected DataTypeDefXSD valueType; + protected DataTypeDefXsd valueType; @IRI("https://admin-shell.io/aas/3/0/Referable/category") protected String category; @@ -68,24 +76,22 @@ public class DefaultRange implements Range { @IRI("https://admin-shell.io/aas/3/0/Referable/idShort") protected String idShort; - public DefaultRange() { - - } + public DefaultRange() {} @Override public int hashCode() { - return Objects.hash(this.max, + return Objects.hash(this.valueType, this.min, - this.valueType, + this.max, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -98,29 +104,29 @@ public boolean equals(Object obj) { return false; } else { DefaultRange other = (DefaultRange) obj; - return Objects.equals(this.max, other.max) && + return Objects.equals(this.valueType, other.valueType) && Objects.equals(this.min, other.min) && - Objects.equals(this.valueType, other.valueType) && + Objects.equals(this.max, other.max) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @Override - public String getMax() { - return max; + public DataTypeDefXsd getValueType() { + return valueType; } @Override - public void setMax(String max) { - this.max = max; + public void setValueType(DataTypeDefXsd valueType) { + this.valueType = valueType; } @Override @@ -134,13 +140,13 @@ public void setMin(String min) { } @Override - public DataTypeDefXSD getValueType() { - return valueType; + public String getMax() { + return max; } @Override - public void setValueType(DataTypeDefXSD valueType) { - this.valueType = valueType; + public void setMax(String max) { + this.max = max; } @Override @@ -154,13 +160,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -173,6 +179,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -184,13 +200,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -199,18 +215,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -223,14 +239,13 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultRange (" + "valueType=%s," + + "min=%s," + + "max=%s," + + ")", + this.valueType, this.min, this.max); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultReference.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultReference.java index 3817f9236..ceed8d70d 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultReference.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultReference.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -37,21 +38,19 @@ public class DefaultReference implements Reference { @IRI("https://admin-shell.io/aas/3/0/Reference/keys") protected List keys = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/Reference/referredSemanticID") - protected Reference referredSemanticID; + @IRI("https://admin-shell.io/aas/3/0/Reference/referredSemanticId") + protected Reference referredSemanticId; @IRI("https://admin-shell.io/aas/3/0/Reference/type") protected ReferenceTypes type; - public DefaultReference() { - - } + public DefaultReference() {} @Override public int hashCode() { - return Objects.hash(this.keys, - this.referredSemanticID, - this.type); + return Objects.hash(this.type, + this.referredSemanticId, + this.keys); } @Override @@ -64,40 +63,49 @@ public boolean equals(Object obj) { return false; } else { DefaultReference other = (DefaultReference) obj; - return Objects.equals(this.keys, other.keys) && - Objects.equals(this.referredSemanticID, other.referredSemanticID) && - Objects.equals(this.type, other.type); + return Objects.equals(this.type, other.type) && + Objects.equals(this.referredSemanticId, other.referredSemanticId) && + Objects.equals(this.keys, other.keys); } } @Override - public List getKeys() { - return keys; + public ReferenceTypes getType() { + return type; } @Override - public void setKeys(List keys) { - this.keys = keys; + public void setType(ReferenceTypes type) { + this.type = type; } @Override - public Reference getReferredSemanticID() { - return referredSemanticID; + public Reference getReferredSemanticId() { + return referredSemanticId; } @Override - public void setReferredSemanticID(Reference referredSemanticID) { - this.referredSemanticID = referredSemanticID; + public void setReferredSemanticId(Reference referredSemanticId) { + this.referredSemanticId = referredSemanticId; } @Override - public ReferenceTypes getType() { - return type; + public List getKeys() { + return keys; } @Override - public void setType(ReferenceTypes type) { - this.type = type; + public void setKeys(List keys) { + this.keys = keys; + } + + public String toString() { + return String.format( + "DefaultReference (" + "type=%s," + + "referredSemanticId=%s," + + "keys=%s," + + ")", + this.type, this.referredSemanticId, this.keys); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultReferenceElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultReferenceElement.java index 3b36d2062..6893d95a5 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultReferenceElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultReferenceElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.ReferenceElement; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.ReferenceElementBuilder; @@ -39,8 +46,8 @@ public class DefaultReferenceElement implements ReferenceElement { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -63,22 +70,20 @@ public class DefaultReferenceElement implements ReferenceElement { @IRI("https://admin-shell.io/aas/3/0/ReferenceElement/value") protected Reference value; - public DefaultReferenceElement() { - - } + public DefaultReferenceElement() {} @Override public int hashCode() { return Objects.hash(this.value, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -93,14 +98,14 @@ public boolean equals(Object obj) { DefaultReferenceElement other = (DefaultReferenceElement) obj; return Objects.equals(this.value, other.value) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @@ -125,13 +130,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -144,6 +149,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -155,13 +170,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -170,18 +185,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -194,14 +209,11 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultReferenceElement (" + "value=%s," + + ")", + this.value); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultRelationshipElement.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultRelationshipElement.java index 99bd400e0..755f7f359 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultRelationshipElement.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultRelationshipElement.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,13 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.RelationshipElement; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.RelationshipElementBuilder; @@ -39,8 +46,8 @@ public class DefaultRelationshipElement implements RelationshipElement { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -66,23 +73,21 @@ public class DefaultRelationshipElement implements RelationshipElement { @IRI("https://admin-shell.io/aas/3/0/RelationshipElement/second") protected Reference second; - public DefaultRelationshipElement() { - - } + public DefaultRelationshipElement() {} @Override public int hashCode() { return Objects.hash(this.first, this.second, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -98,14 +103,14 @@ public boolean equals(Object obj) { return Objects.equals(this.first, other.first) && Objects.equals(this.second, other.second) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @@ -140,13 +145,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -159,6 +164,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -170,13 +185,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -185,18 +200,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -209,14 +224,12 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultRelationshipElement (" + "first=%s," + + "second=%s," + + ")", + this.first, this.second); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultResource.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultResource.java index 44b40cb2b..068c2ad83 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultResource.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultResource.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -37,14 +38,12 @@ public class DefaultResource implements Resource { @IRI("https://admin-shell.io/aas/3/0/Resource/path") protected String path; - public DefaultResource() { - - } + public DefaultResource() {} @Override public int hashCode() { - return Objects.hash(this.contentType, - this.path); + return Objects.hash(this.path, + this.contentType); } @Override @@ -57,29 +56,37 @@ public boolean equals(Object obj) { return false; } else { DefaultResource other = (DefaultResource) obj; - return Objects.equals(this.contentType, other.contentType) && - Objects.equals(this.path, other.path); + return Objects.equals(this.path, other.path) && + Objects.equals(this.contentType, other.contentType); } } @Override - public String getContentType() { - return contentType; + public String getPath() { + return path; } @Override - public void setContentType(String contentType) { - this.contentType = contentType; + public void setPath(String path) { + this.path = path; } @Override - public String getPath() { - return path; + public String getContentType() { + return contentType; } @Override - public void setPath(String path) { - this.path = path; + public void setContentType(String contentType) { + this.contentType = contentType; + } + + public String toString() { + return String.format( + "DefaultResource (" + "path=%s," + + "contentType=%s," + + ")", + this.path, this.contentType); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSpecificAssetID.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSpecificAssetId.java similarity index 60% rename from model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSpecificAssetID.java rename to model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSpecificAssetId.java index 5c35ffb9e..53122fe0c 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSpecificAssetID.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSpecificAssetId.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -15,9 +16,9 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetID; +import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; -import org.eclipse.digitaltwin.aas4j.v3.model.builder.SpecificAssetIDBuilder; +import org.eclipse.digitaltwin.aas4j.v3.model.builder.SpecificAssetIdBuilder; import java.util.ArrayList; import java.util.List; @@ -25,39 +26,37 @@ /** - * Default implementation of package org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetID + * Default implementation of package org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId * * A specific asset ID describes a generic supplementary identifying attribute of the asset. */ -@IRI("aas:SpecificAssetID") -public class DefaultSpecificAssetID implements SpecificAssetID { +@IRI("aas:SpecificAssetId") +public class DefaultSpecificAssetId implements SpecificAssetId { - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/SpecificAssetID/externalSubjectID") - protected Reference externalSubjectID; + @IRI("https://admin-shell.io/aas/3/0/SpecificAssetId/externalSubjectId") + protected Reference externalSubjectId; - @IRI("https://admin-shell.io/aas/3/0/SpecificAssetID/name") + @IRI("https://admin-shell.io/aas/3/0/SpecificAssetId/name") protected String name; - @IRI("https://admin-shell.io/aas/3/0/SpecificAssetID/value") + @IRI("https://admin-shell.io/aas/3/0/SpecificAssetId/value") protected String value; - public DefaultSpecificAssetID() { - - } + public DefaultSpecificAssetId() {} @Override public int hashCode() { - return Objects.hash(this.externalSubjectID, - this.name, + return Objects.hash(this.name, this.value, - this.semanticID, + this.externalSubjectId, + this.semanticId, this.supplementalSemanticIds); } @@ -70,25 +69,15 @@ public boolean equals(Object obj) { } else if (this.getClass() != obj.getClass()) { return false; } else { - DefaultSpecificAssetID other = (DefaultSpecificAssetID) obj; - return Objects.equals(this.externalSubjectID, other.externalSubjectID) && - Objects.equals(this.name, other.name) && + DefaultSpecificAssetId other = (DefaultSpecificAssetId) obj; + return Objects.equals(this.name, other.name) && Objects.equals(this.value, other.value) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.externalSubjectId, other.externalSubjectId) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds); } } - @Override - public Reference getExternalSubjectID() { - return externalSubjectID; - } - - @Override - public void setExternalSubjectID(Reference externalSubjectID) { - this.externalSubjectID = externalSubjectID; - } - @Override public String getName() { return name; @@ -110,13 +99,23 @@ public void setValue(String value) { } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getExternalSubjectId() { + return externalSubjectId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setExternalSubjectId(Reference externalSubjectId) { + this.externalSubjectId = externalSubjectId; + } + + @Override + public Reference getSemanticId() { + return semanticId; + } + + @Override + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -129,10 +128,19 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + public String toString() { + return String.format( + "DefaultSpecificAssetId (" + "name=%s," + + "value=%s," + + "externalSubjectId=%s," + + ")", + this.name, this.value, this.externalSubjectId); + } + /** - * This builder class can be used to construct a DefaultSpecificAssetID bean. + * This builder class can be used to construct a DefaultSpecificAssetId bean. */ - public static class Builder extends SpecificAssetIDBuilder { + public static class Builder extends SpecificAssetIdBuilder { @Override protected Builder getSelf() { @@ -140,8 +148,8 @@ protected Builder getSelf() { } @Override - protected DefaultSpecificAssetID newBuildingInstance() { - return new DefaultSpecificAssetID(); + protected DefaultSpecificAssetId newBuildingInstance() { + return new DefaultSpecificAssetId(); } } } diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodel.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodel.java index 17f582dc9..424e2318e 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodel.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodel.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,16 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AdministrativeInformation; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.ModellingKind; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.SubmodelBuilder; @@ -41,8 +51,8 @@ public class DefaultSubmodel implements Submodel { @IRI("https://admin-shell.io/aas/3/0/HasKind/kind") protected ModellingKind kind; - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -72,23 +82,23 @@ public class DefaultSubmodel implements Submodel { protected List submodelElements = new ArrayList<>(); public DefaultSubmodel() { - + this.kind = ModellingKind.INSTANCE; } @Override public int hashCode() { return Objects.hash(this.submodelElements, this.embeddedDataSpecifications, + this.kind, + this.semanticId, + this.supplementalSemanticIds, this.administration, this.id, this.category, - this.description, - this.displayName, this.idShort, + this.displayName, + this.description, this.extensions, - this.semanticID, - this.supplementalSemanticIds, - this.kind, this.qualifiers); } @@ -104,16 +114,16 @@ public boolean equals(Object obj) { DefaultSubmodel other = (DefaultSubmodel) obj; return Objects.equals(this.submodelElements, other.submodelElements) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && + Objects.equals(this.kind, other.kind) && + Objects.equals(this.semanticId, other.semanticId) && + Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && Objects.equals(this.administration, other.administration) && Objects.equals(this.id, other.id) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.semanticID, other.semanticID) && - Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && - Objects.equals(this.kind, other.kind) && Objects.equals(this.qualifiers, other.qualifiers); } } @@ -139,103 +149,103 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public AdministrativeInformation getAdministration() { - return administration; + public ModellingKind getKind() { + return kind; } @Override - public void setAdministration(AdministrativeInformation administration) { - this.administration = administration; + public void setKind(ModellingKind kind) { + this.kind = kind; } @Override - public String getId() { - return id; + public Reference getSemanticId() { + return semanticId; } @Override - public void setId(String id) { - this.id = id; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override - public String getCategory() { - return category; + public List getSupplementalSemanticIds() { + return supplementalSemanticIds; } @Override - public void setCategory(String category) { - this.category = category; + public void setSupplementalSemanticIds(List supplementalSemanticIds) { + this.supplementalSemanticIds = supplementalSemanticIds; } @Override - public List getDescription() { - return description; + public AdministrativeInformation getAdministration() { + return administration; } @Override - public void setDescription(List description) { - this.description = description; + public void setAdministration(AdministrativeInformation administration) { + this.administration = administration; } @Override - public List getDisplayName() { - return displayName; + public String getId() { + return id; } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setId(String id) { + this.id = id; } @Override - public String getIdShort() { - return idShort; + public String getCategory() { + return category; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setCategory(String category) { + this.category = category; } @Override - public List getExtensions() { - return extensions; + public String getIdShort() { + return idShort; } @Override - public void setExtensions(List extensions) { - this.extensions = extensions; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override - public Reference getSemanticID() { - return semanticID; + public List getDisplayName() { + return displayName; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public List getSupplementalSemanticIds() { - return supplementalSemanticIds; + public List getDescription() { + return description; } @Override - public void setSupplementalSemanticIds(List supplementalSemanticIds) { - this.supplementalSemanticIds = supplementalSemanticIds; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override - public ModellingKind getKind() { - return kind; + public List getExtensions() { + return extensions; } @Override - public void setKind(ModellingKind kind) { - this.kind = kind; + public void setExtensions(List extensions) { + this.extensions = extensions; } @Override @@ -248,6 +258,13 @@ public void setQualifiers(List qualifiers) { this.qualifiers = qualifiers; } + public String toString() { + return String.format( + "DefaultSubmodel (" + "submodelElements=%s," + + ")", + this.submodelElements); + } + /** * This builder class can be used to construct a DefaultSubmodel bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodelElementCollection.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodelElementCollection.java index 2cb74847c..2c6a0c9cd 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodelElementCollection.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodelElementCollection.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,12 +15,18 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.SubmodelElementCollectionBuilder; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Objects; @@ -41,8 +48,8 @@ public class DefaultSubmodelElementCollection implements SubmodelElementCollecti @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -63,24 +70,22 @@ public class DefaultSubmodelElementCollection implements SubmodelElementCollecti protected String idShort; @IRI("https://admin-shell.io/aas/3/0/SubmodelElementCollection/value") - protected Collection value = new ArrayList<>(); + protected List value = new ArrayList<>(); - public DefaultSubmodelElementCollection() { - - } + public DefaultSubmodelElementCollection() {} @Override public int hashCode() { return Objects.hash(this.value, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -95,25 +100,25 @@ public boolean equals(Object obj) { DefaultSubmodelElementCollection other = (DefaultSubmodelElementCollection) obj; return Objects.equals(this.value, other.value) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @Override - public Collection getValue() { + public List getValue() { return value; } @Override - public void setValue(Collection value) { - this.value = value; + public void setValue(List values) { + this.value = values; } @Override @@ -127,13 +132,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -146,6 +151,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -157,13 +172,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -172,18 +187,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -196,14 +211,11 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultSubmodelElementCollection (" + "value=%s," + + ")", + this.value); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodelElementList.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodelElementList.java index 745f21e17..8658b51ca 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodelElementList.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultSubmodelElementList.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -14,7 +15,16 @@ package org.eclipse.digitaltwin.aas4j.v3.model.impl; -import org.eclipse.digitaltwin.aas4j.v3.model.*; +import org.eclipse.digitaltwin.aas4j.v3.model.AasSubmodelElements; +import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; +import org.eclipse.digitaltwin.aas4j.v3.model.EmbeddedDataSpecification; +import org.eclipse.digitaltwin.aas4j.v3.model.Extension; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringNameType; +import org.eclipse.digitaltwin.aas4j.v3.model.LangStringTextType; +import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; +import org.eclipse.digitaltwin.aas4j.v3.model.Reference; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; +import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementList; import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; import org.eclipse.digitaltwin.aas4j.v3.model.builder.SubmodelElementListBuilder; @@ -38,8 +48,8 @@ public class DefaultSubmodelElementList implements SubmodelElementList { @IRI("https://admin-shell.io/aas/3/0/HasExtensions/extensions") protected List extensions = new ArrayList<>(); - @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticID") - protected Reference semanticID; + @IRI("https://admin-shell.io/aas/3/0/HasSemantics/semanticId") + protected Reference semanticId; @IRI("https://admin-shell.io/aas/3/0/HasSemantics/supplementalSemanticIds") protected List supplementalSemanticIds = new ArrayList<>(); @@ -62,38 +72,38 @@ public class DefaultSubmodelElementList implements SubmodelElementList { @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/orderRelevant") protected boolean orderRelevant; - @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/semanticIDListElement") - protected Reference semanticIDListElement; + @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/semanticIdListElement") + protected Reference semanticIdListElement; @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/typeValueListElement") - protected AASSubmodelElements typeValueListElement; + protected AasSubmodelElements typeValueListElement; @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/value") protected List value = new ArrayList<>(); @IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/valueTypeListElement") - protected DataTypeDefXSD valueTypeListElement; + protected DataTypeDefXsd valueTypeListElement; public DefaultSubmodelElementList() { - + this.orderRelevant = Boolean.TRUE; } @Override public int hashCode() { return Objects.hash(this.orderRelevant, - this.semanticIDListElement, + this.semanticIdListElement, this.typeValueListElement, - this.value, this.valueTypeListElement, + this.value, this.embeddedDataSpecifications, - this.semanticID, + this.semanticId, this.supplementalSemanticIds, + this.qualifiers, this.category, - this.description, - this.displayName, this.idShort, - this.extensions, - this.qualifiers); + this.displayName, + this.description, + this.extensions); } @Override @@ -107,19 +117,19 @@ public boolean equals(Object obj) { } else { DefaultSubmodelElementList other = (DefaultSubmodelElementList) obj; return Objects.equals(this.orderRelevant, other.orderRelevant) && - Objects.equals(this.semanticIDListElement, other.semanticIDListElement) && + Objects.equals(this.semanticIdListElement, other.semanticIdListElement) && Objects.equals(this.typeValueListElement, other.typeValueListElement) && - Objects.equals(this.value, other.value) && Objects.equals(this.valueTypeListElement, other.valueTypeListElement) && + Objects.equals(this.value, other.value) && Objects.equals(this.embeddedDataSpecifications, other.embeddedDataSpecifications) && - Objects.equals(this.semanticID, other.semanticID) && + Objects.equals(this.semanticId, other.semanticId) && Objects.equals(this.supplementalSemanticIds, other.supplementalSemanticIds) && + Objects.equals(this.qualifiers, other.qualifiers) && Objects.equals(this.category, other.category) && - Objects.equals(this.description, other.description) && - Objects.equals(this.displayName, other.displayName) && Objects.equals(this.idShort, other.idShort) && - Objects.equals(this.extensions, other.extensions) && - Objects.equals(this.qualifiers, other.qualifiers); + Objects.equals(this.displayName, other.displayName) && + Objects.equals(this.description, other.description) && + Objects.equals(this.extensions, other.extensions); } } @@ -134,43 +144,43 @@ public void setOrderRelevant(boolean orderRelevant) { } @Override - public Reference getSemanticIDListElement() { - return semanticIDListElement; + public Reference getSemanticIdListElement() { + return semanticIdListElement; } @Override - public void setSemanticIDListElement(Reference semanticIDListElement) { - this.semanticIDListElement = semanticIDListElement; + public void setSemanticIdListElement(Reference semanticIdListElement) { + this.semanticIdListElement = semanticIdListElement; } @Override - public AASSubmodelElements getTypeValueListElement() { + public AasSubmodelElements getTypeValueListElement() { return typeValueListElement; } @Override - public void setTypeValueListElement(AASSubmodelElements typeValueListElement) { + public void setTypeValueListElement(AasSubmodelElements typeValueListElement) { this.typeValueListElement = typeValueListElement; } @Override - public List getValue() { - return value; + public DataTypeDefXsd getValueTypeListElement() { + return valueTypeListElement; } @Override - public void setValue(List value) { - this.value = value; + public void setValueTypeListElement(DataTypeDefXsd valueTypeListElement) { + this.valueTypeListElement = valueTypeListElement; } @Override - public DataTypeDefXSD getValueTypeListElement() { - return valueTypeListElement; + public List getValue() { + return value; } @Override - public void setValueTypeListElement(DataTypeDefXSD valueTypeListElement) { - this.valueTypeListElement = valueTypeListElement; + public void setValue(List values) { + this.value = values; } @Override @@ -184,13 +194,13 @@ public void setEmbeddedDataSpecifications(List embedd } @Override - public Reference getSemanticID() { - return semanticID; + public Reference getSemanticId() { + return semanticId; } @Override - public void setSemanticID(Reference semanticID) { - this.semanticID = semanticID; + public void setSemanticId(Reference semanticId) { + this.semanticId = semanticId; } @Override @@ -203,6 +213,16 @@ public void setSupplementalSemanticIds(List supplementalSemanticIds) this.supplementalSemanticIds = supplementalSemanticIds; } + @Override + public List getQualifiers() { + return qualifiers; + } + + @Override + public void setQualifiers(List qualifiers) { + this.qualifiers = qualifiers; + } + @Override public String getCategory() { return category; @@ -214,13 +234,13 @@ public void setCategory(String category) { } @Override - public List getDescription() { - return description; + public String getIdShort() { + return idShort; } @Override - public void setDescription(List description) { - this.description = description; + public void setIdShort(String idShort) { + this.idShort = idShort; } @Override @@ -229,18 +249,18 @@ public List getDisplayName() { } @Override - public void setDisplayName(List displayName) { - this.displayName = displayName; + public void setDisplayName(List displayNames) { + this.displayName = displayNames; } @Override - public String getIdShort() { - return idShort; + public List getDescription() { + return description; } @Override - public void setIdShort(String idShort) { - this.idShort = idShort; + public void setDescription(List descriptions) { + this.description = descriptions; } @Override @@ -253,14 +273,15 @@ public void setExtensions(List extensions) { this.extensions = extensions; } - @Override - public List getQualifiers() { - return qualifiers; - } - - @Override - public void setQualifiers(List qualifiers) { - this.qualifiers = qualifiers; + public String toString() { + return String.format( + "DefaultSubmodelElementList (" + "orderRelevant=%s," + + "semanticIdListElement=%s," + + "typeValueListElement=%s," + + "valueTypeListElement=%s," + + "value=%s," + + ")", + this.orderRelevant, this.semanticIdListElement, this.typeValueListElement, this.valueTypeListElement, this.value); } /** diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultValueList.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultValueList.java index a4c7d4236..95df776d9 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultValueList.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultValueList.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -67,6 +68,13 @@ public void setValueReferencePairs(List valueReferencePairs) this.valueReferencePairs = valueReferencePairs; } + public String toString() { + return String.format( + "DefaultValueList (" + "valueReferencePairs=%s," + + ")", + this.valueReferencePairs); + } + /** * This builder class can be used to construct a DefaultValueList bean. */ diff --git a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultValueReferencePair.java b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultValueReferencePair.java index fbffa2f47..752281744 100644 --- a/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultValueReferencePair.java +++ b/model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/impl/DefaultValueReferencePair.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. + * Copyright (c) 2023, SAP SE or an SAP affiliate company * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -35,17 +36,15 @@ public class DefaultValueReferencePair implements ValueReferencePair { @IRI("https://admin-shell.io/aas/3/0/ValueReferencePair/value") protected String value; - @IRI("https://admin-shell.io/aas/3/0/ValueReferencePair/valueID") - protected Reference valueID; + @IRI("https://admin-shell.io/aas/3/0/ValueReferencePair/valueId") + protected Reference valueId; - public DefaultValueReferencePair() { - - } + public DefaultValueReferencePair() {} @Override public int hashCode() { return Objects.hash(this.value, - this.valueID); + this.valueId); } @Override @@ -59,7 +58,7 @@ public boolean equals(Object obj) { } else { DefaultValueReferencePair other = (DefaultValueReferencePair) obj; return Objects.equals(this.value, other.value) && - Objects.equals(this.valueID, other.valueID); + Objects.equals(this.valueId, other.valueId); } } @@ -74,13 +73,21 @@ public void setValue(String value) { } @Override - public Reference getValueID() { - return valueID; + public Reference getValueId() { + return valueId; } @Override - public void setValueID(Reference valueID) { - this.valueID = valueID; + public void setValueId(Reference valueId) { + this.valueId = valueId; + } + + public String toString() { + return String.format( + "DefaultValueReferencePair (" + "value=%s," + + "valueId=%s," + + ")", + this.value, this.valueId); } /**