Package adams.data.multifilter
Class PickByReportValue
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.multifilter.AbstractMultiSpectrumFilter
-
- adams.data.multifilter.PickByReportValue
-
- All Implemented Interfaces:
adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.ShallowCopySupporter<AbstractMultiSpectrumFilter>,adams.core.SizeOfHandler,Serializable,Comparable
public class PickByReportValue extends AbstractMultiSpectrumFilter
Extracts the first sub-spectrum that matches the condition for the field.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-no-id-update <boolean> (property: dontUpdateID) If enabled, suppresses updating the ID of adams.data.id.IDHandler data containers. default: false
-field <knir.data.sampledata.Field> (property: field) The field to inspect. default: Instrument[S]
-condition-string <adams.core.base.BaseRegExp> (property: conditionString) The regular expression to apply to string fields. default: .*
-condition-numeric-min <double> (property: conditionNumericMin) The lower bound for numeric fields. default: 4.9E-324
-condition-numeric-max <double> (property: conditionNumericMax) The upper bound for numeric fields. default: 1.7976931348623157E308
-condition-boolean <boolean> (property: conditionBoolean) Whether the boolean field must be true or false. default: true
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_ConditionBooleanthe condition for boolean fields.protected doublem_ConditionNumericMaxthe condition for numeric (upper bound).protected doublem_ConditionNumericMinthe condition for numeric (lower bound).protected adams.core.base.BaseRegExpm_ConditionStringthe condition for string fields.protected adams.data.report.Fieldm_Fieldthe field to use.-
Fields inherited from class adams.data.multifilter.AbstractMultiSpectrumFilter
m_DontUpdateID
-
-
Constructor Summary
Constructors Constructor Description PickByReportValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringconditionBooleanTipText()Returns the tip text for this property.StringconditionNumericMaxTipText()Returns the tip text for this property.StringconditionNumericMinTipText()Returns the tip text for this property.StringconditionStringTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringfieldTipText()Returns the tip text for this property.booleangetConditionBoolean()Returns whether the boolean field must be true or false.doublegetConditionNumericMax()Returns the upper bound that numeric fields must match.doublegetConditionNumericMin()Returns the lower bound that numeric fields must match.adams.core.base.BaseRegExpgetConditionString()Returns the regular expression to apply to string fields.adams.data.report.FieldgetField()Returns the field to inspect.StringglobalInfo()Returns a string describing the object.protected SpectrumprocessData(MultiSpectrum data)Performs the actual filtering.voidsetConditionBoolean(boolean value)Sets whether the boolean field must be true or false.voidsetConditionNumericMax(double value)Sets the upper bound that numeric fields must match.voidsetConditionNumericMin(double value)Sets the lower bound that numeric fields must match.voidsetConditionString(adams.core.base.BaseRegExp value)Sets the regular expression to apply to string fields.voidsetField(adams.data.report.Field value)Sets the field to inspect.-
Methods inherited from class adams.data.multifilter.AbstractMultiSpectrumFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, forName, getDontUpdateID, getFilters, reset, setDontUpdateID, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Field
protected adams.data.report.Field m_Field
the field to use.
-
m_ConditionString
protected adams.core.base.BaseRegExp m_ConditionString
the condition for string fields.
-
m_ConditionNumericMin
protected double m_ConditionNumericMin
the condition for numeric (lower bound).
-
m_ConditionNumericMax
protected double m_ConditionNumericMax
the condition for numeric (upper bound).
-
m_ConditionBoolean
protected boolean m_ConditionBoolean
the condition for boolean fields.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractMultiSpectrumFilter
-
setField
public void setField(adams.data.report.Field value)
Sets the field to inspect.- Parameters:
value- the field
-
getField
public adams.data.report.Field getField()
Returns the field to inspect.- Returns:
- the field
-
fieldTipText
public String fieldTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setConditionString
public void setConditionString(adams.core.base.BaseRegExp value)
Sets the regular expression to apply to string fields.- Parameters:
value- the regexp
-
getConditionString
public adams.core.base.BaseRegExp getConditionString()
Returns the regular expression to apply to string fields.- Returns:
- the field
-
conditionStringTipText
public String conditionStringTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setConditionNumericMin
public void setConditionNumericMin(double value)
Sets the lower bound that numeric fields must match.- Parameters:
value- the lower bound
-
getConditionNumericMin
public double getConditionNumericMin()
Returns the lower bound that numeric fields must match.- Returns:
- the lower bound
-
conditionNumericMinTipText
public String conditionNumericMinTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setConditionNumericMax
public void setConditionNumericMax(double value)
Sets the upper bound that numeric fields must match.- Parameters:
value- the upper bound
-
getConditionNumericMax
public double getConditionNumericMax()
Returns the upper bound that numeric fields must match.- Returns:
- the upper bound
-
conditionNumericMaxTipText
public String conditionNumericMaxTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setConditionBoolean
public void setConditionBoolean(boolean value)
Sets whether the boolean field must be true or false.- Parameters:
value- the condition
-
getConditionBoolean
public boolean getConditionBoolean()
Returns whether the boolean field must be true or false.- Returns:
- the condition
-
conditionBooleanTipText
public String conditionBooleanTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
processData
protected Spectrum processData(MultiSpectrum data)
Performs the actual filtering.- Specified by:
processDatain classAbstractMultiSpectrumFilter- Parameters:
data- the data to filter- Returns:
- the filtered data, null if failed to generate output
-
-