public class IdentifierItems
extends java.lang.Object
ADQLParser
!
This class is an array of maximum 4 IdentifierItems.IdentifierItem
.
The goal is to represent complex ADQL identifiers (column, table, ...) which may be composed of more than only one identifier.
For instance, a table can be referenced either by only its name or by the name of its schema and its name. So, in this last case there are 2 identifiers.
It is possible to get one by one each identifier item (by using the
getters), or the concatenation of all (thanks to join(String)
).
IdentifierItems.IdentifierItem
Modifier and Type | Class and Description |
---|---|
static class |
IdentifierItems.IdentifierItem
Represent any ADQL identifier (column name, table name or table/column
alias).
|
Constructor and Description |
---|
IdentifierItems(boolean tableIdentifier)
Builds an IdentifierItems by specifying it is a table or a column identifier.
|
Modifier and Type | Method and Description |
---|---|
void |
append(IdentifierItems.IdentifierItem item)
Apppends a simple identifier, that's to say an additional field (catalog, schema, table, column).
|
IdentifierItems.IdentifierItem |
get(int ind)
Gets the whole ind-th identifier/field.
|
int |
getBeginColumn() |
int |
getBeginLine() |
byte |
getCaseSensitivity() |
java.lang.String |
getCatalog() |
java.lang.String |
getColumn() |
boolean |
getColumnCaseSensitivity() |
int |
getEndColumn() |
int |
getEndLine() |
java.lang.String |
getIdentifier(int ind)
Gets the value of the ind-th identifier/field.
|
TextPosition |
getPosition() |
java.lang.String |
getSchema() |
java.lang.String |
getTable() |
java.lang.String |
join(java.lang.String delim)
Joins all identifiers with the given delimiter.
|
int |
size()
Gets the number of fields/identifiers stored in this
IdentifierItems . |
java.lang.String |
toString() |
public IdentifierItems(boolean tableIdentifier)
tableIdentifier
- true if this IdentifierItems is a table identifier, false otherwise.public void append(IdentifierItems.IdentifierItem item)
Apppends a simple identifier, that's to say an additional field (catalog, schema, table, column).
Note: This function has no effect if there are already 4 identifiers.
item
- Additional item (may be null).public int size()
IdentifierItems
.public IdentifierItems.IdentifierItem get(int ind)
ind
- Index of the identifier/field to get.public java.lang.String getIdentifier(int ind)
ind
- Index of the identifier/field to get.public java.lang.String getCatalog()
public java.lang.String getSchema()
public java.lang.String getTable()
public java.lang.String getColumn()
public int getBeginLine()
public int getEndLine()
public int getBeginColumn()
public int getEndColumn()
public TextPosition getPosition()
public byte getCaseSensitivity()
public boolean getColumnCaseSensitivity()
public java.lang.String join(java.lang.String delim)
delim
- The string which must separate the identifiers (if null, the delimiter will be an empty string).public java.lang.String toString()
toString
in class java.lang.Object