Package adql.parser
Class IdentifierItems
java.lang.Object
adql.parser.IdentifierItems
Important: This class is designed to be filled ONLY by
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)
).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represent any ADQL identifier (column name, table name or table/column alias). -
Constructor Summary
ConstructorsConstructorDescriptionIdentifierItems
(boolean tableIdentifier) Builds an IdentifierItems by specifying it is a table or a column identifier. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Apppends a simple identifier, that's to say an additional field (catalog, schema, table, column).get
(int ind) Gets the whole ind-th identifier/field.int
int
byte
boolean
int
int
getIdentifier
(int ind) Gets the value of the ind-th identifier/field.getTable()
Joins all identifiers with the given delimiter.int
size()
Gets the number of fields/identifiers stored in thisIdentifierItems
.toString()
-
Constructor Details
-
IdentifierItems
public IdentifierItems(boolean tableIdentifier) Builds an IdentifierItems by specifying it is a table or a column identifier.- Parameters:
tableIdentifier
- true if this IdentifierItems is a table identifier, false otherwise.
-
-
Method Details
-
append
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.
- Parameters:
item
- Additional item (may be null).
-
size
public int size()Gets the number of fields/identifiers stored in thisIdentifierItems
.- Returns:
- The number of identifiers.
-
get
Gets the whole ind-th identifier/field.- Parameters:
ind
- Index of the identifier/field to get.- Returns:
- The wanted identifier/field.
-
getIdentifier
Gets the value of the ind-th identifier/field.- Parameters:
ind
- Index of the identifier/field to get.- Returns:
- The value of the wanted identifier/field.
-
getCatalog
-
getSchema
-
getTable
-
getColumn
-
getBeginLine
public int getBeginLine() -
getEndLine
public int getEndLine() -
getBeginColumn
public int getBeginColumn() -
getEndColumn
public int getEndColumn() -
getPosition
-
getCaseSensitivity
public byte getCaseSensitivity() -
getColumnCaseSensitivity
public boolean getColumnCaseSensitivity() -
join
Joins all identifiers with the given delimiter.- Parameters:
delim
- The string which must separate the identifiers (if null, the delimiter will be an empty string).- Returns:
- The joint complex identifier.
-
toString
-