diff --git a/pom.xml b/pom.xml
index 2d32f4d..2f288f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,7 @@
11
11
11
- v1.4.0
+ v1.18.0
3.8
diff --git a/src/main/java/org/ehrbase/aqleditor/service/AqlEditorContainmentService.java b/src/main/java/org/ehrbase/aqleditor/service/AqlEditorContainmentService.java
index c969d51..2e235fc 100644
--- a/src/main/java/org/ehrbase/aqleditor/service/AqlEditorContainmentService.java
+++ b/src/main/java/org/ehrbase/aqleditor/service/AqlEditorContainmentService.java
@@ -38,7 +38,7 @@
import org.ehrbase.util.reflection.ReflectionHelper;
import org.ehrbase.webtemplate.model.WebTemplate;
import org.ehrbase.webtemplate.model.WebTemplateNode;
-import org.ehrbase.webtemplate.parser.FlatPath;
+import org.ehrbase.webtemplate.parser.AqlPath;
import org.springframework.stereotype.Service;
@Service
@@ -94,7 +94,7 @@ private void handleNext(Context context, WebTemplateNode childNode) {
fieldDto.setRmType(childNode.getRmType());
String relativAql =
StringUtils.removeStart(childNode.getAqlPath(), context.aqlQueue.peek());
- fieldDto.setAqlPath(new FlatPath(relativAql).format(false));
+ fieldDto.setAqlPath(AqlPath.parse(relativAql).format(false));
context.nodeQueue.push(childNode);
fieldDto.setHumanReadablePath(buildHumanReadablePath(context));
context.containmentQueue.peek().getFields().add(fieldDto);
@@ -109,7 +109,7 @@ private void handleNext(Context context, WebTemplateNode childNode) {
String relativAql =
StringUtils.removeStart(childNode.getAqlPath(), context.aqlQueue.peek());
fieldDto.setAqlPath(
- new FlatPath(relativAql + "/" + rmAttributeInfo.getRmName()).format(false));
+ AqlPath.parse(relativAql + "/" + rmAttributeInfo.getRmName()).format(false));
context.nodeQueue.push(childNode);
fieldDto.setHumanReadablePath(
buildHumanReadablePath(context) + "/" + rmAttributeInfo.getRmName());
diff --git a/src/test/java/org.ehrbase.aqleditor/AqlServiceTest.java b/src/test/java/org.ehrbase.aqleditor/AqlServiceTest.java
index fbcaf13..6e6f9ab 100644
--- a/src/test/java/org.ehrbase.aqleditor/AqlServiceTest.java
+++ b/src/test/java/org.ehrbase.aqleditor/AqlServiceTest.java
@@ -35,7 +35,7 @@ public void shouldCorrectlyValidateAql1() {
assertThat(response.getStartColumn(), is("0"));
assertThat(response.getStartLine(), is("1"));
assertThat(response.getMessage(),
- containsStringIgnoringCase("AQL Parse exception: line 1: char 0"));
+ containsStringIgnoringCase("Parse exception: line 1: char 0 mismatched input 'invalid' expecting SELECT"));
assertThat(response.getError(),
containsStringIgnoringCase("mismatched input 'invalid' expecting SELECT"));
}
@@ -52,7 +52,7 @@ public void shouldCorrectlyValidateAql2() {
assertThat(response.getStartColumn(), is("23"));
assertThat(response.getStartLine(), is("1"));
assertThat(response.getMessage(),
- containsStringIgnoringCase("AQL Parse exception: line 1: char 23"));
+ containsStringIgnoringCase("Parse exception: line 1: char 23 mismatched input 'where' expecting {DISTINCT, FUNCTION_IDENTIFIER, EXTENSION_IDENTIFIER, IDENTIFIER, INTEGER, STRING}"));
assertThat(response.getError(),
containsStringIgnoringCase("mismatched input 'where' expecting {DISTINCT, FUNCTION_IDENTIFIER, EXTENSION_IDENTIFIER, IDENTIFIER, INTEGER, STRING}"));
}