Interface ITranslator<I,O,CalcT>

Type Parameters:
I - The type of the input to translate.
O - The type to translate to.
CalcT - the input type of the column calculators
All Known Subinterfaces:
IColumnarTranslator<O>, IHeaderTranslator<T>, IMapTranslator, ITupleTranslator
All Known Implementing Classes:
AColumnarTranslator, AHeaderTranslator, ATranslator, ATranslatorWithColumnCalculators, HeaderColumnarTranslator, IdentityTranslator, JdbcTuplizer, KeyValueTuplizer, MapTranslator, MapTuplizer, PojoTuplizer, TupleTranslator

public interface ITranslator<I,O,CalcT>
Translates an input object into an output object. Often used in messaging implementations that convert input data into a proper record. The ITranslator interface defines a translator whose purpose is to transform data from a data source (CSV / JDBC / POJO...) into an output format. An ITranslator will very likely make use of IColumnCalculator to parse the input data into the output format.
Author:
ActiveViam
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves mapping name to column index in the output.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use instead the constructors of the implementation classes to set this parameter.
    translate(I input)
    Translate the input into an output format.
  • Method Details

    • translate

      O translate(I input)
      Translate the input into an output format.
      Parameters:
      input - The input to translate into an output.
      Returns:
      output object
    • setColumnCalculators

      @Deprecated(since="6.1.1", forRemoval=true) @DeprecatedApi(forRemoval="6.2", rationale="Only available on concrete implementations based on column calculators.") void setColumnCalculators(List<IColumnCalculator<CalcT>> columnCalculators)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use instead the constructors of the implementation classes to set this parameter.
      Configure the translator with its ordered list of column calculators. The order of the calculators in the list do matter: a given calculator should not be using values of columns that are set from calculators later in the list.
      Parameters:
      columnCalculators - The column calculators.
    • getColumnIndexes

      Map<String,Integer> getColumnIndexes()
      Retrieves mapping name to column index in the output.
      Returns:
      The column indexes of the output.