Package adql.query

Class TextPosition

java.lang.Object
adql.query.TextPosition

public class TextPosition extends Object
Indicates a simple position or a token/string position in a text. It is particularly used to localize columns and tables in the original ADQL query.
Version:
1.4 (06/2015)
Author:
Grégory Mantelet (CDS;ARI)
  • Field Details

    • beginLine

      public final int beginLine
    • beginColumn

      public final int beginColumn
    • endLine

      public final int endLine
    • endColumn

      public final int endColumn
  • Constructor Details

    • TextPosition

      public TextPosition()
      Build an unknown position (all fields = -1).
    • TextPosition

      public TextPosition(int line, int column)
      Builds a position whose the end line and column are unknown => a simple position.
      Parameters:
      line - Begin line.
      column - Begin column.
    • TextPosition

      public TextPosition(int beginLine, int beginColumn, int endLine, int endColumn)
      Builds a position => a full position (a region in the text).
      Parameters:
      beginLine - Begin line.
      beginColumn - Begin column.
      endLine - End line.
      endColumn - End column.
    • TextPosition

      public TextPosition(Token token)
      Builds a position defining the region delimited by the given token.
      Parameters:
      token - The position will be the one of this token.
    • TextPosition

      public TextPosition(Token beginToken, Token endToken)
      Builds a position => a full position (a region in the text).
      Parameters:
      beginToken - Begin position.
      endToken - End position.
    • TextPosition

      public TextPosition(TextPosition positionToCopy)
      Builds a copy of the given position.
      Parameters:
      positionToCopy - Position to copy.
      Since:
      1.4
    • TextPosition

      public TextPosition(TextPosition startPos, TextPosition endPos)
      Builds a position whose the start is the start position of the first parameter and the end is the end position of the second parameter.
      Parameters:
      startPos - Start position (only beginLine and beginColumn will be used).
      endPos - End position (only endLine and endColumn will be used).
      Since:
      1.4
  • Method Details