Package adql.parser

Class IdentifierItems


  • public class IdentifierItems
    extends java.lang.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)).

    Version:
    1.4 (11/2017)
    Author:
    Grégory Mantelet (CDS;ARI)
    See Also:
    IdentifierItems.IdentifierItem
    • Constructor Detail

      • 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 Detail

      • 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 java.lang.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 java.lang.String getCatalog()
      • getSchema

        public java.lang.String getSchema()
      • getTable

        public java.lang.String getTable()
      • getColumn

        public java.lang.String getColumn()
      • getBeginLine

        public int getBeginLine()
      • getEndLine

        public int getEndLine()
      • getBeginColumn

        public int getBeginColumn()
      • getEndColumn

        public int getEndColumn()
      • getCaseSensitivity

        public byte getCaseSensitivity()
      • getColumnCaseSensitivity

        public boolean getColumnCaseSensitivity()
      • join

        public java.lang.String join​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object