Changes MultiAASProvider path multiplexing

* Does not look for "path://" any more

Change-Id: I50caeef1e0afd989f6a949a9f2ec65bd8d8c5170
Signed-off-by: Frank Schnicke <frank.schnicke@iese.fraunhofer.de>
diff --git a/components/basys.components/basyx.components.docker/basyx.components.xmlAAS/src/main/java/org/eclipse/basyx/components/executable/XMLExecutable.java b/components/basys.components/basyx.components.docker/basyx.components.xmlAAS/src/main/java/org/eclipse/basyx/components/executable/XMLExecutable.java
index 9c75559..be246af 100644
--- a/components/basys.components/basyx.components.docker/basyx.components.xmlAAS/src/main/java/org/eclipse/basyx/components/executable/XMLExecutable.java
+++ b/components/basys.components/basyx.components.docker/basyx.components.xmlAAS/src/main/java/org/eclipse/basyx/components/executable/XMLExecutable.java
@@ -13,15 +13,17 @@
 import org.xml.sax.SAXException;
 
 /**
- * A XML registry servlet based on an InMemory Registry. The servlet therefore
- * provides an implementation for the IAASRegistryService interface without a
- * permanent storage capability. it imports AAS from given XML location provided
- * in the context.properties and maps the AAS to servlet as well
+ * Starts an HTTP server providing multiple AAS and submodels as described in
+ * the XML file specified in the properties file <br />
+ * They are made available at <i>localhost:4000/xmlAAS/$aasId/aas</i><br />
+ * <br />
+ * <b>Please note:</b> Neither the AASs nor the Submodels are added to the
+ * registry. Additionally, the Submodel descriptors inside the AAS are missing.
+ * <br />
+ * There reason for this is that the executable does not know about the outside
+ * context (e.g. docker, ...)!
  * 
- * Do not use this registry in a productive environment - the entries are not
- * persistent!
- * 
- * @author haque
+ * @author haque, schnicke
  */
 public class XMLExecutable {
 
diff --git a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/MultiAASProvider.java b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/MultiAASProvider.java
index 5b8d0a4..9a1b917 100644
--- a/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/MultiAASProvider.java
+++ b/sdks/java/basys.sdk/src/main/java/org/eclipse/basyx/aas/restapi/MultiAASProvider.java
@@ -7,7 +7,7 @@
 
 /**
  * Provider, that redirects requests for different Asset Administration Shells.
- * e.g. path://aas1 refers to the AAS with id "aas1".
+ * e.g. aas1 refers to the AAS with id "aas1".
  * 
  * @author espen
  *
@@ -21,7 +21,7 @@
 
 	/**
 	 * Adds an Asset Administration Shell to this provider. The AAS will be
-	 * accessible via path://*id
+	 * accessible via *id
 	 * 
 	 * @param aasIdShort
 	 *            The id of the added Asset Administration Shell.
@@ -121,7 +121,7 @@
 
 	/**
 	 * Returns the requested aas id from a given VAB path. E.g. returns "aas1", if
-	 * the path is path://aas1/aas/
+	 * the path is aas1/aas/
 	 * 
 	 * @param path
 	 *            The requested VAB path
@@ -129,13 +129,13 @@
 	 *         the path is invalid or does not contain an AAS id.
 	 */
 	private String getId(String path) {
-		if (path == null || !path.startsWith("path://")) {
+		if (path == null) {
 			return null;
 		}
 
 		String[] elements = VABPathTools.splitPath(path);
-		if (elements.length >= 2) {
-			String aasId = elements[1];
+		if (elements.length >= 1) {
+			String aasId = elements[0];
 			return aasId;
 		} else {
 			return null;
@@ -144,7 +144,7 @@
 
 	/**
 	 * Returns the sub path in the context of a given AAS id. E.g. returns
-	 * "/aas/submodels", if the path is path://aas1/aas/submodels/
+	 * "/aas/submodels", if the path is aas1/aas/submodels/
 	 * 
 	 * @param path
 	 *            The requested VAB path
@@ -153,7 +153,6 @@
 	 * @return The remaining sub-path, when removing the id from the VAB path
 	 */
 	private String getSubPath(String path, String aasId) {
-		String prefix = "path://" + aasId;
-		return path.substring(prefix.length());
+		return path.substring(aasId.length());
 	}
 }
diff --git a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/restapi/MultiAASProviderTest.java b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/restapi/MultiAASProviderTest.java
index 1cf47ad..bc46dc2 100644
--- a/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/restapi/MultiAASProviderTest.java
+++ b/sdks/java/basys.sdk/src/test/java/org/eclipse/basyx/testsuite/regression/aas/restapi/MultiAASProviderTest.java
@@ -45,7 +45,7 @@
 	@Test
 	public void clearTest() {
 		provider.clear();
-		Object result = proxy.getModelPropertyValue("path://a1/aas/submodels/SimpleAASSubmodel/");
+		Object result = proxy.getModelPropertyValue("a1/aas/submodels/SimpleAASSubmodel/");
 		assertNull(result);
 	}
 
@@ -54,25 +54,25 @@
 	public void getTest() {
 		// test reading from a valid aas
 		Map<String, Object> result = (Map<String, Object>) proxy
-				.getModelPropertyValue("path://a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
+				.getModelPropertyValue("a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
 		assertEquals(123, result.get(Property.VALUE));
 
 		// test reading from an invalid aas
-		assertNull(proxy.getModelPropertyValue("path://A1/aas/submodels/SimpleAASSubmodel/"));
+		assertNull(proxy.getModelPropertyValue("A1/aas/submodels/SimpleAASSubmodel/"));
 	}
 
 	@SuppressWarnings("unchecked")
 	@Test
 	public void setTest() {
 		// test setting in a valid aas
-		proxy.setModelPropertyValue("path://a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value", 100);
+		proxy.setModelPropertyValue("a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value", 100);
 
 		// test setting in an invalid aas
-		proxy.setModelPropertyValue("path://A1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value", 200);
+		proxy.setModelPropertyValue("A1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value", 200);
 
 		// retrieving property
 		Map<String, Object> result = (Map<String, Object>) proxy
-				.getModelPropertyValue("path://a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
+				.getModelPropertyValue("a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
 		assertEquals(100, result.get(Property.VALUE));
 	}
 
@@ -80,15 +80,15 @@
 	@Test
 	public void removeTest() {
 		// test deleting from an invalid aas
-		proxy.deleteValue("path://A1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
+		proxy.deleteValue("A1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
 		Map<String, Object> result = (Map<String, Object>) proxy
-				.getModelPropertyValue("path://a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
+				.getModelPropertyValue("a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
 		assertEquals(123, result.get(Property.VALUE));
 
 		// test deleting from a valid aas
-		proxy.deleteValue("path://a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
+		proxy.deleteValue("a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/value");
 		result = (Map<String, Object>) proxy
-				.getModelPropertyValue("path://a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/");
+				.getModelPropertyValue("a1/aas/submodels/SimpleAASSubmodel/dataElements/integerProperty/");
 		assertNull(result.get("value"));
 	}
 
@@ -96,14 +96,14 @@
 	public void invokeExceptionTest() {
 		// Invoke exception1
 		try {
-			proxy.invokeOperation("path://a1/aas/submodels/SimpleAASSubmodel/operations/exception1/invokable");
+			proxy.invokeOperation("a1/aas/submodels/SimpleAASSubmodel/operations/exception1/invokable");
 			fail();
 		} catch (ServerException e) {
 			assertEquals(NullPointerException.class.getCanonicalName(), e.getType());
 		}
 		// Invoke exception2
 		try {
-			proxy.invokeOperation("path://a1/aas/submodels/SimpleAASSubmodel/operations/exception2/invokable", "prop1");
+			proxy.invokeOperation("a1/aas/submodels/SimpleAASSubmodel/operations/exception2/invokable", "prop1");
 			fail();
 		} catch (ServerException e) {
 			assertEquals("ExType", e.getType());
@@ -113,10 +113,10 @@
 	@Test
 	public void invokeTest() {
 		// test invoking from an invalid aas
-		assertNull(proxy.invokeOperation("path://A1/aas/submodels/SimpleAASSubmodel/operations/complex/invokable", 10, 3));
+		assertNull(proxy.invokeOperation("A1/aas/submodels/SimpleAASSubmodel/operations/complex/invokable", 10, 3));
 
 		// test invoking with return value
-		assertEquals(7, proxy.invokeOperation("path://a1/aas/submodels/SimpleAASSubmodel/operations/complex/invokable", 10, 3));
-		assertEquals(true, proxy.invokeOperation("path://a1/aas/submodels/SimpleAASSubmodel/operations/simple/invokable"));
+		assertEquals(7, proxy.invokeOperation("a1/aas/submodels/SimpleAASSubmodel/operations/complex/invokable", 10, 3));
+		assertEquals(true, proxy.invokeOperation("a1/aas/submodels/SimpleAASSubmodel/operations/simple/invokable"));
 	}
 }