Class AppendColumnSpec

java.lang.Object
ca.spatial.table.AppendColumnSpec

public class AppendColumnSpec extends Object
This class holds the specification of a column in an AppendStore. The specification includes the column name, data type, width and number of digits of precision after the decimal point.

In addition, the specification also contains the expressions that will be evaluated on each appended table in order to generate the data for this table.

See Also:
AppendStore, AppendStoreBuilder
  • Constructor Details

    • AppendColumnSpec

      public AppendColumnSpec(String name, String type, int width, int dec)
      Create a column definition.
      Parameters:
      name - the name to be used for the column
      type - the data type, which may be C, I, N or L (String, Integer, Number, Boolean)
      width - the field width to be used on output
      dec - the number of digits of precision after the decimal place, used on output
    • AppendColumnSpec

      public AppendColumnSpec(String name, int type, int width, int dec)
      Create a column definition.
      Parameters:
      name - the name to be used for the column
      type - the data type, as taken from the AttributeFormat class. Valid types are INTEGER, NUMBER, BOOLEAN and STRING.
      width - the field width to be used on output
      dec - the number of digits of precision after the decimal place, used on output
  • Method Details

    • getExpressions

      public ArrayList<String> getExpressions()
      Get the list of expressions to be applied to each input table in order to compute the output values.
    • addExpression

      public AppendColumnSpec addExpression(int index, String expression)
      Add an expression for a specific table. THe expressions must initially be added in order.
    • getExpression

      public String getExpression(int index)
      Get an expression for a given table
    • getName

      public String getName()
      Get the name of this column
    • getType

      public int getType()
      Get the type of this column. The types are as defined in the AttributeFormat class (INTEGER, NUMBER, STRING, BOOLEAN)
    • getTypeString

      public String getTypeString()
      Get the type string for this column, which may be C, I, N or L (String, Integer, Number, Boolean).
    • getWidth

      public int getWidth()
      Get the width of this column used for output
    • getDec

      public int getDec()
      Get the number of decimals of precision after the decimal point used for output