Package adql.query
Class TextPosition
- java.lang.Object
-
- adql.query.TextPosition
-
public class TextPosition extends java.lang.ObjectIndicates 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 Summary
Fields Modifier and Type Field Description intbeginColumnintbeginLineintendColumnintendLine
-
Constructor Summary
Constructors Constructor Description TextPosition()Build an unknown position (all fields = -1).TextPosition(int line, int column)Builds a position whose the end line and column are unknown => a simple position.TextPosition(int beginLine, int beginColumn, int endLine, int endColumn)Builds a position => a full position (a region in the text).TextPosition(Token token)Builds a position defining the region delimited by the given token.TextPosition(Token beginToken, Token endToken)Builds a position => a full position (a region in the text).TextPosition(TextPosition positionToCopy)Builds a copy of the given position.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()
-
-
-
Constructor Detail
-
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
-
-