Class TableInfo

  • All Implemented Interfaces:
    java.io.Serializable

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

      • TABLE_MODEL_NONE

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

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

        public static final int TABLE_MODEL_CALS
        Constant for CALS table model.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • TABLE_MODEL_DITA_SIMPLE

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

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

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

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

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

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

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

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

        public static final int MIN_COLUMNS_COUNT
        Minimum number of columns for CALS and simple tables.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • MAX_COLUMNS_COUNT

        public static final int MAX_COLUMNS_COUNT
        Maximum number of columns for CALS and simple tables.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
    • Constructor Detail

      • TableInfo

        public TableInfo​(java.lang.String title,
                         int rowsNumber,
                         int columnsNumber,
                         boolean generateHeader,
                         boolean generateFooter,
                         java.lang.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​(java.lang.String title,
                         int rowsNumber,
                         int columnsNumber,
                         boolean generateHeader,
                         boolean generateFooter,
                         java.lang.String frame,
                         int tableModel,
                         TableCustomizerConstants.ColumnWidthsType columnsWidthsType,
                         java.lang.String rowsep,
                         java.lang.String colsep,
                         java.lang.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​(java.util.Map<java.lang.String,​java.lang.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​(java.util.Map<java.lang.String,​java.lang.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 Detail

      • getTitle

        public java.lang.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 java.lang.String getFrame()
        Returns:
        Specifies the table frame.
      • getRowsep

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

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

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

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