Class Simple

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, Serializable

    public class Simple
    extends AbstractMerge
    Just merges the spreadsheets side by side. Requires the spreadsheets to have the same number of rows.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -class-finder <adams.data.spreadsheet.columnfinder.ColumnFinder> (property: classFinder)
        The method to use to find class columns in the spreadsheets.
        default: adams.data.spreadsheet.columnfinder.NullFinder
     
    -spreadsheet-names <adams.core.base.BaseString> [-spreadsheet-names ...] (property: spreadsheetNames)
        The list of spreadsheet names to use in column renaming.
        default:
     
    -column-renames-exp <adams.core.base.BaseRegExp> [-column-renames-exp ...] (property: columnRenamesExp)
        The expressions to use to select column names for renaming (one per spreadsheet
        ).
        default:
        more: https://docs.oracle.com/javase/tutorial/essential/regex/
        https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
     
    -column-renames-format <adams.core.base.BaseString> [-column-renames-format ...] (property: columnRenamesFormat)
        One format string for each renaming expression to specify how to rename
        the column. Can contain the {SPREADSHEET} keyword which will be replaced
        by the spreadsheet name, and also group identifiers which will be replaced
        by groups from the renaming regex.
        default:
     
    -output-name <java.lang.String> (property: outputName)
        The name to use for the merged spreadsheet.
        default: output
     
    -ensure-equal-values <boolean> (property: ensureEqualValues)
        Whether multiple column being merged into a single column require equal
        values from all sources.
        default: false
     
    Author:
    Corey Sterling (csterlin at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • Simple

        public Simple()
    • Method Detail

      • check

        protected String check​(SpreadSheet[] spreadsheets)
        Hook method for performing checks before attempting the merge.
        Overrides:
        check in class AbstractMerge
        Parameters:
        spreadsheets - The spreadsheets to merge.
        Returns:
        null if successfully checked, otherwise error message.
      • getRowSetEnumeration

        protected Enumeration<int[]> getRowSetEnumeration()
        Allows specific merge methods to specify the order in which rows are placed into the merged spreadsheet, and which rows from the source spreadsheets are used for the source data.
        Specified by:
        getRowSetEnumeration in class AbstractMerge
        Returns:
        An enumeration of the source rows, one row for each spreadsheet.