commit | 9c3a5e73553ea59409e222178667be8790712eea | [log] [tgz] |
---|---|---|
author | margaretha <margaretha@ids-mannheim.de> | Tue Nov 21 19:42:28 2017 +0100 |
committer | margaretha <margaretha@ids-mannheim.de> | Tue Nov 21 19:42:28 2017 +0100 |
tree | 19bd059d7c412e9de3b38cd6e6310566234ec600 | |
parent | a2005cac7740e12b91d59ae3da142768040c4436 [diff] |
Set default version for FCSQL. Change-Id: If49cc766ce40d9be3b264fe2c3b0f5a1d34d61ff
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java index 3717cba..ef7e375 100644 --- a/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java +++ b/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java
@@ -36,6 +36,10 @@ private final QueryParser fcsParser = new QueryParser(); private String version; + + public FCSQLQueryProcessor (String query) { + this(query, VERSION_2_0); + } /** Constructs FCSQLQueryProcessor for the given query and version. * @param query an FCS query string
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 e29fd22..4b192b0 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
@@ -158,8 +158,9 @@ } else if (ql.equalsIgnoreCase("fcsql")) { if (version == null) { - ast.addError(StatusCodes.MISSING_VERSION, - "SRU Version is missing!"); + ast = new FCSQLQueryProcessor(query); +// ast.addError(StatusCodes.MISSING_VERSION, +// "SRU Version is missing!"); } else { ast = new FCSQLQueryProcessor(query, version);