Package net.ivoa.registry.search
Class Where2DOM
- java.lang.Object
-
- net.ivoa.registry.search.Where2DOM
-
- All Implemented Interfaces:
Where2DOMConstants
public class Where2DOM extends java.lang.Object implements Where2DOMConstants
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ADQL_NS
static java.lang.String
ADQL_PREFIX
protected org.w3c.dom.Document
doc
protected int
indent
Token
jj_nt
Next token.static short
MODE_ALWAYS_QUALIFIED
the namespace qualification mode in which all elements will always be fully qualified with a prefixprotected static short
MODE_COUNT
the total number of namespace qualification modes supportedstatic short
MODE_DEFAULT_NS
the namespace qualification mode in which default namespaces are defined to minimize the qualification with prefixes.protected short
nsmode
protected org.w3c.dom.Node
parent
static java.lang.String
STCC_NS
static java.lang.String
STCC_PREFIX
static java.lang.String
STCR_NS
static java.lang.String
STCR_PREFIX
Token
token
Current token.Where2DOMTokenManager
token_source
Generated Token Manager.static java.lang.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(java.io.InputStream stream)
Constructor with InputStream.Where2DOM(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingWhere2DOM(java.io.Reader stream)
Constructor.Where2DOM(Where2DOMTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.Element
ActualColumnReference(java.lang.String name, boolean setXSIType)
static java.lang.String
addIndentation(java.lang.String base, int spaceCount)
append spaceCount spaces after the given base stringjava.lang.String
AggregateFunctionName()
org.w3c.dom.Element
Atom(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
BetweenPred(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
ClosedExpr(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
ClosedSearch(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
ColumnReference(java.lang.String name, boolean setXSIType)
java.lang.String
Comparison()
java.lang.String
ComparisonDivider()
org.w3c.dom.Element
ComparisonPred(java.lang.String name, boolean setXSIType)
protected org.w3c.dom.Element
createADQLElement(java.lang.String name)
void
disable_tracing()
Disable tracing.void
enable_tracing()
Enable tracing.org.w3c.dom.Element
FunctionOfOneVar(java.lang.String name, boolean setXSIType)
ParseException
generateParseException()
Generate ParseException.protected org.w3c.dom.Element
getChildByTag(org.w3c.dom.Element el, java.lang.String name)
int
getIndent()
return the pretty-fying indent amount that will be inserted.Token
getNextToken()
Get the next Token.short
getNSMode(short mode)
return the namespace qualification mode that will be usedToken
getToken(int index)
Get the specific Token.void
indent()
insert the text nodes that provide pretty indentations.void
indent(org.w3c.dom.Element parent, java.lang.String indent, int incr)
insert the text nodes that provide pretty indentations.org.w3c.dom.Element
IntersectionElement(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
IntersectionSearch(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
InverseSearch(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
Literal(java.lang.String name, boolean setXSIType)
static void
main(java.lang.String[] args)
protected boolean
matchesXSIType(org.w3c.dom.Element el, java.lang.String qtype)
java.lang.String
MathFunctionName()
org.w3c.dom.Element
MultExpr(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
Number(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
parseWhere()
org.w3c.dom.Element
PlusExpr(java.lang.String name)
org.w3c.dom.Element
RegionSearch(java.lang.String name, boolean setXSIType)
void
ReInit(java.io.InputStream stream)
Reinitialise.void
ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.void
ReInit(java.io.Reader stream)
Reinitialise.void
ReInit(Where2DOMTokenManager tm)
Reinitialise.void
RelativeXPath(java.lang.StringBuffer sb)
protected org.w3c.dom.Element
renameADQLElement(org.w3c.dom.Element el, java.lang.String newname, org.w3c.dom.Node parent)
org.w3c.dom.Element
ScalarExpression(java.lang.String name)
org.w3c.dom.Element
Search(java.lang.String name)
void
setIndent(int indent)
set the desired pretty-fying indent amount.void
setNSMode(short mode)
set the namespace qualification mode to useboolean
trace_enabled()
Trace enabled.java.lang.String
TrigonometricFunctionName()
org.w3c.dom.Element
UnionSearch(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
Unit(java.lang.String name)
org.w3c.dom.Element
UnitExpr(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
Where(java.lang.String name)
org.w3c.dom.Element
XPathReference(java.lang.String name, boolean setXSIType)
org.w3c.dom.Element
XString(java.lang.String name, boolean setXSIType)
-
-
-
Field Detail
-
ADQL_NS
public static final java.lang.String ADQL_NS
- See Also:
- Constant Field Values
-
ADQL_PREFIX
public static final java.lang.String ADQL_PREFIX
- See Also:
- Constant Field Values
-
STCR_NS
public static final java.lang.String STCR_NS
- See Also:
- Constant Field Values
-
STCR_PREFIX
public static final java.lang.String STCR_PREFIX
- See Also:
- Constant Field Values
-
STCC_NS
public static final java.lang.String STCC_NS
- See Also:
- Constant Field Values
-
STCC_PREFIX
public static final java.lang.String STCC_PREFIX
- See Also:
- Constant Field Values
-
doc
protected org.w3c.dom.Document doc
-
parent
protected org.w3c.dom.Node parent
-
indent
protected int indent
-
nsmode
protected short nsmode
-
XSI_NS
public static final java.lang.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 Detail
-
Where2DOM
public Where2DOM()
-
Where2DOM
public Where2DOM(java.io.InputStream stream)
Constructor with InputStream.
-
Where2DOM
public Where2DOM(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
Where2DOM
public Where2DOM(java.io.Reader stream)
Constructor.
-
Where2DOM
public Where2DOM(Where2DOMTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws javax.xml.transform.TransformerException
- Throws:
javax.xml.transform.TransformerException
-
createADQLElement
protected org.w3c.dom.Element createADQLElement(java.lang.String name)
-
parseWhere
public org.w3c.dom.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 < 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 < 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(org.w3c.dom.Element parent, java.lang.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 intoindent
- the current indentation string on parent. If null, no indentation is currently in place.incr
- the indentation increment
-
addIndentation
public static java.lang.String addIndentation(java.lang.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 org.w3c.dom.Element getChildByTag(org.w3c.dom.Element el, java.lang.String name)
-
matchesXSIType
protected boolean matchesXSIType(org.w3c.dom.Element el, java.lang.String qtype)
-
renameADQLElement
protected org.w3c.dom.Element renameADQLElement(org.w3c.dom.Element el, java.lang.String newname, org.w3c.dom.Node parent)
-
MathFunctionName
public final java.lang.String MathFunctionName() throws ParseException
- Throws:
ParseException
-
AggregateFunctionName
public final java.lang.String AggregateFunctionName() throws ParseException
- Throws:
ParseException
-
TrigonometricFunctionName
public final java.lang.String TrigonometricFunctionName() throws ParseException
- Throws:
ParseException
-
FunctionOfOneVar
public final org.w3c.dom.Element FunctionOfOneVar(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
Atom
public final org.w3c.dom.Element Atom(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
Unit
public final org.w3c.dom.Element Unit(java.lang.String name) throws ParseException
- Throws:
ParseException
-
BetweenPred
public final org.w3c.dom.Element BetweenPred(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
ClosedExpr
public final org.w3c.dom.Element ClosedExpr(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
ClosedSearch
public final org.w3c.dom.Element ClosedSearch(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
ColumnReference
public final org.w3c.dom.Element ColumnReference(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
ActualColumnReference
public final org.w3c.dom.Element ActualColumnReference(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
XPathReference
public final org.w3c.dom.Element XPathReference(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
RelativeXPath
public final void RelativeXPath(java.lang.StringBuffer sb) throws ParseException
- Throws:
ParseException
-
ComparisonPred
public final org.w3c.dom.Element ComparisonPred(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
ComparisonDivider
public final java.lang.String ComparisonDivider() throws ParseException
- Throws:
ParseException
-
Comparison
public final java.lang.String Comparison() throws ParseException
- Throws:
ParseException
-
IntersectionSearch
public final org.w3c.dom.Element IntersectionSearch(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
IntersectionElement
public final org.w3c.dom.Element IntersectionElement(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
InverseSearch
public final org.w3c.dom.Element InverseSearch(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
Literal
public final org.w3c.dom.Element Literal(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
Number
public final org.w3c.dom.Element Number(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
RegionSearch
public final org.w3c.dom.Element RegionSearch(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
ScalarExpression
public final org.w3c.dom.Element ScalarExpression(java.lang.String name) throws ParseException
- Throws:
ParseException
-
PlusExpr
public final org.w3c.dom.Element PlusExpr(java.lang.String name) throws ParseException
- Throws:
ParseException
-
MultExpr
public final org.w3c.dom.Element MultExpr(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
UnitExpr
public final org.w3c.dom.Element UnitExpr(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
Search
public final org.w3c.dom.Element Search(java.lang.String name) throws ParseException
- Throws:
ParseException
-
XString
public final org.w3c.dom.Element XString(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
UnionSearch
public final org.w3c.dom.Element UnionSearch(java.lang.String name, boolean setXSIType) throws ParseException
- Throws:
ParseException
-
Where
public final org.w3c.dom.Element Where(java.lang.String name) throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.
-
ReInit
public void ReInit(java.io.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.
-
-