Package adql.translator
Interface TranslationPattern.ParameterTranslator
- Enclosing class:
TranslationPattern
public static interface TranslationPattern.ParameterTranslator
A class implementing this interface should help the parser of translation
patterns answering the following questions:
- How many parameters in the target function?
getNbParameters()
- How to translate/serialize the parameter specified by its index?
translate(int)
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the maximum number of parameters in the target function.translate
(int paramIndex) Translate or serialize the specified target function's parameter.
-
Method Details
-
getNbParameters
int getNbParameters()Get the maximum number of parameters in the target function.- Returns:
- A positive or null integer.
-
translate
Translate or serialize the specified target function's parameter.- Parameters:
paramIndex
- Index of the parameter to translate. Important: must be an integer starting from 1.- Returns:
- The parameter translation.
- Throws:
TranslationException
- If there is a grave error during the translation process.
-