Modifies serialization for new VAB serialization schema

- removes set/list differentiation from JSON serialization
- container type in meta-model interfaces support Collections instead of List/Set
- fixes empty list return values in connected operations
- adjusts test cases

Change-Id: I1e85aa63eec5a20360725a3caaf00f92d4972c1c
Signed-off-by: Daniel Espen <daniel.espen@iese.fraunhofer.de>
diff --git a/components/basys.components/basyx.components.lib/WebContent/WEB-INF/config/processengine/SimpleTransportProcess.bpmn20.xml b/components/basys.components/basyx.components.lib/WebContent/WEB-INF/config/processengine/SimpleTransportProcess.bpmn20.xml
index 050a3c9..7e29599 100644
--- a/components/basys.components/basyx.components.lib/WebContent/WEB-INF/config/processengine/SimpleTransportProcess.bpmn20.xml
+++ b/components/basys.components/basyx.components.lib/WebContent/WEB-INF/config/processengine/SimpleTransportProcess.bpmn20.xml
@@ -10,7 +10,7 @@
         <activiti:field name="serviceProvider">
         	<activiti:string><![CDATA[coilcar]]></activiti:string></activiti:field>
         <activiti:field name="serviceParameter">
-        	<activiti:string><![CDATA[{"_basyxTypes":"list","_value":[0]}]]></activiti:string></activiti:field>
+        	<activiti:string><![CDATA[[0]]]></activiti:string></activiti:field>
         <activiti:field name="submodelId">
         	<activiti:string><![CDATA[submodel1]]></activiti:string></activiti:field>
       </extensionElements>
@@ -23,7 +23,7 @@
         <activiti:field name="serviceProvider">
         	<activiti:string><![CDATA[coilcar]]></activiti:string></activiti:field>
         <activiti:field name="serviceParameter">
-        	<activiti:string><![CDATA[{"_basyxTypes":"list","_value":[5]}]]></activiti:string></activiti:field>
+        	<activiti:string><![CDATA[[5]]]></activiti:string></activiti:field>
         <activiti:field name="submodelId">
         	<activiti:string><![CDATA[submodel1]]></activiti:string></activiti:field>
       </extensionElements>
@@ -41,7 +41,7 @@
         <activiti:field name="serviceProvider">
         	<activiti:string><![CDATA[coilcar]]></activiti:string></activiti:field>
         <activiti:field name="serviceParameter">
-        	<activiti:string><![CDATA[ {"_basyxTypes":"list","_value":[5]}]]></activiti:string></activiti:field>
+        	<activiti:string><![CDATA[[5]]]></activiti:string></activiti:field>
         <activiti:field name="submodelId">
         	<activiti:string><![CDATA[submodel1]]></activiti:string></activiti:field>
       </extensionElements>
@@ -56,7 +56,7 @@
         <activiti:field name="serviceProvider">
         	<activiti:string><![CDATA[coilcar]]></activiti:string></activiti:field>
         <activiti:field name="serviceParameter">
-        	<activiti:string><![CDATA[ {"_basyxTypes":"list","_value":[6]}]]></activiti:string></activiti:field>
+        	<activiti:string><![CDATA[[6]]]></activiti:string></activiti:field>
         <activiti:field name="submodelId">
         	<activiti:string><![CDATA[submodel1]]></activiti:string></activiti:field>
       </extensionElements>
@@ -69,7 +69,7 @@
         <activiti:field name="serviceProvider">
         	<activiti:string><![CDATA[coilcar]]></activiti:string></activiti:field>
         <activiti:field name="serviceParameter">
-        	<activiti:string><![CDATA[ {"_basyxTypes":"list","_value":[0]}]]></activiti:string></activiti:field>
+        	<activiti:string><![CDATA[[0]]]></activiti:string></activiti:field>
         <activiti:field name="submodelId">
         	<activiti:string><![CDATA[submodel1]]></activiti:string></activiti:field>
       </extensionElements>
@@ -84,7 +84,7 @@
         <activiti:field name="serviceProvider">
         	<activiti:string><![CDATA[coilcar]]></activiti:string></activiti:field>
         <activiti:field name="serviceParameter">
-        	<activiti:string><![CDATA[ {"_basyxTypes":"list","_value":[0]}]]></activiti:string></activiti:field>
+        	<activiti:string><![CDATA[[0]]]></activiti:string></activiti:field>
         <activiti:field name="submodelId">
         	<activiti:string><![CDATA[submodel1]]></activiti:string></activiti:field>
       </extensionElements>
@@ -100,7 +100,7 @@
         <activiti:field name="serviceProvider">
         	<activiti:string><![CDATA[coilcar]]></activiti:string></activiti:field>
         <activiti:field name="serviceParameter">
-        	<activiti:string><![CDATA[{"_basyxTypes":"list","_value":[0]}]]></activiti:string></activiti:field>
+        	<activiti:string><![CDATA[[0]]]></activiti:string></activiti:field>
         <activiti:field name="submodelId">
         	<activiti:string><![CDATA[submodel1]]></activiti:string></activiti:field>
       </extensionElements>
diff --git a/components/basys.components/basyx.components.lib/src/test/java/org/eclipse/basyx/regression/cfgprovider/TestCFGProviderPropertyMetaData.java b/components/basys.components/basyx.components.lib/src/test/java/org/eclipse/basyx/regression/cfgprovider/TestCFGProviderPropertyMetaData.java
index f4a55c0..d146e6e 100644
--- a/components/basys.components/basyx.components.lib/src/test/java/org/eclipse/basyx/regression/cfgprovider/TestCFGProviderPropertyMetaData.java
+++ b/components/basys.components/basyx.components.lib/src/test/java/org/eclipse/basyx/regression/cfgprovider/TestCFGProviderPropertyMetaData.java
@@ -2,8 +2,7 @@
 
 import static org.junit.Assert.assertEquals;
 
-import java.util.HashMap;
-import java.util.HashSet;
+import java.util.Collection;
 import java.util.Map;
 
 import org.eclipse.basyx.regression.support.directory.ComponentsTestsuiteDirectory;
@@ -54,7 +53,7 @@
 		// - Check property meta data (description)
 		Map<String, Object> value1a = (Map<String, Object>) connSubModel
 				.getModelPropertyValue("/aas/submodels/sampleCFG/dataElements/cfgProperty1");
-		LangStrings description = new LangStrings((HashSet<HashMap<String, Object>>) value1a.get("description"));
+		LangStrings description = new LangStrings((Collection<Map<String, Object>>) value1a.get("description"));
 		assertEquals("Configuration property description", description.get(""));
 
 		// Get property value
@@ -64,7 +63,7 @@
 		// - Check property meta data (description)
 		Map<String, Object> value2a = (Map<String, Object>) connSubModel
 				.getModelPropertyValue("/aas/submodels/sampleCFG/dataElements/cfgProperty2");
-		description = new LangStrings((HashSet<HashMap<String, Object>>) value2a.get("description"));
+		description = new LangStrings((Collection<Map<String, Object>>) value2a.get("description"));
 		assertEquals("Configuration property description on multiple lines", description.get(""));
 
 		// Get property value
diff --git a/components/basys.components/basyx.components.lib/src/test/java/org/eclipse/basyx/regression/cfgprovider/TestCFGProviderSubmodelMetaData.java b/components/basys.components/basyx.components.lib/src/test/java/org/eclipse/basyx/regression/cfgprovider/TestCFGProviderSubmodelMetaData.java
index 9b2503d..2460ef5 100644
--- a/components/basys.components/basyx.components.lib/src/test/java/org/eclipse/basyx/regression/cfgprovider/TestCFGProviderSubmodelMetaData.java
+++ b/components/basys.components/basyx.components.lib/src/test/java/org/eclipse/basyx/regression/cfgprovider/TestCFGProviderSubmodelMetaData.java
@@ -2,8 +2,7 @@
 
 import static org.junit.Assert.assertEquals;
 
-import java.util.HashMap;
-import java.util.HashSet;
+import java.util.Collection;
 import java.util.Map;
 
 import org.eclipse.basyx.regression.support.directory.ComponentsTestsuiteDirectory;
@@ -55,7 +54,7 @@
 		Map<String, Object> sampleCFG = (Map<String, Object>) connSubModel
 				.getModelPropertyValue("/aas/submodels/sampleCFG");
 		
-		LangStrings description = new LangStrings((HashSet<HashMap<String, Object>>) sampleCFG.get("description"));
+		LangStrings description = new LangStrings((Collection<Map<String, Object>>) sampleCFG.get("description"));
 		assertEquals("BaSys regression test file for CFG file provider", description.get(""));
 
 		// Get property value
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/aggregator/AASAggregator.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/aggregator/AASAggregator.java
index 59e770f..7c4dc3e 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/aggregator/AASAggregator.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/aggregator/AASAggregator.java
@@ -2,7 +2,6 @@
 
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
@@ -24,10 +23,8 @@
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public List<IAssetAdministrationShell> getAASList() {
-		Collection<AASModelProvider> providers = aasProviderMap.values();
-
-		List<IAssetAdministrationShell> ret = providers.stream().map(p -> {
+	public Collection<IAssetAdministrationShell> getAASList() {
+		return aasProviderMap.values().stream().map(p -> {
 			try {
 				return p.getModelPropertyValue("");
 			} catch (Exception e1) {
@@ -39,8 +36,6 @@
 			aas.putAll((Map<? extends String, ? extends Object>) m);
 			return aas;
 		}).collect(Collectors.toList());
-
-		return ret;
 	}
 
 	@SuppressWarnings("unchecked")
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/aggregator/api/IAASAggregator.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/aggregator/api/IAASAggregator.java
index 9d22ea5..98cba3f 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/aggregator/api/IAASAggregator.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/aggregator/api/IAASAggregator.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.aas.aggregator.api;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell;
 import org.eclipse.basyx.aas.metamodel.map.AssetAdministrationShell;
@@ -21,7 +21,7 @@
 	 * 
 	 * @return a List of all found Asset Administration Shells
 	 */
-	public List<IAssetAdministrationShell> getAASList();
+	public Collection<IAssetAdministrationShell> getAASList();
 	
 	/**
 	 * Retrieves a specific Asset Administration Shell
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/factory/xml/api/parts/ViewXMLConverter.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/factory/xml/api/parts/ViewXMLConverter.java
index 60bc467..8202449 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/factory/xml/api/parts/ViewXMLConverter.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/factory/xml/api/parts/ViewXMLConverter.java
@@ -38,9 +38,9 @@
 	 * @return a Set of IView objects parsed form the given XML Map
 	 */
 	@SuppressWarnings("unchecked")
-	public static Set<IView> parseViews(Map<String, Object> xmlObject) {
+	public static Collection<IView> parseViews(Map<String, Object> xmlObject) {
 
-		Set<IView> viewSet = new HashSet<>();
+		Collection<IView> viewSet = new HashSet<>();
 		if(xmlObject == null) return viewSet;
 		
 		xmlObject = (Map<String, Object>) xmlObject.get(VIEWS);
@@ -110,7 +110,7 @@
 	 * @param view the IView object to build the XML for
 	 */
 	private static void buildContainedElements(Document document, Element xmlView, IView view) {
-		Set<IReference> containedElement = view.getContainedElement();
+		Collection<IReference> containedElement = view.getContainedElement();
 		if(containedElement != null) {
 			Element xmlContainedElements = document.createElement(CONTAINED_ELEMENTS);
 			Element xmlContainedElementsRef = document.createElement(CONTAINED_ELEMENT_REF);
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/factory/xml/converters/AssetAdministrationShellXMLConverter.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/factory/xml/converters/AssetAdministrationShellXMLConverter.java
index 77a33e9..01513ef 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/factory/xml/converters/AssetAdministrationShellXMLConverter.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/factory/xml/converters/AssetAdministrationShellXMLConverter.java
@@ -61,8 +61,8 @@
 			IdentifiableXMLConverter.populateIdentifiable(xmlAAS, adminShell);
 			HasDataSpecificationXMLConverter.populateHasDataSpecification(xmlAAS, adminShell);
 			
-			Set<IView> views = ViewXMLConverter.parseViews(xmlAAS);
-			Set<IConceptDictionary> conceptDictionary = parseConceptDictionaries(xmlAAS);
+			Collection<IView> views = ViewXMLConverter.parseViews(xmlAAS);
+			Collection<IConceptDictionary> conceptDictionary = parseConceptDictionaries(xmlAAS);
 			
 			Map<String, Object> xmlAssetRef = (Map<String, Object>) xmlAAS.get(ASSET_REF);
 			Reference assetRef = ReferenceXMLConverter.parseReference(xmlAssetRef);
@@ -82,7 +82,7 @@
 			adminShell.setConceptDictionary(conceptDictionary);
 			adminShell.setAssetReference(assetRef);
 			
-			Set<IReference> submodelRefs = parseSubmodelRefs(xmlAAS);
+			Collection<IReference> submodelRefs = parseSubmodelRefs(xmlAAS);
 			adminShell.setSubmodelReferences(submodelRefs);
 			
 			AASs.add(adminShell);
@@ -99,13 +99,13 @@
 	 * @return a Set of {@link IReference} objects parsed form the given XML Map
 	 */
 	@SuppressWarnings("unchecked")
-	private static Set<IReference> parseSubmodelRefs(Map<String, Object> xmlObject) {
+	private static Collection<IReference> parseSubmodelRefs(Map<String, Object> xmlObject) {
 		Set<IReference> refSet = new HashSet<>();
 		
 		Map<String, Object> refMap = (Map<String, Object>) xmlObject.get(SUBMODEL_REFS);
 
 		if (refMap == null) {
-			return new HashSet<IReference>();
+			return new HashSet<>();
 		}
 
 		List<Map<String, Object>> xmlKeyList = XMLHelper.getList(refMap.get(SUBMODEL_REF));
@@ -124,7 +124,7 @@
 	 * @return a Set of IConceptDictionary objects parsed form the given XML Map
 	 */
 	@SuppressWarnings("unchecked")
-	private static Set<IConceptDictionary> parseConceptDictionaries(Map<String, Object> xmlConceptDescriptionRefsObject) {
+	private static Collection<IConceptDictionary> parseConceptDictionaries(Map<String, Object> xmlConceptDescriptionRefsObject) {
 		Set<IConceptDictionary> conceptDictionarySet = new HashSet<>();
 		if(xmlConceptDescriptionRefsObject == null) return conceptDictionarySet;
 		
@@ -175,7 +175,7 @@
 			buildDerivedFrom(document, aasRoot, aas);
 			buildAssetRef(document, aasRoot, aas);
 			buildSubmodelRef(document, aasRoot, aas);
-			Set<IView> views = aas.getViews();
+			Collection<IView> views = aas.getViews();
 			
 			Element buildViews = ViewXMLConverter.buildViewsXML(document, views);
 			aasRoot.appendChild(buildViews);
@@ -233,10 +233,10 @@
 	 * @param aas the IAssetAdministrationShell object to build the XML for
 	 */
 	private static void buildSubmodelRef(Document document, Element root, IAssetAdministrationShell aas) {
-		Set<IReference> submodelRef = aas.getSubmodelReferences();
+		Collection<IReference> submodelRef = aas.getSubmodelReferences();
 		
 		
-		if (submodelRef != null && submodelRef.size() > 0) {
+		if (submodelRef != null && !submodelRef.isEmpty()) {
 			Element submodelRefsRoot = document.createElement(SUBMODEL_REFS);
 			for (IReference ref : submodelRef) {
 				Element submodelRefRoot = document.createElement(SUBMODEL_REF);
@@ -257,7 +257,7 @@
 	 * @return the &lt;aas:conceptDictionaries&gt; XML tag build from the IAssetAdministrationShell object
 	 */
 	private static Element buildConceptDictionary(Document document, IAssetAdministrationShell aas) {
-		Set<IConceptDictionary> conceptDicionary = aas.getConceptDictionary();
+		Collection<IConceptDictionary> conceptDicionary = aas.getConceptDictionary();
 		Element conceptDicts = document.createElement(CONCEPT_DICTIONARIES);
 		for(IConceptDictionary iConceptDictionary: conceptDicionary) {
 			Element conceptDict = document.createElement(CONCEPT_DICTIONARY);
@@ -269,7 +269,7 @@
 			}
 			conceptDict.appendChild(concDescRoot);
 			conceptDicts.appendChild(conceptDict);
-			Set<IReference> conceptDescriptionRef = iConceptDictionary.getConceptDescription();
+			Collection<IReference> conceptDescriptionRef = iConceptDictionary.getConceptDescription();
 			for (IReference ref: conceptDescriptionRef) {
 				if(ref != null) {
 					Element conceptDescriptionRefRoot = document.createElement(CONCEPT_DESCRIPTION_REF);
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/IAssetAdministrationShell.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/IAssetAdministrationShell.java
index e467378..40287da 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/IAssetAdministrationShell.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/IAssetAdministrationShell.java
@@ -1,7 +1,7 @@
 package org.eclipse.basyx.aas.metamodel.api;
 
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.aas.metamodel.api.parts.IConceptDictionary;
 import org.eclipse.basyx.aas.metamodel.api.parts.IView;
@@ -34,7 +34,7 @@
 	 * 
 	 * @return
 	 */
-	public Set<IReference> getSubmodelReferences();
+	public Collection<IReference> getSubmodelReferences();
 
 	/**
 	 * Add a sub model to the AAS
@@ -77,7 +77,7 @@
 	 * 
 	 * @return
 	 */
-	public Set<SubmodelDescriptor> getSubModelDescriptors();
+	public Collection<SubmodelDescriptor> getSubModelDescriptors();
 
 	/**
 	 * Gets the views associated with the AAS. <br/>
@@ -86,7 +86,7 @@
 	 * 
 	 * @return
 	 */
-	public Set<IView> getViews();
+	public Collection<IView> getViews();
 
 	/**
 	 * Gets the concept dictionaries associated with the AAS. <br/>
@@ -96,5 +96,5 @@
 	 * 
 	 * @return
 	 */
-	public Set<IConceptDictionary> getConceptDictionary();
+	public Collection<IConceptDictionary> getConceptDictionary();
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/parts/IConceptDictionary.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/parts/IConceptDictionary.java
index b8b84b6..491aa22 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/parts/IConceptDictionary.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/parts/IConceptDictionary.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.aas.metamodel.api.parts;
 
-import java.util.Set;
+import java.util.Collection;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.IReferable;
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
@@ -24,5 +24,5 @@
 	 * 
 	 * @return
 	 */
-	public Set<IReference> getConceptDescription();
+	public Collection<IReference> getConceptDescription();
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/parts/IView.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/parts/IView.java
index 9fba960..ea951f1 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/parts/IView.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/api/parts/IView.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.aas.metamodel.api.parts;
 
-import java.util.Set;
+import java.util.Collection;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.IHasDataSpecification;
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.IHasSemantics;
@@ -21,5 +21,5 @@
 	 * 
 	 * @return
 	 */
-	public Set<IReference> getContainedElement();
+	public Collection<IReference> getContainedElement();
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/connected/ConnectedAssetAdministrationShell.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/connected/ConnectedAssetAdministrationShell.java
index 68c444e..9a320a6 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/connected/ConnectedAssetAdministrationShell.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/connected/ConnectedAssetAdministrationShell.java
@@ -1,7 +1,7 @@
 package org.eclipse.basyx.aas.metamodel.connected;
 
+import java.util.Collection;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
@@ -76,7 +76,7 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(getElem()).getDataSpecificationReferences();
 	}
 
@@ -100,34 +100,37 @@
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Set<SubmodelDescriptor> getSubModelDescriptors() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) getElem().getPath(AssetAdministrationShell.SUBMODELDESCRIPTORS);
-		return set.stream().map(x -> new SubmodelDescriptor(x)).collect(Collectors.toSet());
+
+	public Collection<SubmodelDescriptor> getSubModelDescriptors() {
+		Collection<Map<String, Object>> coll = (Collection<Map<String, Object>>) getElem()
+				.getPath(AssetAdministrationShell.SUBMODELDESCRIPTORS);
+		return coll.stream().map(SubmodelDescriptor::new).collect(Collectors.toSet());
 	}
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Set<IView> getViews() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) getElem().getPath(AssetAdministrationShell.VIEWS);
-		Set<IView> views = new HashSet<>();
-		for (Map<String, Object> m : set) {
-			views.add(View.createAsFacade(m));
-		}
-		return views;
+
+	public Collection<IView> getViews() {
+		Collection<Map<String, Object>> coll = (Collection<Map<String, Object>>) getElem()
+				.getPath(AssetAdministrationShell.VIEWS);
+		return coll.stream().map(View::createAsFacade).collect(Collectors.toSet());
 	}
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Set<IConceptDictionary> getConceptDictionary() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) getElem().getPath(AssetAdministrationShell.CONCEPTDICTIONARY);
-		return set.stream().map(x -> ConceptDictionary.createAsFacade(x)).collect(Collectors.toSet());
+
+	public Collection<IConceptDictionary> getConceptDictionary() {
+		Collection<Map<String, Object>> set = (Set<Map<String, Object>>) getElem()
+				.getPath(AssetAdministrationShell.CONCEPTDICTIONARY);
+		return set.stream().map(ConceptDictionary::createAsFacade).collect(Collectors.toSet());
 	}
 
+
 	@Override
 	public Map<String, ISubModel> getSubModels() {
 		Map<String, ISubModel> ret = new HashMap<>();
 
-		Set<SubmodelDescriptor> submodelDescriptors = getSubModelDescriptors();
+		Collection<SubmodelDescriptor> submodelDescriptors = getSubModelDescriptors();
 		for (final SubmodelDescriptor submodelDescriptor : submodelDescriptors) {
 			String id = submodelDescriptor.getIdShort();
 			ret.put(id, new ConnectedSubModel(getProxy().getDeepProxy(AssetAdministrationShell.SUBMODELS + "/" + id)));
@@ -162,10 +165,9 @@
 		return Reference.createAsFacade((Map<String, Object>) getElem().getPath(Referable.PARENT));
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
-	public Set<IReference> getSubmodelReferences() {
-		return ReferenceHelper.transform((Set<Map<String, Object>>) getElem().getPath(AssetAdministrationShell.SUBMODELS));
+	public Collection<IReference> getSubmodelReferences() {
+		return ReferenceHelper.transform(getElem().getPath(AssetAdministrationShell.SUBMODELS));
 	}
 
 	@SuppressWarnings("unchecked")
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/AssetAdministrationShell.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/AssetAdministrationShell.java
index 65e87fc..a2958d9 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/AssetAdministrationShell.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/AssetAdministrationShell.java
@@ -1,11 +1,11 @@
 package org.eclipse.basyx.aas.metamodel.map;
 
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.stream.Collectors;
 
 import org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell;
@@ -69,7 +69,7 @@
 		this(null, null, new Asset(), new HashSet<SubmodelDescriptor>(), new HashSet<IConceptDictionary>(), new HashSet<IView>());
 	}
 
-	public AssetAdministrationShell(Reference derivedFrom, Security security, Asset asset, Set<SubmodelDescriptor> submodels, Set<IConceptDictionary> dictionaries, Set<IView> views) {
+	public AssetAdministrationShell(Reference derivedFrom, Security security, Asset asset, Collection<SubmodelDescriptor> submodels, Collection<IConceptDictionary> dictionaries, Collection<IView> views) {
 		// Add model type
 		putAll(new ModelType(MODELTYPE));
 		
@@ -150,11 +150,11 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		HasDataSpecification.createAsFacade(this).setDataSpecificationReferences(ref);
 	}
 
@@ -203,35 +203,35 @@
 	}
 
 	@SuppressWarnings("unchecked")
-	public void setSubModels(Set<SubmodelDescriptor> submodels) {
+	public void setSubModels(Collection<SubmodelDescriptor> submodels) {
 		put(AssetAdministrationShell.SUBMODELDESCRIPTORS, submodels);
 
 		// Clear submodel references and add new keys
-		((Set<Reference>) get(SUBMODELS)).clear();
-		submodels.stream().forEach(s -> addSubmodelReferences(s));
+		((Collection<Reference>) get(SUBMODELS)).clear();
+		submodels.stream().forEach(this::addSubmodelReferences);
 	}
 
-	public void setViews(Set<IView> views) {
+	public void setViews(Collection<IView> views) {
 		put(AssetAdministrationShell.VIEWS, views);
 	}
 
 	@Override
 	@SuppressWarnings("unchecked")
-	public Set<IView> getViews() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(AssetAdministrationShell.VIEWS);
-		return set.stream().map(m -> View.createAsFacade(m)).collect(Collectors.toSet());
+	public Collection<IView> getViews() {
+		Collection<Map<String, Object>> coll = (Collection<Map<String, Object>>) get(AssetAdministrationShell.VIEWS);
+		return coll.stream().map(View::createAsFacade).collect(Collectors.toSet());
 	}
 
-	public void setConceptDictionary(Set<IConceptDictionary> dictionaries) {
+	public void setConceptDictionary(Collection<IConceptDictionary> dictionaries) {
 		put(AssetAdministrationShell.CONCEPTDICTIONARY, dictionaries);
 	}
 
 	@Override
 	@SuppressWarnings("unchecked")
-	public Set<IConceptDictionary> getConceptDictionary() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(AssetAdministrationShell.CONCEPTDICTIONARY);
-
-		return set.stream().map(m -> ConceptDictionary.createAsFacade(m)).collect(Collectors.toSet());
+	public Collection<IConceptDictionary> getConceptDictionary() {
+		Collection<Map<String, Object>> coll = (Collection<Map<String, Object>>) get(
+				AssetAdministrationShell.CONCEPTDICTIONARY);
+		return coll.stream().map(ConceptDictionary::createAsFacade).collect(Collectors.toSet());
 	}
 
 	@Override
@@ -275,15 +275,16 @@
 	@Override
 	public void addSubModel(SubmodelDescriptor descriptor) {
 		logger.trace("adding Submodel", descriptor.getIdentifier().getId());
-		((Set<SubmodelDescriptor>) get(AssetAdministrationShell.SUBMODELDESCRIPTORS)).add(descriptor);
+		((Collection<SubmodelDescriptor>) get(AssetAdministrationShell.SUBMODELDESCRIPTORS)).add(descriptor);
 		addSubmodelReferences(descriptor);
 	}
 
 	@Override
 	@SuppressWarnings("unchecked")
-	public Set<SubmodelDescriptor> getSubModelDescriptors() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(AssetAdministrationShell.SUBMODELDESCRIPTORS);
-		return set.stream().map(m -> new SubmodelDescriptor(m)).collect(Collectors.toSet());
+	public Collection<SubmodelDescriptor> getSubModelDescriptors() {
+		Collection<Map<String, Object>> set = (Collection<Map<String, Object>>) get(
+				AssetAdministrationShell.SUBMODELDESCRIPTORS);
+		return set.stream().map(SubmodelDescriptor::new).collect(Collectors.toSet());
 	}
 
 	/**
@@ -292,7 +293,7 @@
 	 * @param description
 	 */
 	public void addConceptDescription(IConceptDescription description) {
-		Set<IConceptDictionary> dictionaries = getConceptDictionary();
+		Collection<IConceptDictionary> dictionaries = getConceptDictionary();
 		if (dictionaries.isEmpty()) {
 			dictionaries.add(new ConceptDictionary());
 		}
@@ -301,17 +302,18 @@
 	}
 
 	@Override
-	@SuppressWarnings("unchecked")
-	public Set<IReference> getSubmodelReferences() {
-		return ReferenceHelper.transform((Set<Map<String, Object>>) get(SUBMODELS));
+	public Collection<IReference> getSubmodelReferences() {
+		return ReferenceHelper.transform(get(SUBMODELS));
 	}
 
-	public void setSubmodelReferences(Set<IReference> references) {
+	public void setSubmodelReferences(Collection<IReference> references) {
 		put(SUBMODELS, references);
 	}
 
+	@SuppressWarnings("unchecked")
 	public void addSubmodelReference(IReference reference) {
-		getSubmodelReferencesAsRawSet().add(reference);
+		Collection<Object> smReferences = (Collection<Object>) get(SUBMODELS);
+		smReferences.add(reference);
 	}
 
 	private void addSubmodelReferences(SubmodelDescriptor descriptor) {
@@ -319,9 +321,4 @@
 		Reference ref = new Reference(identifier, KeyElements.SUBMODEL, true);
 		addSubmodelReference(ref);
 	}
-
-	@SuppressWarnings("unchecked")
-	private Set<Object> getSubmodelReferencesAsRawSet() {
-		return ((Set<Object>) get(SUBMODELS));
-	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/descriptor/AASDescriptor.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/descriptor/AASDescriptor.java
index 23f425c..b6d19ac 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/descriptor/AASDescriptor.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/descriptor/AASDescriptor.java
@@ -4,7 +4,6 @@
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Optional;
-import java.util.Set;
 import java.util.stream.Collectors;
 
 import org.eclipse.basyx.aas.metamodel.map.AssetAdministrationShell;
@@ -47,7 +46,7 @@
 		put(AssetAdministrationShell.ENDPOINTS, aas.getEndpoints());
 
 		// Overwrite submodel descriptors
-		Set<SubmodelDescriptor> smDescriptors = aas.getSubModelDescriptors();
+		Collection<SubmodelDescriptor> smDescriptors = aas.getSubModelDescriptors();
 		put(AssetAdministrationShell.SUBMODELS, smDescriptors);
 	}
 	
@@ -62,7 +61,7 @@
 		this(aas.getIdShort(), aas.getIdentification(), endpoint);
 
 		// Overwrite submodel descriptors
-		Set<SubmodelDescriptor> smDescriptors = aas.getSubModelDescriptors();
+		Collection<SubmodelDescriptor> smDescriptors = aas.getSubModelDescriptors();
 		put(AssetAdministrationShell.SUBMODELS, smDescriptors);
 	}
 
@@ -108,7 +107,7 @@
 		// TODO: Exception in else case
 		if (toRemove.isPresent()) {
 			// Don't use getSubmodelDescriptors here since it returns a copy
-			((Set<Object>) get(AssetAdministrationShell.SUBMODELS)).remove(toRemove.get());
+			((Collection<Object>) get(AssetAdministrationShell.SUBMODELS)).remove(toRemove.get());
 		}
 	}
 
@@ -161,9 +160,9 @@
 	 * @return
 	 */
 	@SuppressWarnings("unchecked")
-	public Set<SubmodelDescriptor> getSubModelDescriptors() {
+	public Collection<SubmodelDescriptor> getSubModelDescriptors() {
 		Collection<Map<String, Object>> descriptors = (Collection<Map<String, Object>>) get(AssetAdministrationShell.SUBMODELS);
-		return descriptors.stream().map(m -> new SubmodelDescriptor(m)).collect(Collectors.toSet());
+		return descriptors.stream().map(SubmodelDescriptor::new).collect(Collectors.toSet());
 	}
 }
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/Asset.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/Asset.java
index c2aa529..b885243 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/Asset.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/Asset.java
@@ -1,7 +1,7 @@
 package org.eclipse.basyx.aas.metamodel.map.parts;
 
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.aas.metamodel.api.parts.asset.AssetKind;
 import org.eclipse.basyx.aas.metamodel.api.parts.asset.IAsset;
@@ -83,11 +83,11 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		HasDataSpecification.createAsFacade(this).setDataSpecificationReferences(ref);
 	}
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/ConceptDictionary.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/ConceptDictionary.java
index 92fa98d..9806fad 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/ConceptDictionary.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/ConceptDictionary.java
@@ -1,8 +1,8 @@
 package org.eclipse.basyx.aas.metamodel.map.parts;
 
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.aas.metamodel.api.parts.IConceptDictionary;
 import org.eclipse.basyx.submodel.metamodel.api.parts.IConceptDescription;
@@ -34,7 +34,7 @@
 		put(CONCEPTDESCRIPTIONS, new HashSet<IConceptDescription>());
 	}
 
-	public ConceptDictionary(Set<IReference> ref) {
+	public ConceptDictionary(Collection<IReference> ref) {
 		// Add qualifier (Referable)
 		putAll(new Referable());
 		put(CONCEPTDESCRIPTION, ref);
@@ -95,18 +95,16 @@
 	}
 
 	@Override
-	@SuppressWarnings("unchecked")
-	public Set<IReference> getConceptDescription() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(ConceptDictionary.CONCEPTDESCRIPTION);
-		return ReferenceHelper.transform(set);
+	public Collection<IReference> getConceptDescription() {
+		return ReferenceHelper.transform(get(ConceptDictionary.CONCEPTDESCRIPTION));
 	}
 
-	public void setConceptDescription(HashSet<IReference> ref) {
+	public void setConceptDescription(Collection<IReference> ref) {
 		put(ConceptDictionary.CONCEPTDESCRIPTION, ref);
 	}
 
 	@SuppressWarnings("unchecked")
 	public void addConceptDescription(IConceptDescription description) {
-		((Set<IConceptDescription>) get(CONCEPTDESCRIPTIONS)).add(description);
+		((Collection<IConceptDescription>) get(CONCEPTDESCRIPTIONS)).add(description);
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/View.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/View.java
index bb81e68..0a13b52 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/View.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/metamodel/map/parts/View.java
@@ -1,5 +1,6 @@
 package org.eclipse.basyx.aas.metamodel.map.parts;
 
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
@@ -70,15 +71,13 @@
 		return ret;
 	}
 
-	public void setContainedElement(Set<IReference> references) {
+	public void setContainedElement(Collection<IReference> references) {
 		put(View.CONTAINEDELEMENT, references);
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
-	public Set<IReference> getContainedElement() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(View.CONTAINEDELEMENT);
-		return ReferenceHelper.transform(set);
+	public Collection<IReference> getContainedElement() {
+		return ReferenceHelper.transform(get(View.CONTAINEDELEMENT));
 	}
 
 	@Override
@@ -92,11 +91,11 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		HasDataSpecification.createAsFacade(this).setDataSpecificationReferences(ref);
 
 	}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/registration/restapi/DirectoryModelProvider.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/registration/restapi/DirectoryModelProvider.java
index b48cc90..3607df8 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/registration/restapi/DirectoryModelProvider.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/registration/restapi/DirectoryModelProvider.java
@@ -2,8 +2,8 @@
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.aas.metamodel.map.descriptor.AASDescriptor;
 import org.eclipse.basyx.aas.metamodel.map.descriptor.ModelUrn;
@@ -311,7 +311,7 @@
 	 * @return Set of contained SubmodelDescriptor objects
 	 * @throws ResourceNotFoundException if the AAS does not exist
 	 */
-	private Set<SubmodelDescriptor> getSmDescriptorsFromAAS(IIdentifier id) throws ResourceNotFoundException {
+	private Collection<SubmodelDescriptor> getSmDescriptorsFromAAS(IIdentifier id) throws ResourceNotFoundException {
 		AASDescriptor aasDescriptor = registry.lookupAAS(id);
 		if(aasDescriptor == null) {
 			throw new ResourceNotFoundException("Specified AASid '" + id.getId() + "' does not exist.");
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/VABMultiSubmodelProvider.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/VABMultiSubmodelProvider.java
index 4b3476b..eafa9aa 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/VABMultiSubmodelProvider.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/VABMultiSubmodelProvider.java
@@ -1,5 +1,6 @@
 package org.eclipse.basyx.aas.restapi;
 
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -153,7 +154,7 @@
 			if (pathElements[1].equals(AssetAdministrationShell.SUBMODELS)) {
 				if (pathElements.length == 2) {
 					// Make a list and return all submodels
-					HashSet<Object> submodels = new HashSet<Object>();
+					Collection<Object> submodels = new HashSet<>();
 					for (IModelProvider submodel : submodel_providers.values()) {
 						submodels.add(submodel.getModelPropertyValue(""));
 					}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/api/parts/ConceptDescriptionXMLConverter.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/api/parts/ConceptDescriptionXMLConverter.java
index b62fb02..07532b9 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/api/parts/ConceptDescriptionXMLConverter.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/api/parts/ConceptDescriptionXMLConverter.java
@@ -5,7 +5,6 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.factory.xml.XMLHelper;
 import org.eclipse.basyx.submodel.factory.xml.converters.qualifier.HasDataSpecificationXMLConverter;
@@ -48,7 +47,7 @@
 			IdentifiableXMLConverter.populateIdentifiable(xmlConceptDescription, conceptDescription);
 			HasDataSpecificationXMLConverter.populateHasDataSpecification(xmlConceptDescription, conceptDescription);
 			
-			Set<Reference> handleIsCaseOf = parseIsCaseOfRefs(xmlConceptDescription);
+			Collection<Reference> handleIsCaseOf = parseIsCaseOfRefs(xmlConceptDescription);
 			conceptDescription.setIsCaseOf(handleIsCaseOf);
 			
 			conceptDescriptions.add(conceptDescription);
@@ -64,9 +63,8 @@
 	 * @param xmlObject a Map containing the XML tag &lt;aas:isCaseOf&gt;
 	 * @return a Reference object parsed form the given XML Map
 	 */
-	private static Set<Reference> parseIsCaseOfRefs(Map<String, Object> xmlObject) {		
-		Set<Reference> references = new HashSet<>();
-		
+	private static Collection<Reference> parseIsCaseOfRefs(Map<String, Object> xmlObject) {
+		Collection<Reference> references = new HashSet<>();
 		List<Map<String, Object>> xmlKeyList = XMLHelper.getList(xmlObject.get(IS_CASE_OF));
 		for (Map<String, Object> xmlKey : xmlKeyList) {
 			references.add(ReferenceXMLConverter.parseReference(xmlKey));
@@ -113,7 +111,7 @@
 	 * @param conceptDescription the IConceptDescription object to build the XML for
 	 */
 	private static void buildIsCaseOf(Document document, Element xmlConceptDescription, IConceptDescription conceptDescription) {		 
-		Set<IReference> references = conceptDescription.getIsCaseOf();
+		Collection<IReference> references = conceptDescription.getIsCaseOf();
 		Element xmlIsCaseOf = document.createElement(IS_CASE_OF);
 
 		Element keysElement = ReferenceXMLConverter.buildReferencesXML(document, references);
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/qualifier/HasDataSpecificationXMLConverter.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/qualifier/HasDataSpecificationXMLConverter.java
index aa42942..e45f297 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/qualifier/HasDataSpecificationXMLConverter.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/qualifier/HasDataSpecificationXMLConverter.java
@@ -1,9 +1,9 @@
 package org.eclipse.basyx.submodel.factory.xml.converters.qualifier;
 
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.factory.xml.XMLHelper;
 import org.eclipse.basyx.submodel.factory.xml.converters.reference.ReferenceXMLConverter;
@@ -40,7 +40,7 @@
 		
 		Object xmlDataSpecObj = xmlObject.get(EMBEDDED_DATA_SPECIFICATION);
 		
-		HashSet<IReference> refSet = new HashSet<>();
+		Collection<IReference> refSet = new HashSet<>();
 		
 		List<Map<String, Object>> xmlSpecList = XMLHelper.getList(xmlDataSpecObj);
 		for (Map<String, Object> xmlSpec : xmlSpecList) {
@@ -76,9 +76,9 @@
 	 * @param hasDataSpecification the IHasDataSpecification object to be converted to XML
 	 */
 	public static void populateHasDataSpecificationXML(Document document, Element root, IHasDataSpecification hasDataSpecification) {
-		Set<IReference> references = hasDataSpecification.getDataSpecificationReferences();
-		
-		if(references != null && references.size() > 0) {
+		Collection<IReference> references = hasDataSpecification.getDataSpecificationReferences();
+
+		if (references != null && !references.isEmpty()) {
 			Element embeddedDataSpecRoot = document.createElement(EMBEDDED_DATA_SPECIFICATION);
 			Element dataSpecRoot = document.createElement(HAS_DATA_SPECIFICATION);
 			embeddedDataSpecRoot.appendChild(dataSpecRoot);
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/qualifier/qualifiable/QualifiableXMLConverter.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/qualifier/qualifiable/QualifiableXMLConverter.java
index 4a2c92b..9d1e93e 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/qualifier/qualifiable/QualifiableXMLConverter.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/qualifier/qualifiable/QualifiableXMLConverter.java
@@ -1,9 +1,9 @@
 package org.eclipse.basyx.submodel.factory.xml.converters.qualifier.qualifiable;
 
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.factory.xml.XMLHelper;
 import org.eclipse.basyx.submodel.factory.xml.converters.qualifier.HasSemanticsXMLConverter;
@@ -61,8 +61,8 @@
 	 * @return the Set of IConstraint objects parsed
 	 */
 	@SuppressWarnings("unchecked")
-	private static Set<IConstraint> parseConstraints(Map<String, Object> xmlConstraints) {
-		Set<IConstraint> constraints = new HashSet<>();
+	private static Collection<IConstraint> parseConstraints(Map<String, Object> xmlConstraints) {
+		Collection<IConstraint> constraints = new HashSet<>();
 		
 		if(xmlConstraints == null) return constraints;
 		
@@ -94,7 +94,7 @@
 	@SuppressWarnings("unchecked")
 	private static Formula parseFormula(Map<String, Object> xmlFormula) {
 		Map<String, Object> dependsOnObj = (Map<String, Object>) xmlFormula.get(DEPENDS_ON_REFS);
-		Set<IReference> referenceList = new HashSet<IReference>();
+		Collection<IReference> referenceList = new HashSet<>();
 				
 		List<Map<String, Object>> xmlReferenceList = XMLHelper.getList(dependsOnObj.get(REFERENCE));
 		for (Map<String, Object> xmlReference : xmlReferenceList) {
@@ -146,7 +146,7 @@
 		if(qualifiable.getQualifier() == null || qualifiable.getQualifier().size() == 0) return;
 		
 		
-		Set<IConstraint> constraints = qualifiable.getQualifier();
+		Collection<IConstraint> constraints = qualifiable.getQualifier();
 		
 		Element qualifierRoot = document.createElement(QUALIFIER);
 		
@@ -189,7 +189,7 @@
 	private static Element buildFormulaXML(Document document, IFormula formula) {
 		Element formulaRoot = document.createElement(FORMULA);
 		Element dependsOnRoot = document.createElement(DEPENDS_ON_REFS);
-		Set<IReference> ref = formula.getDependsOn();
+		Collection<IReference> ref = formula.getDependsOn();
 		Element refrenceRoot = document.createElement(REFERENCE);
 		refrenceRoot.appendChild(ReferenceXMLConverter.buildReferencesXML(document, ref));
 		dependsOnRoot.appendChild(refrenceRoot);
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/submodelelement/operation/OperationXMLConverter.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/submodelelement/operation/OperationXMLConverter.java
index ddf09da..bcc7542 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/submodelelement/operation/OperationXMLConverter.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/factory/xml/converters/submodelelement/operation/OperationXMLConverter.java
@@ -1,6 +1,7 @@
 package org.eclipse.basyx.submodel.factory.xml.converters.submodelelement.operation;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
@@ -96,7 +97,7 @@
 		
 		populateSubmodelElement(document, operationRoot, operation);
 		
-		List<IOperationVariable> in = operation.getInputVariables();
+		Collection<IOperationVariable> in = operation.getInputVariables();
 		if(in != null) {
 			Element valueRoot = document.createElement(INPUT_VARIABLE);
 			operationRoot.appendChild(valueRoot);
@@ -105,7 +106,7 @@
 			}
 		}
 		
-		List<IOperationVariable> out = operation.getOutputVariables();
+		Collection<IOperationVariable> out = operation.getOutputVariables();
 		if(out != null) {
 			Element valueRoot = document.createElement(OUTPUT_VARIABLE);
 			operationRoot.appendChild(valueRoot);
@@ -114,7 +115,7 @@
 			}
 		}
 		
-		List<IOperationVariable> inout = operation.getInOutputVariables();
+		Collection<IOperationVariable> inout = operation.getInOutputVariables();
 		if(out != null) {
 			Element valueRoot = document.createElement(INOUTPUT_VARIABLE);
 			operationRoot.appendChild(valueRoot);
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/parts/IConceptDescription.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/parts/IConceptDescription.java
index 083501d..5ae8129 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/parts/IConceptDescription.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/parts/IConceptDescription.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.api.parts;
 
-import java.util.Set;
+import java.util.Collection;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.IHasDataSpecification;
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.IIdentifiable;
@@ -23,5 +23,5 @@
 	 * 
 	 * @return
 	 */
-	public Set<IReference> getIsCaseOf();
+	public Collection<IReference> getIsCaseOf();
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/IHasDataSpecification.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/IHasDataSpecification.java
index c808818..440308e 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/IHasDataSpecification.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/IHasDataSpecification.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.api.qualifier;
 
-import java.util.Set;
+import java.util.Collection;
 
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
 
@@ -22,5 +22,5 @@
 	 * 
 	 * @return
 	 */
-	public Set<IReference> getDataSpecificationReferences();
+	public Collection<IReference> getDataSpecificationReferences();
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/qualifiable/IFormula.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/qualifiable/IFormula.java
index 333fe47..30be093 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/qualifiable/IFormula.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/qualifiable/IFormula.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.api.qualifier.qualifiable;
 
-import java.util.Set;
+import java.util.Collection;
 
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
 /**
@@ -9,5 +9,5 @@
  *
 */
 public interface IFormula extends IConstraint {
-	public  Set<IReference> getDependsOn();
+	public Collection<IReference> getDependsOn();
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/qualifiable/IQualifiable.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/qualifiable/IQualifiable.java
index b2dba87..28b33f7 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/qualifiable/IQualifiable.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/qualifier/qualifiable/IQualifiable.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.api.qualifier.qualifiable;
 
-import java.util.Set;
+import java.util.Collection;
 
 /**
  * Interface for Qualifiable
@@ -9,5 +9,5 @@
 */
 
 public interface IQualifiable {
-	public Set<IConstraint> getQualifier();
+	public Collection<IConstraint> getQualifier();
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/submodelelement/entity/IEntity.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/submodelelement/entity/IEntity.java
index be42cc0..a8c557f 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/submodelelement/entity/IEntity.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/submodelelement/entity/IEntity.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.api.submodelelement.entity;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
 import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
@@ -18,7 +18,7 @@
 	 * 
 	 * @return
 	 */
-	List<ISubmodelElement> getStatements();
+	Collection<ISubmodelElement> getStatements();
 
 	/**
 	 * Gets EntityType describing whether the entity is a comanaged entity or a
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/submodelelement/operation/IOperation.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/submodelelement/operation/IOperation.java
index febe721..c7b32ae 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/submodelelement/operation/IOperation.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/api/submodelelement/operation/IOperation.java
@@ -1,6 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.api.submodelelement.operation;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.eclipse.basyx.submodel.metamodel.api.IElement;
 import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
@@ -18,21 +18,21 @@
 	 * 
 	 * @return Parameter types
 	 */
-	public List<IOperationVariable> getInputVariables();
+	public Collection<IOperationVariable> getInputVariables();
 
 	/**
 	 * Get operation return type
 	 * 
 	 * @return Operation return type
 	 */
-	public List<IOperationVariable> getOutputVariables();
+	public Collection<IOperationVariable> getOutputVariables();
 
 	/**
 	 * Get the parameters that are input and output of the operation.
 	 * 
 	 * @return
 	 */
-	List<IOperationVariable> getInOutputVariables();
+	public Collection<IOperationVariable> getInOutputVariables();
 
 	/**
 	 * Invoke operation with given parameter
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/ConnectedSubModel.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/ConnectedSubModel.java
index a96451f..40f5624 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/ConnectedSubModel.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/ConnectedSubModel.java
@@ -1,7 +1,7 @@
 package org.eclipse.basyx.submodel.metamodel.connected;
 
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.ISubModel;
 import org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier;
@@ -54,7 +54,7 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(getElem()).getDataSpecificationReferences();
 	}
 
@@ -85,7 +85,7 @@
 	}
 	
 	@Override
-	public Set<IConstraint> getQualifier() {
+	public Collection<IConstraint> getQualifier() {
 		return Qualifiable.createAsFacade(getElem()).getQualifier();
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/submodelelement/ConnectedSubmodelElement.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/submodelelement/ConnectedSubmodelElement.java
index ef47ab7..1097bfb 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/submodelelement/ConnectedSubmodelElement.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/submodelelement/ConnectedSubmodelElement.java
@@ -1,7 +1,7 @@
 package org.eclipse.basyx.submodel.metamodel.connected.submodelelement;
 
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.haskind.ModelingKind;
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.qualifiable.IConstraint;
@@ -48,7 +48,7 @@
 	}
 
 	@Override
-	public Set<IConstraint> getQualifier() {
+	public Collection<IConstraint> getQualifier() {
 		return Qualifiable.createAsFacade(getElem()).getQualifier();
 	}
 
@@ -64,7 +64,7 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(getElem()).getDataSpecificationReferences();
 	}
 	
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/submodelelement/operation/ConnectedOperation.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/submodelelement/operation/ConnectedOperation.java
index 4507696..901bfa5 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/submodelelement/operation/ConnectedOperation.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/connected/submodelelement/operation/ConnectedOperation.java
@@ -1,7 +1,7 @@
 package org.eclipse.basyx.submodel.metamodel.connected.submodelelement.operation;
 
+import java.util.Collection;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.basyx.submodel.metamodel.api.submodelelement.operation.IOperation;
@@ -25,17 +25,17 @@
 	}
 
 	@Override
-	public List<IOperationVariable> getInputVariables() {
+	public Collection<IOperationVariable> getInputVariables() {
 		return Operation.createAsFacade(getElem()).getInputVariables();
 	}
 
 	@Override
-	public List<IOperationVariable> getOutputVariables() {
+	public Collection<IOperationVariable> getOutputVariables() {
 		return Operation.createAsFacade(getElem()).getOutputVariables();
 	}
 
 	@Override
-	public List<IOperationVariable> getInOutputVariables() {
+	public Collection<IOperationVariable> getInOutputVariables() {
 		return Operation.createAsFacade(getElem()).getInOutputVariables();
 	}
 
@@ -49,7 +49,7 @@
 		// Wrap parameter with valuetype information
 		int i = 0;
 		for (Object param : params) {
-			HashMap<String, Object> valueWrapper = new HashMap<String, Object>();
+			HashMap<String, Object> valueWrapper = new HashMap<>();
 			valueWrapper.put(Property.VALUETYPE, PropertyValueTypeDefHelper.fromObject(param));
 			valueWrapper.put(Property.VALUE, param);
 
@@ -62,8 +62,12 @@
 		Object result = getProxy().invokeOperation("", params);
 
 		// Unwrap result value
-		if (result instanceof List<?>) {
-			Object resultWrapper = ((List<?>) result).get(0);
+		if (result instanceof Collection<?>) {
+			Collection<Object> coll = (Collection<Object>) result;
+			if (coll.isEmpty()) {
+				return result;
+			}
+			Object resultWrapper = coll.iterator().next();
 			if (resultWrapper instanceof Map<?, ?>) {
 				Map<String, Object> map = (Map<String, Object>) resultWrapper;
 				if (map.get(Referable.IDSHORT).equals("Response") && map.get(Property.VALUE) != null) {
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/SubModel.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/SubModel.java
index b442953..80439a7 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/SubModel.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/SubModel.java
@@ -1,5 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.map;
 
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -156,7 +157,7 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
@@ -239,7 +240,7 @@
 		return ElementContainer.createAsFacade(this).getSubmodelElements();
 	}
 	@Override
-	public Set<IConstraint> getQualifier() {
+	public Collection<IConstraint> getQualifier() {
 		return Qualifiable.createAsFacade(this).getQualifier();
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/parts/ConceptDescription.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/parts/ConceptDescription.java
index 11eb2c2..f4c8825 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/parts/ConceptDescription.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/parts/ConceptDescription.java
@@ -1,8 +1,8 @@
 package org.eclipse.basyx.submodel.metamodel.map.parts;
 
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.dataspecification.IDataSpecification;
 import org.eclipse.basyx.submodel.metamodel.api.dataspecification.IDataSpecificationIEC61360;
@@ -67,11 +67,11 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		HasDataSpecification.createAsFacade(this).setDataSpecificationReferences(ref);
 	}
 
@@ -94,13 +94,11 @@
 	}
 
 	@Override
-	@SuppressWarnings("unchecked")
-	public Set<IReference> getIsCaseOf() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(ConceptDescription.ISCASEOF);
-		return ReferenceHelper.transform(set);
+	public Collection<IReference> getIsCaseOf() {
+		return ReferenceHelper.transform(get(ConceptDescription.ISCASEOF));
 	}
 
-	public void setIsCaseOf(Set<Reference> ref) {
+	public void setIsCaseOf(Collection<Reference> ref) {
 		put(ConceptDescription.ISCASEOF, ref);
 	}
 
@@ -142,8 +140,8 @@
 	}
 
 	@SuppressWarnings("unchecked")
-	public Set<IDataSpecification> getDataSpecifications() {
-		return (Set<IDataSpecification>) get(DATASPECIFICATIONS);
+	public Collection<IDataSpecification> getDataSpecifications() {
+		return (Collection<IDataSpecification>) get(DATASPECIFICATIONS);
 	}
 
 	public void addDataSpecification(IDataSpecificationIEC61360 spec) {
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/AdministrativeInformation.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/AdministrativeInformation.java
index 484b9c2..d93ab94 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/AdministrativeInformation.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/AdministrativeInformation.java
@@ -1,7 +1,7 @@
 package org.eclipse.basyx.submodel.metamodel.map.qualifier;
 
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.IAdministrativeInformation;
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
@@ -61,11 +61,11 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		HasDataSpecification.createAsFacade(this).setDataSpecificationReferences(ref);
 	}
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/HasDataSpecification.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/HasDataSpecification.java
index f359149..4426761 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/HasDataSpecification.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/HasDataSpecification.java
@@ -1,8 +1,8 @@
 package org.eclipse.basyx.submodel.metamodel.map.qualifier;
 
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.IHasDataSpecification;
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
@@ -23,12 +23,10 @@
 	 * Constructor
 	 */
 	public HasDataSpecification() {
-		// Default values
 		put(HASDATASPECIFICATION, new HashSet<Reference>());
 	}
 
-	public HasDataSpecification(Set<IReference> ref) {
-		// Default values
+	public HasDataSpecification(Collection<IReference> ref) {
 		put(HASDATASPECIFICATION, ref);
 	}
 
@@ -50,14 +48,12 @@
 		return ret;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(HasDataSpecification.HASDATASPECIFICATION);
-		return ReferenceHelper.transform(set);
+	public Collection<IReference> getDataSpecificationReferences() {
+		return ReferenceHelper.transform(get(HasDataSpecification.HASDATASPECIFICATION));
 	}
 
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		put(HasDataSpecification.HASDATASPECIFICATION, ref);
 	}
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/LangStrings.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/LangStrings.java
index 6d805f5..068c971 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/LangStrings.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/LangStrings.java
@@ -1,7 +1,9 @@
 package org.eclipse.basyx.submodel.metamodel.map.qualifier;
 
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 
 /**
@@ -23,8 +25,12 @@
 		add(language, text);
 	}
 	
-	public LangStrings(HashSet<HashMap<String, Object>> set) {
-		this.addAll(set);
+	public LangStrings(Collection<Map<String, Object>> set) {
+		set.stream().forEach(ls -> {
+			String lang = (String) ls.get(LANGUAGE);
+			String text = (String) ls.get(TEXT);
+			add(lang, text);
+		});
 	}
 
 	/**
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/Referable.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/Referable.java
index bf3a24a..910da2a 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/Referable.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/Referable.java
@@ -1,7 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.map.qualifier;
 
-import java.util.HashMap;
-import java.util.HashSet;
+import java.util.Collection;
 import java.util.Map;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.IReferable;
@@ -95,8 +94,7 @@
 	@Override
 	@SuppressWarnings("unchecked")
 	public LangStrings getDescription() {
-		LangStrings desc = new LangStrings((HashSet<HashMap<String, Object>>) get(Referable.DESCRIPTION));
-		return desc;
+		return new LangStrings((Collection<Map<String, Object>>) get(Referable.DESCRIPTION));
 	}
 
 	@Override
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/qualifiable/Formula.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/qualifiable/Formula.java
index e831d4d..c676f9a 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/qualifiable/Formula.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/qualifiable/Formula.java
@@ -1,8 +1,8 @@
 package org.eclipse.basyx.submodel.metamodel.map.qualifier.qualifiable;
 
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.qualifiable.IFormula;
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
@@ -37,7 +37,7 @@
 	 * @param dependsOn
 	 *            set of References the formula depends on
 	 */
-	public Formula(Set<IReference> dependsOn) {
+	public Formula(Collection<IReference> dependsOn) {
 		putAll(new ModelType(MODELTYPE));
 		put(DEPENDSON, dependsOn);
 	}
@@ -59,16 +59,13 @@
 		return ret;
 	}
 
-	public void setDependsOn(Set<IReference> dependsOn) {
+	public void setDependsOn(Collection<IReference> dependsOn) {
 		put(Formula.DEPENDSON, dependsOn);
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
-	public Set<IReference> getDependsOn() {
-		// Transform set of maps to set of IReference
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(Formula.DEPENDSON);
-		return ReferenceHelper.transform(set);
+	public Collection<IReference> getDependsOn() {
+		return ReferenceHelper.transform(get(Formula.DEPENDSON));
 	}
 
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/qualifiable/Qualifiable.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/qualifiable/Qualifiable.java
index 57f8d54..35da4c2 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/qualifiable/Qualifiable.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/qualifier/qualifiable/Qualifiable.java
@@ -3,7 +3,6 @@
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.qualifiable.IConstraint;
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.qualifiable.IQualifiable;
@@ -33,7 +32,7 @@
 	 */
 	public Qualifiable(Constraint qualifier) {
 		// Create collection with qualifiers
-		Set<Constraint> qualifiers = new HashSet<Constraint>();
+		Collection<Constraint> qualifiers = new HashSet<>();
 		// - Add qualifier
 		qualifiers.add(qualifier);
 
@@ -68,16 +67,16 @@
 		return ret;
 	}
 
-	public void setQualifier(Set<IConstraint> qualifiers) {
+	public void setQualifier(Collection<IConstraint> qualifiers) {
 		put(Qualifiable.CONSTRAINTS, qualifiers);
 	}
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Set<IConstraint> getQualifier() {
+	public Collection<IConstraint> getQualifier() {
 		// Transform set of maps to set of IConstraints
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) get(Qualifiable.CONSTRAINTS);
-		Set<IConstraint> ret = new HashSet<>();
+		Collection<Map<String, Object>> set = (Collection<Map<String, Object>>) get(Qualifiable.CONSTRAINTS);
+		Collection<IConstraint> ret = new HashSet<>();
 		if (set != null) {
 			for (Map<String, Object> m : set) {
 				if (ModelType.createAsFacade(m).getName().equals(Formula.MODELTYPE)) {
@@ -87,7 +86,6 @@
 				}
 			}
 		}
-
 		return ret;
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/reference/Reference.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/reference/Reference.java
index 7eb5268..7e99b92 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/reference/Reference.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/reference/Reference.java
@@ -1,6 +1,7 @@
 package org.eclipse.basyx.submodel.metamodel.map.reference;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -98,9 +99,8 @@
 		List<IKey> ret = new ArrayList<>();
 
 		// Transform list of maps to set of IKey
-		List<Map<String, Object>> list = (List<Map<String, Object>>) get(Reference.KEY);
-
-		for (Map<String, Object> m : list) {
+		Collection<Map<String, Object>> coll = (Collection<Map<String, Object>>) get(Reference.KEY);
+		for (Map<String, Object> m : coll) {
 			ret.add(Key.createAsFacade(m));
 		}
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/reference/ReferenceHelper.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/reference/ReferenceHelper.java
index 2e946f1..8be4399 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/reference/ReferenceHelper.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/reference/ReferenceHelper.java
@@ -1,8 +1,8 @@
 package org.eclipse.basyx.submodel.metamodel.map.reference;
 
-import java.util.HashSet;
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
+import java.util.stream.Collectors;
 
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
 
@@ -15,18 +15,15 @@
 public class ReferenceHelper {
 	/**
 	 * Helper method used e.g. by facades to transform a set of maps to a set of
-	 * IReference
+	 * IReference -> Assumes the given object is a Collection<Map<String, Object>>
 	 * 
 	 * @param set
 	 * @return
 	 */
-	public static Set<IReference> transform(Set<Map<String, Object>> set) {
+	public static Collection<IReference> transform(Object obj) {
 		// Transform set of maps to set of IReference
-		Set<IReference> ret = new HashSet<>();
-		for (Map<String, Object> m : set) {
-			ret.add(Reference.createAsFacade(m));
-		}
-
-		return ret;
+		@SuppressWarnings("unchecked")
+		Collection<Map<String, Object>> collection = (Collection<Map<String, Object>>) obj;
+		return collection.stream().map(Reference::createAsFacade).collect(Collectors.toSet());
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/SubmodelElement.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/SubmodelElement.java
index b654e72..4c561b9 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/SubmodelElement.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/SubmodelElement.java
@@ -1,7 +1,7 @@
 package org.eclipse.basyx.submodel.metamodel.map.submodelelement;
 
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.haskind.ModelingKind;
 import org.eclipse.basyx.submodel.metamodel.api.qualifier.qualifiable.IConstraint;
@@ -50,11 +50,11 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		HasDataSpecification.createAsFacade(this).setDataSpecificationReferences(ref);
 	}
 
@@ -98,12 +98,12 @@
 		Referable.createAsFacade(this).setParent(obj);
 	}
 
-	public void setQualifier(Set<IConstraint> qualifiers) {
+	public void setQualifier(Collection<IConstraint> qualifiers) {
 		Qualifiable.createAsFacade(this).setQualifier(qualifiers);
 	}
 
 	@Override
-	public Set<IConstraint> getQualifier() {
+	public Collection<IConstraint> getQualifier() {
 		return Qualifiable.createAsFacade(this).getQualifier();
 	}
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/SubmodelElementCollection.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/SubmodelElementCollection.java
index 11f9b50..3b9c803 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/SubmodelElementCollection.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/SubmodelElementCollection.java
@@ -4,7 +4,6 @@
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
 import org.eclipse.basyx.submodel.metamodel.api.submodelelement.ISubmodelElement;
@@ -87,12 +86,12 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
 	@Override
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		HasDataSpecification.createAsFacade(this).setDataSpecificationReferences(ref);
 
 	}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/dataelement/MultiLanguageProperty.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/dataelement/MultiLanguageProperty.java
index 073e053..18fa2b1 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/dataelement/MultiLanguageProperty.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/dataelement/MultiLanguageProperty.java
@@ -1,7 +1,6 @@
 package org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement;
 
-import java.util.HashMap;
-import java.util.HashSet;
+import java.util.Collection;
 import java.util.Map;
 
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
@@ -54,6 +53,6 @@
 	@Override
 	@SuppressWarnings("unchecked")
 	public LangStrings getValue() {
-		return new LangStrings((HashSet<HashMap<String, Object>>) get(VALUE));
+		return new LangStrings((Collection<Map<String, Object>>) get(VALUE));
 	}
 }
\ No newline at end of file
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/entity/Entity.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/entity/Entity.java
index ea6e3a5..f9ddd74 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/entity/Entity.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/entity/Entity.java
@@ -2,7 +2,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
@@ -65,10 +64,10 @@
 
 	@Override
 	@SuppressWarnings("unchecked")
-	public List<ISubmodelElement> getStatements() {
-		List<ISubmodelElement> ret = new ArrayList<>();
-		List<Object> smElems = (ArrayList<Object>) get(STATEMENT);
-		for(Object smElemO: smElems) {
+	public Collection<ISubmodelElement> getStatements() {
+		Collection<ISubmodelElement> ret = new ArrayList<>();
+		Collection<Object> smElems = (Collection<Object>) get(STATEMENT);
+		for (Object smElemO : smElems) {
 			Map<String, Object> smElem = (Map<String, Object>) smElemO;
 			ret.add(SubmodelElementFacadeFactory.createSubmodelElement(smElem));
 		}
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/operation/Operation.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/operation/Operation.java
index 49b5a5d..11dba7d 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/operation/Operation.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/submodel/metamodel/map/submodelelement/operation/Operation.java
@@ -1,9 +1,8 @@
 package org.eclipse.basyx.submodel.metamodel.map.submodelelement.operation;
 
 import java.util.ArrayList;
-import java.util.List;
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 import java.util.function.Function;
 
 import org.eclipse.basyx.submodel.metamodel.api.reference.IReference;
@@ -62,8 +61,8 @@
 	 *            the concrete function
 	 * 
 	 */
-	public Operation(List<OperationVariable> in, List<OperationVariable> out,
-			List<OperationVariable> inout, Function<Object[], Object> function) {
+	public Operation(Collection<OperationVariable> in, Collection<OperationVariable> out,
+			Collection<OperationVariable> inout, Function<Object[], Object> function) {
 		// Add model type
 		putAll(new ModelType(MODELTYPE));
 
@@ -105,26 +104,25 @@
 		return ret;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
-	public List<IOperationVariable> getInputVariables() {
-		return transformToOperationVariables((List<Map<String, Object>>) get(Operation.IN));
+	public Collection<IOperationVariable> getInputVariables() {
+		return transformToOperationVariables(get(Operation.IN));
+	}
+
+	@Override
+	public Collection<IOperationVariable> getOutputVariables() {
+		return transformToOperationVariables(get(Operation.OUT));
+	}
+
+	@Override
+	public Collection<IOperationVariable> getInOutputVariables() {
+		return transformToOperationVariables(get(Operation.INOUT));
 	}
 
 	@SuppressWarnings("unchecked")
-	@Override
-	public List<IOperationVariable> getOutputVariables() {
-		return transformToOperationVariables((List<Map<String, Object>>) get(Operation.OUT));
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public List<IOperationVariable> getInOutputVariables() {
-		return transformToOperationVariables((List<Map<String, Object>>) get(Operation.INOUT));
-	}
-
-	private List<IOperationVariable> transformToOperationVariables(List<Map<String, Object>> map) {
-		List<IOperationVariable> ret = new ArrayList<>();
+	private Collection<IOperationVariable> transformToOperationVariables(Object obj) {
+		Collection<Map<String, Object>> map = (Collection<Map<String, Object>>) obj;
+		Collection<IOperationVariable> ret = new ArrayList<>();
 		for (Map<String, Object> m : map) {
 			ret.add(OperationVariable.createAsFacade(m));
 		}
@@ -137,15 +135,15 @@
 		return ((Function<Object[], Object>) get(INVOKABLE)).apply(params);
 	}
 
-	public void setInputVariables(List<OperationVariable> in) {
+	public void setInputVariables(Collection<OperationVariable> in) {
 		put(Operation.IN, in);
 	}
 
-	public void setOutputVariables(List<OperationVariable> out) {
+	public void setOutputVariables(Collection<OperationVariable> out) {
 		put(Operation.OUT, out);
 	}
 
-	public void setInOutputVariables(List<OperationVariable> inOut) {
+	public void setInOutputVariables(Collection<OperationVariable> inOut) {
 		put(Operation.INOUT, inOut);
 	}
 
@@ -154,12 +152,12 @@
 	}
 
 	@Override
-	public Set<IReference> getDataSpecificationReferences() {
+	public Collection<IReference> getDataSpecificationReferences() {
 		return HasDataSpecification.createAsFacade(this).getDataSpecificationReferences();
 	}
 
 	@Override
-	public void setDataSpecificationReferences(Set<IReference> ref) {
+	public void setDataSpecificationReferences(Collection<IReference> ref) {
 		HasDataSpecification.createAsFacade(this).setDataSpecificationReferences(ref);
 	}
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/DefaultTypeFactory.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/DefaultTypeFactory.java
index 919a287..c7fcd3f 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/DefaultTypeFactory.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/DefaultTypeFactory.java
@@ -1,11 +1,9 @@
 package org.eclipse.basyx.vab.coder.json.serialization;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 
 
@@ -27,19 +25,10 @@
 
 
 	/**
-	 * Create a set
+	 * Create a collection
 	 */
 	@Override
-	public Set<Object> createSet() {
-		return new HashSet<>();
-	}
-
-
-	/**
-	 * Create an ArrayList
-	 */
-	@Override
-	public List<Object> createList() {
+	public Collection<Object> createCollection() {
 		return new ArrayList<>();
 	}
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/GSONTools.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/GSONTools.java
index 7a7a221..34f1eec 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/GSONTools.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/GSONTools.java
@@ -3,14 +3,14 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.Base64;
 import java.util.Collection;
-import java.util.List;
 import java.util.Map;
-import java.util.Set;
+import java.util.Map.Entry;
 import java.util.function.BiConsumer;
 import java.util.function.Consumer;
 import java.util.function.Function;
@@ -44,15 +44,10 @@
 	private static Logger logger = LoggerFactory.getLogger(GSONTools.class);
 	
 	// Used string constants
-	public static final String INDEX = "index";
 	public static final String OPERATION = "operation";
 	public static final String LAMBDA = "lambda";
 	public static final String BASYXFUNCTIONTYPE = "_basyxFunctionType";
 	public static final String BASYXINVOCABLE = "_basyxInvocable";
-	public static final String LIST = "list";
-	public static final String SET = "set";
-	public static final String BASYXTYPE = "_basyxTypes";
-	public static final String BASYXVALUE = "_value";
 	public static final String BASYXFUNCTIONVALUE = "_basyxFunctionValue";
 
 	/**
@@ -84,67 +79,15 @@
 	@Override
 	public Object deserialize(String str) {
 		JsonElement elem = parser.parse(str);
-
-		// Handle edge case of collection of primitives
-		if (isWrappedCollection(elem)) {
-			return handleWrappedCollection(elem);
-		} else {
-			return deserializeJsonElement(elem);
-		}
-
-	}
-
-	private Object handleWrappedCollection(JsonElement elem) {
-		JsonObject obj = elem.getAsJsonObject();
-		JsonArray array = (JsonArray) obj.get(BASYXVALUE);
-		if (obj.get(BASYXTYPE).getAsString().equals(SET)) {
-			return deserializeJsonArrayAsSet(array);
-		} else {
-			return deserializeJsonArrayAsList(array);
-		}
-	}
-
-	private boolean isWrappedCollection(JsonElement elem) {
-		if (elem.isJsonObject()) {
-			JsonObject obj = elem.getAsJsonObject();
-			return obj.has(BASYXVALUE);
-		}
-		return false;
+		return deserializeJsonElement(elem);
 	}
 
 	@Override
 	public String serialize(Object obj) {
-		JsonElement elem = serializeToJsonElement(obj);
-
-		// Handle edge case of collection of primitives and empty collections
-		// Has to be handled here since complete knowledge about element structure is
-		// needed
-		if (obj instanceof Collection<?>) {
-			Collection<?> col = (Collection<?>) obj;
-
-			if (col.size() > 0) {
-				Object item = col.iterator().next();
-
-				// Only handle primitive types. Complex types are already handled
-				if (item.getClass().isPrimitive() || isWrapperType(item.getClass())) {
-					elem = buildCollectionWrapper(col instanceof List<?> ? LIST : SET, elem);
-				}
-			} else {
-				// Empty collections need also to be handled, regardless of intended type
-				elem = buildCollectionWrapper(col instanceof List<?> ? LIST : SET, new JsonArray());
-			}
-		}
-
+		JsonElement elem = serializeObject(obj);
 		return elem.toString();
 	}
 
-	private JsonObject buildCollectionWrapper(String type, JsonElement elem) {
-		JsonObject jObj = new JsonObject();
-		jObj.add(BASYXTYPE, new JsonPrimitive(type));
-		jObj.add(BASYXVALUE, elem);
-		return jObj;
-	}
-
 	/**
 	 * Serialized an arbitrary object to a JsonElement
 	 * 
@@ -152,7 +95,7 @@
 	 * @return
 	 */
 	@SuppressWarnings("unchecked")
-	private JsonElement serializeToJsonElement(Object obj) {
+	private JsonElement serializeObject(Object obj) {
 		if (obj == null) {
 			return JsonNull.INSTANCE;
 		} else if (obj.getClass().isPrimitive() || isWrapperType(obj.getClass()) || obj instanceof String) {
@@ -160,11 +103,7 @@
 		} else if (obj instanceof Map<?, ?>) {
 			return serializeMap((Map<String, Object>) obj);
 		} else if (obj instanceof Collection<?>) {
-			if (obj instanceof List<?>) {
-				return serializeList((List<?>) obj);
-			} else {
-				return serializeSet((Set<?>) obj);
-			}
+			return serializeCollection((Collection<Object>) obj);
 		} else if (isFunction(obj)) {
 			return serializeFunction(obj);
 		}
@@ -220,7 +159,7 @@
 	}
 
 	/**
-	 * Serializes either string, int, double or boolean to a JsonPrimitive
+	 * Serializes either string, number or boolean to a JsonPrimitive
 	 * 
 	 * @param primitive
 	 * @return
@@ -244,14 +183,16 @@
 	 */
 	private Object deserializeJsonObject(JsonObject map) {
 		if (map.has(BASYXFUNCTIONTYPE)) {
-			if (map.get(BASYXFUNCTIONTYPE).getAsString().equals(OPERATION)) {
+			String functionType = map.get(BASYXFUNCTIONTYPE).getAsString();
+			if (functionType.equals(OPERATION)) {
 				return BASYXINVOCABLE;
-			} else {
-				// Type equals Lambda
+			} else if (functionType.equals(LAMBDA)) {
 				return deserializeObjectFromString(map.get(BASYXFUNCTIONVALUE).getAsString());
+			} else {
+				throw new RuntimeException("Unknown function type " + functionType + "!");
 			}
 		} else {
-			return deserializeToMap(map);
+			return deserializeObject(map);
 		}
 	}
 
@@ -261,36 +202,10 @@
 	 * @param map
 	 * @return
 	 */
-	private Map<String, Object> deserializeToMap(JsonObject map) {
+	private Map<String, Object> deserializeObject(JsonObject map) {
 		Map<String, Object> ret = toolsFactory.createMap();
-		JsonObject collectionTypes = (JsonObject) map.get(BASYXTYPE);
-
 		for (String k : map.keySet()) {
-			// Ignore BASYXTYPE since it is only used for type meta data
-			if (k.equals(BASYXTYPE)) {
-				continue;
-			}
-
-			// If there are collections in the map, get their types and deserialize them
-			if (collectionTypes != null && collectionTypes.has(k)) {
-				String type = collectionTypes.get(k).getAsString();
-				JsonElement el = map.get(k);
-				if (type.equals(LIST)) {
-					if (el.isJsonArray()) {
-						ret.put(k, deserializeJsonArrayAsList((JsonArray) el));
-					} else {
-						ret.put(k, handleWrappedCollection(el));
-					}
-				} else if (type.equals(SET)) {
-					if (el.isJsonArray()) {
-						ret.put(k, deserializeJsonArrayAsSet((JsonArray) el));
-					} else {
-						ret.put(k, handleWrappedCollection(el));
-					}
-				}
-			} else {
-				ret.put(k, deserializeJsonElement(map.get(k)));
-			}
+			ret.put(k, deserializeJsonElement(map.get(k)));
 		}
 		return ret;
 	}
@@ -303,155 +218,40 @@
 	 */
 	private JsonObject serializeMap(Map<String, Object> map) {
 		JsonObject obj = new JsonObject();
-		JsonObject collectionTypes = new JsonObject();
-		for (String k : map.keySet()) {
-			Object o = map.get(k);
-			if (o instanceof List<?>) {
-				collectionTypes.add(k, new JsonPrimitive(LIST));
-			} else if (o instanceof Set<?>) {
-				collectionTypes.add(k, new JsonPrimitive(SET));
-			}
-
-			obj.add(k, serializeToJsonElement(o));
+		for (Entry<String, Object> entry : map.entrySet()) {
+			obj.add(entry.getKey(), serializeObject(entry.getValue()));
 		}
-
-		// If there are any collections, add collection type meta data
-		if (collectionTypes.size() > 0) {
-			obj.add(BASYXTYPE, collectionTypes);
-		}
-
 		return obj;
 	}
 
 	/**
-	 * Removes INDEX string from ordered lists
-	 * 
-	 * @param obj
-	 * @return
-	 */
-	private JsonObject stripIndex(JsonObject obj) {
-		obj.remove(INDEX);
-		return obj;
-	}
-
-	/**
-	 * Deserializes a JSONArray to either a list or a set, depending on the presence
-	 * of an INDEX value
+	 * Deserializes a JsonArray to a Collection<br/>
+	 * Remark: internally, a List will be used for deserialization & it is assumed, that
+	 * the order in the json equals the correct intended order for the list.
+	 * => The ordering will be preserved in the returned collection
 	 * 
 	 * @param array
 	 * @return
 	 */
-	private Object deserializeJsonArray(JsonArray array) {
-		if (isOrdered(array)) {
-			return deserializeJsonArrayAsList(array);
-		} else {
-			return deserializeJsonArrayAsSet(array);
+	private Collection<Object> deserializeJsonArray(JsonArray array) {
+		Collection<Object> list = toolsFactory.createCollection();
+		for (JsonElement element : array) {
+			list.add(deserializeJsonElement(element));
 		}
-	}
-
-	/**
-	 * Deserializes a JsonArray to a List<br/>
-	 * <b>Assumption:</b> The order in the json is equals the correct order
-	 * 
-	 * @param array
-	 * @return
-	 */
-	private List<Object> deserializeJsonArrayAsList(JsonArray array) {
-		List<Object> list = toolsFactory.createList();
-		for (int i = 0; i < array.size(); i++) {
-			if (array.get(i) instanceof JsonObject) {
-				// If it is a JsonObject it contains an index --> Strip it
-				JsonObject stripped = stripIndex(array.get(i).getAsJsonObject());
-				list.add(deserializeJsonElement(stripped));
-			} else {
-				list.add(deserializeJsonElement(array.get(i)));
-
-			}
-		}
-
 		return list;
 	}
 
 	/**
-	 * Deserializes a JsonArray to a Set
-	 * 
-	 * @param array
-	 * @return
-	 */
-	private Set<Object> deserializeJsonArrayAsSet(JsonArray array) {
-		Set<Object> set = toolsFactory.createSet();
-		for (int i = 0; i < array.size(); i++) {
-			set.add(deserializeJsonElement(array.get(i)));
-		}
-		return set;
-	}
-
-	/**
-	 * Checks if a JsonArray is an ordered list or a set <br/>
-	 * FIXME: Replace this here with BASYXTYPE checks
-	 * 
-	 * @param array
-	 * @return
-	 */
-	private boolean isOrdered(JsonArray array) {
-		if (array.size() == 0) {
-			return true;
-		}
-
-		JsonElement elem = array.get(0);
-
-		if (!elem.isJsonObject()) {
-			return false;
-		}
-
-		JsonObject obj = elem.getAsJsonObject();
-		if (obj.has(INDEX)) {
-			return true;
-		} else {
-			return false;
-		}
-	}
-
-	/**
 	 * Checks if an object is a lambda function
 	 * 
 	 * @param value
 	 * @return
 	 */
 	private boolean isFunction(Object value) {
-		return (value instanceof Supplier<?>) || (value instanceof Function<?, ?>) || (value instanceof Consumer<?>) || (value instanceof BiConsumer<?, ?>);
-	}
-
-	/**
-	 * Checks if an object implements Serializable
-	 * 
-	 * @param value
-	 * @return
-	 */
-	private boolean isSerializable(Object value) {
-		return value instanceof Serializable;
-	}
-
-	/**
-	 * Serializes a set to a JsonArray
-	 * 
-	 * @param set
-	 * @return
-	 */
-	private JsonElement serializeSet(Set<?> set) {
-		JsonArray array = new JsonArray();
-		if (set.size() > 0) {
-			for (Object o : set) {
-				array.add(serializeToJsonElement(o));
-			}
-			return array;
-		} else {
-			// If it is an empty list,
-			JsonObject jObj = new JsonObject();
-			jObj.add(BASYXTYPE, new JsonPrimitive(SET));
-			jObj.add(BASYXVALUE, new JsonArray());
-			return jObj;
-		}
+		return (value instanceof Supplier<?>) 
+				|| (value instanceof Function<?, ?>) 
+				|| (value instanceof Consumer<?>)
+				|| (value instanceof BiConsumer<?, ?>);
 	}
 
 	/**
@@ -460,30 +260,10 @@
 	 * @param list
 	 * @return
 	 */
-	private JsonElement serializeList(List<?> list) {
-
-		if (list.size() > 0 && list.get(0) instanceof Map<?, ?>) {
-			// If the list contains maps, attach the index property
-			JsonArray array = new JsonArray();
-
-			for (int i = 0; i < list.size(); i++) {
-				JsonObject elem = (JsonObject) serializeToJsonElement(list.get(i));
-				elem.add(INDEX, new JsonPrimitive(i));
-				array.add(elem);
-			}
-			return array;
-		} else if (list.size() > 0) {
-			// If it does not contain maps, it is not possible to attach the index property.
-			// Thus BASYXTYPE has to handle the type conversion
-			JsonArray array = new JsonArray();
-			for (Object o : list) {
-				array.add(serializeToJsonElement(o));
-			}
-			return array;
-		} else {
-			// If it is an empty list,
-			return new JsonArray();
-		}
+	private JsonArray serializeCollection(Collection<Object> collection) {
+		JsonArray array = new JsonArray();
+		collection.stream().map(this::serializeObject).forEach(array::add);
+		return array;
 	}
 
 	/**
@@ -493,7 +273,7 @@
 	 * @return
 	 */
 	private JsonObject serializeFunction(Object function) {
-		if (isSerializable(function)) {
+		if (function instanceof Serializable) {
 			return serializeSerializableOperation((Serializable) function);
 		} else {
 			return serializeNotSerializableOperation(function);
@@ -504,26 +284,15 @@
 	 * Read an object from Base64 string.
 	 */
 	protected Object deserializeObjectFromString(String s) {
-		// Return value
 		Object result = null;
-
-		// Decode String
 		byte[] data = Base64.getDecoder().decode(s);
-
-		// Try to deserialize object
-		try {
-			// Object input stream
-			ObjectInputStream stream = new ObjectInputStream(new ByteArrayInputStream(data));
-			// - Read object
+		InputStream byteStream = new ByteArrayInputStream(data);
+		
+		try (ObjectInputStream stream = new ObjectInputStream(byteStream)) {
 			result = stream.readObject();
-
-			// Close stream
-			stream.close();
 		} catch (IOException | ClassNotFoundException e) {
 			logger.error("Exception in deserializeObjectFromString", e);
 		}
-
-		// Return object
 		return result;
 	}
 
@@ -531,20 +300,16 @@
 	 * Write the object to a Base64 string.
 	 */
 	protected String serializeObjectToString(Serializable obj) {
-		// Write object into byte array
 		ByteArrayOutputStream outStream = new ByteArrayOutputStream();
 
-		// Try to serialize object
-		try {
-			ObjectOutputStream oos = new ObjectOutputStream(outStream);
+		try (ObjectOutputStream oos = new ObjectOutputStream(outStream)) {
 			oos.writeObject(obj);
-			oos.close();
 		} catch (IOException e) {
 			logger.error("Exception in serializeObjectToString", e);
 		}
 
-		// Try to encode to string
-		return Base64.getEncoder().encodeToString(outStream.toByteArray());
+		byte[] data = outStream.toByteArray();
+		return Base64.getEncoder().encodeToString(data);
 	}
 
 	/**
@@ -553,10 +318,8 @@
 	private JsonObject serializeSerializableOperation(Serializable value) {
 		JsonObject target = new JsonObject();
 		// Serializable functions will be serialized.
-		// - Serialize operation kind
 		target.add(BASYXFUNCTIONTYPE, new JsonPrimitive(LAMBDA));
 
-		// - Add value
 		String serialized = serializeObjectToString(value);
 		target.add(BASYXFUNCTIONVALUE, new JsonPrimitive(serialized));
 
@@ -572,7 +335,6 @@
 	private JsonObject serializeNotSerializableOperation(Object function) {
 		JsonObject target = new JsonObject();
 		// Not serializable functions will be not be serialized.
-		// - Serialize operation kind
 		target.add(BASYXFUNCTIONTYPE, new JsonPrimitive(OPERATION));
 
 		return target;
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/GSONToolsFactory.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/GSONToolsFactory.java
index 0cf3788..31dd4b6 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/GSONToolsFactory.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/coder/json/serialization/GSONToolsFactory.java
@@ -1,15 +1,14 @@
 package org.eclipse.basyx.vab.coder.json.serialization;
 
-import java.util.List;
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
 
 
 
 /**
- * Factory that controls the kind of Maps, Sets, and Lists that is produced when a Map is deserialized
+ * Factory that controls the kind of Maps and Collections that are produced when an Object is deserialized
  * 
- * @author kuhn
+ * @author kuhn, espen
  *
  */
 public interface GSONToolsFactory {
@@ -22,13 +21,7 @@
 	
 	
 	/**
-	 * Create a Set
+	 * Create a Collection
 	 */
-	public Set<Object> createSet();
-
-	
-	/**
-	 * Create a List
-	 */
-	public List<Object> createList();
+	public Collection<Object> createCollection();
 }
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/lambda/VABLambdaHandler.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/lambda/VABLambdaHandler.java
index 1a1c7a7..d258e3e 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/lambda/VABLambdaHandler.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/vab/modelprovider/lambda/VABLambdaHandler.java
@@ -1,11 +1,10 @@
 package org.eclipse.basyx.vab.modelprovider.lambda;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.function.BiConsumer;
 import java.util.function.Consumer;
 import java.util.function.Supplier;
@@ -105,10 +104,8 @@
 		o = resolveSingle(o);
 		if (o instanceof Map<?, ?>) {
 			return resolveMap((Map<String, Object>) o);
-		} else if (o instanceof List<?>) {
-			return resolveList((List<Object>) o);
-		} else if (o instanceof Set<?>) {
-			return resolveSet((Set<Object>) o);
+		} else if (o instanceof Collection<?>) {
+			return resolveCollection((Collection<Object>) o);
 		} else {
 			return o;
 		}
@@ -122,17 +119,9 @@
 		return ret;
 	}
 
-	private Object resolveList(List<Object> list) {
-		List<Object> ret = new ArrayList<>(list.size());
-		for (Object o : list) {
-			ret.add(resolveAll(o));
-		}
-		return ret;
-	}
-
-	private Object resolveSet(Set<Object> set) {
-		Set<Object> ret = new HashSet<>(set.size());
-		for (Object o : set) {
+	private Object resolveCollection(Collection<Object> coll) {
+		List<Object> ret = new ArrayList<>(coll.size());
+		for (Object o : coll) {
 			ret.add(resolveAll(o));
 		}
 		return ret;
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/aggregator/TestIAASAggregator.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/aggregator/TestIAASAggregator.java
index 3ed3887..d02517a 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/aggregator/TestIAASAggregator.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/aggregator/TestIAASAggregator.java
@@ -4,7 +4,7 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.eclipse.basyx.aas.aggregator.AASAggregator;
 import org.eclipse.basyx.aas.aggregator.api.IAASAggregator;
@@ -36,7 +36,7 @@
 	private static final LangStrings description2 = new LangStrings("en", "This is test AAS 2");
 	private static final String aas2Category = "TestCategory2";
 	
-	//initializing dummy test data
+	// initializing dummy test data
 	@Before
 	public void initAASDummies() {
 		aas1 = new AssetAdministrationShell();
@@ -72,16 +72,16 @@
 	public void testGetAASList() throws Exception {
 		IAASAggregator aggregator = getAggregator();
 		
-		//Create two AASs
+		// Create two AASs
 		aggregator.createAAS(aas1);
 		aggregator.createAAS(aas2);
 		
-		//get the List of all AASs
-		List<IAssetAdministrationShell> list = aggregator.getAASList();
-		assertEquals(2, list.size());
+		// get the collection of all AASs
+		Collection<IAssetAdministrationShell> coll = aggregator.getAASList();
+		assertEquals(2, coll.size());
 		
-		//check the AAS List
-		for(IAssetAdministrationShell aas: list) {
+		// check the AAS collection
+		for (IAssetAdministrationShell aas : coll) {
 			if(aas.getIdShort().equals(aas1Id)) {
 				checkAAS1(aas);
 			} else if(aas.getIdShort().equals(aas2Id)) {
@@ -96,19 +96,19 @@
 	public void testUpdate() throws Exception {
 		IAASAggregator aggregator = getAggregator();
 		
-		//Create a new AAS
+		// Create a new AAS
 		aggregator.createAAS(aas1);
 		
-		//Get and check the unchanged AAS
+		// Get and check the unchanged AAS
 		checkAAS1(aggregator.getAAS(new ModelUrn(aas1Id)));
 
-		//Change Category of AAS locally
+		// Change category of AAS locally
 		aas1.setCategory(aas1AltCategory);
 		
-		//Update the changed AAS
+		// Update the changed AAS
 		aggregator.updateAAS(aas1);
 		
-		//Get the updated AAS and check its Category
+		// Get the updated AAS and check its category
 		IAssetAdministrationShell aas = aggregator.getAAS(new ModelUrn(aas1Id));
 		assertEquals(aas1AltCategory, aas.getCategory());
 	}
@@ -117,22 +117,22 @@
 	public void testDelete() throws Exception {
 		IAASAggregator aggregator = getAggregator();
 		
-		//Create two new AASs
+		// Create two new AASs
 		aggregator.createAAS(aas1);
 		aggregator.createAAS(aas2);
 		
-		//Get AAS List and check, that both are present
-		List<IAssetAdministrationShell> list = aggregator.getAASList();
-		assertEquals(2, list.size());
+		// Get AAS collection and check, that both are present
+		Collection<IAssetAdministrationShell> coll = aggregator.getAASList();
+		assertEquals(2, coll.size());
 		
-		//Delete one of the AASs
+		// Delete one of the AASs
 		aggregator.deleteAAS(new ModelUrn(aas1Id));
 		
-		//Get AAS List and check, that one of them is deleted
-		list = aggregator.getAASList();
-		assertEquals(1, list.size());
+		// Get AAS collection and check, that one of them is deleted
+		coll = aggregator.getAASList();
+		assertEquals(1, coll.size());
 		
-		for(IAssetAdministrationShell aas: list) {
+		for (IAssetAdministrationShell aas : coll) {
 			if(aas.getIdShort().equals(aas1Id)) { //aas1 should be deleted
 				fail();
 			} else if(aas.getIdShort().equals(aas2Id)) {
@@ -144,7 +144,7 @@
 	}
 	
 	
-	//Methods to verify, that AAS objects contain the correct test data
+	// Methods to verify, that AAS objects contain the correct test data
 	private void checkAAS1(Object o) {
 		assertTrue(o instanceof AssetAdministrationShell);
 		AssetAdministrationShell aas = (AssetAdministrationShell) o;
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/factory/xml/TestXMLConverter.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/factory/xml/TestXMLConverter.java
index f16b6e1..7546028 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/factory/xml/TestXMLConverter.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/factory/xml/TestXMLConverter.java
@@ -14,7 +14,6 @@
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import javax.xml.transform.stream.StreamResult;
 
@@ -188,10 +187,10 @@
 		assertEquals("1", aas.getAdministration().getVersion());
 		assertEquals("0", aas.getAdministration().getRevision());
 		
-		Set<IConceptDictionary> conceptDictionary = aas.getConceptDictionary();
+		Collection<IConceptDictionary> conceptDictionary = aas.getConceptDictionary();
 		for (IConceptDictionary iConceptDictionary : conceptDictionary) {
 			assertEquals("SampleDic", iConceptDictionary.getIdShort());
-			Set<IReference> conceptDescription = iConceptDictionary.getConceptDescription();
+			Collection<IReference> conceptDescription = iConceptDictionary.getConceptDescription();
 			List<IKey> keys = conceptDescription.iterator().next().getKeys();
 			assertEquals(1, keys.size());
 
@@ -237,7 +236,7 @@
 		if(!iView.getIdShort().equals("SampleView"))
 			iView = (IView) views[1];
 		assertEquals("SampleView", iView.getIdShort());
-		Set<IReference> containedElement = iView.getContainedElement();
+		Collection<IReference> containedElement = iView.getContainedElement();
 		IReference ref = containedElement.iterator().next();
 
 		// Text keys
@@ -287,7 +286,7 @@
 		assertEquals("conceptDescription1", conceptDescription.getIdShort());
 		assertEquals("conceptDescription_Description", conceptDescription.getDescription().get("EN"));
 		assertEquals("www.festo.com/dic/08111234", conceptDescription.getIdentification().getId());
-		Set<IReference> refs = conceptDescription.getIsCaseOf();
+		Collection<IReference> refs = conceptDescription.getIsCaseOf();
 		assertEquals(1, refs.size());
 	}
 	
@@ -306,7 +305,7 @@
 		assertNotNull(submodel);
 		
 		assertEquals("3s7plfdrs35_submodel1", submodel.getIdShort());
-		Set<IConstraint> constraints = submodel.getQualifier();
+		Collection<IConstraint> constraints = submodel.getQualifier();
 		assertEquals(2, constraints.size());
 		checkSubmodelElements(submodel);
 	}
@@ -340,10 +339,9 @@
 		assertTrue(element instanceof Entity);
 		Entity entity = (Entity) element;
 		assertTrue(entity.getEntityType().equals(EntityType.COMANAGEDENTITY));
-		List<ISubmodelElement> statements = entity.getStatements();
+		Collection<ISubmodelElement> statements = entity.getStatements();
 		assertEquals(2, statements.size());
-		assertTrue((statements.get(0) instanceof File) || (statements.get(1) instanceof File));
-		assertTrue((statements.get(0) instanceof Range) || (statements.get(1) instanceof Range));
+		assertTrue(statements.stream().allMatch(s -> s instanceof File || s instanceof Range));
 		
 		element = submodelElements.get("multi_language_property_id");
 		assertTrue(element instanceof MultiLanguageProperty);
@@ -403,15 +401,15 @@
 		element = submodelElements.get("operation_ID");
 		assertTrue(element instanceof Operation);
 		Operation op = (Operation) element;
-		List<IOperationVariable> parameters = op.getInputVariables();
+		Collection<IOperationVariable> parameters = op.getInputVariables();
 		assertEquals(2, parameters.size());
-		List<IOperationVariable> returns = op.getOutputVariables();
+		Collection<IOperationVariable> returns = op.getOutputVariables();
 		assertEquals(1, returns.size());
-		Object o = returns.get(0).getValue();
+		Object o = returns.iterator().next().getValue();
 		assertTrue(o instanceof ReferenceElement);
-		List<IOperationVariable> inout = op.getInOutputVariables();
+		Collection<IOperationVariable> inout = op.getInOutputVariables();
 		assertEquals(1, inout.size());
-		o = inout.get(0).getValue();
+		o = inout.iterator().next().getValue();
 		assertTrue(o instanceof ReferenceElement);
 	}
 	
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/AssetAdministrationShellSuite.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/AssetAdministrationShellSuite.java
index 09bbd60..eab2e66 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/AssetAdministrationShellSuite.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/AssetAdministrationShellSuite.java
@@ -3,7 +3,7 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import java.util.Set;
+import java.util.Collection;
 
 import org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell;
 import org.eclipse.basyx.aas.metamodel.map.AssetAdministrationShell;
@@ -149,7 +149,7 @@
 	@Test
 	 public void testGetSubmodelDescriptors() {
 		IAssetAdministrationShell shell = retrieveShell();
-		Set<SubmodelDescriptor> descriptors = shell.getSubModelDescriptors();
+		Collection<SubmodelDescriptor> descriptors = shell.getSubModelDescriptors();
 		assertEquals(1, descriptors.size());
 		SubmodelDescriptor desc = descriptors.iterator().next();
 		assertEquals(SMENDPOINT, desc.getFirstEndpoint());
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/map/TestAssetAdministrationShell.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/map/TestAssetAdministrationShell.java
index 26439c8..f906efd 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/map/TestAssetAdministrationShell.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/metamodel/map/TestAssetAdministrationShell.java
@@ -2,8 +2,8 @@
 
 import static org.junit.Assert.assertEquals;
 
+import java.util.Collection;
 import java.util.HashSet;
-import java.util.Set;
 
 import org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell;
 import org.eclipse.basyx.aas.metamodel.map.AssetAdministrationShell;
@@ -49,7 +49,7 @@
 		String idShort = "idShort";
 		String httpEndpoint = "http://endpoint";
 
-		Set<SubmodelDescriptor> descriptors = new HashSet<>();
+		Collection<SubmodelDescriptor> descriptors = new HashSet<>();
 		descriptors.add(new SubmodelDescriptor(idShort, id, httpEndpoint));
 
 		aas.setSubModels(descriptors);
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/restapi/SubModelProviderTest.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/restapi/SubModelProviderTest.java
index 3b21246..958e013 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/restapi/SubModelProviderTest.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/submodel/restapi/SubModelProviderTest.java
@@ -5,9 +5,9 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.basyx.submodel.metamodel.map.qualifier.Identifiable;
 import org.eclipse.basyx.submodel.metamodel.map.qualifier.Referable;
@@ -85,7 +85,7 @@
 
 		// Read list of properties
 		Object result = submodelElement.getModelPropertyValue("/submodel/dataElements");
-		Set<Map<String, Object>> propertySet = (Set<Map<String, Object>>) result;
+		Collection<Map<String, Object>> propertySet = (Collection<Map<String, Object>>) result;
 		HashMap<String, Object> property = (HashMap<String, Object>) propertySet.stream().filter(elem -> elem.get(Identifiable.IDSHORT).equals("integerProperty")).findFirst().get();
 		assertEquals(123, property.get(Property.VALUE));
 
@@ -105,7 +105,7 @@
 		assertEquals("Test", resMap.get(Property.VALUE));
 
 		// Read container property
-		Set<Object> resSet = (Set<Object>) submodelElement
+		Collection<Object> resSet = (Collection<Object>) submodelElement
 				.getModelPropertyValue("/submodel/dataElements/containerRoot/submodelElement");
 		assertEquals(1, resSet.size());
 		resSet.forEach(x -> assertEquals("container", ((Map<String, Object>) x).get(Referable.IDSHORT)));
@@ -147,7 +147,7 @@
 	@Test
 	public void testReadDataElements() {
 		VABElementProxy submodel = getConnectionManager().connectToVABElement(submodelAddr);
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) submodel.getModelPropertyValue("/submodel/dataElements");
+		Collection<Map<String, Object>> set = (Collection<Map<String, Object>>) submodel.getModelPropertyValue("/submodel/dataElements");
 		assertEquals(3, set.size());
 	}
 
@@ -158,7 +158,7 @@
 	@Test
 	public void testReadOperations() {
 		VABElementProxy submodel = getConnectionManager().connectToVABElement(submodelAddr);
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) submodel.getModelPropertyValue("/submodel/operations");
+		Collection<Map<String, Object>> set = (Collection<Map<String, Object>>) submodel.getModelPropertyValue("/submodel/operations");
 		assertEquals(4, set.size());
 	}
 
@@ -180,7 +180,7 @@
 	@Test
 	public void testReadSubModelElements() {
 		VABElementProxy submodel = getConnectionManager().connectToVABElement(submodelAddr);
-		Set<Map<String, Object>> set = (Set<Map<String, Object>>) submodel.getModelPropertyValue("/submodel/submodelElement");
+		Collection<Map<String, Object>> set = (Collection<Map<String, Object>>) submodel.getModelPropertyValue("/submodel/submodelElement");
 		assertEquals(7, set.size());
 	}
 
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/coder/json/TestJson.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/coder/json/TestJson.java
index 3279b4a..f42432d 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/coder/json/TestJson.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/coder/json/TestJson.java
@@ -10,6 +10,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Base64;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -110,19 +111,42 @@
 	}
 
 	/**
-	 * Tests if a map containing Sets/Lists is (de-)serialized correctly
+	 * Tests if a map containing a collection is (de-)serialized correctly
 	 */
+	@SuppressWarnings("unchecked")
 	@Test
 	public void testMapWithCollection() {
-		String str = "{\"" + GSONTools.BASYXTYPE + "\": {\"a\": \"" + GSONTools.LIST + "\", \"b\": \"" + GSONTools.SET + "\"}, \"a\": [1,2,3], \"b\": [4,5,6]}";
+		String str = "{\"a\": [1,2,3]}";
 
-		Map<String, Object> map = new HashMap<>();
-		map.put("a", Arrays.asList(1, 2, 3));
-		map.put("b", Sets.newHashSet(4, 5, 6));
-
-		assertEquals(map, tools.deserialize(str));
+		Map<String, Object> listMap = new HashMap<>();
+		listMap.put("a", Arrays.asList(1, 2, 3));
 		
-		assertEquals(map, tools.deserialize(tools.serialize(map)));
+		Map<String, Object> setMap = new HashMap<>();
+		setMap.put("a", Sets.newHashSet(1, 2, 3));
+		
+		Map<String, Object> deserialized = (Map<String, Object>) tools.deserialize(str);
+		Collection<Object> coll = (Collection<Object>) deserialized.get("a");
+		assertEquals(1, deserialized.size());
+		assertEquals(3, coll.size());
+		assertTrue(coll.contains(1));
+		assertTrue(coll.contains(2));
+		assertTrue(coll.contains(3));
+		
+		deserialized = (Map<String, Object>) tools.deserialize(tools.serialize(listMap));
+		coll = (Collection<Object>) deserialized.get("a");
+		assertEquals(1, deserialized.size());
+		assertEquals(3, coll.size());
+		assertTrue(coll.contains(1));
+		assertTrue(coll.contains(2));
+		assertTrue(coll.contains(3));
+		
+		deserialized = (Map<String, Object>) tools.deserialize(tools.serialize(setMap));
+		coll = (Collection<Object>) deserialized.get("a");
+		assertEquals(1, deserialized.size());
+		assertEquals(3, coll.size());
+		assertTrue(coll.contains(1));
+		assertTrue(coll.contains(2));
+		assertTrue(coll.contains(3));
 	}
 
 	/**
@@ -130,7 +154,7 @@
 	 */
 	@Test
 	public void testList() {
-		String strComplexOrdered = "[{\"" + GSONTools.INDEX + "\": 0, \"a\": 2}, {\"" + GSONTools.INDEX + "\": 1, \"a\": false}]";
+		String strComplexOrdered = "[{\"a\": 2}, {\"a\": false}]";
 		List<Map<String, Object>> orderedCollection = new ArrayList<>();
 		orderedCollection.add(Collections.singletonMap("a", 2));
 		orderedCollection.add(Collections.singletonMap("a", false));
@@ -139,11 +163,8 @@
 
 		JsonObject o1 = new JsonObject();
 		o1.add("a", new JsonPrimitive(2));
-		o1.add(GSONTools.INDEX, new JsonPrimitive(0));
 		JsonObject o2 = new JsonObject();
 		o2.add("a", new JsonPrimitive(false));
-		o2.add(GSONTools.INDEX, new JsonPrimitive(1));
-
 		JsonArray ordered = new JsonArray();
 		ordered.add(o1);
 		ordered.add(o2);
@@ -159,11 +180,13 @@
 	/**
 	 * Tests if an empty list is correctly (de-)serialized
 	 */
+	@SuppressWarnings("unchecked")
 	@Test
 	public void testEmptyList() {
 		List<String> list = new ArrayList<>();
-
-		assertEquals(list, tools.deserialize(tools.serialize(list)));
+		String serialized = tools.serialize(list);
+		Collection<Object> coll = (Collection<Object>) tools.deserialize(serialized);
+		assertTrue(coll.isEmpty());
 	}
 
 	/**
@@ -172,15 +195,14 @@
 	@Test
 	public void testEmptyListInMap() {
 		Map<String, Object> map = new HashMap<>();
-
 		map.put("a", new ArrayList<>());
-
 		assertEquals(map, tools.deserialize(tools.serialize(map)));
 	}
 
 	/**
 	 * Tests if a set is correctly (de-)serialized
 	 */
+	@SuppressWarnings("unchecked")
 	@Test
 	public void testSet() {
 		String strComplexUnordered = "[{\"a\": 4}]";
@@ -188,8 +210,10 @@
 		Set<Map<String, Object>> unorderedSet = new HashSet<>();
 		unorderedSet.add(Collections.singletonMap("a", 4));
 		
-		assertEquals(unorderedSet, tools.deserialize(strComplexUnordered));
-		
+		Collection<Map<String, Object>> deserialized = (Collection<Map<String, Object>>) tools
+				.deserialize(strComplexUnordered);
+		assertEquals(1, deserialized.size());
+		assertEquals(4, deserialized.iterator().next().get("a"));
 		
 		JsonArray unorderedArray = new JsonArray();
 		JsonObject o1 = new JsonObject();
@@ -200,18 +224,21 @@
 
 		Set<Integer> primitiveSet = new HashSet<>();
 		primitiveSet.add(1);
-
-		assertEquals(primitiveSet, tools.deserialize(tools.serialize(primitiveSet)));
+		Collection<Object> deserializedColl = (Collection<Object>) tools.deserialize(tools.serialize(primitiveSet));
+		assertEquals(1, deserializedColl.size());
+		assertTrue(deserializedColl.contains(1));
 	}
 
 	/**
 	 * Tests if an empty set is correctly (de-)serialized
 	 */
+	@SuppressWarnings("unchecked")
 	@Test
 	public void testEmptySet() {
 		Set<String> set = new HashSet<>();
 		String serialized = tools.serialize(set);
-		assertEquals(set, tools.deserialize(serialized));
+		Collection<Object> coll = (Collection<Object>) tools.deserialize(serialized);
+		assertTrue(coll.isEmpty());
 	}
 
 	/**
@@ -221,10 +248,8 @@
 	public void testEmptySetInMap() {
 		Map<String, Object> map = new HashMap<>();
 		map.put("test", new ArrayList<>());
-
 		String result = tools.serialize(map);
-		assertEquals("{\"test\":[],\"" + GSONTools.BASYXTYPE + "\":{\"test\":\"" + GSONTools.LIST + "\"}}", result);
-
+		assertEquals("{\"test\":[]}", result);
 		assertEquals(map, tools.deserialize(tools.serialize(map)));
 	}
 
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/protocol/TypeDestroyer.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/protocol/TypeDestroyer.java
index 8431240..298d3f6 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/protocol/TypeDestroyer.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/vab/protocol/TypeDestroyer.java
@@ -4,11 +4,13 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
+import java.util.Set;
 
 import org.eclipse.basyx.testsuite.regression.vab.modelprovider.SimpleVABElement;
 import org.junit.Test;
@@ -36,8 +38,10 @@
 	private static Object handle(Object o) {
 		if(o instanceof Map) {
 			return handleMap((Map<String, Object>) o);
-		} else if(o instanceof Set) {
+		} else if (o instanceof Set) {
 			return handleSet((Set<Object>) o);
+		} else if (o instanceof List) {
+			return handleList((List<Object>) o);
 		} else {
 			return o;
 		}
@@ -51,6 +55,14 @@
 		return ret;
 	}
 
+	private static List<Object> handleList(List<Object> list) {
+		List<Object> ret = new ArrayList<>();
+		for (Object o : list) {
+			ret.add(handle(o));
+		}
+		return ret;
+	}
+
 	private static Map<String, Object> handleMap(Map<String, Object> map) {
 		Map<String, Object> ret = new HashMap<>();
 		for (Entry<String, Object> entry : map.entrySet()) {