com.groupdocs.assembly

Class DocumentTableColumn

  • java.lang.Object
    • com.groupdocs.assembly.DocumentTableColumn


  • public class DocumentTableColumn
    extends java.lang.Object
    Represents a single column of a particular DocumentTable object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean getAllowsNull()
      Gets a value indicating whether cells in this column contain null values or not.
      int getIndexInDocument()
      Gets the original zero-based index of the corresponding table column as per the source document.
      java.lang.String getName()
      Gets the name of this column used to access the column's data in a template document passed to DocumentAssembler.
      java.lang.Class getType()
      Gets the type of cell values in this column.
      void setName(java.lang.String value)
      Sets the name of this column used to access the column's data in a template document passed to DocumentAssembler.
      void setType(java.lang.Class value)
      Sets the type of cell values in this column.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of this column used to access the column's data in a template document passed to DocumentAssembler.

        If the column's name is read from a document (see DocumentTableOptions.getFirstRowContainsColumnNames() / DocumentTableOptions.setFirstRowContainsColumnNames(boolean)), the name is automatically corrected so that it to be valid. However, if the column's name is set manually through this property and the name is invalid, an exception is thrown.

        The column's name is considered to be valid, if the following conditions are met:

        • The name is not empty.
        • The name's first character is a letter or underscore.
        • The rest of the name's characters are letters, underscores, digits, or the following characters: '@', '#', '$'.
        • The corresponding DocumentTable object does not contain a DocumentTableColumn instance with the same name.
        Returns:
        The name of this column used to access the column's data in a template document passed to DocumentAssembler.
      • setName

        public void setName(java.lang.String value)
        Sets the name of this column used to access the column's data in a template document passed to DocumentAssembler.

        If the column's name is read from a document (see DocumentTableOptions.getFirstRowContainsColumnNames() / DocumentTableOptions.setFirstRowContainsColumnNames(boolean)), the name is automatically corrected so that it to be valid. However, if the column's name is set manually through this property and the name is invalid, an exception is thrown.

        The column's name is considered to be valid, if the following conditions are met:

        • The name is not empty.
        • The name's first character is a letter or underscore.
        • The rest of the name's characters are letters, underscores, digits, or the following characters: '@', '#', '$'.
        • The corresponding DocumentTable object does not contain a DocumentTableColumn instance with the same name.
        Parameters:
        value - The name of this column used to access the column's data in a template document passed to DocumentAssembler.
      • getIndexInDocument

        public int getIndexInDocument()
        Gets the original zero-based index of the corresponding table column as per the source document. Depending on DocumentTableOptions specified, this index may differ from the index of this DocumentTableColumn instance within the column collection of the corresponding DocumentTable instance.
        Returns:
        The original zero-based index of the corresponding table column as per the source document.
      • getType

        public java.lang.Class getType()
        Gets the type of cell values in this column.

        For documents of non-Spreadsheet file formats, the initial type is always automatically determined as string. For documents of Spreadsheet file formats, the initial type is automatically determined depending on corresponding cell values.

        If cells of a particular Spreadsheet column contain values of different types, then the column's initial type is also automatically determined as string.

        Returns:
        The type of cell values in this column.
      • setType

        public void setType(java.lang.Class value)
        Sets the type of cell values in this column.

        For documents of non-Spreadsheet file formats, the initial type is always automatically determined as string. For documents of Spreadsheet file formats, the initial type is automatically determined depending on corresponding cell values.

        If cells of a particular Spreadsheet column contain values of different types, then the column's initial type is also automatically determined as string.

        Parameters:
        value - The type of cell values in this column.
      • getAllowsNull

        public boolean getAllowsNull()
        Gets a value indicating whether cells in this column contain null values or not. Undefined and error values in cells of Spreadsheet documents are also considered to be null.
        Returns:
        A value indicating whether cells in this column contain null values or not.