Merge "Implements DigitalNameplateSubmodel and required SubmodelElementCollections"
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/DigitalNameplateSubmodel.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/DigitalNameplateSubmodel.java
new file mode 100644
index 0000000..a0de434
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/DigitalNameplateSubmodel.java
@@ -0,0 +1,432 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IMultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IProperty;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.SubModel;
+import org.eclipse.basyx.submodel.metamodel.map.identifier.Identifier;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Address;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties.AssetSpecificProperties;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.markings.Markings;
+
+/**
+ * DigitalNameplateSubmodel as defined in the AAS Digital Nameplate Template document <br/>
+ * this contains the nameplate information attached to the product
+ *
+ * @author haque
+ *
+ */
+public class DigitalNameplateSubmodel extends SubModel {
+ public static final String MANUFACTURERNAMEID = "ManufacturerName";
+ public static final String MANUFACTURERPRODUCTDESIGNATIONID = "ManufacturerProductDesignation";
+ public static final String ADDRESSID = "Address";
+ public static final String MANUFACTURERPRODUCTFAMILYID = "ManufacturerProductFamily";
+ public static final String SERIALNUMBERID = "SerialNumber";
+ public static final String YEARSOFCONSTRUCTIONID = "YearOfConstruction";
+ public static final String MARKINGSID = "Markings";
+ public static final String ASSETSPECIFICPROPERTIESID = "AssetSpecificProperties";
+ public static final Reference SEMANTICID = new Reference(Collections.singletonList(new Key(KeyElements.CONCEPTDESCRIPTION, false, "https://admin-shell.io/zvei/nameplate/1/0/Nameplate", KeyType.IRI)));
+ public static final String SUBMODELID = "Nameplate";
+
+ private DigitalNameplateSubmodel() {}
+
+ /**
+ * Constructor with default idShort
+ * @param identifier
+ * @param manufacturerName
+ * @param manufacturerProductDesignation
+ * @param address
+ * @param manufacturerProductFamily
+ * @param yearsOfConstruction
+ */
+ public DigitalNameplateSubmodel(
+ Identifier identifier,
+ MultiLanguageProperty manufacturerName,
+ MultiLanguageProperty manufacturerProductDesignation,
+ Address address,
+ MultiLanguageProperty manufacturerProductFamily,
+ Property yearsOfConstruction
+ ) {
+ this(SUBMODELID, identifier, manufacturerName, manufacturerProductDesignation, address, manufacturerProductFamily, yearsOfConstruction);
+ }
+
+ /**
+ * Constructor with default idShort
+ * @param identifier
+ * @param manufacturerName
+ * @param manufacturerProductDesignation
+ * @param address
+ * @param manufacturerProductFamily
+ * @param yearsOfConstruction
+ */
+ public DigitalNameplateSubmodel(
+ Identifier identifier,
+ LangString manufacturerName,
+ LangString manufacturerProductDesignation,
+ Address address,
+ LangString manufacturerProductFamily,
+ String yearsOfConstruction
+ ) {
+ this(SUBMODELID, identifier, manufacturerName, manufacturerProductDesignation, address, manufacturerProductFamily, yearsOfConstruction);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param identifier
+ * @param manufacturerName
+ * @param manufacturerProductDesignation
+ * @param address
+ * @param manufacturerProductFamily
+ * @param yearsOfConstruction
+ */
+ public DigitalNameplateSubmodel(
+ String idShort,
+ Identifier identifier,
+ MultiLanguageProperty manufacturerName,
+ MultiLanguageProperty manufacturerProductDesignation,
+ Address address,
+ MultiLanguageProperty manufacturerProductFamily,
+ Property yearsOfConstruction
+ ) {
+ super(idShort, identifier);
+ setSemanticId(SEMANTICID);
+ setManufacturerName(manufacturerName);
+ setManufacturerProductDesignation(manufacturerProductDesignation);
+ setAddress(address);
+ setManufacturerProductFamily(manufacturerProductFamily);
+ setYearOfConstruction(yearsOfConstruction);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param identifier
+ * @param manufacturerName
+ * @param manufacturerProductDesignation
+ * @param address
+ * @param manufacturerProductFamily
+ * @param yearsOfConstruction
+ */
+ public DigitalNameplateSubmodel(
+ String idShort,
+ Identifier identifier,
+ LangString manufacturerName,
+ LangString manufacturerProductDesignation,
+ Address address,
+ LangString manufacturerProductFamily,
+ String yearsOfConstruction
+ ) {
+ super(idShort, identifier);
+ setSemanticId(SEMANTICID);
+ setManufacturerName(manufacturerName);
+ setManufacturerProductDesignation(manufacturerProductDesignation);
+ setAddress(address);
+ setManufacturerProductFamily(manufacturerProductFamily);
+ setYearOfConstruction(yearsOfConstruction);
+ }
+
+ /**
+ * Creates a DigitalNameplateSubmodel object from a map
+ *
+ * @param obj a DigitalNameplateSubmodel SMC object as raw map
+ * @return a DigitalNameplateSubmodel SMC object, that behaves like a facade for the given map
+ */
+ public static DigitalNameplateSubmodel createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(DigitalNameplateSubmodel.class, obj);
+ }
+
+ DigitalNameplateSubmodel ret = new DigitalNameplateSubmodel();
+ ret.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSM(obj));
+ return ret;
+ }
+
+ /**
+ * Creates a DigitalNameplateSubmodel object from a map without validation
+ *
+ * @param obj a DigitalNameplateSubmodel SMC object as raw map
+ * @return a DigitalNameplateSubmodel SMC object, that behaves like a facade for the given map
+ */
+ private static DigitalNameplateSubmodel createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ DigitalNameplateSubmodel ret = new DigitalNameplateSubmodel();
+ ret.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSM(obj));
+ return ret;
+ }
+
+ /**
+ * Check whether all mandatory elements for DigitalNameplateSubmodel
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ DigitalNameplateSubmodel submodel = createAsFacadeNonStrict(obj);
+
+ return SubmodelElementCollection.isValid(obj)
+ && submodel.getManufacturerName() != null
+ && submodel.getManufacturerProductDesignation() != null
+ && submodel.getAddress() != null
+ && submodel.getManufacturerProductFamily() != null
+ && submodel.getYearOfConstruction() != null;
+ }
+
+ /**
+ * sets manufacturerName
+ * 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
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @param manufacturerName {@link MultiLanguageProperty}
+ */
+ public void setManufacturerName(MultiLanguageProperty manufacturerName) {
+ addSubModelElement(manufacturerName);
+ }
+
+ /**
+ * sets manufacturerName
+ * 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
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @param manufacturerName {@link LangString}
+ */
+ public void setManufacturerName(LangString manufacturerName) {
+ MultiLanguageProperty manufacturerNameProp = new MultiLanguageProperty(MANUFACTURERNAMEID);
+ manufacturerNameProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO677#002", IdentifierType.IRDI)));
+ manufacturerNameProp.setValue(new LangStrings(manufacturerName));
+ setManufacturerName(manufacturerNameProp);
+ }
+
+ /**
+ *
+ * gets manufacturerName
+ * 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
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @return
+ */
+ public IMultiLanguageProperty getManufacturerName() {
+ return (IMultiLanguageProperty) getSubmodelElement(MANUFACTURERNAMEID);
+ }
+
+ /**
+ * sets Short description of the product (short text)
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @param manufacturerProductDesignation {@link MultiLanguageProperty}
+ */
+ public void setManufacturerProductDesignation(MultiLanguageProperty manufacturerProductDesignation) {
+ addSubModelElement(manufacturerProductDesignation);
+ }
+
+ /**
+ * sets Short description of the product (short text)
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @param manufacturerProductDesignation {@link LangString}
+ */
+ public void setManufacturerProductDesignation(LangString manufacturerProductDesignation) {
+ MultiLanguageProperty manufacturerProductDesignationProp = new MultiLanguageProperty(MANUFACTURERPRODUCTDESIGNATIONID);
+ manufacturerProductDesignationProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAW338#001", IdentifierType.IRDI)));
+ manufacturerProductDesignationProp.setValue(new LangStrings(manufacturerProductDesignation));
+ setManufacturerProductDesignation(manufacturerProductDesignationProp);
+ }
+
+ /**
+ * gets Short description of the product (short text)
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @return
+ */
+ public IMultiLanguageProperty getManufacturerProductDesignation() {
+ return (IMultiLanguageProperty) getSubmodelElement(MANUFACTURERPRODUCTDESIGNATIONID);
+ }
+
+ /**
+ * sets address information of a business partner
+ *
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @param address
+ */
+ public void setAddress(Address address) {
+ addSubModelElement(address);
+ }
+
+ /**
+ * gets address information of a business partner
+ *
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public Address getAddress() {
+ ISubmodelElement element = getSubmodelElement(ADDRESSID);
+ return element == null ? null : Address.createAsFacade((Map<String, Object>) element);
+ }
+
+ /**
+ * sets 2nd level of a 3 level manufacturer specific product hierarchy
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @param manufacturerProductFamily {@link MultiLanguageProperty}
+ */
+ public void setManufacturerProductFamily(MultiLanguageProperty manufacturerProductFamily) {
+ addSubModelElement(manufacturerProductFamily);
+ }
+
+ /**
+ * sets 2nd level of a 3 level manufacturer specific product hierarchy
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @param manufacturerProductFamily {@link LangString}
+ */
+ public void setManufacturerProductFamily(LangString manufacturerProductFamily) {
+ MultiLanguageProperty manufacturerProductFamilyProp = new MultiLanguageProperty(MANUFACTURERPRODUCTFAMILYID);
+ manufacturerProductFamilyProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAU731#001", IdentifierType.IRDI)));
+ manufacturerProductFamilyProp.setValue(new LangStrings(manufacturerProductFamily));
+ setManufacturerProductFamily(manufacturerProductFamilyProp);
+ }
+
+ /**
+ * gets 2nd level of a 3 level manufacturer specific product hierarchy
+ * Note: mandatory property according to EU Machine Directive
+ * 2006/42/EC.
+ * @return
+ */
+ public IMultiLanguageProperty getManufacturerProductFamily() {
+ return (IMultiLanguageProperty) getSubmodelElement(MANUFACTURERPRODUCTFAMILYID);
+ }
+
+ /**
+ * sets unique combination of numbers and letters used to identify the device
+ * once it has been manufactured
+ * @param serialNumber
+ */
+ public void setSerialNumber(Property serialNumber) {
+ addSubModelElement(serialNumber);
+ }
+
+ /**
+ * sets unique combination of numbers and letters used to identify the device
+ * once it has been manufactured
+ * @param serialNumber
+ */
+ public void setSerialNumber(String serialNumber) {
+ Property serialNumberProp = new Property(SERIALNUMBERID, PropertyValueTypeDef.String);
+ serialNumberProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAM556#002", IdentifierType.IRDI)));
+ serialNumberProp.set(serialNumber);
+ setSerialNumber(serialNumberProp);
+ }
+
+ /**
+ * gets unique combination of numbers and letters used to identify the device
+ * once it has been manufactured
+ * @return
+ */
+ public IProperty getSerialNumber() {
+ return (IProperty) getSubmodelElement(SERIALNUMBERID);
+ }
+
+ /**
+ * sets year as completion date of object
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param yearsOfConstruction
+ */
+ public void setYearOfConstruction(Property yearsOfConstruction) {
+ addSubModelElement(yearsOfConstruction);
+ }
+
+ /**
+ * sets year as completion date of object
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param yearsOfConstruction
+ */
+ public void setYearOfConstruction(String yearsOfConstruction) {
+ Property yearsOfConstructionProp = new Property(YEARSOFCONSTRUCTIONID, PropertyValueTypeDef.String);
+ yearsOfConstructionProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAP906#001", IdentifierType.IRDI)));
+ yearsOfConstructionProp.set(yearsOfConstruction);
+ setYearOfConstruction(yearsOfConstructionProp);
+ }
+
+ /**
+ * gets year as completion date of object
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @return
+ */
+ public IProperty getYearOfConstruction() {
+ return (IProperty) getSubmodelElement(YEARSOFCONSTRUCTIONID);
+ }
+
+ /**
+ * sets collection of product markings
+ * Note: CE marking is declared as mandatory according to EU Machine
+ * Directive 2006/42/EC.
+ * @param markings
+ */
+ public void setMarkings(Markings markings) {
+ addSubModelElement(markings);
+ }
+
+ /**
+ * gets collection of product markings
+ * Note: CE marking is declared as mandatory according to EU Machine
+ * Directive 2006/42/EC.
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public Markings getMarkings() {
+ ISubmodelElement element = getSubmodelElement(MARKINGSID);
+ return element == null ? null : Markings.createAsFacade((Map<String, Object>) element);
+ }
+
+ /**
+ * sets Collection of guideline specific properties
+ * @param assetSpecificProperties
+ */
+ public void setAssetSpecificProperties(AssetSpecificProperties assetSpecificProperties) {
+ addSubModelElement(assetSpecificProperties);
+ }
+
+ /**
+ * gets Collection of guideline specific properties
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public AssetSpecificProperties getAssetSpecificProperties() {
+ ISubmodelElement element = getSubmodelElement(ASSETSPECIFICPROPERTIESID);
+ return element == null ? null : AssetSpecificProperties.createAsFacade((Map<String, Object>) element);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/FaxType.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/FaxType.java
new file mode 100644
index 0000000..fe922f4
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/FaxType.java
@@ -0,0 +1,48 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.enums;
+
+import org.eclipse.basyx.submodel.metamodel.enumhelper.StandardizedLiteralEnum;
+import org.eclipse.basyx.submodel.metamodel.enumhelper.StandardizedLiteralEnumHelper;
+
+/**
+ * characterization of the fax according its location or usage
+ * as described in the AAS Digital Nameplate template
+ * @author haque
+ *
+ */
+public enum FaxType implements StandardizedLiteralEnum {
+
+ /**
+ * (office, 0173-1#07-AAS754#001)
+ */
+ OFFICE("1"),
+
+ /**
+ * (secretary, 0173-1#07-AAS756#001)
+ */
+ SECRETARY("3"),
+
+ /**
+ * (home, 0173-1#07-AAS758#001)
+ */
+ HOME("5");
+
+ private String standardizedLiteral;
+
+ private FaxType(String standardizedLiteral) {
+ this.standardizedLiteral = standardizedLiteral;
+ }
+
+ @Override
+ public String getStandardizedLiteral() {
+ return standardizedLiteral;
+ }
+
+ @Override
+ public String toString() {
+ return standardizedLiteral;
+ }
+
+ public static FaxType fromString(String str) {
+ return StandardizedLiteralEnumHelper.fromLiteral(FaxType.class, str);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/MailType.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/MailType.java
new file mode 100644
index 0000000..7735288
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/MailType.java
@@ -0,0 +1,55 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.enums;
+
+import org.eclipse.basyx.submodel.metamodel.enumhelper.StandardizedLiteralEnum;
+import org.eclipse.basyx.submodel.metamodel.enumhelper.StandardizedLiteralEnumHelper;
+
+/**
+ * characterization of an e-mail address according to its location or usage
+ * as described in the AAS Digital Nameplate template
+ * @author haque
+ *
+ */
+public enum MailType implements StandardizedLiteralEnum {
+ // Enum values
+
+ /**
+ * (office, 0173-1#07-AAS754#001)
+ */
+ OFFICE("1"),
+
+ /**
+ * (secretary, 0173-1#07-AAS756#001)
+ */
+ SECRETARY("3"),
+
+ /**
+ * (substitute, 0173-1#07-AAS757#001)
+ */
+ SUBSTITUTE("4"),
+
+ /**
+ * (home, 0173-1#07-AAS758#001)
+ */
+ HOME("5");
+
+ private String standardizedLiteral;
+
+ private MailType(String standardizedLiteral) {
+ this.standardizedLiteral = standardizedLiteral;
+ }
+
+ @Override
+ public String getStandardizedLiteral() {
+ return standardizedLiteral;
+ }
+
+ @Override
+ public String toString() {
+ return standardizedLiteral;
+ }
+
+ public static MailType fromString(String str) {
+ return StandardizedLiteralEnumHelper.fromLiteral(MailType.class, str);
+ }
+
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/PhoneType.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/PhoneType.java
new file mode 100644
index 0000000..bdf5f0d
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/enums/PhoneType.java
@@ -0,0 +1,63 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.enums;
+
+import org.eclipse.basyx.submodel.metamodel.enumhelper.StandardizedLiteralEnum;
+import org.eclipse.basyx.submodel.metamodel.enumhelper.StandardizedLiteralEnumHelper;
+
+/**
+ * characterization of a telephone according to its location or usage
+ * as described in the AAS Digital Nameplate template
+ * @author haque
+ *
+ */
+public enum PhoneType implements StandardizedLiteralEnum {
+
+ /**
+ * (office, 0173-1#07-AAS754#001)
+ */
+ OFFICE("1"),
+
+ /**
+ * (office mobile, 0173-1#07-AAS755#001)
+ */
+ OFFICEMOBILE("2"),
+
+ /**
+ * (secretary, 0173-1#07-AAS756#001)
+ */
+ SECRETARY("3"),
+
+ /**
+ * (substitute, 0173-1#07-AAS757#001)
+ */
+ SUBSTITUTE("4"),
+
+ /**
+ * (home, 0173-1#07-AAS758#001)
+ */
+ HOME("5"),
+
+ /**
+ * (private mobile, 0173-1#07-AAS759#001)
+ */
+ PRIVATEMOBILE("6");;
+
+ private String standardizedLiteral;
+
+ private PhoneType(String standardizedLiteral) {
+ this.standardizedLiteral = standardizedLiteral;
+ }
+
+ @Override
+ public String getStandardizedLiteral() {
+ return standardizedLiteral;
+ }
+
+ @Override
+ public String toString() {
+ return standardizedLiteral;
+ }
+
+ public static PhoneType fromString(String str) {
+ return StandardizedLiteralEnumHelper.fromLiteral(PhoneType.class, str);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/helper/DigitalNameplateSubmodelHelper.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/helper/DigitalNameplateSubmodelHelper.java
new file mode 100644
index 0000000..dc44084
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/helper/DigitalNameplateSubmodelHelper.java
@@ -0,0 +1,18 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.helper;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+
+public class DigitalNameplateSubmodelHelper {
+
+ public static List<ISubmodelElement> getSubmodelElementsByIdPrefix(String prefix, Map<String, ISubmodelElement> elemMap) {
+ if (elemMap != null && elemMap.size() > 0) {
+ return elemMap.values().stream().filter(s -> s.getIdShort().startsWith(prefix)).collect(Collectors.toList());
+ }
+ return new ArrayList<ISubmodelElement>();
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Address.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Address.java
new file mode 100644
index 0000000..2c1cbd2
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Address.java
@@ -0,0 +1,556 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IMultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IProperty;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.helper.DigitalNameplateSubmodelHelper;
+
+/**
+ * Address as defined in the AAS Digital Nameplate Template document <br/>
+ * It is a submodel element collection which contains
+ * The standardized SMC Address contains information
+ * about address of a partner within the value chain.
+ *
+ * @author haque
+ *
+ */
+public class Address extends SubmodelElementCollection {
+ public static final String DEPARTMENTID = "Department";
+ public static final String STREETID = "Street";
+ public static final String ZIPCODEID = "Zipcode";
+ public static final String POBOXID = "POBox";
+ public static final String ZIPCODEOFPOBOXID = "ZipCodeOfPOBox";
+ public static final String CITYTOWNID = "CityTown";
+ public static final String STATECOUNTYID = "StateCounty";
+ public static final String NATIONALCODEID = "NationalCode";
+ public static final String VATNUMBERID = "VATNumber";
+ public static final String ADDRESSREMARKSID = "AddressRemarks";
+ public static final String ADDRESSOFADDITIONALLINKID = "AddressOfAdditionalLink";
+ public static final String PHONEPREFIX = "Phone";
+ public static final String FAXPREFIX = "Fax";
+ public static final String EMAILPREFIX = "Email";
+ public static final Reference SEMANTICID = new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAQ832#005", KeyType.IRDI));
+ public static final String ADDRESSIDSHORT = "Address";
+
+ private Address() {
+ }
+
+ /**
+ * Constructor with default idShort
+ * @param street
+ * @param zipCode
+ * @param cityTown
+ * @param nationalCode
+ */
+ public Address(MultiLanguageProperty street, MultiLanguageProperty zipCode, MultiLanguageProperty cityTown, MultiLanguageProperty nationalCode) {
+ this(ADDRESSIDSHORT, street, zipCode, cityTown, nationalCode);
+ }
+
+ /**
+ * Constructor with default idShort
+ * @param street
+ * @param zipCode
+ * @param cityTown
+ * @param nationalCode
+ */
+ public Address(LangString street, LangString zipCode, LangString cityTown, LangString nationalCode) {
+ this(ADDRESSIDSHORT, street, zipCode, cityTown, nationalCode);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param street
+ * @param zipCode
+ * @param cityTown
+ * @param nationalCode
+ */
+ public Address(String idShort, MultiLanguageProperty street, MultiLanguageProperty zipCode, MultiLanguageProperty cityTown, MultiLanguageProperty nationalCode) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setStreet(street);
+ setZipCode(zipCode);
+ setCityTown(cityTown);
+ setNationalCode(nationalCode);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param street
+ * @param zipCode
+ * @param cityTown
+ * @param nationalCode
+ */
+ public Address(String idShort, LangString street, LangString zipCode, LangString cityTown, LangString nationalCode) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setStreet(street);
+ setZipCode(zipCode);
+ setCityTown(cityTown);
+ setNationalCode(nationalCode);
+ }
+
+ /**
+ * Creates a Address SMC object from a map
+ *
+ * @param obj a Address SMC object as raw map
+ * @return a Address SMC object, that behaves like a facade for the given map
+ */
+ public static Address createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(Address.class, obj);
+ }
+
+ Address address = new Address();
+ address.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return address;
+ }
+
+ /**
+ * Creates a Address SMC object from a map without validation
+ *
+ * @param obj a Address SMC object as raw map
+ * @return a Address SMC object, that behaves like a facade for the given map
+ */
+ private static Address createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ Address address = new Address();
+ address.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return address;
+ }
+
+ /**
+ * Check whether all mandatory elements for Address SMC
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ Address address = createAsFacadeNonStrict(obj);
+ return SubmodelElementCollection.isValid(obj)
+ && address.getStreet() != null
+ && address.getZipCode() != null
+ && address.getCityTown() != null
+ && address.getNationalCode() != null;
+ }
+
+ /**
+ * Gets administrative section within an organisation where a business partner is located
+ * @return
+ */
+ public IMultiLanguageProperty getDepartment() {
+ return (IMultiLanguageProperty) getSubmodelElement(DEPARTMENTID);
+ }
+
+ /**
+ * Sets administrative section within an organisation where a business partner is located
+ * @param department {@link MultiLanguageProperty}
+ */
+ public void setDepartment(MultiLanguageProperty department) {
+ addSubModelElement(department);
+ }
+
+ /**
+ * Sets administrative section within an organisation where a business partner is located
+ * @param department {@link LangString}
+ */
+ public void setDepartment(LangString department) {
+ MultiLanguageProperty deptProp = new MultiLanguageProperty(DEPARTMENTID);
+ deptProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO127#003", IdentifierType.IRDI)));
+ deptProp.setValue(new LangStrings(department));
+ setDepartment(deptProp);
+ }
+
+ /**
+ * Gets street name and house number
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @return
+ */
+ public IMultiLanguageProperty getStreet() {
+ return (IMultiLanguageProperty) getSubmodelElement(STREETID);
+ }
+
+ /**
+ * Sets street name and house number
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param street {@link MultiLanguageProperty}
+ */
+ public void setStreet(MultiLanguageProperty street) {
+ addSubModelElement(street);
+ }
+
+ /**
+ * Sets street name and house number
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param street {@link LangString}
+ */
+ public void setStreet(LangString street) {
+ MultiLanguageProperty streetProp = new MultiLanguageProperty(STREETID);
+ streetProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO128#002", IdentifierType.IRDI)));
+ streetProp.setValue(new LangStrings(street));
+ setStreet(streetProp);
+ }
+
+ /**
+ * Gets ZIP code of address
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @return
+ */
+ public IMultiLanguageProperty getZipCode() {
+ return (IMultiLanguageProperty) getSubmodelElement(ZIPCODEID);
+ }
+
+ /**
+ * Sets ZIP code of address
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param zipCode {@link MultiLanguageProperty}
+ */
+ public void setZipCode(MultiLanguageProperty zipCode) {
+ addSubModelElement(zipCode);
+ }
+
+ /**
+ * Sets ZIP code of address
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param zipCode {@link LangString}
+ */
+ public void setZipCode(LangString zipCode) {
+ MultiLanguageProperty zipCodeProp = new MultiLanguageProperty(ZIPCODEID);
+ zipCodeProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO129#002", IdentifierType.IRDI)));
+ zipCodeProp.setValue(new LangStrings(zipCode));
+ setZipCode(zipCodeProp);
+ }
+
+ /**
+ * Gets P.O. box number
+ * @return
+ */
+ public IMultiLanguageProperty getPOBox() {
+ return (IMultiLanguageProperty) getSubmodelElement(POBOXID);
+ }
+
+ /**
+ * Sets P.O. box number
+ * @param poBox {@link MultiLanguageProperty}
+ */
+ public void setPOBox(MultiLanguageProperty poBox) {
+ addSubModelElement(poBox);
+ }
+
+ /**
+ * Sets P.O. box number
+ * @param poBox {@link LangString}
+ */
+ public void setPOBox(LangString poBox) {
+ MultiLanguageProperty poBoxProp = new MultiLanguageProperty(POBOXID);
+ poBoxProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO130#002", IdentifierType.IRDI)));
+ poBoxProp.setValue(new LangStrings(poBox));
+ setPOBox(poBoxProp);
+ }
+
+ /**
+ * Gets ZIP code of P.O. box address
+ * @return
+ */
+ public IMultiLanguageProperty getZipCodeOfPOBox() {
+ return (IMultiLanguageProperty) getSubmodelElement(ZIPCODEOFPOBOXID);
+ }
+
+ /**
+ * Sets ZIP code of P.O. box address
+ * @param zipCodeOfPoBox {@link MultiLanguageProperty}
+ */
+ public void setZipCodeOfPOBox(MultiLanguageProperty zipCodeOfPoBox) {
+ addSubModelElement(zipCodeOfPoBox);
+ }
+
+ /**
+ * Sets ZIP code of P.O. box address
+ * @param zipCodeOfPoBox {@link LangString}
+ */
+ public void setZipCodeOfPOBox(LangString zipCodeOfPoBox) {
+ MultiLanguageProperty zipCodeOfPoBoxProp = new MultiLanguageProperty(ZIPCODEOFPOBOXID);
+ zipCodeOfPoBoxProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO131#002", IdentifierType.IRDI)));
+ zipCodeOfPoBoxProp.setValue(new LangStrings(zipCodeOfPoBox));
+ setZipCodeOfPOBox(zipCodeOfPoBoxProp);
+ }
+
+ /**
+ * Gets town or city
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @return
+ */
+ public IMultiLanguageProperty getCityTown() {
+ return (IMultiLanguageProperty) getSubmodelElement(CITYTOWNID);
+ }
+
+ /**
+ * Sets town or city
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param cityTown {@link MultiLanguageProperty}
+ */
+ public void setCityTown(MultiLanguageProperty cityTown) {
+ addSubModelElement(cityTown);
+ }
+
+ /**
+ * Sets town or city
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param cityTown {@link LangString}
+ */
+ public void setCityTown(LangString cityTown) {
+ MultiLanguageProperty cityTownProp = new MultiLanguageProperty(CITYTOWNID);
+ cityTownProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO132#002", IdentifierType.IRDI)));
+ cityTownProp.setValue(new LangStrings(cityTown));
+ setCityTown(cityTownProp);
+ }
+
+ /**
+ * Gets federal state a part of a state
+ * @return
+ */
+ public IMultiLanguageProperty getStateCounty() {
+ return (IMultiLanguageProperty) getSubmodelElement(STATECOUNTYID);
+ }
+
+ /**
+ * Sets federal state a part of a state
+ * @param stateCounty {@link MultiLanguageProperty}
+ */
+ public void setStateCounty(MultiLanguageProperty stateCounty) {
+ addSubModelElement(stateCounty);
+ }
+
+ /**
+ * Sets federal state a part of a state
+ * @param stateCounty {@link LangString}
+ */
+ public void setStateCounty(LangString stateCounty) {
+ MultiLanguageProperty stateCountyProp = new MultiLanguageProperty(STATECOUNTYID);
+ stateCountyProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO133#002", IdentifierType.IRDI)));
+ stateCountyProp.setValue(new LangStrings(stateCounty));
+ setStateCounty(stateCountyProp);
+ }
+
+ /**
+ * Gets code of a country
+ * Note: Country codes defined accord. to DIN EN ISO 3166-1
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @return
+ */
+ public IMultiLanguageProperty getNationalCode() {
+ return (IMultiLanguageProperty) getSubmodelElement(NATIONALCODEID);
+ }
+
+ /**
+ * Sets code of a country
+ * Note: Country codes defined accord. to DIN EN ISO 3166-1
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param nationalCode {@link MultiLanguageProperty}
+ */
+ public void setNationalCode(MultiLanguageProperty nationalCode) {
+ addSubModelElement(nationalCode);
+ }
+
+ /**
+ * Sets code of a country
+ * Note: Country codes defined accord. to DIN EN ISO 3166-1
+ * Note: mandatory property according to EU Machine Directive 2006/42/EC.
+ * @param nationalCode {@link LangString}
+ */
+ public void setNationalCode(LangString nationalCode) {
+ MultiLanguageProperty nationalCodeProp = new MultiLanguageProperty(NATIONALCODEID);
+ nationalCodeProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO134#002", IdentifierType.IRDI)));
+ nationalCodeProp.setValue(new LangStrings(nationalCode));
+ setNationalCode(nationalCodeProp);
+ }
+
+ /**
+ * Gets VAT identification number of the business partner
+ * @return
+ */
+ public IMultiLanguageProperty getVatNumber() {
+ return (IMultiLanguageProperty) getSubmodelElement(VATNUMBERID);
+ }
+
+ /**
+ * Sets VAT identification number of the business partner
+ * @param vatNumber {@link MultiLanguageProperty}
+ */
+ public void setVatNumber(MultiLanguageProperty vatNumber) {
+ addSubModelElement(vatNumber);
+ }
+
+ /**
+ * Sets VAT identification number of the business partner
+ * @param vatNumber {@link LangString}
+ */
+ public void setVatNumber(LangString vatNumber) {
+ MultiLanguageProperty vatNumberProp = new MultiLanguageProperty(VATNUMBERID);
+ vatNumberProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO135#002", IdentifierType.IRDI)));
+ vatNumberProp.setValue(new LangStrings(vatNumber));
+ setVatNumber(vatNumberProp);
+ }
+
+ /**
+ * Gets plain text characterizing address information for which there is no property
+ * @return
+ */
+ public IMultiLanguageProperty getAddressRemarks() {
+ return (IMultiLanguageProperty) getSubmodelElement(ADDRESSREMARKSID);
+ }
+
+ /**
+ * Sets plain text characterizing address information for which there is no property
+ * @param addressRemarks {@link MultiLanguageProperty}
+ */
+ public void setAddressRemarks(MultiLanguageProperty addressRemarks) {
+ addSubModelElement(addressRemarks);
+ }
+
+ /**
+ * Sets plain text characterizing address information for which there is no property
+ * @param addressRemarks {@link LangString}
+ */
+ public void setAddressRemarks(LangString addressRemarks) {
+ MultiLanguageProperty addressRemarksProp = new MultiLanguageProperty(ADDRESSREMARKSID);
+ addressRemarksProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO202#003", IdentifierType.IRDI)));
+ addressRemarksProp.setValue(new LangStrings(addressRemarks));
+ setAddressRemarks(addressRemarksProp);
+ }
+
+ /**
+ * Gets web site address where information about the product or contact is given
+ * @return
+ */
+ public IProperty getAddressOfAdditionalLink() {
+ return (IProperty) getSubmodelElement(ADDRESSOFADDITIONALLINKID);
+ }
+
+ /**
+ * Sets web site address where information about the product or contact is given
+ * @param addressOfAdditionalLink {@link Property}
+ */
+ public void setAddressOfAdditionalLink(Property addressOfAdditionalLink) {
+ addSubModelElement(addressOfAdditionalLink);
+ }
+
+ /**
+ * Sets web site address where information about the product or contact is given
+ * @param addressOfAdditionalLink {@link String}
+ */
+ public void setAddressOfAdditionalLink(String addressOfAdditionalLink) {
+ Property addressOfAdditionalLinkProp = new Property(ADDRESSOFADDITIONALLINKID, PropertyValueTypeDef.String);
+ addressOfAdditionalLinkProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAQ326#002", IdentifierType.IRDI)));
+ addressOfAdditionalLinkProp.set(addressOfAdditionalLink);
+ setAddressOfAdditionalLink(addressOfAdditionalLinkProp);
+ }
+
+ /**
+ * Gets Phone number including type
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public List<Phone> getPhone() {
+ List<Phone> ret = new ArrayList<Phone>();
+ List<ISubmodelElement> elements = DigitalNameplateSubmodelHelper.getSubmodelElementsByIdPrefix(PHONEPREFIX, getSubmodelElements());
+
+ for (ISubmodelElement element: elements) {
+ ret.add(Phone.createAsFacade((Map<String, Object>) element));
+ }
+ return ret;
+ }
+
+ /**
+ * Sets Phone number including type
+ * @param phone
+ */
+ public void setPhone(List<Phone> phones) {
+ if (phones != null && phones.size() > 0) {
+ for (Phone phone : phones) {
+ addSubModelElement(phone);
+ }
+ }
+ }
+
+ /**
+ * Gets fax number including type
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public List<Fax> getFax() {
+ List<Fax> ret = new ArrayList<Fax>();
+ List<ISubmodelElement> elements = DigitalNameplateSubmodelHelper.getSubmodelElementsByIdPrefix(FAXPREFIX, getSubmodelElements());
+
+ for (ISubmodelElement element: elements) {
+ ret.add(Fax.createAsFacade((Map<String, Object>) element));
+ }
+ return ret;
+ }
+
+ /**
+ * Sets fax number including type
+ * @param fax
+ */
+ public void setFax(List<Fax> faxes) {
+ if (faxes != null && faxes.size() > 0) {
+ for (Fax fax : faxes) {
+ addSubModelElement(fax);
+ }
+ }
+ }
+
+ /**
+ * Gets E-mail address and encryption method
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public List<Email> getEmail() {
+ List<Email> ret = new ArrayList<Email>();
+ List<ISubmodelElement> elements = DigitalNameplateSubmodelHelper.getSubmodelElementsByIdPrefix(EMAILPREFIX, getSubmodelElements());
+
+ for (ISubmodelElement element: elements) {
+ ret.add(Email.createAsFacade((Map<String, Object>) element));
+ }
+ return ret;
+ }
+
+ /**
+ * Sets E-mail address and encryption method
+ * @param email
+ */
+ public void setEmail(List<Email> emails) {
+ if (emails != null && emails.size() > 0) {
+ for (Email email : emails) {
+ addSubModelElement(email);
+ }
+ }
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Email.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Email.java
new file mode 100644
index 0000000..ff223fd
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Email.java
@@ -0,0 +1,220 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address;
+
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IMultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IProperty;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.enums.MailType;
+
+/**
+ * Email as defined in the AAS Digital Nameplate Template document <br/>
+ * It is a submodel element collection which contains email address and encryption method
+ *
+ * @author haque
+ *
+ */
+public class Email extends SubmodelElementCollection {
+ public static final String EMAILADDRESSID = "EmailAddress";
+ public static final String PUBLICKEYID = "PublicKey";
+ public static final String TYPEOFEMAILADDRESSID = "TypeOfEmailAddress";
+ public static final String TYPEOFPUBLICKEYID = "TypeOfPublickKey";
+ public static final Reference SEMANTICID = new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAQ836#005", KeyType.IRDI));
+
+ private Email() {
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param emailAddress
+ */
+ public Email(String idShort, Property emailAddress) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setEmailAddress(emailAddress);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param emailAddress
+ */
+ public Email(String idShort, String emailAddress) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setEmailAddress(emailAddress);
+ }
+
+ /**
+ * Creates a Email SMC object from a map
+ *
+ * @param obj a Email SMC object as raw map
+ * @return a Email SMC object, that behaves like a facade for the given map
+ */
+ public static Email createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(Email.class, obj);
+ }
+
+ Email email = new Email();
+ email.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return email;
+ }
+
+ /**
+ * Creates a Email SMC object from a map without validation
+ *
+ * @param obj a Email SMC object as raw map
+ * @return a Email SMC object, that behaves like a facade for the given map
+ */
+ private static Email createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ Email email = new Email();
+ email.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return email;
+ }
+
+ /**
+ * Check whether all mandatory elements for Email SMC
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ return SubmodelElementCollection.isValid(obj)
+ && createAsFacadeNonStrict(obj).getEmailAddress() != null;
+ }
+
+ /**
+ * sets electronic mail address of a business partner
+ * @param emailAddress Property
+ */
+ public void setEmailAddress(Property emailAddress) {
+ addSubModelElement(emailAddress);
+ }
+
+ /**
+ * sets electronic mail address of a business partner
+ * @param emailAddress String
+ */
+ public void setEmailAddress(String emailAddress) {
+ Property emailProp = new Property(EMAILADDRESSID, PropertyValueTypeDef.String);
+ emailProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO198#002", IdentifierType.IRDI)));
+ emailProp.set(emailAddress);
+ setEmailAddress(emailProp);
+ }
+
+ /**
+ * gets electronic mail address of a business partner
+ * @return
+ */
+ public IProperty getEmailAddress() {
+ return (IProperty) getSubmodelElement(EMAILADDRESSID);
+ }
+
+ /**
+ * sets public part of an unsymmetrical key pair to sign or encrypt text or messages
+ * @param key {@link MultiLanguageProperty}
+ */
+ public void setPublicKey(MultiLanguageProperty key) {
+ addSubModelElement(key);
+ }
+
+ /**
+ * sets public part of an unsymmetrical key pair to sign or encrypt text or messages
+ * @param key {@link LangString}
+ */
+ public void setPublicKey(LangString key) {
+ MultiLanguageProperty publicKey = new MultiLanguageProperty(PUBLICKEYID);
+ publicKey.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO200#002", IdentifierType.IRDI)));
+ publicKey.setValue(new LangStrings(key));
+ setPublicKey(publicKey);
+ }
+
+ /**
+ * gets public part of an unsymmetrical key pair to sign or encrypt text or messages
+ * @return
+ */
+ public IMultiLanguageProperty getPublicKey() {
+ return (IMultiLanguageProperty) getSubmodelElement(PUBLICKEYID);
+ }
+
+ /**
+ * sets characterization of an e-mail address according to its location or usage
+ * enumeration
+ * @param type {@link Property}
+ */
+ public void setTypeOfEmailAddress(Property type) {
+ addSubModelElement(type);
+ }
+
+ /**
+ * sets characterization of an e-mail address according to its location or usage
+ * enumeration
+ * @param type {@link MailType}
+ */
+ public void setTypeOfEmailAddress(MailType type) {
+ Property mailTypeProp = new Property(TYPEOFEMAILADDRESSID, PropertyValueTypeDef.String);
+ mailTypeProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO199#003", IdentifierType.IRDI)));
+ mailTypeProp.set(type.toString());
+ setTypeOfEmailAddress(mailTypeProp);
+ }
+
+ /**
+ * gets characterization of an e-mail address according to its location or usage
+ * enumeration
+ * @return
+ */
+ public IProperty getTypeOfEmailAddress() {
+ return (IProperty) getSubmodelElement(TYPEOFEMAILADDRESSID);
+ }
+
+ /**
+ * sets characterization of a public key according to its encryption process
+ * @param key {@link MultiLanguageProperty}
+ */
+ public void setTypeOfPublicKey(MultiLanguageProperty key) {
+ addSubModelElement(key);
+ }
+
+ /**
+ * sets characterization of a public key according to its encryption process
+ * @param key {@link LangString}
+ */
+ public void setTypeOfPublicKey(LangString key) {
+ MultiLanguageProperty typeOfPublicKey = new MultiLanguageProperty(TYPEOFPUBLICKEYID);
+ typeOfPublicKey.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO201#002", IdentifierType.IRDI)));
+ typeOfPublicKey.setValue(new LangStrings(key));
+ setTypeOfPublicKey(typeOfPublicKey);
+ }
+
+ /**
+ * gets characterization of a public key according to its encryption process
+ * @return
+ */
+ public IMultiLanguageProperty getTypeOfPublicKey() {
+ return (IMultiLanguageProperty) getSubmodelElement(TYPEOFPUBLICKEYID);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Fax.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Fax.java
new file mode 100644
index 0000000..431d50a
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Fax.java
@@ -0,0 +1,164 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address;
+
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IMultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IProperty;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.enums.FaxType;
+
+/**
+ * Fax as defined in the AAS Digital Nameplate Template document <br/>
+ * It is a submodel element collection which contains a fax number including type
+ *
+ * @author haque
+ *
+ */
+public class Fax extends SubmodelElementCollection {
+ public static final String FAXNUMBERID = "FaxNumber";
+ public static final String TYPEOFFAXID = "TypeOfFaxNumber";
+ public static final Reference SEMANTICID = new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAQ834#005", KeyType.IRDI));
+
+ private Fax() {
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param faxNumber
+ */
+ public Fax(String idShort, LangString faxNumber) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setFaxNumber(faxNumber);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param faxNumber
+ */
+ public Fax(String idShort, MultiLanguageProperty faxNumber) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setFaxNumber(faxNumber);
+ }
+
+ /**
+ * Creates a Fax SMC object from a map
+ *
+ * @param obj a Fax SMC object as raw map
+ * @return a Fax SMC object, that behaves like a facade for the given map
+ */
+ public static Fax createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(Fax.class, obj);
+ }
+
+ Fax fax = new Fax();
+ fax.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return fax;
+ }
+
+ /**
+ * Creates a Fax SMC object from a map without validation
+ *
+ * @param obj a Fax SMC object as raw map
+ * @return a Fax SMC object, that behaves like a facade for the given map
+ */
+ private static Fax createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ Fax fax = new Fax();
+ fax.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return fax;
+ }
+
+ /**
+ * Check whether all mandatory elements for Fax SMC
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ return SubmodelElementCollection.isValid(obj)
+ && createAsFacadeNonStrict(obj).getFaxNumber() != null;
+ }
+
+ /**
+ * Sets complete telephone number to be called to reach a
+ * business partner's fax machine
+ * @param faxNumber {@link MultiLanguageProperty}
+ */
+ public void setFaxNumber(MultiLanguageProperty faxNumber) {
+ addSubModelElement(faxNumber);
+ }
+
+ /**
+ * Sets complete telephone number to be called to reach a
+ * business partner's fax machine
+ * @param faxNumber {@link LangString}
+ */
+ public void setFaxNumber(LangString faxNumber) {
+ MultiLanguageProperty faxProp = new MultiLanguageProperty(FAXNUMBERID);
+ faxProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO195#002", IdentifierType.IRDI)));
+ faxProp.setValue(new LangStrings(faxNumber));
+ setFaxNumber(faxProp);
+ }
+
+ /**
+ * Sets characterization of the fax according its location or usage
+ * @param type {@link Property}
+ */
+ public void setTypeOfFaxNumber(Property type) {
+ addSubModelElement(type);
+ }
+
+ /**
+ * Sets characterization of the fax according its location or usage
+ * @param type {@link FaxType}
+ */
+ public void setTypeOfFaxNumber(FaxType type) {
+ Property faxTypeProp = new Property(TYPEOFFAXID, PropertyValueTypeDef.String);
+ faxTypeProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO196#003", IdentifierType.IRDI)));
+ faxTypeProp.set(type.toString());
+ setTypeOfFaxNumber(faxTypeProp);
+ }
+
+ /**
+ * Gets characterization of the fax according its location or usage
+ * @return
+ */
+ public IProperty getTypeOfFaxNumber() {
+ return (IProperty) getSubmodelElement(TYPEOFFAXID);
+ }
+
+ /**
+ * Gets complete telephone number to be called to reach a
+ * business partner's fax machine
+ * @return
+ */
+ public IMultiLanguageProperty getFaxNumber() {
+ return (IMultiLanguageProperty) getSubmodelElement(FAXNUMBERID);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Phone.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Phone.java
new file mode 100644
index 0000000..45b6a0b
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/address/Phone.java
@@ -0,0 +1,161 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address;
+
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IMultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IProperty;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.enums.PhoneType;
+
+/**
+ * Phone as defined in the AAS Digital Nameplate Template document <br/>
+ * It is a submodel element collection which contains a phone number including type
+ *
+ * @author haque
+ *
+ */
+public class Phone extends SubmodelElementCollection {
+ public static final String TELEPHONENUMBERID = "TelephoneNumber";
+ public static final String TYPEOFTELEPHONEID = "TypeOfTelephone";
+ public static final String PHONEID = "Phone";
+ public static final Reference SEMANTICID = new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAQ833#005", KeyType.IRDI));
+
+ private Phone() {}
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param telephoneNumber
+ */
+ public Phone(String idShort, LangString telephoneNumber) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setTelephoneNumber(telephoneNumber);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ * @param idShort
+ * @param telephoneNumber
+ */
+ public Phone(String idShort, MultiLanguageProperty telephoneNumber) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setTelephoneNumber(telephoneNumber);
+ }
+
+ /**
+ * Creates a Phone SMC object from a map
+ *
+ * @param obj a Phone SMC object as raw map
+ * @return a Phone SMC object, that behaves like a facade for the given map
+ */
+ public static Phone createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(Phone.class, obj);
+ }
+
+ Phone phone = new Phone();
+ phone.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return phone;
+ }
+
+ /**
+ * Creates a Phone SMC object from a map without checking validity
+ *
+ * @param obj a Phone SMC object as raw map
+ * @return a Phone SMC object, that behaves like a facade for the given map
+ */
+ private static Phone createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ Phone phone = new Phone();
+ phone.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return phone;
+ }
+
+ /**
+ * Check whether all mandatory elements for Phone SMC
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ return SubmodelElementCollection.isValid(obj)
+ && createAsFacadeNonStrict(obj).getTelephoneNumber() != null;
+ }
+
+ /**
+ * Sets complete telephone number to be called to reach a business partner
+ * @param telephoneNumber {@link MultiLanguageProperty}
+ */
+ public void setTelephoneNumber(MultiLanguageProperty telephoneNumber) {
+ addSubModelElement(telephoneNumber);
+ }
+
+ /**
+ * Sets complete telephone number to be called to reach a business partner
+ * @param telephoneNumber {@link LangString}
+ */
+ public void setTelephoneNumber(LangString telephoneNumber) {
+ MultiLanguageProperty phoneProp = new MultiLanguageProperty(TELEPHONENUMBERID);
+ phoneProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO136#002", IdentifierType.IRDI)));
+ phoneProp.setValue(new LangStrings(telephoneNumber));
+ setTelephoneNumber(phoneProp);
+ }
+
+ /**
+ * Sets characterization of a telephone according to its location or usage enumeration
+ * @param type {@link Property}
+ */
+ public void setTypeOfTelephone(Property type) {
+ addSubModelElement(type);
+ }
+
+ /**
+ * Sets characterization of a telephone according to its location or usage enumeration
+ * @param type {@link PhoneType}
+ */
+ public void setTypeOfTelephone(PhoneType type) {
+ Property phoneTypeProp = new Property(TYPEOFTELEPHONEID, PropertyValueTypeDef.String);
+ phoneTypeProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO137#003", IdentifierType.IRDI)));
+ phoneTypeProp.set(type.toString());
+ setTypeOfTelephone(phoneTypeProp);
+ }
+
+ /**
+ * Gets characterization of a telephone according to its location or usage enumeration
+ * @return
+ */
+ public IProperty getTypeOfTelephone() {
+ return (IProperty) getSubmodelElement(TYPEOFTELEPHONEID);
+ }
+
+ /**
+ * Gets complete telephone number to be called to reach a business partner
+ * @return
+ */
+ public IMultiLanguageProperty getTelephoneNumber() {
+ return (IMultiLanguageProperty) getSubmodelElement(TELEPHONENUMBERID);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/AssetSpecificProperties.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/AssetSpecificProperties.java
new file mode 100644
index 0000000..5125de5
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/AssetSpecificProperties.java
@@ -0,0 +1,122 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.types.digitalnameplate.helper.DigitalNameplateSubmodelHelper;
+
+/**
+ * AssetSpecificProperties as defined in the AAS Digital Nameplate Template document <br/>
+ * It is a submodel element collection which contains collection of guideline specific properties
+ *
+ * @author haque
+ *
+ */
+public class AssetSpecificProperties extends SubmodelElementCollection {
+ public static final String ASSETSPECIFICPROPERTIESID = "AssetSpecificProperties";
+ public static final String GUIDELINESPECIFICPROPERTYPREFIX = "GuidelineSpecificProperties";
+ public static final Reference SEMANTICID = new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "https://admin-shell.io/zvei/nameplate/1/0/Nameplate/AssetSpecificProperties", KeyType.IRI));
+
+ private AssetSpecificProperties() {
+ }
+
+ /**
+ * Constructor with default idShort
+ * @param guidelineSpecificProperties
+ */
+ public AssetSpecificProperties(List<GuidelineSpecificProperties> guidelineSpecificProperties) {
+ this (ASSETSPECIFICPROPERTIESID, guidelineSpecificProperties);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ *
+ * @param idShort
+ * @param guidelineSpecificProperties
+ */
+ public AssetSpecificProperties(String idShort, List<GuidelineSpecificProperties> guidelineSpecificProperties) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setGuidelineSpecificProperties(guidelineSpecificProperties);
+ }
+
+ /**
+ * Creates a AssetSpecificProperties SMC object from a map
+ *
+ * @param obj a AssetSpecificProperties SMC object as raw map
+ * @return a AssetSpecificProperties SMC object, that behaves like a facade for the given map
+ */
+ public static AssetSpecificProperties createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(AssetSpecificProperties.class, obj);
+ }
+
+ AssetSpecificProperties assetSpecificProperties = new AssetSpecificProperties();
+ assetSpecificProperties.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return assetSpecificProperties;
+ }
+
+ /**
+ * Creates a AssetSpecificProperties SMC object from a map without validation
+ *
+ * @param obj a AssetSpecificProperties SMC object as raw map
+ * @return a AssetSpecificProperties SMC object, that behaves like a facade for the given map
+ */
+ private static AssetSpecificProperties createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ AssetSpecificProperties assetSpecificProperties = new AssetSpecificProperties();
+ assetSpecificProperties.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return assetSpecificProperties;
+ }
+
+ /**
+ * Check whether all mandatory elements for AssetSpecificProperties SMC
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ AssetSpecificProperties props = createAsFacadeNonStrict(obj);
+
+ return SubmodelElementCollection.isValid(obj)
+ && props.getGuidelineSpecificProperties() != null
+ && props.getGuidelineSpecificProperties().size() > 0;
+ }
+
+ public void setGuidelineSpecificProperties(List<GuidelineSpecificProperties> properties) {
+ if (properties != null & properties.size() > 0) {
+ for (GuidelineSpecificProperties prop : properties) {
+ addSubModelElement(prop);
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<GuidelineSpecificProperties> getGuidelineSpecificProperties() {
+ List<GuidelineSpecificProperties> ret = new ArrayList<GuidelineSpecificProperties>();
+ List<ISubmodelElement> elements = DigitalNameplateSubmodelHelper.getSubmodelElementsByIdPrefix(GUIDELINESPECIFICPROPERTYPREFIX, getSubmodelElements());
+
+ for (ISubmodelElement element: elements) {
+ ret.add(GuidelineSpecificProperties.createAsFacade((Map<String, Object>) element));
+ }
+ return ret;
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/GuidelineSpecificProperties.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/GuidelineSpecificProperties.java
new file mode 100644
index 0000000..ad7db0e
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/GuidelineSpecificProperties.java
@@ -0,0 +1,174 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IProperty;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+
+/**
+ * GuidelineSpecificProperties as defined in the AAS Digital Nameplate Template document <br/>
+ * It is a submodel element collection which contains Asset specific nameplate
+ * information required by guideline, stipulation or legislation.
+ *
+ * @author haque
+ *
+ */
+public class GuidelineSpecificProperties extends SubmodelElementCollection {
+ public static final String GUIDELINEFORCONFORMITYDECLARATIONID = "GuidelineForConformityDeclaration";
+ public static final Reference SEMANTICID = new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "https://adminshell.io/zvei/nameplate/1/0/Nameplate/AssetSpecificProperties/GuidelineSpecificProperties", KeyType.IRI));
+
+ private GuidelineSpecificProperties() {
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ *
+ * @param idShort
+ * @param declaration
+ * @param arbitrary
+ */
+ public GuidelineSpecificProperties(String idShort, Property declaration, List<Property> arbitrary) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setGuidelineForConformityDeclaration(declaration);
+ setArbitrary(arbitrary);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ *
+ * @param idShort
+ * @param declaration
+ * @param arbitrary
+ */
+ public GuidelineSpecificProperties(String idShort, String declaration, List<Property> arbitrary) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setGuidelineForConformityDeclaration(declaration);
+ setArbitrary(arbitrary);
+ }
+
+ /**
+ * Creates a GuidelineSpecificProperties SMC object from a map
+ *
+ * @param obj a GuidelineSpecificProperties SMC object as raw map
+ * @return a GuidelineSpecificProperties SMC object, that behaves like a facade for the given map
+ */
+ public static GuidelineSpecificProperties createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(GuidelineSpecificProperties.class, obj);
+ }
+
+ GuidelineSpecificProperties guidelineSpecificProperties = new GuidelineSpecificProperties();
+ guidelineSpecificProperties.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return guidelineSpecificProperties;
+ }
+
+ /**
+ * Creates a GuidelineSpecificProperties SMC object from a map without validation
+ *
+ * @param obj a GuidelineSpecificProperties SMC object as raw map
+ * @return a GuidelineSpecificProperties SMC object, that behaves like a facade for the given map
+ */
+ private static GuidelineSpecificProperties createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ GuidelineSpecificProperties guidelineSpecificProperties = new GuidelineSpecificProperties();
+ guidelineSpecificProperties.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return guidelineSpecificProperties;
+ }
+
+ /**
+ * Check whether all mandatory elements for GuidelineSpecificProperties SMC
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ GuidelineSpecificProperties props = createAsFacadeNonStrict(obj);
+
+ return SubmodelElementCollection.isValid(obj)
+ && props.getGuidelineForConformityDeclaration() != null
+ && props.getArbitrary() != null
+ && props.getArbitrary().size() > 0;
+ }
+
+ /**
+ * sets guideline, stipulation or legislation used for determining conformity
+ *
+ * @param declaration {@link Property}
+ */
+ public void setGuidelineForConformityDeclaration(Property declaration) {
+ addSubModelElement(declaration);
+ }
+
+ /**
+ * sets guideline, stipulation or legislation used for determining conformity
+ *
+ * @param declaration {@link String}
+ */
+ public void setGuidelineForConformityDeclaration(String declaration) {
+ Property declarationProp = new Property(GUIDELINEFORCONFORMITYDECLARATIONID, PropertyValueTypeDef.String);
+ declarationProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "0173-1#02-AAO856#002", IdentifierType.IRDI)));
+ declarationProp.set(declaration);
+ setGuidelineForConformityDeclaration(declarationProp);
+ }
+
+ /**
+ * gets sets guideline, stipulation or legislation used for determining conformity
+ *
+ * @return
+ */
+ public IProperty getGuidelineForConformityDeclaration() {
+ return (IProperty) getSubmodelElement(GUIDELINEFORCONFORMITYDECLARATIONID);
+ }
+
+ /**
+ * Gets arbitrary, representing information required by further standards
+ * @return
+ */
+ public List<IProperty> getArbitrary() {
+ List<IProperty> ret = new ArrayList<IProperty>();
+ Map<String, ISubmodelElement> elemMap = getSubmodelElements();
+ if (elemMap != null && elemMap.size() > 0) {
+ for (Map.Entry<String, ISubmodelElement> singleElement: elemMap.entrySet()) {
+ if (!singleElement.getKey().equals(GUIDELINEFORCONFORMITYDECLARATIONID)) {
+ ret.add((IProperty) singleElement.getValue());
+ }
+ }
+ }
+ return ret;
+ }
+
+ /**
+ * Sets arbitrary, representing information required by further standards
+ * @param arbitraries
+ */
+ public void setArbitrary(List<Property> arbitraries) {
+ if (arbitraries != null & arbitraries.size() > 0) {
+ for (Property prop : arbitraries) {
+ addSubModelElement(prop);
+ }
+ }
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/markings/Marking.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/markings/Marking.java
new file mode 100644
index 0000000..48a1829
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/markings/Marking.java
@@ -0,0 +1,206 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.markings;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IFile;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.dataelement.IProperty;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.File;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.helper.DigitalNameplateSubmodelHelper;
+
+/**
+ * Marking as defined in the AAS Digital Nameplate Template document <br/>
+ * It is a submodel element collection which
+ * contains information about the marking labelled on the device
+ *
+ * @author haque
+ *
+ */
+public class Marking extends SubmodelElementCollection {
+ public static final String MARKINGNAMEID = "MarkingName";
+ public static final String MARKINGFILEID = "MarkingFile";
+ public static final String MARKINGADDITIONALTEXTPREFIX = "MarkingAdditionalText";
+ public static final Reference SEMANTICID = new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "https://admin-shell.io/zvei/nameplate/0/1/Nameplate/Markings/Marking", KeyType.IRI));
+
+ private Marking() {
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ *
+ * @param idShort
+ * @param markingName
+ * @param markingFile
+ */
+ public Marking(String idShort, Property markingName, File markingFile) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setMarkingAdditionalText(new ArrayList<Property>());
+ setMarkingName(markingName);
+ setMarkingFile(markingFile);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ *
+ * @param idShort
+ * @param markingName
+ * @param markingFile
+ */
+ public Marking(String idShort, String markingName, File markingFile) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setMarkingAdditionalText(new ArrayList<Property>());
+ setMarkingName(markingName);
+ setMarkingFile(markingFile);
+ }
+
+ /**
+ * Creates a Marking SMC object from a map
+ *
+ * @param obj a Marking SMC object as raw map
+ * @return a Marking SMC object, that behaves like a facade for the given map
+ */
+ public static Marking createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(Marking.class, obj);
+ }
+
+ Marking marking = new Marking();
+ marking.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return marking;
+ }
+
+ /**
+ * Creates a Marking SMC object from a map without validation
+ *
+ * @param obj a Marking SMC object as raw map
+ * @return a Marking SMC object, that behaves like a facade for the given map
+ */
+ private static Marking createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ Marking marking = new Marking();
+ marking.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return marking;
+ }
+
+ /**
+ * Check whether all mandatory elements for Marking SMC
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ Marking marking = createAsFacadeNonStrict(obj);
+ return SubmodelElementCollection.isValid(obj)
+ && marking.getMarkingName() != null
+ && marking.getMarkingFile() != null;
+ }
+
+ /**
+ * sets common name of the marking
+ *
+ * Note: CE marking is declared as mandatory according to EU
+ * Machine Directive 2006/42/EC.
+ * @param markingName
+ */
+ public void setMarkingName(Property markingName) {
+ addSubModelElement(markingName);
+ }
+
+ /**
+ * sets common name of the marking
+ *
+ * Note: CE marking is declared as mandatory according to EU
+ * Machine Directive 2006/42/EC.
+ * @param markingName
+ */
+ public void setMarkingName(String markingName) {
+ Property markingNameProp = new Property(MARKINGNAMEID, PropertyValueTypeDef.String);
+ markingNameProp.setSemanticID(new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "https://admin-shell.io/zvei/nameplate/1/0/Nameplate/Markings/Marking/MarkingName", IdentifierType.IRDI)));
+ markingNameProp.set(markingName);
+ setMarkingName(markingNameProp);
+ }
+
+ /**
+ * gets common name of the marking
+ *
+ * Note: CE marking is declared as mandatory according to EU
+ * Machine Directive 2006/42/EC.
+ * @return
+ */
+ public IProperty getMarkingName() {
+ return (IProperty) getSubmodelElement(MARKINGNAMEID);
+ }
+
+ /**
+ * sets picture of the marking
+ *
+ * Note: CE marking is declared as mandatory according to EU
+ * Machine Directive 2006/42/EC.
+ * @param markingFile
+ */
+ public void setMarkingFile(File markingFile) {
+ addSubModelElement(markingFile);
+ }
+
+ /**
+ * gets picture of the marking
+ *
+ * Note: CE marking is declared as mandatory according to EU
+ * Machine Directive 2006/42/EC.
+ * @return
+ */
+ public IFile getMarkingFile() {
+ return (IFile) getSubmodelElement(MARKINGFILEID);
+ }
+
+ /**
+ * sets where applicable, additional information on the marking in
+ * plain text
+ * @param markingAdditionalText
+ */
+ public void setMarkingAdditionalText(List<Property> markingAdditionalText) {
+ if (markingAdditionalText != null && markingAdditionalText.size() > 0) {
+ for (Property markingAdditionalSingle : markingAdditionalText) {
+ addSubModelElement(markingAdditionalSingle);
+ }
+ }
+ }
+
+ /**
+ * gets where applicable, additional information on the marking in
+ * plain text
+ * @return
+ */
+ public List<IProperty> getMarkingAdditionalText() {
+ List<IProperty> ret = new ArrayList<IProperty>();
+ List<ISubmodelElement> elements = DigitalNameplateSubmodelHelper.getSubmodelElementsByIdPrefix(MARKINGADDITIONALTEXTPREFIX, getSubmodelElements());
+
+ for (ISubmodelElement element: elements) {
+ ret.add((IProperty) element);
+ }
+ return ret;
+ }
+}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/markings/Markings.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/markings/Markings.java
new file mode 100644
index 0000000..69cc9a7
--- /dev/null
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/types/digitalnameplate/submodelelementcollections/markings/Markings.java
@@ -0,0 +1,137 @@
+package org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.markings;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyType;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.facade.SubmodelElementMapCollectionConverter;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.SubmodelElementCollection;
+import org.eclipse.basyx.submodel.types.digitalnameplate.helper.DigitalNameplateSubmodelHelper;
+
+/**
+ * Markings as defined in the AAS Digital Nameplate Template document <br/>
+ * It is a submodel element collection which contains a collection of product markings
+ *
+ * Note: CE marking is declared as mandatory according to EU Machine Directive 2006/42/EC.
+ *
+ * @author haque
+ *
+ */
+public class Markings extends SubmodelElementCollection {
+ public static final String IDSHORT = "Markings";
+ public static final Reference SEMANTICID = new Reference(new Key(KeyElements.CONCEPTDESCRIPTION, false, "https://admin-shell.io/zvei/nameplate/1/0/Nameplate/Markings", KeyType.IRI));
+ public static final String MARKINGPREFIX = "Marking";
+
+ private Markings() {
+ }
+
+ /**
+ * Constructor with default idShort
+ * @param markings
+ */
+ public Markings(List<Marking> markings) {
+ this(IDSHORT, markings);
+ }
+
+ /**
+ * Constructor with mandatory attributes
+ *
+ * @param idShort
+ * @param markings
+ */
+ public Markings(String idShort, List<Marking> markings) {
+ super(idShort);
+ setSemanticID(SEMANTICID);
+ setMarking(markings);
+ }
+
+ /**
+ * Creates a Markings SMC object from a map
+ *
+ * @param obj a Markings SMC object as raw map
+ * @return a Markings SMC object, that behaves like a facade for the given map
+ */
+ public static Markings createAsFacade(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ if (!isValid(obj)) {
+ throw new MetamodelConstructionException(Markings.class, obj);
+ }
+
+ Markings markings = new Markings();
+ markings.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return markings;
+ }
+
+ /**
+ * Creates a Markings SMC object from a map without validation
+ *
+ * @param obj a Markings SMC object as raw map
+ * @return a Markings SMC object, that behaves like a facade for the given map
+ */
+ private static Markings createAsFacadeNonStrict(Map<String, Object> obj) {
+ if (obj == null) {
+ return null;
+ }
+
+ Markings markings = new Markings();
+ markings.setMap((Map<String, Object>)SubmodelElementMapCollectionConverter.mapToSmECollection(obj));
+ return markings;
+ }
+
+ /**
+ * Check whether all mandatory elements for Markings SMC
+ * exist in the map
+ *
+ * @param obj
+ *
+ * @return true/false
+ */
+ public static boolean isValid(Map<String, Object> obj) {
+ Markings markings = createAsFacadeNonStrict(obj);
+ return SubmodelElementCollection.isValid(obj)
+ && markings.getMarking() != null
+ && markings.getMarking().size() > 0;
+ }
+
+ /**
+ * sets information about the marking labelled on the device
+
+ * Note: CE marking is declared as mandatory according to EU Machine
+ * Directive 2006/42/EC.
+ * @param markingName
+ */
+ public void setMarking(List<Marking> markings) {
+ if (markings != null && markings.size() > 0) {
+ for (Marking prop : markings) {
+ addSubModelElement(prop);
+ }
+ }
+ }
+
+ /**
+ * gets information about the marking labelled on the device
+
+ * Note: CE marking is declared as mandatory according to EU Machine
+ * Directive 2006/42/EC.
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public List<Marking> getMarking() {
+ List<Marking> ret = new ArrayList<Marking>();
+ List<ISubmodelElement> elements = DigitalNameplateSubmodelHelper.getSubmodelElementsByIdPrefix(MARKINGPREFIX, getSubmodelElements());
+
+ for (ISubmodelElement element: elements) {
+ ret.add(Marking.createAsFacade((Map<String, Object>) element));
+ }
+ return ret;
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/TestDigitalNameplateSubmodel.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/TestDigitalNameplateSubmodel.java
new file mode 100644
index 0000000..bff74fb
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/TestDigitalNameplateSubmodel.java
@@ -0,0 +1,153 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.map.SubModel;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Address;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Fax;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties.AssetSpecificProperties;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.markings.Marking;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.markings.Markings;
+import org.eclipse.basyx.submodel.types.digitalnameplate.DigitalNameplateSubmodel;
+import org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.address.TestAddress;
+import org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties.TestAssetSpecificProperties;
+import org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.markings.TestMarking;
+import org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.markings.TestMarkings;
+import org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests createAsFacade and isValid of {@link DigitalNameplateSubmodel} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestDigitalNameplateSubmodel {
+ public static MultiLanguageProperty manufacturerName = new MultiLanguageProperty(DigitalNameplateSubmodel.MANUFACTURERNAMEID);
+ public static MultiLanguageProperty designation = new MultiLanguageProperty(DigitalNameplateSubmodel.MANUFACTURERPRODUCTDESIGNATIONID);
+ public static Address address = new Address(TestAddress.street, TestAddress.zipCode, TestAddress.cityTown, TestAddress.nationalCode);
+ public static MultiLanguageProperty productFamily = new MultiLanguageProperty(DigitalNameplateSubmodel.MANUFACTURERPRODUCTFAMILYID);
+ public static Property serialNumber = new Property(DigitalNameplateSubmodel.SERIALNUMBERID, PropertyValueTypeDef.String);
+ public static Property yearsOfConstruction = new Property(DigitalNameplateSubmodel.YEARSOFCONSTRUCTIONID, PropertyValueTypeDef.String);
+ public static Markings markings;
+ public static AssetSpecificProperties assetSpecificProperties = new AssetSpecificProperties(Collections.singletonList(TestAssetSpecificProperties.guidelineSpecificProperties));
+
+ private Map<String, Object> submodelMap = new HashMap<String, Object>();
+
+ @Before
+ public void buildFax() {
+ manufacturerName.setValue(new LangStrings(new LangString("DE", "Test Manufacturer")));
+ designation.setValue(new LangStrings(new LangString("DE", "Test Designation")));
+ productFamily.setValue(new LangStrings(new LangString("DE", "Test Product Family")));
+ serialNumber.setValue("123456");
+ yearsOfConstruction.setValue("2020");
+
+ TestMarking.markingFile.setIdShort(Marking.MARKINGFILEID);
+ TestMarking.markingName.setValue("0173-1#07-DAA603#004");
+ TestMarkings.marking = new Marking(TestMarking.IDSHORT, TestMarking.markingName, TestMarking.markingFile);
+ TestMarkings.marking.setParent(new Reference(new Key(KeyElements.SUBMODELELEMENTCOLLECTION, true, Markings.IDSHORT, IdentifierType.IRDI)));
+ TestMarkings.markings = new ArrayList<Marking>();
+ TestMarkings.markings.add(TestMarkings.marking);
+ markings = new Markings(TestMarkings.markings);
+
+ TestAddress.street.setValue(new LangStrings(new LangString("DE", "musterstraße 1")));
+ TestAddress.zipCode.setValue(new LangStrings(new LangString("DE", "12345")));
+ TestAddress.cityTown.setValue(new LangStrings(new LangString("DE", "MusterStadt")));
+ TestAddress.nationalCode.setValue(new LangStrings(new LangString("DE", "DE")));
+
+ List<ISubmodelElement> elements = new ArrayList<ISubmodelElement>();
+ elements.add(manufacturerName);
+ elements.add(designation);
+ elements.add(productFamily);
+ elements.add(serialNumber);
+ elements.add(yearsOfConstruction);
+ elements.add(markings);
+ elements.add(address);
+ elements.add(assetSpecificProperties);
+ submodelMap.put(Referable.IDSHORT, DigitalNameplateSubmodel.SUBMODELID);
+ submodelMap.put(HasSemantics.SEMANTICID, DigitalNameplateSubmodel.SEMANTICID);
+ submodelMap.put(SubModel.SUBMODELELEMENT, elements);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ DigitalNameplateSubmodel submodelFromMap = DigitalNameplateSubmodel.createAsFacade(submodelMap);
+ assertEquals(DigitalNameplateSubmodel.SEMANTICID, submodelFromMap.getSemanticId());
+ assertEquals(manufacturerName, submodelFromMap.getManufacturerName());
+ assertEquals(designation, submodelFromMap.getManufacturerProductDesignation());
+ assertEquals(address, submodelFromMap.getAddress());
+ assertEquals(productFamily, submodelFromMap.getManufacturerProductFamily());
+ assertEquals(serialNumber, submodelFromMap.getSerialNumber());
+ assertEquals(yearsOfConstruction, submodelFromMap.getYearOfConstruction());
+ assertEquals(markings, submodelFromMap.getMarkings());
+ assertEquals(assetSpecificProperties, submodelFromMap.getAssetSpecificProperties());
+ assertEquals(DigitalNameplateSubmodel.SUBMODELID, submodelFromMap.getIdShort());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ submodelMap.remove(Referable.IDSHORT);
+ Fax.createAsFacade(submodelMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionManufacturerName() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)submodelMap.get(SubModel.SUBMODELELEMENT);
+ elements.remove(manufacturerName);
+ DigitalNameplateSubmodel.createAsFacade(submodelMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionZearsOfConstruction() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)submodelMap.get(SubModel.SUBMODELELEMENT);
+ elements.remove(yearsOfConstruction);
+ DigitalNameplateSubmodel.createAsFacade(submodelMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionManufacturerProductDesignation() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)submodelMap.get(SubModel.SUBMODELELEMENT);
+ elements.remove(designation);
+ DigitalNameplateSubmodel.createAsFacade(submodelMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionAddress() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)submodelMap.get(SubModel.SUBMODELELEMENT);
+ elements.remove(address);
+ DigitalNameplateSubmodel.createAsFacade(submodelMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionManufacturerProductFamily() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)submodelMap.get(SubModel.SUBMODELELEMENT);
+ elements.remove(productFamily);
+ DigitalNameplateSubmodel.createAsFacade(submodelMap);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestAddress.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestAddress.java
new file mode 100644
index 0000000..1d4ad2e
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestAddress.java
@@ -0,0 +1,162 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.address;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Address;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Email;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Fax;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Phone;
+import org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests createAsFacade and isValid of {@link Address} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestAddress {
+ public static final String IDSHORT = "testAddressId";
+ public static MultiLanguageProperty department = new MultiLanguageProperty(Address.DEPARTMENTID);
+ public static MultiLanguageProperty street = new MultiLanguageProperty(Address.STREETID);
+ public static MultiLanguageProperty zipCode = new MultiLanguageProperty(Address.ZIPCODEID);
+ public static MultiLanguageProperty poBox = new MultiLanguageProperty(Address.POBOXID);
+ public static MultiLanguageProperty zipPoBox = new MultiLanguageProperty(Address.ZIPCODEOFPOBOXID);
+ public static MultiLanguageProperty cityTown = new MultiLanguageProperty(Address.CITYTOWNID);
+ public static MultiLanguageProperty stateCounty = new MultiLanguageProperty(Address.STATECOUNTYID);
+ public static MultiLanguageProperty nationalCode = new MultiLanguageProperty(Address.NATIONALCODEID);
+ public static MultiLanguageProperty vatNumber = new MultiLanguageProperty(Address.VATNUMBERID);
+ public static MultiLanguageProperty addressRemarks = new MultiLanguageProperty(Address.ADDRESSREMARKSID);
+ public static Property additLink = new Property(Address.ADDRESSOFADDITIONALLINKID, PropertyValueTypeDef.String);
+ public static Phone phone1 = new Phone("Phone01", new LangString("DE", "123456789"));
+ public static Phone phone2 = new Phone("Phone02", new LangString("US", "123456711"));
+ public static Fax fax1 = new Fax("Fax01", new LangString("DE", "123456789"));
+ public static Fax fax2 = new Fax("Fax02", new LangString("DE", "123456711"));
+ public static Email email1 = new Email("Email01", new Property(Email.EMAILADDRESSID, "abc@test.com"));
+ public static Email email2 = new Email("Email02", new Property(Email.EMAILADDRESSID, "abcd@test.com"));
+
+
+ private Map<String, Object> addressMap = new HashMap<String, Object>();
+
+ @Before
+ public void buildFax() {
+ department.setValue(new LangStrings(new LangString("DE", "Dept Test")));
+ street.setValue(new LangStrings(new LangString("DE", "musterstraße 1")));
+ zipCode.setValue(new LangStrings(new LangString("DE", "12345")));
+ poBox.setValue(new LangStrings(new LangString("DE", "PE 1234")));
+ zipPoBox.setValue(new LangStrings(new LangString("DE", "12345")));
+ cityTown.setValue(new LangStrings(new LangString("DE", "MusterStadt")));
+ stateCounty.setValue(new LangStrings(new LangString("DE", "RLP")));
+ nationalCode.setValue(new LangStrings(new LangString("DE", "DE")));
+ vatNumber.setValue(new LangStrings(new LangString("DE", "123456")));
+ addressRemarks.setValue(new LangStrings(new LangString("DE", "test remarks")));
+ additLink.setValue("test.com");
+
+ List<ISubmodelElement> elements = new ArrayList<ISubmodelElement>();
+ elements.add(department);
+ elements.add(street);
+ elements.add(zipCode);
+ elements.add(poBox);
+ elements.add(zipPoBox);
+ elements.add(cityTown);
+ elements.add(stateCounty);
+ elements.add(nationalCode);
+ elements.add(vatNumber);
+ elements.add(addressRemarks);
+ elements.add(additLink);
+ elements.add(phone1);
+ elements.add(phone2);
+ elements.add(fax1);
+ elements.add(fax2);
+ elements.add(email1);
+ elements.add(email2);
+
+ addressMap.put(Referable.IDSHORT, IDSHORT);
+ addressMap.put(HasSemantics.SEMANTICID, Address.SEMANTICID);
+ addressMap.put(Property.VALUE, elements);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ Address addressFromMap = Address.createAsFacade(addressMap);
+ assertEquals(Address.SEMANTICID, addressFromMap.getSemanticId());
+ assertEquals(IDSHORT, addressFromMap.getIdShort());
+ assertEquals(department, addressFromMap.getDepartment());
+ assertEquals(street, addressFromMap.getStreet());
+ assertEquals(poBox, addressFromMap.getPOBox());
+ assertEquals(zipPoBox, addressFromMap.getZipCodeOfPOBox());
+ assertEquals(cityTown, addressFromMap.getCityTown());
+ assertEquals(stateCounty, addressFromMap.getStateCounty());
+ assertEquals(nationalCode, addressFromMap.getNationalCode());
+ assertEquals(zipCode, addressFromMap.getZipCode());
+ assertEquals(vatNumber, addressFromMap.getVatNumber());
+ assertEquals(addressRemarks, addressFromMap.getAddressRemarks());
+ assertEquals(additLink, addressFromMap.getAddressOfAdditionalLink());
+ List<Phone> phones = new ArrayList<Phone>();
+ phones.add(phone2);
+ phones.add(phone1);
+ List<Fax> faxes = new ArrayList<Fax>();
+ faxes.add(fax1);
+ faxes.add(fax2);
+ List<Email> emails = new ArrayList<Email>();
+ emails.add(email2);
+ emails.add(email1);
+ assertEquals(phones, addressFromMap.getPhone());
+ assertEquals(faxes, addressFromMap.getFax());
+ assertEquals(emails, addressFromMap.getEmail());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ addressMap.remove(Referable.IDSHORT);
+ Address.createAsFacade(addressMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionStreet() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)addressMap.get(Property.VALUE);
+ elements.remove(street);
+ Address.createAsFacade(addressMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionZipCode() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)addressMap.get(Property.VALUE);
+ elements.remove(zipCode);
+ Address.createAsFacade(addressMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionCityTown() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)addressMap.get(Property.VALUE);
+ elements.remove(cityTown);
+ Address.createAsFacade(addressMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionNationalCode() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)addressMap.get(Property.VALUE);
+ elements.remove(nationalCode);
+ Address.createAsFacade(addressMap);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestEmail.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestEmail.java
new file mode 100644
index 0000000..f675c50
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestEmail.java
@@ -0,0 +1,81 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.address;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.enums.MailType;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Email;
+import org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests createAsFacade and isValid of {@link Email} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestEmail {
+ public static final String IDSHORT = "testEmailId";
+ public static Property emailAddress = new Property(Email.EMAILADDRESSID, PropertyValueTypeDef.String);
+ public static MultiLanguageProperty publicKey = new MultiLanguageProperty(Email.PUBLICKEYID);
+ public static Property typeOfEmailAddress = new Property(Email.TYPEOFEMAILADDRESSID, PropertyValueTypeDef.String);
+ public static MultiLanguageProperty typeOfPublicKey = new MultiLanguageProperty(Email.TYPEOFPUBLICKEYID);
+
+ private Map<String, Object> emailMap = new HashMap<String, Object>();
+
+ @Before
+ public void buildFax() {
+ emailAddress.set("test@muster-ag.de");
+ publicKey.setValue(new LangStrings(new LangString("DE", "123456")));
+ typeOfEmailAddress.setValue(MailType.SECRETARY);
+ typeOfPublicKey.setValue(new LangStrings(new LangString("DE", "1234")));
+ List<ISubmodelElement> elements = new ArrayList<ISubmodelElement>();
+ elements.add(emailAddress);
+ elements.add(publicKey);
+ elements.add(typeOfEmailAddress);
+ elements.add(typeOfPublicKey);
+ emailMap.put(Referable.IDSHORT, IDSHORT);
+ emailMap.put(HasSemantics.SEMANTICID, Email.SEMANTICID);
+ emailMap.put(Property.VALUE, elements);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ Email emailFromMap = Email.createAsFacade(emailMap);
+ assertEquals(Email.SEMANTICID, emailFromMap.getSemanticId());
+ assertEquals(emailAddress, emailFromMap.getEmailAddress());
+ assertEquals(publicKey, emailFromMap.getPublicKey());
+ assertEquals(typeOfEmailAddress, emailFromMap.getTypeOfEmailAddress());
+ assertEquals(typeOfPublicKey, emailFromMap.getTypeOfPublicKey());
+ assertEquals(IDSHORT, emailFromMap.getIdShort());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ emailMap.remove(Referable.IDSHORT);
+ Email.createAsFacade(emailMap);
+ }
+
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionEmailAddress() {
+ List<ISubmodelElement> newElements = new ArrayList<ISubmodelElement>();
+ newElements.add(typeOfEmailAddress);
+ emailMap.put(Property.VALUE, newElements);
+ Email.createAsFacade(emailMap);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestFax.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestFax.java
new file mode 100644
index 0000000..c73c2c6
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestFax.java
@@ -0,0 +1,73 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.address;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.enums.FaxType;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Fax;
+import org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests createAsFacade and isValid of {@link Fax} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestFax {
+ public static final String IDSHORT = "testFaxId";
+ public static MultiLanguageProperty faxNumber = new MultiLanguageProperty(Fax.FAXNUMBERID);
+ public static Property typeOfFax = new Property(Fax.TYPEOFFAXID, PropertyValueTypeDef.String);
+
+ private Map<String, Object> faxMap = new HashMap<String, Object>();
+
+ @Before
+ public void buildFax() {
+ faxNumber.setValue(new LangStrings(new LangString("DE", "0631123456")));
+ typeOfFax.setValue(FaxType.HOME);
+ List<ISubmodelElement> elements = new ArrayList<ISubmodelElement>();
+ elements.add(faxNumber);
+ elements.add(typeOfFax);
+ faxMap.put(Referable.IDSHORT, IDSHORT);
+ faxMap.put(HasSemantics.SEMANTICID, Fax.SEMANTICID);
+ faxMap.put(Property.VALUE, elements);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ Fax faxFromMap = Fax.createAsFacade(faxMap);
+ assertEquals(Fax.SEMANTICID, faxFromMap.getSemanticId());
+ assertEquals(faxNumber, faxFromMap.getFaxNumber());
+ assertEquals(typeOfFax, faxFromMap.getTypeOfFaxNumber());
+ assertEquals(IDSHORT, faxFromMap.getIdShort());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ faxMap.remove(Referable.IDSHORT);
+ Fax.createAsFacade(faxMap);
+ }
+
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionFaxNumber() {
+ List<ISubmodelElement> newElements = new ArrayList<ISubmodelElement>();
+ newElements.add(typeOfFax);
+ faxMap.put(Property.VALUE, newElements);
+ Fax.createAsFacade(faxMap);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestPhone.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestPhone.java
new file mode 100644
index 0000000..ed0014b
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/address/TestPhone.java
@@ -0,0 +1,72 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.address;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangString;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.LangStrings;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.MultiLanguageProperty;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.enums.PhoneType;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.address.Phone;
+import org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests createAsFacade and isValid of {@link Phone} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestPhone {
+ public static final String IDSHORT = "testPhoneId";
+ public static MultiLanguageProperty telephone = new MultiLanguageProperty(Phone.TELEPHONENUMBERID);
+ public static Property typeOfTelephone = new Property(Phone.TYPEOFTELEPHONEID, PropertyValueTypeDef.String);
+ private Map<String, Object> phoneMap = new HashMap<String, Object>();
+
+ @Before
+ public void buildPhone() {
+ telephone.setValue(new LangStrings(new LangString("DE", "0631123456")));
+ typeOfTelephone.setValue(PhoneType.HOME);
+ List<ISubmodelElement> elements = new ArrayList<ISubmodelElement>();
+ elements.add(telephone);
+ elements.add(typeOfTelephone);
+ phoneMap.put(Referable.IDSHORT, IDSHORT);
+ phoneMap.put(HasSemantics.SEMANTICID, Phone.SEMANTICID);
+ phoneMap.put(Property.VALUE, elements);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ Phone phoneFromMap = Phone.createAsFacade(phoneMap);
+ assertEquals(Phone.SEMANTICID, phoneFromMap.getSemanticId());
+ assertEquals(telephone, phoneFromMap.getTelephoneNumber());
+ assertEquals(typeOfTelephone, phoneFromMap.getTypeOfTelephone());
+ assertEquals(IDSHORT, phoneFromMap.getIdShort());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ phoneMap.remove(Referable.IDSHORT);
+ Phone.createAsFacade(phoneMap);
+ }
+
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionTelephoneNumber() {
+ List<ISubmodelElement> newElements = new ArrayList<ISubmodelElement>();
+ newElements.add(typeOfTelephone);
+ phoneMap.put(Property.VALUE, newElements);
+ Phone.createAsFacade(phoneMap);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/TestAssetSpecificProperties.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/TestAssetSpecificProperties.java
new file mode 100644
index 0000000..7f1ce1c
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/TestAssetSpecificProperties.java
@@ -0,0 +1,66 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties.AssetSpecificProperties;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties.GuidelineSpecificProperties;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests createAsFacade and isValid of {@link AssetSpecificProperties} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestAssetSpecificProperties {
+ public static final String IDSHORT = "AssetSpecificProperties";
+ public static GuidelineSpecificProperties guidelineSpecificProperties = new GuidelineSpecificProperties(TestGuidelineSpecificProperties.IDSHORT, TestGuidelineSpecificProperties.conformityDeclaration, Collections.singletonList(TestGuidelineSpecificProperties.arbitrary));
+
+ private Map<String, Object> assetMap = new HashMap<String, Object>();
+
+ @Before
+ public void buildAssetSpecificProperties() {
+
+ List<ISubmodelElement> elements = new ArrayList<ISubmodelElement>();
+ elements.add(guidelineSpecificProperties);
+
+ assetMap.put(Referable.IDSHORT, IDSHORT);
+ assetMap.put(HasSemantics.SEMANTICID, AssetSpecificProperties.SEMANTICID);
+ assetMap.put(Property.VALUE, elements);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ AssetSpecificProperties assetFromMap = AssetSpecificProperties.createAsFacade(assetMap);
+ assertEquals(AssetSpecificProperties.SEMANTICID, assetFromMap.getSemanticId());
+ assertEquals(Collections.singletonList(guidelineSpecificProperties), assetFromMap.getGuidelineSpecificProperties());
+ assertEquals(IDSHORT, assetFromMap.getIdShort());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ assetMap.remove(Referable.IDSHORT);
+ AssetSpecificProperties.createAsFacade(assetMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionGuideline() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)assetMap.get(Property.VALUE);
+ elements.remove(guidelineSpecificProperties);
+ AssetSpecificProperties.createAsFacade(assetMap);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/TestGuidelineSpecificProperties.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/TestGuidelineSpecificProperties.java
new file mode 100644
index 0000000..a04d4d8
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/assetspecificproperties/TestGuidelineSpecificProperties.java
@@ -0,0 +1,80 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.assetspecificproperties.GuidelineSpecificProperties;
+import org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests createAsFacade and isValid of {@link GuidelineSpecificProperties} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestGuidelineSpecificProperties {
+ public static final String IDSHORT = "GuidelineSpecificProperties01";
+ public static Property conformityDeclaration = new Property(GuidelineSpecificProperties.GUIDELINEFORCONFORMITYDECLARATIONID, PropertyValueTypeDef.String);
+ public static Property arbitrary = new Property("arbitraryId", PropertyValueTypeDef.String);
+
+ private Map<String, Object> guidelineMap = new HashMap<String, Object>();
+
+ @Before
+ public void buildGuidelineSpecificProperties() {
+ conformityDeclaration.setValue("test Declaration");
+ arbitrary.setValue("0173-1#07-DAA603#004");
+
+ List<ISubmodelElement> elements = new ArrayList<ISubmodelElement>();
+ elements.add(conformityDeclaration);
+ elements.add(arbitrary);
+
+ guidelineMap.put(Referable.IDSHORT, IDSHORT);
+ guidelineMap.put(HasSemantics.SEMANTICID, GuidelineSpecificProperties.SEMANTICID);
+ guidelineMap.put(Property.VALUE, elements);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ GuidelineSpecificProperties guidelineFromMap = GuidelineSpecificProperties.createAsFacade(guidelineMap);
+ assertEquals(GuidelineSpecificProperties.SEMANTICID, guidelineFromMap.getSemanticId());
+ assertEquals(conformityDeclaration, guidelineFromMap.getGuidelineForConformityDeclaration());
+ assertEquals(Collections.singletonList(arbitrary), guidelineFromMap.getArbitrary());
+ assertEquals(IDSHORT, guidelineFromMap.getIdShort());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ guidelineMap.remove(Referable.IDSHORT);
+ GuidelineSpecificProperties.createAsFacade(guidelineMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionArbitrary() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)guidelineMap.get(Property.VALUE);
+ elements.remove(arbitrary);
+ GuidelineSpecificProperties.createAsFacade(guidelineMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionDeclaration() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)guidelineMap.get(Property.VALUE);
+ elements.remove(conformityDeclaration);
+ GuidelineSpecificProperties.createAsFacade(guidelineMap);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/markings/TestMarking.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/markings/TestMarking.java
new file mode 100644
index 0000000..45557fa
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/markings/TestMarking.java
@@ -0,0 +1,85 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.markings;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.File;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.valuetypedef.PropertyValueTypeDef;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.markings.Marking;
+import org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests createAsFacade and isValid of {@link Marking} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestMarking {
+ public static final String IDSHORT = "Marking01";
+ public static Property markingName = new Property(Marking.MARKINGNAMEID, PropertyValueTypeDef.String);
+ public static File markingFile = new File("/to/the/image.jpg", "image/jpg");
+ public static Property additText = new Property(Marking.MARKINGADDITIONALTEXTPREFIX + "01", PropertyValueTypeDef.String);
+
+ private Map<String, Object> markingMap = new HashMap<String, Object>();
+
+ @Before
+ public void buildFax() {
+ markingFile.setIdShort(Marking.MARKINGFILEID);
+ markingName.setValue("0173-1#07-DAA603#004");
+ additText.setValue("text additional");
+
+ List<ISubmodelElement> elements = new ArrayList<ISubmodelElement>();
+ elements.add(markingFile);
+ elements.add(markingName);
+ elements.add(additText);
+
+ markingMap.put(Referable.IDSHORT, IDSHORT);
+ markingMap.put(HasSemantics.SEMANTICID, Marking.SEMANTICID);
+ markingMap.put(Property.VALUE, elements);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ Marking markingFromMap = Marking.createAsFacade(markingMap);
+ assertEquals(Marking.SEMANTICID, markingFromMap.getSemanticId());
+ assertEquals(markingFile, markingFromMap.getMarkingFile());
+ assertEquals(markingName, markingFromMap.getMarkingName());
+ assertEquals(Collections.singletonList(additText), markingFromMap.getMarkingAdditionalText());
+ assertEquals(IDSHORT, markingFromMap.getIdShort());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ markingMap.remove(Referable.IDSHORT);
+ Marking.createAsFacade(markingMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionMarkingName() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)markingMap.get(Property.VALUE);
+ elements.remove(markingName);
+ Marking.createAsFacade(markingMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test (expected = ResourceNotFoundException.class)
+ public void testCreateAsFacadeExceptionMarkingFile() {
+ List<ISubmodelElement> elements = (List<ISubmodelElement>)markingMap.get(Property.VALUE);
+ elements.remove(markingFile);
+ Marking.createAsFacade(markingMap);
+ }
+}
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/markings/TestMarkings.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/markings/TestMarkings.java
new file mode 100644
index 0000000..f57d5c8
--- /dev/null
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/types/digitalnameplate/submodelelementcollections/markings/TestMarkings.java
@@ -0,0 +1,78 @@
+package org.eclipse.basyx.testsuite.regression.submodel.types.digitalnameplate.submodelelementcollections.markings;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.property.Property;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.markings.Marking;
+import org.eclipse.basyx.submodel.types.digitalnameplate.submodelelementcollections.markings.Markings;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.basyx.aas.metamodel.exception.MetamodelConstructionException;
+import org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType;
+import org.eclipse.basyx.submodel.metamodel.api.reference.enums.KeyElements;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.HasSemantics;
+import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Key;
+import org.eclipse.basyx.submodel.metamodel.map.reference.Reference;
+
+/**
+ * Tests createAsFacade and isValid of {@link Markings} for their
+ * correctness
+ *
+ * @author haque
+ *
+ */
+public class TestMarkings {
+ public static final String IDSHORT = "Markings";
+ public static List<Marking> markings;
+ public static Marking marking;
+
+ private Map<String, Object> markingsMap = new HashMap<String, Object>();
+
+ @Before
+ public void initMarkings() {
+ TestMarking.markingFile.setIdShort(Marking.MARKINGFILEID);
+ TestMarking.markingName.setValue("0173-1#07-DAA603#004");
+ marking = new Marking(TestMarking.IDSHORT, TestMarking.markingName, TestMarking.markingFile);
+ marking.setParent(new Reference(new Key(KeyElements.SUBMODELELEMENTCOLLECTION, true, IDSHORT, IdentifierType.IRDI)));
+ markings = new ArrayList<Marking>();
+ markings.add(marking);
+
+ markingsMap.put(Referable.IDSHORT, IDSHORT);
+ markingsMap.put(Property.VALUE, markings);
+ markingsMap.put(HasSemantics.SEMANTICID, Markings.SEMANTICID);
+ }
+
+ @Test
+ public void testCreateAsFacade() {
+ Markings markingsFromMap = Markings.createAsFacade(markingsMap);
+ assertEquals(Markings.SEMANTICID, markingsFromMap.getSemanticId());
+ assertEquals(markings, markingsFromMap.getMarking());
+ assertEquals(IDSHORT, markingsFromMap.getIdShort());
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionIdShort() {
+ markingsMap.remove(Referable.IDSHORT);
+ Markings.createAsFacade(markingsMap);
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionNullMarkings() {
+ markingsMap.remove(Property.VALUE);
+ Markings.createAsFacade(markingsMap);
+ }
+
+ @Test (expected = MetamodelConstructionException.class)
+ public void testCreateAsFacadeExceptionEmptyMarkings() {
+ markingsMap.put(Property.VALUE, new ArrayList<Marking>());
+ Markings.createAsFacade(markingsMap);
+ }
+}