Merge branch 'fcs-ql' of
ssh://margaretha@korap.ids-mannheim.de:29418/KorAP/Koral into fcs-ql
Conflicts:
src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
Change-Id: Id1037d133c9fa6ea7cb4e07f0ae32ed978671c18
diff --git a/pom.xml b/pom.xml
index f575129..00f257e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,6 +29,11 @@
</dependency>
<dependency>
<groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ <version>4.5.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>4.2</version>
</dependency>
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
index 16a24de..b7516fa 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
@@ -122,8 +122,9 @@
}
else if (queryLanguage.equalsIgnoreCase("cql")) {
ast = new CqlQueryProcessor(query);
- }
- else if (queryLanguage.equalsIgnoreCase("annis")) {
+ } else if (queryLanguage.equalsIgnoreCase("fcsql")) {
+ ast = new FCSQLQueryProcessor(query, "2.0");
+ }else if (queryLanguage.equalsIgnoreCase("annis")) {
ast = new AnnisQueryProcessor(query);
}
else {
@@ -150,7 +151,7 @@
ast = new Cosmas2QueryProcessor(query);
}
else if (ql.equalsIgnoreCase("poliqarpplus")) {
- ast = new PoliqarpPlusQueryProcessor(query);
+ ast = new PoliqarpPlusQueryProcessor(query);
}
else if (ql.equalsIgnoreCase("cql")) {
if (version == null) {
@@ -165,7 +166,14 @@
} else {
ast = new FCSQLQueryProcessor(query, version);
}
- }else if (ql.equalsIgnoreCase("annis")) {
+ } else if (ql.equalsIgnoreCase("fcsql")) {
+ if (version == null) {
+ ast.addError(StatusCodes.MISSING_VERSION,
+ "SRU Version is missing!");
+ } else {
+ ast = new FCSQLQueryProcessor(query, version);
+ }
+ } else if (ql.equalsIgnoreCase("annis")) {
ast = new AnnisQueryProcessor(query);
}else {