-// $Id: CQLNode.java,v 1.18 2002-12-08 00:37:54 mike Exp $
+// $Id: CQLNode.java,v 1.22 2002-12-12 15:03:50 mike Exp $
package org.z3950.zing.cql;
import java.util.Properties;
/**
* 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.22 2002-12-12 15:03:50 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.
* <P>
* @param level
* A <TT>Properties</TT> object containing configuration
* information that specifies the mapping from CQL qualifiers,
* 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,
* <TT>etc/pqf.properties</TT>, which see.
* @return
* A <TT>Properties</TT> object containing configuration
* information that specifies the mapping from CQL qualifiers,
* 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,
* <TT>etc/pqf.properties</TT>, which see.
* @return
* <A href="ftp://ftp.rsasecurity.com/pub/pkcs/ascii/layman.asc"
* >ftp://ftp.rsasecurity.com/pub/pkcs/ascii/layman.asc</A>
*/
- abstract public byte[] toType1(Properties config)
+ abstract public byte[] toType1BER(Properties config)
throws PQFTranslationException;
// ANS.1 classes
public static final byte[] makeQuery(CQLNode root, Properties properties)
throws PQFTranslationException {
- byte[] rpnStructure = root.toType1(properties);
+ byte[] rpnStructure = root.toType1BER(properties);
byte[] qry = new byte[rpnStructure.length+100];
int offset = 0;
offset = putTag(CONTEXT, 1, CONSTRUCTED, qry, offset);