|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.z3950.zing.cql.CQLNode
public abstract class CQLNode
Represents a node in a CQL parse-tree.
Field Summary | |
---|---|
protected static int |
APPLICATION
|
static byte |
BITSTRING
|
static byte |
BOOLEAN
|
protected static int |
CONSTRUCTED
|
protected static int |
CONTEXT
|
static byte |
ENUMERATED
|
static byte |
EXTERNAL
|
static byte |
GENERALSTRING
|
static byte |
INTEGER
|
static byte |
NULL
|
static byte |
OBJECTDESCRIPTOR
|
static byte |
OBJECTIDENTIFIER
|
static byte |
OCTETSTRING
|
protected static int |
PRIMITIVE
|
protected static int |
PRIVATE
|
static byte |
SEQUENCE
|
static byte |
SET
|
protected static int |
UNIVERSAL
|
static byte |
VISIBLESTRING
|
Method Summary | |
---|---|
java.lang.String |
getResultSetName()
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. |
protected static java.lang.String |
indent(int level)
Returns a String of spaces for indenting to the specified level. |
protected static int |
lenLen(int length)
Get the length needed to represent the given length. |
protected static byte[] |
makeOID(java.lang.String oid)
|
static byte[] |
makeQuery(CQLNode root,
java.util.Properties properties)
|
protected static int |
numLen(long num)
Get the length needed to represent the given number. |
static int |
putLen(int len,
byte[] record,
int offset)
Put a length directly into a BER record. |
protected static int |
putNum(long num,
byte[] record,
int offset)
Put a number into a given buffer |
protected static int |
putTag(int asn1class,
int fldid,
int form,
byte[] record,
int offset)
|
protected static java.lang.String |
renderPrefixes(int level,
java.util.Vector prefixes)
|
protected static java.lang.String |
renderSortKeys(int level,
java.util.Vector<ModifierSet> sortkeys)
|
abstract java.lang.String |
toCQL()
Decompiles a parse-tree into a CQL query. |
abstract java.lang.String |
toPQF(java.util.Properties config)
Renders a parse-tree into a Yaz-style PQF string. |
abstract byte[] |
toType1BER(java.util.Properties config)
Renders a parser-tree into a BER-endoded packet representing an equivalent Z39.50 Type-1 query. |
java.lang.String |
toXCQL(int level)
Translates a parse-tree into an XCQL document. |
java.lang.String |
toXCQL(int level,
java.util.Vector<CQLPrefix> prefixes)
|
abstract java.lang.String |
toXCQL(int level,
java.util.Vector<CQLPrefix> prefixes,
java.util.Vector<ModifierSet> sortkeys)
|
protected static java.lang.String |
xq(java.lang.String str)
Returns the argument String quoted for XML. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int UNIVERSAL
protected static final int APPLICATION
protected static final int CONTEXT
protected static final int PRIVATE
protected static final int PRIMITIVE
protected static final int CONSTRUCTED
public static final byte BOOLEAN
public static final byte INTEGER
public static final byte BITSTRING
public static final byte OCTETSTRING
public static final byte NULL
public static final byte OBJECTIDENTIFIER
public static final byte OBJECTDESCRIPTOR
public static final byte EXTERNAL
public static final byte ENUMERATED
public static final byte SEQUENCE
public static final byte SET
public static final byte VISIBLESTRING
public static final byte GENERALSTRING
Method Detail |
---|
public java.lang.String getResultSetName()
public java.lang.String toXCQL(int level)
level
- The number of levels to indent the top element of the XCQL
document. This will typically be 0 when invoked by an
application; it takes higher values when this method is
invoked recursively for nodes further down the tree.
public java.lang.String toXCQL(int level, java.util.Vector<CQLPrefix> prefixes)
public abstract java.lang.String toXCQL(int level, java.util.Vector<CQLPrefix> prefixes, java.util.Vector<ModifierSet> sortkeys)
protected static java.lang.String renderPrefixes(int level, java.util.Vector prefixes)
protected static java.lang.String renderSortKeys(int level, java.util.Vector<ModifierSet> sortkeys)
public abstract java.lang.String toCQL()
public abstract java.lang.String toPQF(java.util.Properties config) throws PQFTranslationException
config
- 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.
PQFTranslationException
protected static java.lang.String indent(int level)
protected static java.lang.String xq(java.lang.String str)
public abstract byte[] toType1BER(java.util.Properties config) throws PQFTranslationException
config
- 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.
PQFTranslationException
protected static final int putTag(int asn1class, int fldid, int form, byte[] record, int offset)
public static final int putLen(int len, byte[] record, int offset)
len
- length to put into record
protected static final int lenLen(int length)
length
- determine length needed to encode this
protected static final int numLen(long num)
num
- determine length needed to encode this
protected static final int putNum(long num, byte[] record, int offset)
num
- number to put into bufferrecord
- buffer to useoffset
- offset into buffer
protected static final byte[] makeOID(java.lang.String oid)
public static final byte[] makeQuery(CQLNode root, java.util.Properties properties) throws PQFTranslationException
PQFTranslationException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |