X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLNode.java;h=28521268ca9d5df8f15780c48e6cebbf92be0868;hb=8e35f984081a29de9b53af7c1b2fbf981c474d88;hp=69b57f743ab46bc5ba6a14a82eca3016893aeb6e;hpb=0d602847da05628623b47828d8207f87bedc78a3;p=cql-java-moved-to-github.git diff --git a/src/org/z3950/zing/cql/CQLNode.java b/src/org/z3950/zing/cql/CQLNode.java index 69b57f7..2852126 100644 --- a/src/org/z3950/zing/cql/CQLNode.java +++ b/src/org/z3950/zing/cql/CQLNode.java @@ -1,4 +1,4 @@ -// $Id: CQLNode.java,v 1.18 2002-12-08 00:37:54 mike Exp $ +// $Id: CQLNode.java,v 1.25 2007-06-27 22:39:55 mike Exp $ package org.z3950.zing.cql; import java.util.Properties; @@ -8,12 +8,24 @@ import java.util.Vector; /** * Represents a node in a CQL parse-tree. * - * @version $Id: CQLNode.java,v 1.18 2002-12-08 00:37:54 mike Exp $ + * @version $Id: CQLNode.java,v 1.25 2007-06-27 22:39:55 mike Exp $ */ public abstract class CQLNode { CQLNode() {} // prevent javadoc from documenting this /** + * Returns the name of the result-set to which this query is a + * reference, if and only if the entire query consists only of a + * result-set reference. If it's anything else, including a + * boolean combination of a result-set reference with something + * else, then null is returned instead. + * @return the name of the referenced result-set + */ + public String getResultSetName() { + return null; + } + + /** * Translates a parse-tree into an XCQL document. *
* @param level
@@ -26,10 +38,10 @@ public abstract class CQLNode {
* parse-tree whose root is this node.
*/
public String toXCQL(int level) {
- return toXCQL(level, new Vector());
+ return toXCQL(level, new Vector
* @param config
* A Properties object containing configuration
- * information that specifies the mapping from CQL qualifiers,
+ * 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
+ * specification is described in the CQL-Java distribution's
* sample PQF-mapping configuration file,
* etc/pqf.properties, which see.
* @return
@@ -101,9 +113,9 @@ public abstract class CQLNode {
*
* @param config
* A Properties object containing configuration
- * information that specifies the mapping from CQL qualifiers,
+ * 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
+ * specification is described in the CQL-Java distribution's
* sample PQF-mapping configuration file,
* etc/pqf.properties, which see.
* @return
@@ -112,7 +124,7 @@ public abstract class CQLNode {
* ftp://ftp.rsasecurity.com/pub/pkcs/ascii/layman.asc
*/
- abstract public byte[] toType1(Properties config)
+ abstract public byte[] toType1BER(Properties config)
throws PQFTranslationException;
// ANS.1 classes
@@ -159,7 +171,7 @@ public abstract class CQLNode {
/**
* Put a length directly into a BER record.
*
- * @param length length to put into record
+ * @param len length to put into record
* @return the new, incremented value of the offset parameter.
*/
public // ### shouldn't this be protected?
@@ -198,7 +210,7 @@ public abstract class CQLNode {
/**
* Get the length needed to represent the given number.
*
- * @param number determine length needed to encode this
+ * @param num determine length needed to encode this
* @return length needed to encode given number
*/
protected static final int numLen(long num) {
@@ -233,8 +245,8 @@ public abstract class CQLNode {
}
// Used only by the makeOID() method
- private static final java.util.Hashtable madeOIDs =
- new java.util.Hashtable(10);
+ private static final java.util.Hashtable