* ADQLLibrary is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ADQLLibrary is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with ADQLLibrary. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2021 - UDS/Centre de Données astronomiques de Strasbourg (CDS)
*/
importadql.parser.feature.LanguageFeature;
importadql.query.ADQLObject;
importadql.query.operand.ADQLOperand;
importadql.query.operand.function.ADQLFunction;
/**
* It represents the UPPER function of ADQL.
*
* <p>This function converts its string parameter to upper case.</p>
*
* <p>
* Since case folding is a nontrivial operation in a multi-encoding world,
* ADQL requires standard behaviour for the ASCII characters, and
* recommends following algorithm R1 described in Section 3.13,
* "Default Case Algorithms" of The Unicode Consortium (2012) for characters
* outside the ASCII set.
* </p>
*
* <i>
* <p><b>Example:</b></p>
* <pre>LOWER('Francis Albert Augustus Charles Emmanuel')</pre>
* <p>which should return:</p>
* <pre>FRANCIS ALBERT AUGUSTUS CHARLES EMMANUEL</pre>
* </i>
*
* @author Grégory Mantelet (CDS)
* @version 2.0 (01/2021)
* @since 2.0
*/
publicclassUpperFunctionextendsADQLFunction{
/** Description of this ADQL Feature.
* @since 2.0 */
publicstaticfinalLanguageFeatureFEATURE=newLanguageFeature(LanguageFeature.TYPE_ADQL_STRING,"UPPER",true,"Convert all characters of the given string in upper case.");
/** Constant name of this function. */
protectedfinalStringFCT_NAME="UPPER";
/** The only parameter of this function. */
protectedADQLOperandstrParam;
/**
* Builds a UPPER function with its parameter.
*
* @param param Parameter of UPPER.
*
* @throws NullPointerException If the given operand is NULL.
* @throws IllegalArgumentException If the operand is not a string parameter.