Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Updated sdk version to v1.18.0 #11

Merged
merged 1 commit into from
May 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Updated sdk version to v1.18.0
Fixed AqlEditorContainmentService
Fixed error message in AqlServiceTest
philiphufeland committed Apr 29, 2022
commit 9e65d35ceb0cf0bbd5e76b9a36f0ec035f9b394e
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<ehrbase.sdk.version>v1.4.0</ehrbase.sdk.version>
<ehrbase.sdk.version>v1.18.0</ehrbase.sdk.version>
<commons.lang3.version>3.8</commons.lang3.version>
</properties>

Original file line number Diff line number Diff line change
@@ -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());
4 changes: 2 additions & 2 deletions src/test/java/org.ehrbase.aqleditor/AqlServiceTest.java
Original file line number Diff line number Diff line change
@@ -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}"));
}