diff --git a/src/main/java/org/z3950/zing/cql/CQLAndNode.java b/src/main/java/org/z3950/zing/cql/CQLAndNode.java index 724c185..ecff58d 100644 --- a/src/main/java/org/z3950/zing/cql/CQLAndNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLAndNode.java @@ -1,4 +1,3 @@ - package org.z3950.zing.cql; @@ -10,6 +9,13 @@ public class CQLAndNode extends CQLBooleanNode { /** * Creates a new AND node with the specified left- and right-hand * sides and modifiers. + * @param left the left-hand side of the AND + * @param right the right-hand side of the AND + * @param ms the modifiers to apply to this AND + * @see ModifierSet + * @see CQLNode + * @see CQLBoolean + * @see CQLBooleanNode */ public CQLAndNode(CQLNode left, CQLNode right, ModifierSet ms) { super(left, right, ms, CQLBoolean.AND); diff --git a/src/main/java/org/z3950/zing/cql/CQLBoolean.java b/src/main/java/org/z3950/zing/cql/CQLBoolean.java index 53b48ad..bab541b 100644 --- a/src/main/java/org/z3950/zing/cql/CQLBoolean.java +++ b/src/main/java/org/z3950/zing/cql/CQLBoolean.java @@ -1,14 +1,16 @@ -/* - * Copyright (c) 1995-2016, Index Data - * All rights reserved. - * See the file LICENSE for details. - */ package org.z3950.zing.cql; /** - * + * Represents a boolean operator in CQL. * @author jakub */ public enum CQLBoolean { - AND, OR, NOT, PROX; + /** AND is the same as CQL's "and" */ + AND, + /** OR is the same as CQL's "or" */ + OR, + /** NOT is the same as CQL's "not" */ + NOT, + /** PROX is the same as CQL's "prox" */ + PROX; } diff --git a/src/main/java/org/z3950/zing/cql/CQLBooleanNode.java b/src/main/java/org/z3950/zing/cql/CQLBooleanNode.java index ee167b8..6d903bf 100644 --- a/src/main/java/org/z3950/zing/cql/CQLBooleanNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLBooleanNode.java @@ -1,5 +1,5 @@ - package org.z3950.zing.cql; + import java.util.List; import java.util.Properties; @@ -18,6 +18,7 @@ public CQLBoolean getOperator() { /** * The root of a parse-tree representing the left-hand side. + * @return the left operand of this boolean node */ public CQLNode getLeftOperand() { return left; @@ -27,6 +28,7 @@ public CQLNode getLeftOperand() { /** * The root of a parse-tree representing the right-hand side. + * @return the right operand of this boolean node */ public CQLNode getRightOperand() { return right; @@ -36,6 +38,7 @@ public CQLNode getRightOperand() { /** * The set of modifiers that are applied to this boolean. + * @return a list of Modifier objects, which may be empty. */ public List getModifiers() { return ms.getModifiers(); @@ -57,7 +60,6 @@ public void traverse(CQLNodeVisitor visitor) { visitor.onBooleanNodeEnd(this); } - @Override void toXCQLInternal(XCQLBuilder b, int level, List prefixes, List sortkeys) { diff --git a/src/main/java/org/z3950/zing/cql/CQLDefaultNodeVisitor.java b/src/main/java/org/z3950/zing/cql/CQLDefaultNodeVisitor.java index e3858ce..9c0b744 100644 --- a/src/main/java/org/z3950/zing/cql/CQLDefaultNodeVisitor.java +++ b/src/main/java/org/z3950/zing/cql/CQLDefaultNodeVisitor.java @@ -1,9 +1,3 @@ -/* - * Copyright (c) 1995-2014, Index Data - * All rights reserved. - * See the file LICENSE for details. - */ - package org.z3950.zing.cql; /** diff --git a/src/main/java/org/z3950/zing/cql/CQLGenerator.java b/src/main/java/org/z3950/zing/cql/CQLGenerator.java index f03235d..2f21563 100644 --- a/src/main/java/org/z3950/zing/cql/CQLGenerator.java +++ b/src/main/java/org/z3950/zing/cql/CQLGenerator.java @@ -1,24 +1,22 @@ - package org.z3950.zing.cql; + import java.util.Properties; import java.util.Random; import java.io.InputStream; import java.io.FileInputStream; -import java.io.FileNotFoundException; - /** * A generator that produces random CQL queries. *

* Why is that useful? Mainly to produce test-cases for CQL parsers - * (including the CQLParser class in this package): you can + * (including the CQLParser class in this package): you can * generate a random search tree, render it to XCQL and remember the * result. Then decompile the tree to CQL, feed the generated CQL to * the parser of your choice, and check that the XCQL it comes up with * is the same what you got from your initial rendering. *

- * This code is based on the same grammar as the CQLParser class in - * this distribution - there is a generate_x() method + * This code is based on the same grammar as the CQLParser class in + * this distribution - there is a generate_x() method * for each grammar element X. * * @see * @param params - * A Properties table containing configuration + * A Properties table containing configuration * parameters for the queries to be generated by this generator. - * Recognised parameters are: *

+ * Recognised parameters are: + *

*
- *
seed
+ *
seed
*
- * If specified, this is a long used to seed the + * If specified, this is a long used to seed the * random number generator, so that the CQL generator can be * run repeatably, giving the same results each time. If it's * omitted, then no seed is explicitly specified, and the * results of each run will be different (so long as you don't * run it more that 2^32 times :-) - *

*

- *
complexQuery
+ *
complexQuery
*
* [mandatory] A floating-point number between 0.0 and 1.0, - * indicating the probability for each cql-query node + * indicating the probability for each cql-query node * that it will be expanded into a ``complex query'' - * (cql-query boolean search-clause) rather - * than a search-clause. - *

+ * (cql-query boolean search-clause) rather + * than a search-clause. *

- *
complexClause
+ *
complexClause
*
* [mandatory] A floating-point number between 0.0 and 1.0, - * indicating the probability for each search-clause + * indicating the probability for each search-clause * node that it will be expanded into a full sub-query rather - * than an [ index relation ] term triplet. - *

+ * than an [ index relation ] term triplet. *

- *
proxOp
+ *
proxOp
*
* [mandatory] A floating-point number between 0.0 and 1.0, * indicating the probability that each boolean operator will * be chosen to be proximity operation; otherwise, the three - * simpler boolean operations (and, or and - * not) are chosen with equal probability. - *

+ * simpler boolean operations (and, or and + * not) are chosen with equal probability. *

- *
equalsRelation
+ *
equalsRelation
*
* [mandatory] A floating-point number between 0.0 and 1.0, * indicating the probability that each relation will be chosen - * to be = - this is treated as a special case, since + * to be = - this is treated as a special case, since * it's likely to be by far the most common relation in * ``real life'' searches. - *

*

- *
numericRelation
- *
+ *
numericRelation
+ *
q * [mandatory] A floating-point number between 0.0 and 1.0, * indicating the probability that a relation, having chosen - * not to be =, is instead chosen to be one of the six - * numeric relations (<, >, - * <=, >=, <> and - * =). - *

+ * not to be =, is instead chosen to be one of the six + * numeric relations (<, >, + * <=, >=, <> and + * =). *

*
*/ @@ -116,11 +108,11 @@ private static void debug(String str) { * when it was created. You are free to create as many random * queries as you wish from a single generator; each of them will * use the same parameters. - *

+ *

* @return - * A CQLNode that is the root of the generated tree. - * That tree may be rendered in XCQL using its toXCQL() - * method, or decompiled into CQL using its toCQL + * A CQLNode that is the root of the generated tree. + * That tree may be rendered in XCQL using its toXCQL() + * method, or decompiled into CQL using its toCQL * method. */ public CQLNode generate() throws MissingParameterException { @@ -264,9 +256,9 @@ boolean maybe(String param) throws MissingParameterException { * decompiles it into CQL which is written to standard output. *

* For example, - * java org.z3950.zing.cql.CQLGenerator - * etc/generate.properties seed 18398, - * where the file generate.properties contains:

+     * java org.z3950.zing.cql.CQLGenerator
+     *	etc/generate.properties seed 18398,
+     * where the file generate.properties contains:
      *	complexQuery=0.4
      *	complexClause=0.4
      *	equalsRelation=0.5
diff --git a/src/main/java/org/z3950/zing/cql/CQLLexer.java b/src/main/java/org/z3950/zing/cql/CQLLexer.java
index cb990cd..4294b6f 100644
--- a/src/main/java/org/z3950/zing/cql/CQLLexer.java
+++ b/src/main/java/org/z3950/zing/cql/CQLLexer.java
@@ -1,8 +1,3 @@
-/*
- * Copyright (c) 1995-2014, Index Datassss
- * All rights reserved.
- * See the file LICENSE for details.
- */
 package org.z3950.zing.cql;
 
 import java.io.BufferedReader;
diff --git a/src/main/java/org/z3950/zing/cql/CQLNode.java b/src/main/java/org/z3950/zing/cql/CQLNode.java
index 221da44..b71ba1b 100644
--- a/src/main/java/org/z3950/zing/cql/CQLNode.java
+++ b/src/main/java/org/z3950/zing/cql/CQLNode.java
@@ -1,12 +1,10 @@
-
 package org.z3950.zing.cql;
+
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-
-
 /**
  * Represents a node in a CQL parse-tree.
  *
@@ -29,7 +27,6 @@ public String getResultSetName() {
 
     /**
      * Translates a parse-tree into an XCQL document.
-     * 

* @return * A String containing an XCQL document equivalent to the * parse-tree whose root is this node. @@ -79,7 +76,6 @@ static void renderSortKeys(XCQLBuilder b, int level, /** * Decompiles a parse-tree into a CQL query. - *

* @return * A String containing a CQL query equivalent to the parse-tree * whose root is this node, so that compiling that query will @@ -96,17 +92,20 @@ static void renderSortKeys(XCQLBuilder b, int level, * Chapter 7 (Supporting Tools) of the * YAZ manual. - *

* @param config - * A Properties object containing configuration + * A Properties object containing configuration * information that specifies the mapping from CQL indexes, * relations, etc. to Type-1 attributes. The mapping * specification is described in the CQL-Java distribution's * sample PQF-mapping configuration file, - * etc/pqf.properties, which see. + * etc/pqf.properties, which see. * @return * A String containing a PQF query equivalent to the parse-tree * whose root is this node. + * @throws PQFTranslationException + * If the parse-tree cannot be translated into PQF, for example + * because it contains a CQL relation that is not supported by the + * PQF configuration. */ abstract public String toPQF(Properties config) throws PQFTranslationException; @@ -118,17 +117,21 @@ abstract public String toPQF(Properties config) * primarily for SRW-to-Z39.50 gateways. * * @param config - * A Properties object containing configuration + * A Properties object containing configuration * information that specifies the mapping from CQL indexes, * relations, etc. to Type-1 attributes. The mapping * specification is described in the CQL-Java distribution's * sample PQF-mapping configuration file, - * etc/pqf.properties, which see. + * etc/pqf.properties, which see. * @return * A byte array containing the BER packet. * @see * ftp://ftp.rsasecurity.com/pub/pkcs/ascii/layman.asc + * @throws PQFTranslationException + * If the parse-tree cannot be translated into PQF, for example + * because it contains a CQL relation that is not supported by the + * PQF configuration. */ abstract public byte[] toType1BER(Properties config) throws PQFTranslationException; diff --git a/src/main/java/org/z3950/zing/cql/CQLNodeVisitor.java b/src/main/java/org/z3950/zing/cql/CQLNodeVisitor.java index 5f90cf6..bbd8452 100644 --- a/src/main/java/org/z3950/zing/cql/CQLNodeVisitor.java +++ b/src/main/java/org/z3950/zing/cql/CQLNodeVisitor.java @@ -1,9 +1,3 @@ -/* - * Copyright (c) 1995-2014, Index Data - * All rights reserved. - * See the file LICENSE for details. - */ - package org.z3950.zing.cql; /** diff --git a/src/main/java/org/z3950/zing/cql/CQLNotNode.java b/src/main/java/org/z3950/zing/cql/CQLNotNode.java index 706f4c1..743c1a0 100644 --- a/src/main/java/org/z3950/zing/cql/CQLNotNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLNotNode.java @@ -1,7 +1,5 @@ - package org.z3950.zing.cql; - /** * Represents a NOT node in a CQL parse-tree. * diff --git a/src/main/java/org/z3950/zing/cql/CQLOrNode.java b/src/main/java/org/z3950/zing/cql/CQLOrNode.java index 295f303..32600c6 100644 --- a/src/main/java/org/z3950/zing/cql/CQLOrNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLOrNode.java @@ -1,7 +1,5 @@ - package org.z3950.zing.cql; - /** * Represents an OR node in a CQL parse-tree. * diff --git a/src/main/java/org/z3950/zing/cql/CQLParseException.java b/src/main/java/org/z3950/zing/cql/CQLParseException.java index ff1423f..311fa42 100644 --- a/src/main/java/org/z3950/zing/cql/CQLParseException.java +++ b/src/main/java/org/z3950/zing/cql/CQLParseException.java @@ -1,7 +1,5 @@ - package org.z3950.zing.cql; - /** * Exception indicating that an error ocurred parsing CQL. * @@ -9,7 +7,7 @@ public class CQLParseException extends Exception { private int pos; /** - * Creates a new CQLParseException. + * Creates a new CQLParseException. * @param s * An error message describing the problem with the query, * usually a syntax error of some kind. diff --git a/src/main/java/org/z3950/zing/cql/CQLParser.java b/src/main/java/org/z3950/zing/cql/CQLParser.java index cbe64d5..93c7c10 100644 --- a/src/main/java/org/z3950/zing/cql/CQLParser.java +++ b/src/main/java/org/z3950/zing/cql/CQLParser.java @@ -1,4 +1,3 @@ - package org.z3950.zing.cql; import java.io.BufferedReader; @@ -12,7 +11,6 @@ import java.util.List; import java.util.Set; - /** * Compiles CQL strings into parse trees of CQLNode subtypes. * @@ -34,16 +32,16 @@ public class CQLParser { /** * The new parser implements a dialect of CQL specified by the - * compat argument: - *

    - *
  • V1POINT1 - CQL version 1.1 - *
  • - *
  • V1POINT2 - CQL version 1.2 - *
  • - *
  • V1POINT1SORT - CQL version 1.1 but including + * compat argument: + *
      + *
    • V1POINT1 - CQL version 1.1 + *
    • + *
    • V1POINT2 - CQL version 1.2 + *
    • + *
    • V1POINT1SORT - CQL version 1.1 but including * sortby as specified for CQL 1.2. - *
    • - *
    + *
  • + *
*/ public CQLParser(int compat) { this.compat = compat; @@ -100,10 +98,10 @@ public boolean unregisterCustomRelation(String relation) { * The resulting parse tree may be further processed by hand (see * the individual node-types' documentation for details on the * data structure) or, more often, simply rendered out in the - * desired form using one of the back-ends. toCQL() + * desired form using one of the back-ends. toCQL() * returns a decompiled CQL query equivalent to the one that was - * compiled in the first place; toXCQL() returns an - * XML snippet representing the query; and toPQF() + * compiled in the first place; toXCQL() returns an + * XML snippet representing the query; and toPQF() * returns the query rendered in Index Data's Prefix Query * Format. * @@ -403,7 +401,6 @@ private String matchSymbol(String expected) * </searchClause> * </triple> *
- *

* @param -1 * CQL version 1.1 (default version 1.2) * @param -d @@ -414,7 +411,7 @@ private String matchSymbol(String expected) * effect, the test harness acts as a query canonicaliser. * @return * The input query, either as XCQL [default] or CQL [if the - * -c option is supplied]. + * -c option is supplied]. */ public static void main (String[] args) { char mode = 'x'; // x=XCQL, c=CQL, p=PQF diff --git a/src/main/java/org/z3950/zing/cql/CQLPrefix.java b/src/main/java/org/z3950/zing/cql/CQLPrefix.java index 64ed961..d9d8050 100644 --- a/src/main/java/org/z3950/zing/cql/CQLPrefix.java +++ b/src/main/java/org/z3950/zing/cql/CQLPrefix.java @@ -1,4 +1,3 @@ - package org.z3950.zing.cql; /** @@ -11,8 +10,8 @@ public class CQLPrefix { /** * The short name of the prefix mapping. That is, the prefix - * itself, such as dc, as it might be used in an index - * like dc.title. + * itself, such as dc, as it might be used in an index + * like dc.title. */ public String getName() { return name; @@ -24,7 +23,7 @@ public String getName() { /** * The full identifier name of the prefix mapping. That is, * typically, a URI permanently allocated to a specific index - * set, such as http://zthes.z3950.org/cql/1.0. + * set, such as http://zthes.z3950.org/cql/1.0. */ public String getIdentifier() { return identifier; diff --git a/src/main/java/org/z3950/zing/cql/CQLPrefixNode.java b/src/main/java/org/z3950/zing/cql/CQLPrefixNode.java index 64e3103..1705aad 100644 --- a/src/main/java/org/z3950/zing/cql/CQLPrefixNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLPrefixNode.java @@ -1,10 +1,9 @@ - package org.z3950.zing.cql; + import java.util.ArrayList; import java.util.List; import java.util.Properties; - /** * Represents a prefix node in a CQL parse-tree. * diff --git a/src/main/java/org/z3950/zing/cql/CQLProxNode.java b/src/main/java/org/z3950/zing/cql/CQLProxNode.java index b452e22..3e844ca 100644 --- a/src/main/java/org/z3950/zing/cql/CQLProxNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLProxNode.java @@ -1,7 +1,5 @@ - package org.z3950.zing.cql; - /** * Represents a proximity node in a CQL parse-tree. * The left- and right-hand-sides must be satisfied by parts of the diff --git a/src/main/java/org/z3950/zing/cql/CQLRelation.java b/src/main/java/org/z3950/zing/cql/CQLRelation.java index 81fd38c..6f52eec 100644 --- a/src/main/java/org/z3950/zing/cql/CQLRelation.java +++ b/src/main/java/org/z3950/zing/cql/CQLRelation.java @@ -1,5 +1,5 @@ - package org.z3950.zing.cql; + import java.util.List; import java.util.Properties; @@ -13,10 +13,10 @@ public class CQLRelation extends CQLNode { /** * Creates a new CQLRelation with the specified base relation. * Typical base relations include the usual six ordering relations - * (<=, >, etc.), the text - * relations any, all and exact, the - * old server-choice relation scr and profiled relations of - * the form prefix.name. + * (<=, >, etc.), the text + * relations any, all and exact, the + * old server-choice relation scr and profiled relations of + * the form prefix.name. */ // ### Seems wrong: a modifier set should not have a base, a // relation should diff --git a/src/main/java/org/z3950/zing/cql/CQLSortNode.java b/src/main/java/org/z3950/zing/cql/CQLSortNode.java index efc190b..9aed194 100644 --- a/src/main/java/org/z3950/zing/cql/CQLSortNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLSortNode.java @@ -1,10 +1,9 @@ - package org.z3950.zing.cql; + import java.util.ArrayList; import java.util.List; import java.util.Properties; - /** * Represents a sort node in a CQL parse-tree. * diff --git a/src/main/java/org/z3950/zing/cql/CQLTermNode.java b/src/main/java/org/z3950/zing/cql/CQLTermNode.java index 218a4aa..02a8229 100644 --- a/src/main/java/org/z3950/zing/cql/CQLTermNode.java +++ b/src/main/java/org/z3950/zing/cql/CQLTermNode.java @@ -1,5 +1,5 @@ - package org.z3950.zing.cql; + import java.util.ArrayList; import java.util.List; import java.util.Properties; @@ -18,9 +18,9 @@ public class CQLTermNode extends CQLNode { private String term; /** - * Creates a new term node with the specified index, - * relation and term. The first two may be - * null, but the term may not. + * Creates a new term node with the specified index, + * relation and term. The first two may be + * null, but the term may not. */ public CQLTermNode(String index, CQLRelation relation, String term) { this.index = index; diff --git a/src/main/java/org/z3950/zing/cql/CQLTokenizer.java b/src/main/java/org/z3950/zing/cql/CQLTokenizer.java index 2d8b6b1..8542dd9 100644 --- a/src/main/java/org/z3950/zing/cql/CQLTokenizer.java +++ b/src/main/java/org/z3950/zing/cql/CQLTokenizer.java @@ -1,8 +1,3 @@ -/* - * Copyright (c) 1995-2014, Index Datassss - * All rights reserved. - * See the file LICENSE for details. - */ package org.z3950.zing.cql; /** diff --git a/src/main/java/org/z3950/zing/cql/MissingParameterException.java b/src/main/java/org/z3950/zing/cql/MissingParameterException.java index c953e42..b52b2cb 100644 --- a/src/main/java/org/z3950/zing/cql/MissingParameterException.java +++ b/src/main/java/org/z3950/zing/cql/MissingParameterException.java @@ -1,14 +1,12 @@ - package org.z3950.zing.cql; - /** * Exception indicating that a required property was not specified. * */ public class MissingParameterException extends Exception { /** - * Creates a new MissingParameterException. + * Creates a new MissingParameterException. * @param s * The name of the property whose value was required but not supplied. */ diff --git a/src/main/java/org/z3950/zing/cql/Modifier.java b/src/main/java/org/z3950/zing/cql/Modifier.java index 71232e9..af68453 100644 --- a/src/main/java/org/z3950/zing/cql/Modifier.java +++ b/src/main/java/org/z3950/zing/cql/Modifier.java @@ -1,9 +1,8 @@ - package org.z3950.zing.cql; /** * Represents a single modifier, consisting of three elements: a type, - * a comparision and a value. For example, "distance", "<", "3". The + * a comparision and a value. For example, "distance", "<", "3". The * type is mandatory; either the comparison and value must both occur, * or neither must. *

diff --git a/src/main/java/org/z3950/zing/cql/ModifierSet.java b/src/main/java/org/z3950/zing/cql/ModifierSet.java index da94b8c..754af1e 100644 --- a/src/main/java/org/z3950/zing/cql/ModifierSet.java +++ b/src/main/java/org/z3950/zing/cql/ModifierSet.java @@ -1,5 +1,5 @@ - package org.z3950.zing.cql; + import java.util.ArrayList; import java.util.List; @@ -9,10 +9,12 @@ * This class is used as a workhorse delegate by both CQLRelation and * CQLProxNode - two functionally very separate classes that happen to * require similar data structures and functionality. + *

*

* A ModifierSet consists of a ``base'' string together with a set of * zero or more type comparison value pairs, * where type, comparison and value are all strings. + *

* */ public class ModifierSet { @@ -35,8 +37,8 @@ public String getBase() { } /** - * Adds a modifier of the specified type, - * comparison and value to a ModifierSet. + * Adds a modifier of the specified type, + * comparison and value to a ModifierSet. */ public void addModifier(String type, String comparison, String value) { Modifier modifier = new Modifier(type, comparison, value); @@ -44,8 +46,8 @@ public void addModifier(String type, String comparison, String value) { } /** - * Adds a modifier of the specified type, but with no - * comparison and value, to a ModifierSet. + * Adds a modifier of the specified type, but with no + * comparison and value, to a ModifierSet. */ public void addModifier(String type) { Modifier modifier = new Modifier(type); diff --git a/src/main/java/org/z3950/zing/cql/PQFTranslationException.java b/src/main/java/org/z3950/zing/cql/PQFTranslationException.java index f0d7dc2..a095776 100644 --- a/src/main/java/org/z3950/zing/cql/PQFTranslationException.java +++ b/src/main/java/org/z3950/zing/cql/PQFTranslationException.java @@ -1,7 +1,5 @@ - package org.z3950.zing.cql; - /** * Base class for exceptions occurring when translating parse trees to PQF. * diff --git a/src/main/java/org/z3950/zing/cql/UnknownIndexException.java b/src/main/java/org/z3950/zing/cql/UnknownIndexException.java index 01dce00..e460dfc 100644 --- a/src/main/java/org/z3950/zing/cql/UnknownIndexException.java +++ b/src/main/java/org/z3950/zing/cql/UnknownIndexException.java @@ -1,7 +1,5 @@ - package org.z3950.zing.cql; - /** * Exception indicating that an index was not recognised. * At compilation time, we accept any syntactically valid index; @@ -13,7 +11,7 @@ */ public class UnknownIndexException extends PQFTranslationException { /** - * Creates a new UnknownIndexException. + * Creates a new UnknownIndexException. * @param s * The index for which there was no PQF configuration. */ diff --git a/src/main/java/org/z3950/zing/cql/UnknownPositionException.java b/src/main/java/org/z3950/zing/cql/UnknownPositionException.java index 649a7d0..c7d9c12 100644 --- a/src/main/java/org/z3950/zing/cql/UnknownPositionException.java +++ b/src/main/java/org/z3950/zing/cql/UnknownPositionException.java @@ -1,21 +1,19 @@ - package org.z3950.zing.cql; - /** * Exception indicating that a position was not recognised. * When rendering a tree out as PQF, each term is classified either as - * any, first, last or - * firstAndLast, depending on whether it begins and/or ends - * with the word-anchoring meta-character ^. Its - * classification is looked up as a position in the PQF + * any, first, last or + * firstAndLast, depending on whether it begins and/or ends + * with the word-anchoring meta-character ^. Its + * classification is looked up as a position in the PQF * configuration. If the position is not configured, we throw one of * these babies. * */ public class UnknownPositionException extends PQFTranslationException { /** - * Creates a new UnknownPositionException. + * Creates a new UnknownPositionException. * @param s * The position for which there was no PQF configuration. */ diff --git a/src/main/java/org/z3950/zing/cql/UnknownRelationException.java b/src/main/java/org/z3950/zing/cql/UnknownRelationException.java index 3a665d9..d4998b0 100644 --- a/src/main/java/org/z3950/zing/cql/UnknownRelationException.java +++ b/src/main/java/org/z3950/zing/cql/UnknownRelationException.java @@ -1,7 +1,5 @@ - package org.z3950.zing.cql; - /** * Exception indicating that a relation was not recognised. * At compilation time, we accept any syntactically valid relation; @@ -13,7 +11,7 @@ */ public class UnknownRelationException extends PQFTranslationException { /** - * Creates a new UnknownRelationException. + * Creates a new UnknownRelationException. * @param s * The relation for which there was no PQF configuration. */ diff --git a/src/main/java/org/z3950/zing/cql/UnknownRelationModifierException.java b/src/main/java/org/z3950/zing/cql/UnknownRelationModifierException.java index 2d3d6f2..b27d952 100644 --- a/src/main/java/org/z3950/zing/cql/UnknownRelationModifierException.java +++ b/src/main/java/org/z3950/zing/cql/UnknownRelationModifierException.java @@ -1,7 +1,5 @@ - package org.z3950.zing.cql; - /** * Exception indicating that a relation modifier was not recognised. * At compilation time, we accept any syntactically valid relation modifier; @@ -13,7 +11,7 @@ */ public class UnknownRelationModifierException extends PQFTranslationException { /** - * Creates a new UnknownRelationModifierException. + * Creates a new UnknownRelationModifierException. * @param s * The relation modifier for which there was no PQF configuration. */ diff --git a/src/main/java/org/z3950/zing/cql/UnknownTruncationException.java b/src/main/java/org/z3950/zing/cql/UnknownTruncationException.java index 3842e23..024fd2e 100644 --- a/src/main/java/org/z3950/zing/cql/UnknownTruncationException.java +++ b/src/main/java/org/z3950/zing/cql/UnknownTruncationException.java @@ -2,10 +2,10 @@ /** * Exception indicating that a truncation was not recognised. When rendering a - * tree out as PQF, each term is classified either as left, - * right, left and right truncated, depending on whether - * it begins and/or ends with the character *. Its - * classification is looked up as a truncation in the PQF + * tree out as PQF, each term is classified either as left, + * right, left and right truncated, depending on whether + * it begins and/or ends with the character *. Its + * classification is looked up as a truncation in the PQF * configuration. If the truncation is not configured, we throw one of these * babies. * @@ -14,7 +14,7 @@ public class UnknownTruncationException extends PQFTranslationException { private static final long serialVersionUID = 6971993723734811253L; /** - * Creates a new UnknownTruncationException. + * Creates a new UnknownTruncationException. * * @param s * The truncation for which there was no PQF configuration. diff --git a/src/main/java/org/z3950/zing/cql/XCQLBuilder.java b/src/main/java/org/z3950/zing/cql/XCQLBuilder.java index d59ce89..9b3d8fd 100644 --- a/src/main/java/org/z3950/zing/cql/XCQLBuilder.java +++ b/src/main/java/org/z3950/zing/cql/XCQLBuilder.java @@ -1,8 +1,3 @@ -/* - * Copyright (c) 1995-2011, Index Data - * All rights reserved. - * See the file LICENSE for details. - */ package org.z3950.zing.cql; /** diff --git a/src/test/java/org/z3950/zing/cql/CQLNodeVisitorTest.java b/src/test/java/org/z3950/zing/cql/CQLNodeVisitorTest.java index 3a83235..8324098 100644 --- a/src/test/java/org/z3950/zing/cql/CQLNodeVisitorTest.java +++ b/src/test/java/org/z3950/zing/cql/CQLNodeVisitorTest.java @@ -1,8 +1,3 @@ -/* - * Copyright (c) 1995-2016, Index Data - * All rights reserved. - * See the file LICENSE for details. - */ package org.z3950.zing.cql; import java.io.IOException; diff --git a/src/test/java/org/z3950/zing/cql/CQLParserTest.java b/src/test/java/org/z3950/zing/cql/CQLParserTest.java index 34d5999..ed0c1ab 100644 --- a/src/test/java/org/z3950/zing/cql/CQLParserTest.java +++ b/src/test/java/org/z3950/zing/cql/CQLParserTest.java @@ -1,23 +1,16 @@ -/* - * 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.Properties; import java.util.Set; import java.util.jar.JarEntry; import java.util.jar.JarFile; @@ -26,10 +19,9 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; +import static org.junit.Assert.*; import static java.lang.System.out; -import java.util.Properties; /** *