java.lang.Object
ro.sync.ecss.extensions.commons.table.operations.TableInfo
All Implemented Interfaces:
Serializable

@API(type=INTERNAL, src=PUBLIC) public class TableInfo extends Object implements Serializable
Contains information about the table element (number of rows, columns, table title).
See Also:
  • Field Details

    • TABLE_MODEL_NONE

      public static final int TABLE_MODEL_NONE
      Constant for no table model.
      See Also:
    • TABLE_MODEL_HTML

      public static final int TABLE_MODEL_HTML
      Constant for HTML table model.
      See Also:
    • TABLE_MODEL_CALS

      public static final int TABLE_MODEL_CALS
      Constant for CALS table model.
      See Also:
    • TABLE_MODEL_CUSTOM

      public static final int TABLE_MODEL_CUSTOM
      Constant for custom table model specific for a document type (proprietary table model).
      See Also:
    • TABLE_MODEL_DITA_SIMPLE

      public static final int TABLE_MODEL_DITA_SIMPLE
      The simple table model for DITA.
      See Also:
    • TABLE_MODEL_DITA_CHOICE

      public static final int TABLE_MODEL_DITA_CHOICE
      The choice table model for DITA.
      See Also:
    • TABLE_MODEL_DITA_PROPERTIES

      public static final int TABLE_MODEL_DITA_PROPERTIES
      The properties table model for DITA.
      See Also:
    • MIN_ROWS_COUNT

      public static final int MIN_ROWS_COUNT
      Minimum number of rows.
      See Also:
    • DEFAULT_ROWS_COUNT

      public static final int DEFAULT_ROWS_COUNT
      Default number of rows
      See Also:
    • DEFAULT_COLUMNS_COUNT_CHOICE_TABLE

      public static final int DEFAULT_COLUMNS_COUNT_CHOICE_TABLE
      Default number of columns for DITA choice table.
      See Also:
    • DEFAULT_COLUMNS_COUNT

      public static final int DEFAULT_COLUMNS_COUNT
      Default number of columns
      See Also:
    • DEFAULT_COLUMNS_COUNT_PROPERTIES_TABLE

      public static final int DEFAULT_COLUMNS_COUNT_PROPERTIES_TABLE
      Default number of columns for Properties table
      See Also:
    • MIN_COLUMNS_COUNT

      public static final int MIN_COLUMNS_COUNT
      Minimum number of columns for CALS and simple tables.
      See Also:
    • MIN_COLUMNS_COUNT_PROPERTIES_TABLE

      public static final int MIN_COLUMNS_COUNT_PROPERTIES_TABLE
      Minimum number of columns for CALS and simple tables.
      See Also:
    • MAX_COLUMNS_COUNT

      public static final int MAX_COLUMNS_COUNT
      Maximum number of columns for CALS and simple tables.
      See Also:
    • MAX_COLUMNS_COUNT_PROPERTIES_TABLE

      public static final int MAX_COLUMNS_COUNT_PROPERTIES_TABLE
      Maximum number of columns for CALS and simple tables.
      See Also:
  • Constructor Details

    • TableInfo

      public TableInfo(String title, int rowsNumber, int columnsNumber, boolean generateHeader, boolean generateFooter, String frame, int tableModel)
      Constructor.
      Parameters:
      title - The table title.
      rowsNumber - The number of rows.
      columnsNumber - The number of columns.
      generateHeader - If true generate table header.
      generateFooter - If true generate table footer.
      frame - Specifies how the table is to be framed.
      tableModel - The table model type. One of the constants: TABLE_MODEL_CALS, TABLE_MODEL_CUSTOM, TABLE_MODEL_DITA_SIMPLE, TABLE_MODEL_HTML, TABLE_MODEL_DITA_CHOICE, TABLE_MODEL_DITA_PROPERTIES.
    • TableInfo

      public TableInfo(String title, int rowsNumber, int columnsNumber, boolean generateHeader, boolean generateFooter, String frame, int tableModel, TableCustomizerConstants.ColumnWidthsType columnsWidthsType, String rowsep, String colsep, String align)
      Constructor.
      Parameters:
      title - The table title.
      rowsNumber - The number of rows.
      columnsNumber - The number of columns.
      generateHeader - If true generate table header.
      generateFooter - If true generate table footer.
      frame - Specifies how the table is to be framed.
      tableModel - The table model type. One of the constants: TABLE_MODEL_CALS, TABLE_MODEL_CUSTOM, TABLE_MODEL_DITA_SIMPLE, TABLE_MODEL_HTML, TABLE_MODEL_DITA_CHOICE, TABLE_MODEL_DITA_PROPERTIES.
      columnsWidthsType - The columns widths type.
      rowsep - Specifies the row separator value.
      colsep - Specifies the column separator value
      align - Specifies the alignment for the current table.
    • TableInfo

      public TableInfo(Map<String,Object> fieldValues, int rows)
      Constructs a table info from a map that contains the values of its fields.
      Parameters:
      fieldValues - The map that contains the values for the operation fields.
      rows - If greater than 0, the enforced number of rows, used when the user converts a list with that many items to a table. If 0 or negative, it is ignored.
    • TableInfo

      @Deprecated public TableInfo(Map<String,Object> fieldValues)
      Deprecated.
      Use TableInfo(Map, int) instead because the table operation can also convert lists to tables and we need to provide a minimum number of rows.
      Constructs a table info from a map that contains the values of its fields.
      Parameters:
      fieldValues - The map that contains the values for the operation fields.
  • Method Details

    • getTitle

      public String getTitle()
      Returns the title of the table.
      Returns:
      The title of the table.
    • getRowsNumber

      public int getRowsNumber()
      Return the number of rows.
      Returns:
      The number of rows.
    • getColumnsNumber

      public int getColumnsNumber()
      Return the number of columns.
      Returns:
      The number of columns.
    • isGenerateHeader

      public boolean isGenerateHeader()
      Returns:
      If true then table header will be generated.
    • isGenerateFooter

      public boolean isGenerateFooter()
      Returns:
      If true then table footer will be generated.
    • getFrame

      public String getFrame()
      Returns:
      Specifies the table frame.
    • getRowsep

      public String getRowsep()
      Obtain the value for the row separator attribute.
      Returns:
      Specifies the row separator value.
    • getColsep

      public String getColsep()
      Obtain the value for the column separator attribute.
      Returns:
      Specifies the column separator value.
    • getAlign

      public String getAlign()
      Obtain the value for the alignment attribute.
      Returns:
      Specifies the alignment value.
    • getTableModel

      public int getTableModel()
      Returns:
      Returns the table model. One of the constants: TABLE_MODEL_CALS, TABLE_MODEL_CUSTOM, TABLE_MODEL_DITA_SIMPLE, TABLE_MODEL_HTML, TABLE_MODEL_DITA_CHOICE, TABLE_MODEL_DITA_PROPERTIES.
    • getColumnsWidthsType

      public TableCustomizerConstants.ColumnWidthsType getColumnsWidthsType()
      Returns:
      Returns the columns widths type(proportional, fixed, dynamic).
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: