Package net.ivoa.registry.search

# Class Where2DOM

java.lang.Object
net.ivoa.registry.search.Where2DOM

All Implemented Interfaces:
  `Where2DOMConstants`

public class Where2DOM extends Object implements Where2DOMConstants

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ADQL_NS`
`static final String`
`ADQL_PREFIX`
`protected Document`
`doc`
`protected int`
`indent`
`Token`
`jj_nt`
Next token.
`static final short`
`MODE_ALWAYS_QUALIFIED`
the namespace qualification mode in which all elements will always be fully qualified with a prefix
`protected static final short`
`MODE_COUNT`
the total number of namespace qualification modes supported
`static final short`
`MODE_DEFAULT_NS`
the namespace qualification mode in which default namespaces are defined to minimize the qualification with prefixes.
`protected short`
`nsmode`
`protected Node`
`parent`
`static final String`
`STCC_NS`
`static final String`
`STCC_PREFIX`
`static final String`
`STCR_NS`
`static final String`
`STCR_PREFIX`
`Token`
`token`
Current token.
`Where2DOMTokenManager`
`token_source`
Generated Token Manager.
`static final String`
`XSI_NS`

### Fields inherited from interface net.ivoa.registry.search.Where2DOMConstants

`DEFAULT, DIGIT, EOF, FLOAT, INTEGER, K_abs, K_acos, K_ALL, K_AND, K_ANY, K_AS, K_ASC, K_asin, K_atan, K_atan2, K_AVG, K_BETWEEN, K_BY, K_ceiling, K_cos, K_COUNT, K_degrees, K_DESC, K_DISTINCT, K_EXISTS, K_exp, K_floor, K_FROM, K_GROUP, K_HAVING, K_IN, K_INTO, K_IS, K_LIKE, K_log, K_log10, K_MAX, K_MIN, K_NOT, K_NOWAIT, K_OR, K_ORDER, K_pi, K_power, K_radians, K_rand, K_REGION, K_round, K_SELECT, K_sin, K_sqrt, K_square, K_SUM, K_tan, K_TOP, K_truncate, K_UNION, K_WHERE, K_XMATCH, LETTER, LINE_COMMENT, MULTI_LINE_COMMENT, S_CHAR_LITERAL, S_IDENTIFIER, S_INTEGER, S_PROTECTED, S_QUOTED_IDENTIFIER, S_REAL, S_TABLE_IDENTIFIER, S_XPATH, S_XPATH_IDENTIFIER, SPECIAL_CHARS, tokenImage`

## Constructor Summary

Constructors
Constructor
Description
`Where2DOM()`
`Where2DOM(InputStream stream)`
Constructor with InputStream.
`Where2DOM(InputStream stream, String encoding)`
Constructor with InputStream and supplied encoding
`Where2DOM(Reader stream)`
Constructor.
`Where2DOM(Where2DOMTokenManager tm)`
Constructor with generated Token Manager.

## Method Summary

Modifier and Type
Method
Description
`final Element`
`ActualColumnReference(String name, boolean setXSIType)`
`static String`
`addIndentation(String base, int spaceCount)`
append spaceCount spaces after the given base string
`final String`
`AggregateFunctionName()`
`final Element`
`Atom(String name, boolean setXSIType)`
`final Element`
`BetweenPred(String name, boolean setXSIType)`
`final Element`
`ClosedExpr(String name, boolean setXSIType)`
`final Element`
`ClosedSearch(String name, boolean setXSIType)`
`final Element`
`ColumnReference(String name, boolean setXSIType)`
`final String`
`Comparison()`
`final String`
`ComparisonDivider()`
`final Element`
`ComparisonPred(String name, boolean setXSIType)`
`protected Element`
`createADQLElement(String name)`
`final void`
`disable_tracing()`
Disable tracing.
`final void`
`enable_tracing()`
Enable tracing.
`final Element`
`FunctionOfOneVar(String name, boolean setXSIType)`
`ParseException`
`generateParseException()`
Generate ParseException.
`protected Element`
`getChildByTag(Element el, String name)`
`int`
`getIndent()`
return the pretty-fying indent amount that will be inserted.
`final Token`
`getNextToken()`
Get the next Token.
`short`
`getNSMode(short mode)`
return the namespace qualification mode that will be used
`final Token`
`getToken(int index)`
Get the specific Token.
`void`
`indent()`
insert the text nodes that provide pretty indentations.
`void`
`indent(Element parent, String indent, int incr)`
insert the text nodes that provide pretty indentations.
`final Element`
`IntersectionElement(String name, boolean setXSIType)`
`final Element`
`IntersectionSearch(String name, boolean setXSIType)`
`final Element`
`InverseSearch(String name, boolean setXSIType)`
`final Element`
`Literal(String name, boolean setXSIType)`
`static void`
`main(String[] args)`
`protected boolean`
`matchesXSIType(Element el, String qtype)`
`final String`
`MathFunctionName()`
`final Element`
`MultExpr(String name, boolean setXSIType)`
`final Element`
`Number(String name, boolean setXSIType)`
`Element`
`parseWhere()`
`final Element`
`PlusExpr(String name)`
`final Element`
`RegionSearch(String name, boolean setXSIType)`
`void`
`ReInit(InputStream stream)`
Reinitialise.
`void`
`ReInit(InputStream stream, String encoding)`
Reinitialise.
`void`
`ReInit(Reader stream)`
Reinitialise.
`void`
`ReInit(Where2DOMTokenManager tm)`
Reinitialise.
`final void`
`RelativeXPath(StringBuffer sb)`
`protected Element`
`renameADQLElement(Element el, String newname, Node parent)`
`final Element`
`ScalarExpression(String name)`
`final Element`
`Search(String name)`
`void`
`setIndent(int indent)`
set the desired pretty-fying indent amount.
`void`
`setNSMode(short mode)`
set the namespace qualification mode to use
`final boolean`
`trace_enabled()`
Trace enabled.
`final String`
`TrigonometricFunctionName()`
`final Element`
`UnionSearch(String name, boolean setXSIType)`
`final Element`
`Unit(String name)`
`final Element`
`UnitExpr(String name, boolean setXSIType)`
`final Element`
`Where(String name)`
`final Element`
`XPathReference(String name, boolean setXSIType)`
`final Element`
`XString(String name, boolean setXSIType)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ADQL_NS

public static final String ADQL_NS

See Also:
  - Constant Field Values

### ADQL_PREFIX

public static final String ADQL_PREFIX

See Also:
  - Constant Field Values

### STCR_NS

public static final String STCR_NS

See Also:
  - Constant Field Values

### STCR_PREFIX

public static final String STCR_PREFIX

See Also:
  - Constant Field Values

### STCC_NS

public static final String STCC_NS

See Also:
  - Constant Field Values

### STCC_PREFIX

public static final String STCC_PREFIX

See Also:
  - Constant Field Values

### doc

protected Document doc

### parent

protected Node parent

### indent

protected int indent

### nsmode

protected short nsmode

### XSI_NS

public static final String XSI_NS

See Also:
  - Constant Field Values

### MODE_ALWAYS_QUALIFIED

public static final short MODE_ALWAYS_QUALIFIED
the namespace qualification mode in which all elements will always be fully qualified with a prefix

See Also:
  - Constant Field Values

### MODE_DEFAULT_NS

public static final short MODE_DEFAULT_NS
the namespace qualification mode in which default namespaces are defined to minimize the qualification with prefixes.

See Also:
  - Constant Field Values

### MODE_COUNT

protected static final short MODE_COUNT
the total number of namespace qualification modes supported

See Also:
  - Constant Field Values

### token_source

public Where2DOMTokenManager token_source
Generated Token Manager.

### token

public Token token
Current token.

### jj_nt

public Token jj_nt
Next token.

## Constructor Details

### Where2DOM

public Where2DOM()

### Where2DOM

public Where2DOM(InputStream stream)
Constructor with InputStream.

### Where2DOM

public Where2DOM(InputStream stream, String encoding)
Constructor with InputStream and supplied encoding

### Where2DOM

public Where2DOM(Reader stream)
Constructor.

### Where2DOM

public Where2DOM(Where2DOMTokenManager tm)
Constructor with generated Token Manager.

## Method Details

### main

public static void main(String[] args) throws TransformerException

Throws:
  `TransformerException`

### createADQLElement

protected Element createADQLElement(String name)

### parseWhere

public Element parseWhere() throws ParseException

Throws:
  `ParseException`

### setIndent

public void setIndent(int indent)
set the desired pretty-fying indent amount. If indent = 0, only carriage returns are inserted between each element. If indent invalid input: '<' 0, no indentation or carriage returns will be inserted.

Parameters:
  `indent` - the amount of indentation per depth level

### getIndent

public int getIndent()
return the pretty-fying indent amount that will be inserted. If indent = 0, only carriage returns are inserted between each element. If indent invalid input: '<' 0, no indentation or carriage returns will be inserted.

Parameters:
  `indent` - the amount of indentation per depth level

### indent

public void indent()
insert the text nodes that provide pretty indentations. This will avoid inserting indentation multiple times.

### indent

public void indent(Element parent, String indent, int incr)
insert the text nodes that provide pretty indentations. This will avoid inserting indentation multiple times.

Parameters:
  `parent` - the node to insert text nodes into
  `indent` - the current indentation string on parent. If null, no indentation is currently in place.
  `incr` - the indentation increment

### addIndentation

public static String addIndentation(String base, int spaceCount)
append spaceCount spaces after the given base string

### setNSMode

public void setNSMode(short mode)
set the namespace qualification mode to use

### getNSMode

public short getNSMode(short mode)
return the namespace qualification mode that will be used

### getChildByTag

protected Element getChildByTag(Element el, String name)

### matchesXSIType

protected boolean matchesXSIType(Element el, String qtype)

### renameADQLElement

protected Element renameADQLElement(Element el, String newname, Node parent)

### MathFunctionName

public final String MathFunctionName() throws ParseException

Throws:
  `ParseException`

### AggregateFunctionName

public final String AggregateFunctionName() throws ParseException

Throws:
  `ParseException`

### TrigonometricFunctionName

public final String TrigonometricFunctionName() throws ParseException

Throws:
  `ParseException`

### FunctionOfOneVar

public final Element FunctionOfOneVar(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### Atom

public final Element Atom(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### Unit

public final Element Unit(String name) throws ParseException

Throws:
  `ParseException`

### BetweenPred

public final Element BetweenPred(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### ClosedExpr

public final Element ClosedExpr(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### ClosedSearch

public final Element ClosedSearch(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### ColumnReference

public final Element ColumnReference(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### ActualColumnReference

public final Element ActualColumnReference(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### XPathReference

public final Element XPathReference(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### RelativeXPath

public final void RelativeXPath(StringBuffer sb) throws ParseException

Throws:
  `ParseException`

### ComparisonPred

public final Element ComparisonPred(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### ComparisonDivider

public final String ComparisonDivider() throws ParseException

Throws:
  `ParseException`

### Comparison

public final String Comparison() throws ParseException

Throws:
  `ParseException`

### IntersectionSearch

public final Element IntersectionSearch(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### IntersectionElement

public final Element IntersectionElement(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### InverseSearch

public final Element InverseSearch(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### Literal

public final Element Literal(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### Number

public final Element Number(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### RegionSearch

public final Element RegionSearch(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### ScalarExpression

public final Element ScalarExpression(String name) throws ParseException

Throws:
  `ParseException`

### PlusExpr

public final Element PlusExpr(String name) throws ParseException

Throws:
  `ParseException`

### MultExpr

public final Element MultExpr(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### UnitExpr

public final Element UnitExpr(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### Search

public final Element Search(String name) throws ParseException

Throws:
  `ParseException`

### XString

public final Element XString(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### UnionSearch

public final Element UnionSearch(String name, boolean setXSIType) throws ParseException

Throws:
  `ParseException`

### Where

public final Element Where(String name) throws ParseException

Throws:
  `ParseException`

### ReInit

public void ReInit(InputStream stream)
Reinitialise.

### ReInit

public void ReInit(InputStream stream, String encoding)
Reinitialise.

### ReInit

public void ReInit(Reader stream)
Reinitialise.

### ReInit

public void ReInit(Where2DOMTokenManager tm)
Reinitialise.

### getNextToken

public final Token getNextToken()
Get the next Token.

### getToken

public final Token getToken(int index)
Get the specific Token.

### generateParseException

public ParseException generateParseException()
Generate ParseException.

### trace_enabled

public final boolean trace_enabled()
Trace enabled.

### enable_tracing

public final void enable_tracing()
Enable tracing.

### disable_tracing

public final void disable_tracing()
Disable tracing.