Port regression/randomized testing to JUnit
authorJakub Skoczen <jakub@indexdata.dk>
Fri, 14 Mar 2014 13:23:20 +0000 (14:23 +0100)
committerJakub Skoczen <jakub@indexdata.dk>
Fri, 14 Mar 2014 13:23:20 +0000 (14:23 +0100)
182 files changed:
Makefile [deleted file]
docs/.gitignore [deleted file]
docs/Makefile [deleted file]
mkdist [deleted file]
src/main/java/org/z3950/zing/cql/CQLParser.java
src/main/java/org/z3950/zing/cql/Makefile [deleted file]
src/test/java/org/z3950/zing/cql/CQLParserTest.java [new file with mode: 0644]
src/test/resources/generate.properties [new file with mode: 0644]
src/test/resources/regression/01/01.cql [new file with mode: 0644]
src/test/resources/regression/01/01.xcql [new file with mode: 0644]
src/test/resources/regression/01/02.cql [new file with mode: 0644]
src/test/resources/regression/01/02.xcql [new file with mode: 0644]
src/test/resources/regression/01/03.cql [new file with mode: 0644]
src/test/resources/regression/01/03.xcql [new file with mode: 0644]
src/test/resources/regression/01/04.cql [new file with mode: 0644]
src/test/resources/regression/01/04.xcql [new file with mode: 0644]
src/test/resources/regression/01/05.cql [new file with mode: 0644]
src/test/resources/regression/01/05.xcql [new file with mode: 0644]
src/test/resources/regression/01/06.cql [new file with mode: 0644]
src/test/resources/regression/01/06.xcql [new file with mode: 0644]
src/test/resources/regression/01/07.cql [new file with mode: 0644]
src/test/resources/regression/01/07.xcql [new file with mode: 0644]
src/test/resources/regression/01/08.cql [new file with mode: 0644]
src/test/resources/regression/01/08.xcql [new file with mode: 0644]
src/test/resources/regression/01/09.cql [new file with mode: 0644]
src/test/resources/regression/01/09.xcql [new file with mode: 0644]
src/test/resources/regression/01/10.cql [new file with mode: 0644]
src/test/resources/regression/01/10.xcql [new file with mode: 0644]
src/test/resources/regression/01/11.cql [new file with mode: 0644]
src/test/resources/regression/01/11.xcql [new file with mode: 0644]
src/test/resources/regression/01/name [new file with mode: 0644]
src/test/resources/regression/02/01.cql [new file with mode: 0644]
src/test/resources/regression/02/01.xcql [new file with mode: 0644]
src/test/resources/regression/02/02.cql [new file with mode: 0644]
src/test/resources/regression/02/02.xcql [new file with mode: 0644]
src/test/resources/regression/02/03.cql [new file with mode: 0644]
src/test/resources/regression/02/03.xcql [new file with mode: 0644]
src/test/resources/regression/02/04.cql [new file with mode: 0644]
src/test/resources/regression/02/04.xcql [new file with mode: 0644]
src/test/resources/regression/02/05.cql [new file with mode: 0644]
src/test/resources/regression/02/05.xcql [new file with mode: 0644]
src/test/resources/regression/02/06.cql [new file with mode: 0644]
src/test/resources/regression/02/06.xcql [new file with mode: 0644]
src/test/resources/regression/02/07.cql [new file with mode: 0644]
src/test/resources/regression/02/07.xcql [new file with mode: 0644]
src/test/resources/regression/02/08.cql [new file with mode: 0644]
src/test/resources/regression/02/08.xcql [new file with mode: 0644]
src/test/resources/regression/02/09.cql [new file with mode: 0644]
src/test/resources/regression/02/09.xcql [new file with mode: 0644]
src/test/resources/regression/02/10.cql [new file with mode: 0644]
src/test/resources/regression/02/10.xcql [new file with mode: 0644]
src/test/resources/regression/02/11.cql [new file with mode: 0644]
src/test/resources/regression/02/11.xcql [new file with mode: 0644]
src/test/resources/regression/02/12.cql [new file with mode: 0644]
src/test/resources/regression/02/12.xcql [new file with mode: 0644]
src/test/resources/regression/02/13.cql [new file with mode: 0644]
src/test/resources/regression/02/13.xcql [new file with mode: 0644]
src/test/resources/regression/02/14.cql [new file with mode: 0644]
src/test/resources/regression/02/14.xcql [new file with mode: 0644]
src/test/resources/regression/02/15.cql [new file with mode: 0644]
src/test/resources/regression/02/15.xcql [new file with mode: 0644]
src/test/resources/regression/02/16.cql [new file with mode: 0644]
src/test/resources/regression/02/16.xcql [new file with mode: 0644]
src/test/resources/regression/02/17.cql [new file with mode: 0644]
src/test/resources/regression/02/17.xcql [new file with mode: 0644]
src/test/resources/regression/02/name [new file with mode: 0644]
src/test/resources/regression/03/01.cql [new file with mode: 0644]
src/test/resources/regression/03/01.xcql [new file with mode: 0644]
src/test/resources/regression/03/02.cql [new file with mode: 0644]
src/test/resources/regression/03/02.xcql [new file with mode: 0644]
src/test/resources/regression/03/03.cql [new file with mode: 0644]
src/test/resources/regression/03/03.xcql [new file with mode: 0644]
src/test/resources/regression/03/04.cql [new file with mode: 0644]
src/test/resources/regression/03/04.xcql [new file with mode: 0644]
src/test/resources/regression/03/05.cql [new file with mode: 0644]
src/test/resources/regression/03/05.xcql [new file with mode: 0644]
src/test/resources/regression/03/06.cql [new file with mode: 0644]
src/test/resources/regression/03/06.xcql [new file with mode: 0644]
src/test/resources/regression/03/07.cql [new file with mode: 0644]
src/test/resources/regression/03/07.xcql [new file with mode: 0644]
src/test/resources/regression/03/08.cql [new file with mode: 0644]
src/test/resources/regression/03/08.xcql [new file with mode: 0644]
src/test/resources/regression/03/09.cql [new file with mode: 0644]
src/test/resources/regression/03/09.xcql [new file with mode: 0644]
src/test/resources/regression/03/name [new file with mode: 0644]
src/test/resources/regression/04/01.cql [new file with mode: 0644]
src/test/resources/regression/04/01.xcql [new file with mode: 0644]
src/test/resources/regression/04/02.cql [new file with mode: 0644]
src/test/resources/regression/04/02.xcql [new file with mode: 0644]
src/test/resources/regression/04/name [new file with mode: 0644]
src/test/resources/regression/05/01.cql [new file with mode: 0644]
src/test/resources/regression/05/01.xcql [new file with mode: 0644]
src/test/resources/regression/05/02.cql [new file with mode: 0644]
src/test/resources/regression/05/02.xcql [new file with mode: 0644]
src/test/resources/regression/05/03.cql [new file with mode: 0644]
src/test/resources/regression/05/03.xcql [new file with mode: 0644]
src/test/resources/regression/05/04.cql [new file with mode: 0644]
src/test/resources/regression/05/04.xcql [new file with mode: 0644]
src/test/resources/regression/05/05.cql [new file with mode: 0644]
src/test/resources/regression/05/05.xcql [new file with mode: 0644]
src/test/resources/regression/05/06.cql [new file with mode: 0644]
src/test/resources/regression/05/06.xcql [new file with mode: 0644]
src/test/resources/regression/05/07.cql [new file with mode: 0644]
src/test/resources/regression/05/07.xcql [new file with mode: 0644]
src/test/resources/regression/05/08.cql [new file with mode: 0644]
src/test/resources/regression/05/08.xcql [new file with mode: 0644]
src/test/resources/regression/05/09.cql [new file with mode: 0644]
src/test/resources/regression/05/09.xcql [new file with mode: 0644]
src/test/resources/regression/05/name [new file with mode: 0644]
src/test/resources/regression/06/01.cql [new file with mode: 0644]
src/test/resources/regression/06/01.xcql [new file with mode: 0644]
src/test/resources/regression/06/02.cql [new file with mode: 0644]
src/test/resources/regression/06/02.xcql [new file with mode: 0644]
src/test/resources/regression/06/03.cql [new file with mode: 0644]
src/test/resources/regression/06/03.xcql [new file with mode: 0644]
src/test/resources/regression/06/04.cql [new file with mode: 0644]
src/test/resources/regression/06/04.xcql [new file with mode: 0644]
src/test/resources/regression/06/05.cql [new file with mode: 0644]
src/test/resources/regression/06/05.xcql [new file with mode: 0644]
src/test/resources/regression/06/06.cql [new file with mode: 0644]
src/test/resources/regression/06/06.xcql [new file with mode: 0644]
src/test/resources/regression/06/name [new file with mode: 0644]
src/test/resources/regression/07/01.cql [new file with mode: 0644]
src/test/resources/regression/07/01.xcql [new file with mode: 0644]
src/test/resources/regression/07/02.cql [new file with mode: 0644]
src/test/resources/regression/07/02.xcql [new file with mode: 0644]
src/test/resources/regression/07/03.cql [new file with mode: 0644]
src/test/resources/regression/07/03.xcql [new file with mode: 0644]
src/test/resources/regression/07/name [new file with mode: 0644]
src/test/resources/regression/08/01.cql [new file with mode: 0644]
src/test/resources/regression/08/01.xcql [new file with mode: 0644]
src/test/resources/regression/08/02.cql [new file with mode: 0644]
src/test/resources/regression/08/02.xcql [new file with mode: 0644]
src/test/resources/regression/08/03.cql [new file with mode: 0644]
src/test/resources/regression/08/03.xcql [new file with mode: 0644]
src/test/resources/regression/08/name [new file with mode: 0644]
src/test/resources/regression/09/01.cql [new file with mode: 0644]
src/test/resources/regression/09/01.xcql [new file with mode: 0644]
src/test/resources/regression/09/02.cql [new file with mode: 0644]
src/test/resources/regression/09/02.xcql [new file with mode: 0644]
src/test/resources/regression/09/03.cql [new file with mode: 0644]
src/test/resources/regression/09/03.xcql [new file with mode: 0644]
src/test/resources/regression/09/04.cql [new file with mode: 0644]
src/test/resources/regression/09/04.xcql [new file with mode: 0644]
src/test/resources/regression/09/05.cql [new file with mode: 0644]
src/test/resources/regression/09/05.xcql [new file with mode: 0644]
src/test/resources/regression/09/06.cql [new file with mode: 0644]
src/test/resources/regression/09/06.xcql [new file with mode: 0644]
src/test/resources/regression/09/name [new file with mode: 0644]
src/test/resources/regression/10/01.cql [new file with mode: 0644]
src/test/resources/regression/10/01.xcql [new file with mode: 0644]
src/test/resources/regression/10/02.cql [new file with mode: 0644]
src/test/resources/regression/10/02.xcql [new file with mode: 0644]
src/test/resources/regression/10/03.cql [new file with mode: 0644]
src/test/resources/regression/10/03.xcql [new file with mode: 0644]
src/test/resources/regression/10/04.cql [new file with mode: 0644]
src/test/resources/regression/10/04.xcql [new file with mode: 0644]
src/test/resources/regression/10/05.cql [new file with mode: 0644]
src/test/resources/regression/10/05.xcql [new file with mode: 0644]
src/test/resources/regression/10/06.cql [new file with mode: 0644]
src/test/resources/regression/10/06.xcql [new file with mode: 0644]
src/test/resources/regression/10/07.cql [new file with mode: 0644]
src/test/resources/regression/10/07.xcql [new file with mode: 0644]
src/test/resources/regression/10/08.cql [new file with mode: 0644]
src/test/resources/regression/10/08.xcql [new file with mode: 0644]
src/test/resources/regression/10/09.cql [new file with mode: 0644]
src/test/resources/regression/10/09.xcql [new file with mode: 0644]
src/test/resources/regression/10/10.cql [new file with mode: 0644]
src/test/resources/regression/10/10.xcql [new file with mode: 0644]
src/test/resources/regression/10/11.cql [new file with mode: 0644]
src/test/resources/regression/10/11.xcql [new file with mode: 0644]
src/test/resources/regression/10/12.cql [new file with mode: 0644]
src/test/resources/regression/10/12.xcql [new file with mode: 0644]
src/test/resources/regression/10/13.cql [new file with mode: 0644]
src/test/resources/regression/10/13.xcql [new file with mode: 0644]
src/test/resources/regression/10/14.cql [new file with mode: 0644]
src/test/resources/regression/10/14.xcql [new file with mode: 0644]
src/test/resources/regression/10/15.cql [new file with mode: 0644]
src/test/resources/regression/10/15.xcql [new file with mode: 0644]
src/test/resources/regression/10/16.cql [new file with mode: 0644]
src/test/resources/regression/10/16.xcql [new file with mode: 0644]
src/test/resources/regression/10/name [new file with mode: 0644]

diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 0308585..0000000
--- a/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-
-**make-default**:
-       ./Build
-
-clean:
-       ./Build clean
-
diff --git a/docs/.gitignore b/docs/.gitignore
deleted file mode 100644 (file)
index c796f0b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-allclasses-frame.html
-allclasses-noframe.html
-constant-values.html
-deprecated-list.html
-help-doc.html
-index-all.html
-index.html
-org
-overview-tree.html
-package-list
-packages.html
-serialized-form.html
-stylesheet.css
-resources
diff --git a/docs/Makefile b/docs/Makefile
deleted file mode 100644 (file)
index 36ce6b8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-all: overview-tree.html
-
-overview-tree.html: ../src/main/java/org/z3950/zing/cql/*.java
-       nice javadoc -classpath ../src/main/java \
-               -author -version -windowtitle cql-java org.z3950.zing.cql
-
-clean:
-       rm -rf  allclasses-frame.html \
-               allclasses-noframe.html \
-               deprecated-list.html \
-               help-doc.html \
-               index-all.html \
-               index.html \
-               org \
-               overview-tree.html \
-               package-list \
-               packages.html \
-               serialized-form.html \
-               constant-values.html \
-               stylesheet.css \
-               resources
diff --git a/mkdist b/mkdist
deleted file mode 100755 (executable)
index fb065f8..0000000
--- a/mkdist
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# mkdist - make a distribution of the CQL-Java software
-
-version=`cat VERSION`
-distdir=cql-java-$version
-distfile=$distdir.tar.gz
-tmpdir=/tmp/$distdir
-echo "Building $distdir"
-trap "rm -rf $tmpdir" 1 2 15   # 0
-cp -rp . $tmpdir
-cd $tmpdir
-find . \( -name CVS -o -name .cvsignore \) -print | xargs rm -rf
-rm -rf archive mkdist etc/xslt .git target
-( cd src/main/java/org/z3950/zing/cql && make && make clean )
-( cd docs && make )
-( cd test/regression && make distclean )
-cd ..
-tar cf - $distdir | gzip -9v > $distfile
-rm -rf $tmpdir
-echo "Made /tmp/$distfile"
index d577cd9..72a39a3 100644 (file)
@@ -59,7 +59,7 @@ public class CQLParser {
      * @param allowKeywordTerms when false registered keywords are disallowed in unquoted terms
      */
     public CQLParser(int compat, boolean allowKeywordTerms) {
-       this.compat = V1POINT2;
+       this.compat = compat;
         this.allowKeywordTerms = allowKeywordTerms;
     }
     
diff --git a/src/main/java/org/z3950/zing/cql/Makefile b/src/main/java/org/z3950/zing/cql/Makefile
deleted file mode 100644 (file)
index 9470de2..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Your Java compiler will require that this source directory is on the
-# classpath.  The best way to do that is just to add the CQL-Java
-# distribution's "src" subdirectory to your CLASSPATH environment
-# variable, like this:
-#      CLASSPATH=$CLASSPATH:/where/ever/you/unpacked/it/cql-java-VERSION/src
-
-OBJ = Utils.class \
-       CQLNode.class CQLTermNode.class CQLBooleanNode.class \
-       CQLAndNode.class CQLOrNode.class CQLNotNode.class \
-       CQLProxNode.class CQLPrefixNode.class CQLSortNode.class \
-       CQLPrefix.class \
-       CQLRelation.class Modifier.class ModifierSet.class \
-       CQLParser.class CQLLexer.class CQLGenerator.class \
-       CQLParseException.class MissingParameterException.class \
-       PQFTranslationException.class \
-       UnknownIndexException.class UnknownRelationException.class \
-       UnknownRelationModifierException.class UnknownPositionException.class
-
-JARPATH = ../../../lib/cql-java.jar
-JAR = ../../../../../../$(JARPATH)
-$(JAR): $(OBJ)
-       cd ../../../..; jar cf $(JARPATH) org/z3950/zing/cql/*.class
-
-%.class: %.java
-       javac -Xlint:unchecked *.java
-
-test: $(JAR)
-       cd ../../../../../../../test/regression && make
-
-clean:
-       rm -f $(OBJ) 'CQLLexer$$Keyword.class'
-
diff --git a/src/test/java/org/z3950/zing/cql/CQLParserTest.java b/src/test/java/org/z3950/zing/cql/CQLParserTest.java
new file mode 100644 (file)
index 0000000..7e258e0
--- /dev/null
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 1995-2014, Index Datassss
+ * All rights reserved.
+ * See the file LICENSE for details.
+ */
+package org.z3950.zing.cql;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import static java.lang.System.out;
+import java.util.Properties;
+
+/**
+ *
+ * @author jakub
+ */
+public class CQLParserTest {
+  public CQLParserTest() {
+  }
+  
+  @BeforeClass
+  public static void setUpClass() {
+  }
+  
+  @AfterClass
+  public static void tearDownClass() {
+  }
+  
+  @Before
+  public void setUp() {
+  }
+  
+  @After
+  public void tearDown() {
+  }
+
+  /**
+   * Test of main method, of class CQLParser.
+   */
+  @Test
+  public void testRegressionQueries() throws IOException {
+    System.out.println("Testing the parser using pre-canned regression queries...");
+    //we might be running the test from within the jar
+    //list all resource dirs, then traverse them
+    String[] dirs = getResourceListing(this.getClass(), "regression");
+    for (String dir : dirs) {
+      String files[] = getResourceListing(this.getClass(), "regression/" + dir);
+      for (String file : files) {
+        if (!file.endsWith(".cql")) continue;
+        out.println("Parsing "+dir+"/"+file);
+        InputStream is = this.getClass().getResourceAsStream("/regression/"+dir+"/"+file);
+        BufferedReader reader = null, reader2 = null; 
+        try {
+          reader = new BufferedReader(new InputStreamReader(is));
+          String input = reader.readLine();
+          out.println("Query: "+input);
+          CQLParser parser = new CQLParser();
+          CQLNode parsed = parser.parse(input);
+          String xcql = parsed.toXCQL();
+          out.println("Parsed:");
+          out.println(xcql);
+          //read the expected xcql output
+          String prefix = file.substring(0, file.length()-4);
+          reader2 = new BufferedReader(new InputStreamReader(
+            this.getClass().getResourceAsStream("/regression/"+dir+"/"+prefix+".xcql")));
+          StringBuilder sb = new StringBuilder();
+          String line;
+          while ((line = reader2.readLine()) != null) {
+            sb.append(line).append("\n");
+          }
+          String expected = sb.toString();
+          out.println("Expected: ");
+          out.println(expected);
+          assertEquals("Assertion failure for "+dir+"/"+file, expected, xcql);
+        } catch (CQLParseException pe) {
+          fail("Parsing failed with: "+pe.toString());
+        } finally {
+          if (reader != null) reader.close();
+          if (reader2 != null) reader2.close();
+        }
+      }
+    }
+  }
+  
+  @Test
+  public void testRandomQueries() throws IOException, MissingParameterException {
+    out.println("Testing the parser using 100 randomly generated queries...");
+    Properties params = new Properties();
+    InputStream is = getClass().getResourceAsStream("/generate.properties");
+    if (is == null)
+      fail("Cannot locate generate.properties");
+    params.load(is);
+    is.close();
+    CQLGenerator generator = new CQLGenerator(params);
+    for (int i=0; i<100; i++) {
+      CQLNode random = generator.generate();
+      String expected = random.toCQL();
+      out.println("Generated query: "+expected);
+      CQLParser parser = new CQLParser();
+      try {
+        CQLNode parsed = parser.parse(expected);
+        String result = parsed.toCQL();
+        assertEquals(expected, result);
+      } catch (CQLParseException pe) {
+        fail("Generated query failed to parse: "+pe.getMessage());
+      }
+    }
+  }
+  
+  
+  //helper methods follow
+  //TODO move to masterkey-common
+  
+  @SuppressWarnings("rawtypes")
+  public static String[] getResourceListing(Class clazz, String path) throws
+    IOException {
+    URL dirURL = clazz.getClassLoader().getResource(path);
+    if (dirURL != null && dirURL.getProtocol().equals("file")) {
+      /* A file path: easy enough */
+      try {
+        return new File(dirURL.toURI()).list();
+      } catch (URISyntaxException use) {
+        throw new UnsupportedOperationException(use);
+      }
+    }
+
+    if (dirURL == null) {
+      /* 
+       * In case of a jar file, we can't actually find a directory.
+       * Have to assume the same jar as clazz.
+       */
+      String me = clazz.getName().replace(".", "/") + ".class";
+      dirURL = clazz.getClassLoader().getResource(me);
+    }
+
+    if (dirURL.getProtocol().equals("jar")) {
+      /* A JAR path */
+      String jarPath = dirURL.getPath().substring(5, dirURL.getPath().indexOf(
+        "!")); //strip out only the JAR file
+      JarFile jar = new JarFile(URLDecoder.decode(jarPath, "UTF-8"));
+      Enumeration<JarEntry> entries = jar.entries(); //gives ALL entries in jar
+      Set<String> result = new HashSet<String>(); //avoid duplicates in case it is a subdirectory
+      while (entries.hasMoreElements()) {
+        String name = entries.nextElement().getName();
+        if (name.startsWith(path)) { //filter according to the path
+          String entry = name.substring(path.length());
+          int checkSubdir = entry.indexOf("/");
+          if (checkSubdir >= 0) {
+            // if it is a subdirectory, we just return the directory name
+            entry = entry.substring(0, checkSubdir);
+          }
+          result.add(entry);
+        }
+      }
+      return result.toArray(new String[result.size()]);
+    }
+
+    throw new UnsupportedOperationException("Cannot list files for URL "
+      + dirURL);
+  }
+}
\ No newline at end of file
diff --git a/src/test/resources/generate.properties b/src/test/resources/generate.properties
new file mode 100644 (file)
index 0000000..409f872
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Propeties file to drive the org.z3950.zing.cql.CQLGenerator
+# test-harness.  See that class's documentation for the semantics of
+# these properties.
+#
+complexQuery=0.4
+complexClause=0.4
+equalsRelation=0.5
+numericRelation=0.7
+proxOp=0.0
diff --git a/src/test/resources/regression/01/01.cql b/src/test/resources/regression/01/01.cql
new file mode 100644 (file)
index 0000000..5d5b306
--- /dev/null
@@ -0,0 +1 @@
+cat
\ No newline at end of file
diff --git a/src/test/resources/regression/01/01.xcql b/src/test/resources/regression/01/01.xcql
new file mode 100644 (file)
index 0000000..48aee99
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>cat</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/02.cql b/src/test/resources/regression/01/02.cql
new file mode 100644 (file)
index 0000000..d579091
--- /dev/null
@@ -0,0 +1 @@
+"cat"
\ No newline at end of file
diff --git a/src/test/resources/regression/01/02.xcql b/src/test/resources/regression/01/02.xcql
new file mode 100644 (file)
index 0000000..48aee99
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>cat</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/03.cql b/src/test/resources/regression/01/03.cql
new file mode 100644 (file)
index 0000000..dac67a1
--- /dev/null
@@ -0,0 +1 @@
+comp.os.linux
\ No newline at end of file
diff --git a/src/test/resources/regression/01/03.xcql b/src/test/resources/regression/01/03.xcql
new file mode 100644 (file)
index 0000000..af191d3
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>comp.os.linux</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/04.cql b/src/test/resources/regression/01/04.cql
new file mode 100644 (file)
index 0000000..b665f17
--- /dev/null
@@ -0,0 +1 @@
+xml:element
\ No newline at end of file
diff --git a/src/test/resources/regression/01/04.xcql b/src/test/resources/regression/01/04.xcql
new file mode 100644 (file)
index 0000000..4141430
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>xml:element</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/05.cql b/src/test/resources/regression/01/05.cql
new file mode 100644 (file)
index 0000000..c9b128e
--- /dev/null
@@ -0,0 +1 @@
+"<xml:element>"
\ No newline at end of file
diff --git a/src/test/resources/regression/01/05.xcql b/src/test/resources/regression/01/05.xcql
new file mode 100644 (file)
index 0000000..6ec410e
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>&lt;xml:element&gt;</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/06.cql b/src/test/resources/regression/01/06.cql
new file mode 100644 (file)
index 0000000..79b87e7
--- /dev/null
@@ -0,0 +1 @@
+"="
\ No newline at end of file
diff --git a/src/test/resources/regression/01/06.xcql b/src/test/resources/regression/01/06.xcql
new file mode 100644 (file)
index 0000000..da69755
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>=</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/07.cql b/src/test/resources/regression/01/07.cql
new file mode 100644 (file)
index 0000000..34442aa
--- /dev/null
@@ -0,0 +1 @@
+"prox/distance<3/unit=word"
\ No newline at end of file
diff --git a/src/test/resources/regression/01/07.xcql b/src/test/resources/regression/01/07.xcql
new file mode 100644 (file)
index 0000000..851a5c1
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>prox/distance&lt;3/unit=word</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/08.cql b/src/test/resources/regression/01/08.cql
new file mode 100644 (file)
index 0000000..f6f67a9
--- /dev/null
@@ -0,0 +1 @@
+("cat")
\ No newline at end of file
diff --git a/src/test/resources/regression/01/08.xcql b/src/test/resources/regression/01/08.xcql
new file mode 100644 (file)
index 0000000..48aee99
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>cat</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/09.cql b/src/test/resources/regression/01/09.cql
new file mode 100644 (file)
index 0000000..ab149fc
--- /dev/null
@@ -0,0 +1 @@
+((dog))
\ No newline at end of file
diff --git a/src/test/resources/regression/01/09.xcql b/src/test/resources/regression/01/09.xcql
new file mode 100644 (file)
index 0000000..d41b39e
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>dog</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/10.cql b/src/test/resources/regression/01/10.cql
new file mode 100644 (file)
index 0000000..baa6044
--- /dev/null
@@ -0,0 +1 @@
+all
\ No newline at end of file
diff --git a/src/test/resources/regression/01/10.xcql b/src/test/resources/regression/01/10.xcql
new file mode 100644 (file)
index 0000000..c5ac7f6
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>all</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/11.cql b/src/test/resources/regression/01/11.cql
new file mode 100644 (file)
index 0000000..91c2bee
--- /dev/null
@@ -0,0 +1 @@
+prox
\ No newline at end of file
diff --git a/src/test/resources/regression/01/11.xcql b/src/test/resources/regression/01/11.xcql
new file mode 100644 (file)
index 0000000..88da9eb
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>prox</term>
+</searchClause>
diff --git a/src/test/resources/regression/01/name b/src/test/resources/regression/01/name
new file mode 100644 (file)
index 0000000..dc563f2
--- /dev/null
@@ -0,0 +1 @@
+Simple
\ No newline at end of file
diff --git a/src/test/resources/regression/02/01.cql b/src/test/resources/regression/02/01.cql
new file mode 100644 (file)
index 0000000..fea9bed
--- /dev/null
@@ -0,0 +1 @@
+title = "fish"
\ No newline at end of file
diff --git a/src/test/resources/regression/02/01.xcql b/src/test/resources/regression/02/01.xcql
new file mode 100644 (file)
index 0000000..be3c9c1
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>title</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>fish</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/02.cql b/src/test/resources/regression/02/02.cql
new file mode 100644 (file)
index 0000000..2ae47ba
--- /dev/null
@@ -0,0 +1 @@
+title == fish
diff --git a/src/test/resources/regression/02/02.xcql b/src/test/resources/regression/02/02.xcql
new file mode 100644 (file)
index 0000000..fd085e3
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>title</index>
+  <relation>
+    <value>==</value>
+  </relation>
+  <term>fish</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/03.cql b/src/test/resources/regression/02/03.cql
new file mode 100644 (file)
index 0000000..553d2b8
--- /dev/null
@@ -0,0 +1 @@
+title any fish
\ No newline at end of file
diff --git a/src/test/resources/regression/02/03.xcql b/src/test/resources/regression/02/03.xcql
new file mode 100644 (file)
index 0000000..62521be
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>title</index>
+  <relation>
+    <value>any</value>
+  </relation>
+  <term>fish</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/04.cql b/src/test/resources/regression/02/04.cql
new file mode 100644 (file)
index 0000000..f0f4f19
--- /dev/null
@@ -0,0 +1 @@
+title all fish
\ No newline at end of file
diff --git a/src/test/resources/regression/02/04.xcql b/src/test/resources/regression/02/04.xcql
new file mode 100644 (file)
index 0000000..646c973
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>title</index>
+  <relation>
+    <value>all</value>
+  </relation>
+  <term>fish</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/05.cql b/src/test/resources/regression/02/05.cql
new file mode 100644 (file)
index 0000000..f20b1df
--- /dev/null
@@ -0,0 +1 @@
+title > 9
\ No newline at end of file
diff --git a/src/test/resources/regression/02/05.xcql b/src/test/resources/regression/02/05.xcql
new file mode 100644 (file)
index 0000000..92411c4
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>title</index>
+  <relation>
+    <value>&gt;</value>
+  </relation>
+  <term>9</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/06.cql b/src/test/resources/regression/02/06.cql
new file mode 100644 (file)
index 0000000..e081346
--- /dev/null
@@ -0,0 +1 @@
+title >= 23
\ No newline at end of file
diff --git a/src/test/resources/regression/02/06.xcql b/src/test/resources/regression/02/06.xcql
new file mode 100644 (file)
index 0000000..6702471
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>title</index>
+  <relation>
+    <value>&gt;=</value>
+  </relation>
+  <term>23</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/07.cql b/src/test/resources/regression/02/07.cql
new file mode 100644 (file)
index 0000000..2c774e0
--- /dev/null
@@ -0,0 +1 @@
+dc.title any "fish chips"
\ No newline at end of file
diff --git a/src/test/resources/regression/02/07.xcql b/src/test/resources/regression/02/07.xcql
new file mode 100644 (file)
index 0000000..ba4ac78
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>dc.title</index>
+  <relation>
+    <value>any</value>
+  </relation>
+  <term>fish chips</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/08.cql b/src/test/resources/regression/02/08.cql
new file mode 100644 (file)
index 0000000..acc6a7d
--- /dev/null
@@ -0,0 +1 @@
+dc.title any/stem fish
\ No newline at end of file
diff --git a/src/test/resources/regression/02/08.xcql b/src/test/resources/regression/02/08.xcql
new file mode 100644 (file)
index 0000000..1576778
--- /dev/null
@@ -0,0 +1,12 @@
+<searchClause>
+  <index>dc.title</index>
+  <relation>
+    <value>any</value>
+    <modifiers>
+      <modifier>
+        <type>stem</type>
+      </modifier>
+    </modifiers>
+  </relation>
+  <term>fish</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/09.cql b/src/test/resources/regression/02/09.cql
new file mode 100644 (file)
index 0000000..fff4f2a
--- /dev/null
@@ -0,0 +1 @@
+dc.fish all/stem/fuzzy "fish chips"
\ No newline at end of file
diff --git a/src/test/resources/regression/02/09.xcql b/src/test/resources/regression/02/09.xcql
new file mode 100644 (file)
index 0000000..9f8abff
--- /dev/null
@@ -0,0 +1,15 @@
+<searchClause>
+  <index>dc.fish</index>
+  <relation>
+    <value>all</value>
+    <modifiers>
+      <modifier>
+        <type>stem</type>
+      </modifier>
+      <modifier>
+        <type>fuzzy</type>
+      </modifier>
+    </modifiers>
+  </relation>
+  <term>fish chips</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/10.cql b/src/test/resources/regression/02/10.cql
new file mode 100644 (file)
index 0000000..2723119
--- /dev/null
@@ -0,0 +1 @@
+(title any frog)
\ No newline at end of file
diff --git a/src/test/resources/regression/02/10.xcql b/src/test/resources/regression/02/10.xcql
new file mode 100644 (file)
index 0000000..d7dfe7a
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>title</index>
+  <relation>
+    <value>any</value>
+  </relation>
+  <term>frog</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/11.cql b/src/test/resources/regression/02/11.cql
new file mode 100644 (file)
index 0000000..7c42dc6
--- /dev/null
@@ -0,0 +1 @@
+((dc.title any/stem "frog pond"))
\ No newline at end of file
diff --git a/src/test/resources/regression/02/11.xcql b/src/test/resources/regression/02/11.xcql
new file mode 100644 (file)
index 0000000..726a36e
--- /dev/null
@@ -0,0 +1,12 @@
+<searchClause>
+  <index>dc.title</index>
+  <relation>
+    <value>any</value>
+    <modifiers>
+      <modifier>
+        <type>stem</type>
+      </modifier>
+    </modifiers>
+  </relation>
+  <term>frog pond</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/12.cql b/src/test/resources/regression/02/12.cql
new file mode 100644 (file)
index 0000000..dd8106c
--- /dev/null
@@ -0,0 +1 @@
+dc.title any "fish frog chicken"
\ No newline at end of file
diff --git a/src/test/resources/regression/02/12.xcql b/src/test/resources/regression/02/12.xcql
new file mode 100644 (file)
index 0000000..b4bcf3b
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>dc.title</index>
+  <relation>
+    <value>any</value>
+  </relation>
+  <term>fish frog chicken</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/13.cql b/src/test/resources/regression/02/13.cql
new file mode 100644 (file)
index 0000000..d290d65
--- /dev/null
@@ -0,0 +1 @@
+dc.title =/rel.algorithm=CORI squid
\ No newline at end of file
diff --git a/src/test/resources/regression/02/13.xcql b/src/test/resources/regression/02/13.xcql
new file mode 100644 (file)
index 0000000..6f3c011
--- /dev/null
@@ -0,0 +1,14 @@
+<searchClause>
+  <index>dc.title</index>
+  <relation>
+    <value>=</value>
+    <modifiers>
+      <modifier>
+        <type>rel.algorithm</type>
+        <comparison>=</comparison>
+        <value>CORI</value>
+      </modifier>
+    </modifiers>
+  </relation>
+  <term>squid</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/14.cql b/src/test/resources/regression/02/14.cql
new file mode 100644 (file)
index 0000000..58d2b9b
--- /dev/null
@@ -0,0 +1 @@
+author any/f.foo/b.bar>1 "sanderson taylor"
\ No newline at end of file
diff --git a/src/test/resources/regression/02/14.xcql b/src/test/resources/regression/02/14.xcql
new file mode 100644 (file)
index 0000000..c833d26
--- /dev/null
@@ -0,0 +1,17 @@
+<searchClause>
+  <index>author</index>
+  <relation>
+    <value>any</value>
+    <modifiers>
+      <modifier>
+        <type>f.foo</type>
+      </modifier>
+      <modifier>
+        <type>b.bar</type>
+        <comparison>&gt;</comparison>
+        <value>1</value>
+      </modifier>
+    </modifiers>
+  </relation>
+  <term>sanderson taylor</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/15.cql b/src/test/resources/regression/02/15.cql
new file mode 100644 (file)
index 0000000..c427e26
--- /dev/null
@@ -0,0 +1 @@
+numberOfLegs <= 4
\ No newline at end of file
diff --git a/src/test/resources/regression/02/15.xcql b/src/test/resources/regression/02/15.xcql
new file mode 100644 (file)
index 0000000..3a23abe
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>numberOfLegs</index>
+  <relation>
+    <value>&lt;=</value>
+  </relation>
+  <term>4</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/16.cql b/src/test/resources/regression/02/16.cql
new file mode 100644 (file)
index 0000000..eb65cd2
--- /dev/null
@@ -0,0 +1 @@
+numberOfLegs <> 4
\ No newline at end of file
diff --git a/src/test/resources/regression/02/16.xcql b/src/test/resources/regression/02/16.xcql
new file mode 100644 (file)
index 0000000..0e8eccd
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>numberOfLegs</index>
+  <relation>
+    <value>&lt;&gt;</value>
+  </relation>
+  <term>4</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/17.cql b/src/test/resources/regression/02/17.cql
new file mode 100644 (file)
index 0000000..2249148
--- /dev/null
@@ -0,0 +1 @@
+title == jaws
\ No newline at end of file
diff --git a/src/test/resources/regression/02/17.xcql b/src/test/resources/regression/02/17.xcql
new file mode 100644 (file)
index 0000000..b2587ff
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>title</index>
+  <relation>
+    <value>==</value>
+  </relation>
+  <term>jaws</term>
+</searchClause>
diff --git a/src/test/resources/regression/02/name b/src/test/resources/regression/02/name
new file mode 100644 (file)
index 0000000..d9e175e
--- /dev/null
@@ -0,0 +1 @@
+Index Relation Term
\ No newline at end of file
diff --git a/src/test/resources/regression/03/01.cql b/src/test/resources/regression/03/01.cql
new file mode 100644 (file)
index 0000000..a47d816
--- /dev/null
@@ -0,0 +1 @@
+cat or dog
\ No newline at end of file
diff --git a/src/test/resources/regression/03/01.xcql b/src/test/resources/regression/03/01.xcql
new file mode 100644 (file)
index 0000000..fc1b678
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>or</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>dog</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/02.cql b/src/test/resources/regression/03/02.cql
new file mode 100644 (file)
index 0000000..7bfe969
--- /dev/null
@@ -0,0 +1 @@
+cat and fish
\ No newline at end of file
diff --git a/src/test/resources/regression/03/02.xcql b/src/test/resources/regression/03/02.xcql
new file mode 100644 (file)
index 0000000..55ae66a
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>fish</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/03.cql b/src/test/resources/regression/03/03.cql
new file mode 100644 (file)
index 0000000..28e500a
--- /dev/null
@@ -0,0 +1 @@
+cat not frog
\ No newline at end of file
diff --git a/src/test/resources/regression/03/03.xcql b/src/test/resources/regression/03/03.xcql
new file mode 100644 (file)
index 0000000..2f4f6c0
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>not</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>frog</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/04.cql b/src/test/resources/regression/03/04.cql
new file mode 100644 (file)
index 0000000..eb88011
--- /dev/null
@@ -0,0 +1 @@
+(cat not frog)
\ No newline at end of file
diff --git a/src/test/resources/regression/03/04.xcql b/src/test/resources/regression/03/04.xcql
new file mode 100644 (file)
index 0000000..2f4f6c0
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>not</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>frog</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/05.cql b/src/test/resources/regression/03/05.cql
new file mode 100644 (file)
index 0000000..436176b
--- /dev/null
@@ -0,0 +1 @@
+"cat" not "fish food"
\ No newline at end of file
diff --git a/src/test/resources/regression/03/05.xcql b/src/test/resources/regression/03/05.xcql
new file mode 100644 (file)
index 0000000..9ad0700
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>not</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>fish food</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/06.cql b/src/test/resources/regression/03/06.cql
new file mode 100644 (file)
index 0000000..9c30208
--- /dev/null
@@ -0,0 +1 @@
+xml and "prox///"
\ No newline at end of file
diff --git a/src/test/resources/regression/03/06.xcql b/src/test/resources/regression/03/06.xcql
new file mode 100644 (file)
index 0000000..7b8dae8
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>xml</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>prox///</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/07.cql b/src/test/resources/regression/03/07.cql
new file mode 100644 (file)
index 0000000..1c01ad9
--- /dev/null
@@ -0,0 +1 @@
+fred and any
\ No newline at end of file
diff --git a/src/test/resources/regression/03/07.xcql b/src/test/resources/regression/03/07.xcql
new file mode 100644 (file)
index 0000000..5e0076e
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>fred</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>any</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/08.cql b/src/test/resources/regression/03/08.cql
new file mode 100644 (file)
index 0000000..f37768b
--- /dev/null
@@ -0,0 +1 @@
+((fred or all))
\ No newline at end of file
diff --git a/src/test/resources/regression/03/08.xcql b/src/test/resources/regression/03/08.xcql
new file mode 100644 (file)
index 0000000..f080d4b
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>or</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>fred</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>all</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/09.cql b/src/test/resources/regression/03/09.cql
new file mode 100644 (file)
index 0000000..545400b
--- /dev/null
@@ -0,0 +1 @@
+a or b and c not d
\ No newline at end of file
diff --git a/src/test/resources/regression/03/09.xcql b/src/test/resources/regression/03/09.xcql
new file mode 100644 (file)
index 0000000..4f3ade7
--- /dev/null
@@ -0,0 +1,55 @@
+<triple>
+  <boolean>
+    <value>not</value>
+  </boolean>
+  <leftOperand>
+    <triple>
+      <boolean>
+        <value>and</value>
+      </boolean>
+      <leftOperand>
+        <triple>
+          <boolean>
+            <value>or</value>
+          </boolean>
+          <leftOperand>
+            <searchClause>
+              <index>cql.serverChoice</index>
+              <relation>
+                <value>=</value>
+              </relation>
+              <term>a</term>
+            </searchClause>
+          </leftOperand>
+          <rightOperand>
+            <searchClause>
+              <index>cql.serverChoice</index>
+              <relation>
+                <value>=</value>
+              </relation>
+              <term>b</term>
+            </searchClause>
+          </rightOperand>
+        </triple>
+      </leftOperand>
+      <rightOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>c</term>
+        </searchClause>
+      </rightOperand>
+    </triple>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>d</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/03/name b/src/test/resources/regression/03/name
new file mode 100644 (file)
index 0000000..7dd2e3d
--- /dev/null
@@ -0,0 +1 @@
+Simple Boolean
\ No newline at end of file
diff --git a/src/test/resources/regression/04/01.cql b/src/test/resources/regression/04/01.cql
new file mode 100644 (file)
index 0000000..046c5e4
--- /dev/null
@@ -0,0 +1 @@
+bath.author any fish and dc.title all "cat dog"
\ No newline at end of file
diff --git a/src/test/resources/regression/04/01.xcql b/src/test/resources/regression/04/01.xcql
new file mode 100644 (file)
index 0000000..6f3ec27
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>bath.author</index>
+      <relation>
+        <value>any</value>
+      </relation>
+      <term>fish</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>dc.title</index>
+      <relation>
+        <value>all</value>
+      </relation>
+      <term>cat dog</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/04/02.cql b/src/test/resources/regression/04/02.cql
new file mode 100644 (file)
index 0000000..f8372df
--- /dev/null
@@ -0,0 +1 @@
+(title any/stem "fish dog" or and)
\ No newline at end of file
diff --git a/src/test/resources/regression/04/02.xcql b/src/test/resources/regression/04/02.xcql
new file mode 100644 (file)
index 0000000..0dcb869
--- /dev/null
@@ -0,0 +1,28 @@
+<triple>
+  <boolean>
+    <value>or</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>title</index>
+      <relation>
+        <value>any</value>
+        <modifiers>
+          <modifier>
+            <type>stem</type>
+          </modifier>
+        </modifiers>
+      </relation>
+      <term>fish dog</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>and</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/04/name b/src/test/resources/regression/04/name
new file mode 100644 (file)
index 0000000..9bafd2c
--- /dev/null
@@ -0,0 +1 @@
+I/R/T plus Boolean
\ No newline at end of file
diff --git a/src/test/resources/regression/05/01.cql b/src/test/resources/regression/05/01.cql
new file mode 100644 (file)
index 0000000..18c09ef
--- /dev/null
@@ -0,0 +1 @@
+cat prox hat
\ No newline at end of file
diff --git a/src/test/resources/regression/05/01.xcql b/src/test/resources/regression/05/01.xcql
new file mode 100644 (file)
index 0000000..406d103
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>prox</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>hat</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/02.cql b/src/test/resources/regression/05/02.cql
new file mode 100644 (file)
index 0000000..aa05edd
--- /dev/null
@@ -0,0 +1 @@
+cat prox/distance=3/unit=word/ordered hat
\ No newline at end of file
diff --git a/src/test/resources/regression/05/02.xcql b/src/test/resources/regression/05/02.xcql
new file mode 100644 (file)
index 0000000..f09ab0b
--- /dev/null
@@ -0,0 +1,38 @@
+<triple>
+  <boolean>
+    <value>prox</value>
+    <modifiers>
+      <modifier>
+        <type>distance</type>
+        <comparison>=</comparison>
+        <value>3</value>
+      </modifier>
+      <modifier>
+        <type>unit</type>
+        <comparison>=</comparison>
+        <value>word</value>
+      </modifier>
+      <modifier>
+        <type>ordered</type>
+      </modifier>
+    </modifiers>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>hat</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/03.cql b/src/test/resources/regression/05/03.cql
new file mode 100644 (file)
index 0000000..13a0574
--- /dev/null
@@ -0,0 +1 @@
+cat prox/distance<3 hat
\ No newline at end of file
diff --git a/src/test/resources/regression/05/03.xcql b/src/test/resources/regression/05/03.xcql
new file mode 100644 (file)
index 0000000..25c5377
--- /dev/null
@@ -0,0 +1,30 @@
+<triple>
+  <boolean>
+    <value>prox</value>
+    <modifiers>
+      <modifier>
+        <type>distance</type>
+        <comparison>&lt;</comparison>
+        <value>3</value>
+      </modifier>
+    </modifiers>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>hat</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/04.cql b/src/test/resources/regression/05/04.cql
new file mode 100644 (file)
index 0000000..53ca6c8
--- /dev/null
@@ -0,0 +1 @@
+"fish food" prox/unit=sentence and
\ No newline at end of file
diff --git a/src/test/resources/regression/05/04.xcql b/src/test/resources/regression/05/04.xcql
new file mode 100644 (file)
index 0000000..a6e2198
--- /dev/null
@@ -0,0 +1,30 @@
+<triple>
+  <boolean>
+    <value>prox</value>
+    <modifiers>
+      <modifier>
+        <type>unit</type>
+        <comparison>=</comparison>
+        <value>sentence</value>
+      </modifier>
+    </modifiers>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>fish food</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>and</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/05.cql b/src/test/resources/regression/05/05.cql
new file mode 100644 (file)
index 0000000..18d574d
--- /dev/null
@@ -0,0 +1 @@
+title all "chips frog" prox/distance<=5 exact
\ No newline at end of file
diff --git a/src/test/resources/regression/05/05.xcql b/src/test/resources/regression/05/05.xcql
new file mode 100644 (file)
index 0000000..a59341f
--- /dev/null
@@ -0,0 +1,30 @@
+<triple>
+  <boolean>
+    <value>prox</value>
+    <modifiers>
+      <modifier>
+        <type>distance</type>
+        <comparison>&lt;=</comparison>
+        <value>5</value>
+      </modifier>
+    </modifiers>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>title</index>
+      <relation>
+        <value>all</value>
+      </relation>
+      <term>chips frog</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>exact</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/06.cql b/src/test/resources/regression/05/06.cql
new file mode 100644 (file)
index 0000000..e9ae9fd
--- /dev/null
@@ -0,0 +1 @@
+(dc.author == "jones" prox/distance>5/unit=element title >= "smith")
\ No newline at end of file
diff --git a/src/test/resources/regression/05/06.xcql b/src/test/resources/regression/05/06.xcql
new file mode 100644 (file)
index 0000000..4ffea29
--- /dev/null
@@ -0,0 +1,35 @@
+<triple>
+  <boolean>
+    <value>prox</value>
+    <modifiers>
+      <modifier>
+        <type>distance</type>
+        <comparison>&gt;</comparison>
+        <value>5</value>
+      </modifier>
+      <modifier>
+        <type>unit</type>
+        <comparison>=</comparison>
+        <value>element</value>
+      </modifier>
+    </modifiers>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>dc.author</index>
+      <relation>
+        <value>==</value>
+      </relation>
+      <term>jones</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>title</index>
+      <relation>
+        <value>&gt;=</value>
+      </relation>
+      <term>smith</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/07.cql b/src/test/resources/regression/05/07.cql
new file mode 100644 (file)
index 0000000..fb65e0f
--- /dev/null
@@ -0,0 +1 @@
+((cat prox hat))
\ No newline at end of file
diff --git a/src/test/resources/regression/05/07.xcql b/src/test/resources/regression/05/07.xcql
new file mode 100644 (file)
index 0000000..406d103
--- /dev/null
@@ -0,0 +1,23 @@
+<triple>
+  <boolean>
+    <value>prox</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>cat</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>hat</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/08.cql b/src/test/resources/regression/05/08.cql
new file mode 100644 (file)
index 0000000..24a51b2
--- /dev/null
@@ -0,0 +1 @@
+a and/rel.SumOfScores b
\ No newline at end of file
diff --git a/src/test/resources/regression/05/08.xcql b/src/test/resources/regression/05/08.xcql
new file mode 100644 (file)
index 0000000..b46dcfd
--- /dev/null
@@ -0,0 +1,28 @@
+<triple>
+  <boolean>
+    <value>and</value>
+    <modifiers>
+      <modifier>
+        <type>rel.sumofscores</type>
+      </modifier>
+    </modifiers>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>a</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>b</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/09.cql b/src/test/resources/regression/05/09.cql
new file mode 100644 (file)
index 0000000..2cd14ce
--- /dev/null
@@ -0,0 +1 @@
+a and/rel.algorithm=CORI b
\ No newline at end of file
diff --git a/src/test/resources/regression/05/09.xcql b/src/test/resources/regression/05/09.xcql
new file mode 100644 (file)
index 0000000..1dc3602
--- /dev/null
@@ -0,0 +1,30 @@
+<triple>
+  <boolean>
+    <value>and</value>
+    <modifiers>
+      <modifier>
+        <type>rel.algorithm</type>
+        <comparison>=</comparison>
+        <value>CORI</value>
+      </modifier>
+    </modifiers>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>a</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>b</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/05/name b/src/test/resources/regression/05/name
new file mode 100644 (file)
index 0000000..4c6e65c
--- /dev/null
@@ -0,0 +1 @@
+Prox
\ No newline at end of file
diff --git a/src/test/resources/regression/06/01.cql b/src/test/resources/regression/06/01.cql
new file mode 100644 (file)
index 0000000..b428b8f
--- /dev/null
@@ -0,0 +1 @@
+(cat^)
\ No newline at end of file
diff --git a/src/test/resources/regression/06/01.xcql b/src/test/resources/regression/06/01.xcql
new file mode 100644 (file)
index 0000000..0dcc5fb
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>cat^</term>
+</searchClause>
diff --git a/src/test/resources/regression/06/02.cql b/src/test/resources/regression/06/02.cql
new file mode 100644 (file)
index 0000000..d579091
--- /dev/null
@@ -0,0 +1 @@
+"cat"
\ No newline at end of file
diff --git a/src/test/resources/regression/06/02.xcql b/src/test/resources/regression/06/02.xcql
new file mode 100644 (file)
index 0000000..48aee99
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>cat</term>
+</searchClause>
diff --git a/src/test/resources/regression/06/03.cql b/src/test/resources/regression/06/03.cql
new file mode 100644 (file)
index 0000000..d482955
--- /dev/null
@@ -0,0 +1 @@
+"^cat says \"fish\""
\ No newline at end of file
diff --git a/src/test/resources/regression/06/03.xcql b/src/test/resources/regression/06/03.xcql
new file mode 100644 (file)
index 0000000..9db40ae
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>^cat says "fish"</term>
+</searchClause>
diff --git a/src/test/resources/regression/06/04.cql b/src/test/resources/regression/06/04.cql
new file mode 100644 (file)
index 0000000..ce842d2
--- /dev/null
@@ -0,0 +1 @@
+"cat*fish"
\ No newline at end of file
diff --git a/src/test/resources/regression/06/04.xcql b/src/test/resources/regression/06/04.xcql
new file mode 100644 (file)
index 0000000..ee38b0e
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>cat*fish</term>
+</searchClause>
diff --git a/src/test/resources/regression/06/05.cql b/src/test/resources/regression/06/05.cql
new file mode 100644 (file)
index 0000000..21ad338
--- /dev/null
@@ -0,0 +1 @@
+cat?dog
\ No newline at end of file
diff --git a/src/test/resources/regression/06/05.xcql b/src/test/resources/regression/06/05.xcql
new file mode 100644 (file)
index 0000000..dc59539
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>cat?dog</term>
+</searchClause>
diff --git a/src/test/resources/regression/06/06.cql b/src/test/resources/regression/06/06.cql
new file mode 100644 (file)
index 0000000..0cfced3
--- /dev/null
@@ -0,0 +1 @@
+(("^cat*fishdog\"horse?"))
\ No newline at end of file
diff --git a/src/test/resources/regression/06/06.xcql b/src/test/resources/regression/06/06.xcql
new file mode 100644 (file)
index 0000000..9d38695
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>^cat*fishdog"horse?</term>
+</searchClause>
diff --git a/src/test/resources/regression/06/name b/src/test/resources/regression/06/name
new file mode 100644 (file)
index 0000000..6e12768
--- /dev/null
@@ -0,0 +1 @@
+Special Characters
\ No newline at end of file
diff --git a/src/test/resources/regression/07/01.cql b/src/test/resources/regression/07/01.cql
new file mode 100644 (file)
index 0000000..2e2ea08
--- /dev/null
@@ -0,0 +1 @@
+(((cat or dog) or horse) and frog)
\ No newline at end of file
diff --git a/src/test/resources/regression/07/01.xcql b/src/test/resources/regression/07/01.xcql
new file mode 100644 (file)
index 0000000..3338a9f
--- /dev/null
@@ -0,0 +1,55 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <triple>
+      <boolean>
+        <value>or</value>
+      </boolean>
+      <leftOperand>
+        <triple>
+          <boolean>
+            <value>or</value>
+          </boolean>
+          <leftOperand>
+            <searchClause>
+              <index>cql.serverChoice</index>
+              <relation>
+                <value>=</value>
+              </relation>
+              <term>cat</term>
+            </searchClause>
+          </leftOperand>
+          <rightOperand>
+            <searchClause>
+              <index>cql.serverChoice</index>
+              <relation>
+                <value>=</value>
+              </relation>
+              <term>dog</term>
+            </searchClause>
+          </rightOperand>
+        </triple>
+      </leftOperand>
+      <rightOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>horse</term>
+        </searchClause>
+      </rightOperand>
+    </triple>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>frog</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/07/02.cql b/src/test/resources/regression/07/02.cql
new file mode 100644 (file)
index 0000000..ce2ba87
--- /dev/null
@@ -0,0 +1 @@
+(cat and dog) or (horse and frog)
\ No newline at end of file
diff --git a/src/test/resources/regression/07/02.xcql b/src/test/resources/regression/07/02.xcql
new file mode 100644 (file)
index 0000000..1324889
--- /dev/null
@@ -0,0 +1,55 @@
+<triple>
+  <boolean>
+    <value>or</value>
+  </boolean>
+  <leftOperand>
+    <triple>
+      <boolean>
+        <value>and</value>
+      </boolean>
+      <leftOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>cat</term>
+        </searchClause>
+      </leftOperand>
+      <rightOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>dog</term>
+        </searchClause>
+      </rightOperand>
+    </triple>
+  </leftOperand>
+  <rightOperand>
+    <triple>
+      <boolean>
+        <value>and</value>
+      </boolean>
+      <leftOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>horse</term>
+        </searchClause>
+      </leftOperand>
+      <rightOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>frog</term>
+        </searchClause>
+      </rightOperand>
+    </triple>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/07/03.cql b/src/test/resources/regression/07/03.cql
new file mode 100644 (file)
index 0000000..99d3e25
--- /dev/null
@@ -0,0 +1 @@
+(cat and (horse or frog)) and chips
\ No newline at end of file
diff --git a/src/test/resources/regression/07/03.xcql b/src/test/resources/regression/07/03.xcql
new file mode 100644 (file)
index 0000000..202af98
--- /dev/null
@@ -0,0 +1,55 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <triple>
+      <boolean>
+        <value>and</value>
+      </boolean>
+      <leftOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>cat</term>
+        </searchClause>
+      </leftOperand>
+      <rightOperand>
+        <triple>
+          <boolean>
+            <value>or</value>
+          </boolean>
+          <leftOperand>
+            <searchClause>
+              <index>cql.serverChoice</index>
+              <relation>
+                <value>=</value>
+              </relation>
+              <term>horse</term>
+            </searchClause>
+          </leftOperand>
+          <rightOperand>
+            <searchClause>
+              <index>cql.serverChoice</index>
+              <relation>
+                <value>=</value>
+              </relation>
+              <term>frog</term>
+            </searchClause>
+          </rightOperand>
+        </triple>
+      </rightOperand>
+    </triple>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>chips</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/07/name b/src/test/resources/regression/07/name
new file mode 100644 (file)
index 0000000..b8a913e
--- /dev/null
@@ -0,0 +1 @@
+Nesting Parentheses
\ No newline at end of file
diff --git a/src/test/resources/regression/08/01.cql b/src/test/resources/regression/08/01.cql
new file mode 100644 (file)
index 0000000..665568f
--- /dev/null
@@ -0,0 +1 @@
+> foo="http://www.loc.gov/zing/cql/dc-indexes/" dc.title="fish"
\ No newline at end of file
diff --git a/src/test/resources/regression/08/01.xcql b/src/test/resources/regression/08/01.xcql
new file mode 100644 (file)
index 0000000..4e2d548
--- /dev/null
@@ -0,0 +1,13 @@
+<searchClause>
+  <prefixes>
+    <prefix>
+      <name>foo</name>
+      <identifier>http://www.loc.gov/zing/cql/dc-indexes/</identifier>
+    </prefix>
+  </prefixes>
+  <index>dc.title</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>fish</term>
+</searchClause>
diff --git a/src/test/resources/regression/08/02.cql b/src/test/resources/regression/08/02.cql
new file mode 100644 (file)
index 0000000..f5bf9b0
--- /dev/null
@@ -0,0 +1 @@
+> "http://www.loc.gov/zing/cql/dc-indexes/" title="fish"
\ No newline at end of file
diff --git a/src/test/resources/regression/08/02.xcql b/src/test/resources/regression/08/02.xcql
new file mode 100644 (file)
index 0000000..63ce6ad
--- /dev/null
@@ -0,0 +1,12 @@
+<searchClause>
+  <prefixes>
+    <prefix>
+      <identifier>http://www.loc.gov/zing/cql/dc-indexes/</identifier>
+    </prefix>
+  </prefixes>
+  <index>title</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>fish</term>
+</searchClause>
diff --git a/src/test/resources/regression/08/03.cql b/src/test/resources/regression/08/03.cql
new file mode 100644 (file)
index 0000000..f75c2fc
--- /dev/null
@@ -0,0 +1 @@
+> foo="http://www.loc.gov/zing/cql/dc-indexes" > ccg = "http://srw.o-r-g.org/cql/indexSets/ccg/" foo.title="fish" and ccg.force=3
\ No newline at end of file
diff --git a/src/test/resources/regression/08/03.xcql b/src/test/resources/regression/08/03.xcql
new file mode 100644 (file)
index 0000000..025c7c9
--- /dev/null
@@ -0,0 +1,33 @@
+<triple>
+  <prefixes>
+    <prefix>
+      <name>foo</name>
+      <identifier>http://www.loc.gov/zing/cql/dc-indexes</identifier>
+    </prefix>
+    <prefix>
+      <name>ccg</name>
+      <identifier>http://srw.o-r-g.org/cql/indexSets/ccg/</identifier>
+    </prefix>
+  </prefixes>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>foo.title</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>fish</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>ccg.force</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>3</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/08/name b/src/test/resources/regression/08/name
new file mode 100644 (file)
index 0000000..d37a456
--- /dev/null
@@ -0,0 +1 @@
+Prefix Maps
\ No newline at end of file
diff --git a/src/test/resources/regression/09/01.cql b/src/test/resources/regression/09/01.cql
new file mode 100644 (file)
index 0000000..cda5565
--- /dev/null
@@ -0,0 +1 @@
+any or all:stem and all contains any prox proxfuzzy
\ No newline at end of file
diff --git a/src/test/resources/regression/09/01.xcql b/src/test/resources/regression/09/01.xcql
new file mode 100644 (file)
index 0000000..f721ed0
--- /dev/null
@@ -0,0 +1,39 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <triple>
+      <boolean>
+        <value>or</value>
+      </boolean>
+      <leftOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>any</term>
+        </searchClause>
+      </leftOperand>
+      <rightOperand>
+        <searchClause>
+          <index>cql.serverChoice</index>
+          <relation>
+            <value>=</value>
+          </relation>
+          <term>all:stem</term>
+        </searchClause>
+      </rightOperand>
+    </triple>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>all contains</index>
+      <relation>
+        <value>any</value>
+      </relation>
+      <term>prox proxfuzzy</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/src/test/resources/regression/09/02.cql b/src/test/resources/regression/09/02.cql
new file mode 100644 (file)
index 0000000..3026808
--- /dev/null
@@ -0,0 +1 @@
+(((((((((any)))))))))
\ No newline at end of file
diff --git a/src/test/resources/regression/09/02.xcql b/src/test/resources/regression/09/02.xcql
new file mode 100644 (file)
index 0000000..dd7c8f0
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>any</term>
+</searchClause>
diff --git a/src/test/resources/regression/09/03.cql b/src/test/resources/regression/09/03.cql
new file mode 100644 (file)
index 0000000..3cc762b
--- /dev/null
@@ -0,0 +1 @@
+""
\ No newline at end of file
diff --git a/src/test/resources/regression/09/03.xcql b/src/test/resources/regression/09/03.xcql
new file mode 100644 (file)
index 0000000..1eeff16
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term></term>
+</searchClause>
diff --git a/src/test/resources/regression/09/04.cql b/src/test/resources/regression/09/04.cql
new file mode 100644 (file)
index 0000000..d2fba11
--- /dev/null
@@ -0,0 +1 @@
+> any > any = exact any > any
\ No newline at end of file
diff --git a/src/test/resources/regression/09/04.xcql b/src/test/resources/regression/09/04.xcql
new file mode 100644 (file)
index 0000000..aed8eca
--- /dev/null
@@ -0,0 +1,16 @@
+<searchClause>
+  <prefixes>
+    <prefix>
+      <identifier>any</identifier>
+    </prefix>
+    <prefix>
+      <name>any</name>
+      <identifier>exact</identifier>
+    </prefix>
+  </prefixes>
+  <index>any</index>
+  <relation>
+    <value>&gt;</value>
+  </relation>
+  <term>any</term>
+</searchClause>
diff --git a/src/test/resources/regression/09/05.cql b/src/test/resources/regression/09/05.cql
new file mode 100644 (file)
index 0000000..9fbc491
--- /dev/null
@@ -0,0 +1 @@
+sortby sortby sortby
\ No newline at end of file
diff --git a/src/test/resources/regression/09/05.xcql b/src/test/resources/regression/09/05.xcql
new file mode 100644 (file)
index 0000000..578af0f
--- /dev/null
@@ -0,0 +1,12 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>sortby</term>
+  <sortKeys>
+    <key>
+      <index>sortby</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/09/06.cql b/src/test/resources/regression/09/06.cql
new file mode 100644 (file)
index 0000000..c1c8282
--- /dev/null
@@ -0,0 +1 @@
+sortby sortby sortby sortby sortby
\ No newline at end of file
diff --git a/src/test/resources/regression/09/06.xcql b/src/test/resources/regression/09/06.xcql
new file mode 100644 (file)
index 0000000..2e136b5
--- /dev/null
@@ -0,0 +1,18 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>sortby</term>
+  <sortKeys>
+    <key>
+      <index>sortby</index>
+    </key>
+    <key>
+      <index>sortby</index>
+    </key>
+    <key>
+      <index>sortby</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/09/name b/src/test/resources/regression/09/name
new file mode 100644 (file)
index 0000000..ed65cdb
--- /dev/null
@@ -0,0 +1 @@
+Lame Searches
\ No newline at end of file
diff --git a/src/test/resources/regression/10/01.cql b/src/test/resources/regression/10/01.cql
new file mode 100644 (file)
index 0000000..c45d250
--- /dev/null
@@ -0,0 +1 @@
+kernighan sortby title
\ No newline at end of file
diff --git a/src/test/resources/regression/10/01.xcql b/src/test/resources/regression/10/01.xcql
new file mode 100644 (file)
index 0000000..0c8cc74
--- /dev/null
@@ -0,0 +1,12 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>kernighan</term>
+  <sortKeys>
+    <key>
+      <index>title</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/02.cql b/src/test/resources/regression/10/02.cql
new file mode 100644 (file)
index 0000000..606ba50
--- /dev/null
@@ -0,0 +1 @@
+kernighan and ritchie sortby title
\ No newline at end of file
diff --git a/src/test/resources/regression/10/02.xcql b/src/test/resources/regression/10/02.xcql
new file mode 100644 (file)
index 0000000..dbd6407
--- /dev/null
@@ -0,0 +1,28 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>kernighan</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>ritchie</term>
+    </searchClause>
+  </rightOperand>
+  <sortKeys>
+    <key>
+      <index>title</index>
+    </key>
+  </sortKeys>
+</triple>
diff --git a/src/test/resources/regression/10/03.cql b/src/test/resources/regression/10/03.cql
new file mode 100644 (file)
index 0000000..beae0f5
--- /dev/null
@@ -0,0 +1 @@
+dc.creator=kernighan sortby dc.title
\ No newline at end of file
diff --git a/src/test/resources/regression/10/03.xcql b/src/test/resources/regression/10/03.xcql
new file mode 100644 (file)
index 0000000..eaef782
--- /dev/null
@@ -0,0 +1,12 @@
+<searchClause>
+  <index>dc.creator</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>kernighan</term>
+  <sortKeys>
+    <key>
+      <index>dc.title</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/04.cql b/src/test/resources/regression/10/04.cql
new file mode 100644 (file)
index 0000000..28ef4c4
--- /dev/null
@@ -0,0 +1 @@
+dc.creator=kernighan sortby numberOfLegs/cql.number
\ No newline at end of file
diff --git a/src/test/resources/regression/10/04.xcql b/src/test/resources/regression/10/04.xcql
new file mode 100644 (file)
index 0000000..3a32884
--- /dev/null
@@ -0,0 +1,17 @@
+<searchClause>
+  <index>dc.creator</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>kernighan</term>
+  <sortKeys>
+    <key>
+      <index>numberOfLegs</index>
+      <modifiers>
+        <modifier>
+          <type>cql.number</type>
+        </modifier>
+      </modifiers>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/05.cql b/src/test/resources/regression/10/05.cql
new file mode 100644 (file)
index 0000000..d263a12
--- /dev/null
@@ -0,0 +1 @@
+dc.creator=kernighan sortby dc.title/sort.respectCase
\ No newline at end of file
diff --git a/src/test/resources/regression/10/05.xcql b/src/test/resources/regression/10/05.xcql
new file mode 100644 (file)
index 0000000..5821b04
--- /dev/null
@@ -0,0 +1,17 @@
+<searchClause>
+  <index>dc.creator</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>kernighan</term>
+  <sortKeys>
+    <key>
+      <index>dc.title</index>
+      <modifiers>
+        <modifier>
+          <type>sort.respectcase</type>
+        </modifier>
+      </modifiers>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/06.cql b/src/test/resources/regression/10/06.cql
new file mode 100644 (file)
index 0000000..ead9f79
--- /dev/null
@@ -0,0 +1 @@
+dc.creator=kernighan sortby dc.title/sort.respectCase/sort.descending
\ No newline at end of file
diff --git a/src/test/resources/regression/10/06.xcql b/src/test/resources/regression/10/06.xcql
new file mode 100644 (file)
index 0000000..8d232b2
--- /dev/null
@@ -0,0 +1,20 @@
+<searchClause>
+  <index>dc.creator</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>kernighan</term>
+  <sortKeys>
+    <key>
+      <index>dc.title</index>
+      <modifiers>
+        <modifier>
+          <type>sort.respectcase</type>
+        </modifier>
+        <modifier>
+          <type>sort.descending</type>
+        </modifier>
+      </modifiers>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/07.cql b/src/test/resources/regression/10/07.cql
new file mode 100644 (file)
index 0000000..3495ee0
--- /dev/null
@@ -0,0 +1 @@
+dc.creator=kernighan sortby dc.date dc.title
\ No newline at end of file
diff --git a/src/test/resources/regression/10/07.xcql b/src/test/resources/regression/10/07.xcql
new file mode 100644 (file)
index 0000000..13737ee
--- /dev/null
@@ -0,0 +1,15 @@
+<searchClause>
+  <index>dc.creator</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>kernighan</term>
+  <sortKeys>
+    <key>
+      <index>dc.date</index>
+    </key>
+    <key>
+      <index>dc.title</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/08.cql b/src/test/resources/regression/10/08.cql
new file mode 100644 (file)
index 0000000..27e5a1c
--- /dev/null
@@ -0,0 +1 @@
+dc.creator=kernighan sortby dc.date/sort.missingOmit
\ No newline at end of file
diff --git a/src/test/resources/regression/10/08.xcql b/src/test/resources/regression/10/08.xcql
new file mode 100644 (file)
index 0000000..bcf2a8f
--- /dev/null
@@ -0,0 +1,17 @@
+<searchClause>
+  <index>dc.creator</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>kernighan</term>
+  <sortKeys>
+    <key>
+      <index>dc.date</index>
+      <modifiers>
+        <modifier>
+          <type>sort.missingomit</type>
+        </modifier>
+      </modifiers>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/09.cql b/src/test/resources/regression/10/09.cql
new file mode 100644 (file)
index 0000000..fc41d84
--- /dev/null
@@ -0,0 +1 @@
+dc.creator=kernighan sortby dc.date/sort.missingValue=1970
\ No newline at end of file
diff --git a/src/test/resources/regression/10/09.xcql b/src/test/resources/regression/10/09.xcql
new file mode 100644 (file)
index 0000000..8a60d51
--- /dev/null
@@ -0,0 +1,19 @@
+<searchClause>
+  <index>dc.creator</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>kernighan</term>
+  <sortKeys>
+    <key>
+      <index>dc.date</index>
+      <modifiers>
+        <modifier>
+          <type>sort.missingvalue</type>
+          <comparison>=</comparison>
+          <value>1970</value>
+        </modifier>
+      </modifiers>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/10.cql b/src/test/resources/regression/10/10.cql
new file mode 100644 (file)
index 0000000..1f9b830
--- /dev/null
@@ -0,0 +1 @@
+>dc="http://deepcustard.org/1.0" blah sortby dc.custardDepth
\ No newline at end of file
diff --git a/src/test/resources/regression/10/10.xcql b/src/test/resources/regression/10/10.xcql
new file mode 100644 (file)
index 0000000..cb97df6
--- /dev/null
@@ -0,0 +1,18 @@
+<searchClause>
+  <prefixes>
+    <prefix>
+      <name>dc</name>
+      <identifier>http://deepcustard.org/1.0</identifier>
+    </prefix>
+  </prefixes>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>blah</term>
+  <sortKeys>
+    <key>
+      <index>dc.custardDepth</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/11.cql b/src/test/resources/regression/10/11.cql
new file mode 100644 (file)
index 0000000..216ec56
--- /dev/null
@@ -0,0 +1 @@
+>ns1="http://uri1" >ns2="http://uri2" whatever sortby ns1.key/a/b/c=1 ns2.key2
\ No newline at end of file
diff --git a/src/test/resources/regression/10/11.xcql b/src/test/resources/regression/10/11.xcql
new file mode 100644 (file)
index 0000000..ba2abe7
--- /dev/null
@@ -0,0 +1,38 @@
+<searchClause>
+  <prefixes>
+    <prefix>
+      <name>ns1</name>
+      <identifier>http://uri1</identifier>
+    </prefix>
+    <prefix>
+      <name>ns2</name>
+      <identifier>http://uri2</identifier>
+    </prefix>
+  </prefixes>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>whatever</term>
+  <sortKeys>
+    <key>
+      <index>ns1.key</index>
+      <modifiers>
+        <modifier>
+          <type>a</type>
+        </modifier>
+        <modifier>
+          <type>b</type>
+        </modifier>
+        <modifier>
+          <type>c</type>
+          <comparison>=</comparison>
+          <value>1</value>
+        </modifier>
+      </modifiers>
+    </key>
+    <key>
+      <index>ns2.key2</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/12.cql b/src/test/resources/regression/10/12.cql
new file mode 100644 (file)
index 0000000..e73b2f7
--- /dev/null
@@ -0,0 +1 @@
+(>dc=x b=c) sortby d
\ No newline at end of file
diff --git a/src/test/resources/regression/10/12.xcql b/src/test/resources/regression/10/12.xcql
new file mode 100644 (file)
index 0000000..06b0ac2
--- /dev/null
@@ -0,0 +1,18 @@
+<searchClause>
+  <prefixes>
+    <prefix>
+      <name>dc</name>
+      <identifier>x</identifier>
+    </prefix>
+  </prefixes>
+  <index>b</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>c</term>
+  <sortKeys>
+    <key>
+      <index>d</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/13.cql b/src/test/resources/regression/10/13.cql
new file mode 100644 (file)
index 0000000..60694b0
--- /dev/null
@@ -0,0 +1 @@
+b=(>dc=x c) sortby d
\ No newline at end of file
diff --git a/src/test/resources/regression/10/13.xcql b/src/test/resources/regression/10/13.xcql
new file mode 100644 (file)
index 0000000..06b0ac2
--- /dev/null
@@ -0,0 +1,18 @@
+<searchClause>
+  <prefixes>
+    <prefix>
+      <name>dc</name>
+      <identifier>x</identifier>
+    </prefix>
+  </prefixes>
+  <index>b</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>c</term>
+  <sortKeys>
+    <key>
+      <index>d</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/14.cql b/src/test/resources/regression/10/14.cql
new file mode 100644 (file)
index 0000000..5a6f6c5
--- /dev/null
@@ -0,0 +1 @@
+(>dc=x c1 and c2) sortby d
\ No newline at end of file
diff --git a/src/test/resources/regression/10/14.xcql b/src/test/resources/regression/10/14.xcql
new file mode 100644 (file)
index 0000000..4f9f6d2
--- /dev/null
@@ -0,0 +1,34 @@
+<triple>
+  <prefixes>
+    <prefix>
+      <name>dc</name>
+      <identifier>x</identifier>
+    </prefix>
+  </prefixes>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>c1</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>c2</term>
+    </searchClause>
+  </rightOperand>
+  <sortKeys>
+    <key>
+      <index>d</index>
+    </key>
+  </sortKeys>
+</triple>
diff --git a/src/test/resources/regression/10/15.cql b/src/test/resources/regression/10/15.cql
new file mode 100644 (file)
index 0000000..9931696
--- /dev/null
@@ -0,0 +1 @@
+>dc="http://deepcustard.org" (>dc="http://dublincore.org" dc.title=jaws) sortby dc.custardDepth
\ No newline at end of file
diff --git a/src/test/resources/regression/10/15.xcql b/src/test/resources/regression/10/15.xcql
new file mode 100644 (file)
index 0000000..fb278bc
--- /dev/null
@@ -0,0 +1,22 @@
+<searchClause>
+  <prefixes>
+    <prefix>
+      <name>dc</name>
+      <identifier>http://deepcustard.org</identifier>
+    </prefix>
+    <prefix>
+      <name>dc</name>
+      <identifier>http://dublincore.org</identifier>
+    </prefix>
+  </prefixes>
+  <index>dc.title</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>jaws</term>
+  <sortKeys>
+    <key>
+      <index>dc.custardDepth</index>
+    </key>
+  </sortKeys>
+</searchClause>
diff --git a/src/test/resources/regression/10/16.cql b/src/test/resources/regression/10/16.cql
new file mode 100644 (file)
index 0000000..eab4136
--- /dev/null
@@ -0,0 +1 @@
+>dc="http://deepcustard.org" (fish or >dc="http://dublincore.org" dc.title=jaws) sortby dc.custardDepth
\ No newline at end of file
diff --git a/src/test/resources/regression/10/16.xcql b/src/test/resources/regression/10/16.xcql
new file mode 100644 (file)
index 0000000..42b01d6
--- /dev/null
@@ -0,0 +1,40 @@
+<triple>
+  <prefixes>
+    <prefix>
+      <name>dc</name>
+      <identifier>http://deepcustard.org</identifier>
+    </prefix>
+  </prefixes>
+  <boolean>
+    <value>or</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>fish</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <prefixes>
+        <prefix>
+          <name>dc</name>
+          <identifier>http://dublincore.org</identifier>
+        </prefix>
+      </prefixes>
+      <index>dc.title</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>jaws</term>
+    </searchClause>
+  </rightOperand>
+  <sortKeys>
+    <key>
+      <index>dc.custardDepth</index>
+    </key>
+  </sortKeys>
+</triple>
diff --git a/src/test/resources/regression/10/name b/src/test/resources/regression/10/name
new file mode 100644 (file)
index 0000000..02e6bb6
--- /dev/null
@@ -0,0 +1 @@
+Sorting
\ No newline at end of file