Package adql.parser

Class IdentifierItems

java.lang.Object
adql.parser.IdentifierItems

public class IdentifierItems extends Object
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:
  • 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

      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.

      Parameters:
      item - Additional item (may be null).
    • size

      public int size()
      Gets the number of fields/identifiers stored in this IdentifierItems.
      Returns:
      The number of identifiers.
    • get

      public IdentifierItems.IdentifierItem get(int ind)
      Gets the whole ind-th identifier/field.
      Parameters:
      ind - Index of the identifier/field to get.
      Returns:
      The wanted identifier/field.
    • getIdentifier

      public String getIdentifier(int ind)
      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

      public String getCatalog()
    • getSchema

      public String getSchema()
    • getTable

      public String getTable()
    • getColumn

      public String getColumn()
    • getBeginLine

      public int getBeginLine()
    • getEndLine

      public int getEndLine()
    • getBeginColumn

      public int getBeginColumn()
    • getEndColumn

      public int getEndColumn()
    • getPosition

      public TextPosition getPosition()
    • getCaseSensitivity

      public byte getCaseSensitivity()
    • getColumnCaseSensitivity

      public boolean getColumnCaseSensitivity()
    • join

      public String join(String delim)
      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

      public String toString()
      Overrides:
      toString in class Object