Class Simple
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.spreadsheetmethodmerge.AbstractMerge
-
- adams.flow.transformer.spreadsheetmethodmerge.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Simple.SimpleRowSetIterator
Enumeration class which just returns the concatenation of the source data rows in order.-
Nested classes/interfaces inherited from class adams.flow.transformer.spreadsheetmethodmerge.AbstractMerge
AbstractMerge.SourceColumn
-
-
Field Summary
-
Fields inherited from class adams.flow.transformer.spreadsheetmethodmerge.AbstractMerge
m_ClassColumns, m_ClassFinder, m_ColumnRenameFindRegexs, m_ColumnRenameFormatStrings, m_EnsureEqualValues, m_MergedSpreadsheetName, m_SpreadsheetNames, m_Spreadsheets, ROW_MISSING, SPREADSHEET_KEYWORD
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Simple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
check(SpreadSheet[] spreadsheets)
Hook method for performing checks before attempting the merge.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.String
globalInfo()
Returns a string describing the object.-
Methods inherited from class adams.flow.transformer.spreadsheetmethodmerge.AbstractMerge
checkColumnMapping, classFinderTipText, columnRenamesExpTipText, columnRenamesFormatTipText, compare, createColumnMapping, createEmptyResultantSpreadsheet, defineOptions, ensureEqualValuesTipText, getClassFinder, getColumnRenamesExp, getColumnRenamesFormat, getEnsureEqualValues, getMappedColumnName, getOutputName, getQuickInfo, getSpreadsheetNames, getValue, getValueEnsureEqual, getValueFirstAvailable, isAnyClassColumn, isClassColumn, isClassColumn, merge, outputNameTipText, recordClassColumns, resetInternalState, setClassFinder, setColumnRenamesExp, setColumnRenamesFormat, setEnsureEqualValues, setOutputName, setSpreadsheetNames, setValue, spreadsheetNamesTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
check
protected String check(SpreadSheet[] spreadsheets)
Hook method for performing checks before attempting the merge.- Overrides:
check
in classAbstractMerge
- 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 classAbstractMerge
- Returns:
- An enumeration of the source rows, one row for each spreadsheet.
-
-