Package com.novell.sentinel.client.tinyq

Contains support for a tiny query expression language designed for use with URL's.

See:
          Description

Class Summary
TinyQBuilder A helper class to allow easy programmatic construction of TinyQ expressions.
 

Enum Summary
Operator Enum describing operators in the TinyQuery language.
 

Exception Summary
TinyQBuilder.BuilderException Base class of exceptions thrown when errors occur while building a TinyQ query expression.
TinyQBuilder.InvalidExpressionTypeException Exception thrown if an operator is appended in an invalid position.
TinyQBuilder.InvalidOperandException Exception thrown if an invalid operand is supplied to a TinyQ operator.
 

Package com.novell.sentinel.client.tinyq Description

Contains support for a tiny query expression language designed for use with URL's.

The operator lexical representations are designed to fit in the non-reserved character set defined by RFC 3986 and to be smaller than "percent-encoded" representations of more desirable lexical operator representations.

The following operators are provided in the TinyQ language:

.t
Unary, logical "NOT"
.l
Binary comparison "less than" ('<')
.m
Binary comparison "less than or equal" ('<=')
.g
Binary comparison "greater than" ('>')
.h
Binary comparison "greater than or equal" ('>=')
.e
Binary comparison "equal" ('==')
.n
Binary comparison "not equal" ('!=')
.k
Binary comparison "LIKE" (wildcards, ref. SQL LIKE)
.o
Binary, logical "OR"
.a
Binary, logical "AND"
.s
Grouping left, i.e., '('
.f
Grouping right, i.e., ')'

Operators are left-associative and the order of operator precedence is (highest to lowest):

  1. '.t'
  2. '.l','.m','.g','.h'
  3. '.e','.n','.k'
  4. '.o'
  5. '.a'

String comparisons are case-insensitive.

"Dot-character" sequences in operands that match an operator are escaped by doubling the '.' character. For example, "henry.aaron" would be encoded as "henry..aaron".

The "LIKE" wildcards are '-' for multiple characters and '_' for a single character. If a literal right-side operand for "LIKE" has a '-' or '_' these are escaped by preceding them with a '.' character. For example, if "some_text" is the literal part of the LIKE argument the text is encoded as "some._text". A full like expression might be: "name.ksome._text-".