Class SpreadSheetAddRowID

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractConversion>, SizeOfHandler, Stoppable, Conversion, InPlaceProcessing, Serializable

    public class SpreadSheetAddRowID
    extends AbstractInPlaceSpreadSheetConversion
    Adds an ID column to the spreadsheet, using the row index as value.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -no-copy <boolean> (property: noCopy)
        If enabled, no copy of the spreadsheet is created before processing it.
        default: false
     
    -header <java.lang.String> (property: header)
        The name of the new column.
        default: ID
     
    -position <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: position)
        The position where to insert the ID column.
        default: first
        example: An index is a number starting with 1; apart from column names (case-sensitive), the following placeholders can be used as well: first, second, third, last_2, last_1, last
     
    -after <boolean> (property: after)
        If enabled, the ID column is inserted after the position instead of at the 
        position.
        default: false
     
    -start <int> (property: start)
        The first ID to use.
        default: 1
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Header

        protected String m_Header
        the column header.
      • m_After

        protected boolean m_After
        whether to insert after the position instead of at.
      • m_Start

        protected int m_Start
        the index to start with.
    • Constructor Detail

      • SpreadSheetAddRowID

        public SpreadSheetAddRowID()
    • Method Detail

      • setHeader

        public void setHeader​(String value)
        Sets the name of the column.
        Parameters:
        value - the name
      • getHeader

        public String getHeader()
        Returns the name of the column.
        Returns:
        the name
      • headerTipText

        public String headerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setPosition

        public void setPosition​(SpreadSheetColumnIndex value)
        Sets the position where to insert the column.
        Parameters:
        value - the position
      • getPosition

        public SpreadSheetColumnIndex getPosition()
        Returns the position where to insert the column.
        Returns:
        the position
      • positionTipText

        public String positionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setAfter

        public void setAfter​(boolean value)
        Sets whether to insert at or after the position.
        Parameters:
        value - true if to add after
      • getAfter

        public boolean getAfter()
        Returns whether to insert at or after the position.
        Returns:
        true if to add after
      • afterTipText

        public String afterTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setStart

        public void setStart​(int value)
        Sets the first row ID to use.
        Parameters:
        value - the ID start
      • getStart

        public int getStart()
        Returns the start of the row ID.
        Returns:
        the ID start
      • startTipText

        public String startTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.