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 boolean
m_ConditionBoolean
the condition for boolean fields.protected double
m_ConditionNumericMax
the condition for numeric (upper bound).protected double
m_ConditionNumericMin
the condition for numeric (lower bound).protected adams.core.base.BaseRegExp
m_ConditionString
the condition for string fields.protected adams.data.report.Field
m_Field
the 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 String
conditionBooleanTipText()
Returns the tip text for this property.String
conditionNumericMaxTipText()
Returns the tip text for this property.String
conditionNumericMinTipText()
Returns the tip text for this property.String
conditionStringTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.String
fieldTipText()
Returns the tip text for this property.boolean
getConditionBoolean()
Returns whether the boolean field must be true or false.double
getConditionNumericMax()
Returns the upper bound that numeric fields must match.double
getConditionNumericMin()
Returns the lower bound that numeric fields must match.adams.core.base.BaseRegExp
getConditionString()
Returns the regular expression to apply to string fields.adams.data.report.Field
getField()
Returns the field to inspect.String
globalInfo()
Returns a string describing the object.protected Spectrum
processData(MultiSpectrum data)
Performs the actual filtering.void
setConditionBoolean(boolean value)
Sets whether the boolean field must be true or false.void
setConditionNumericMax(double value)
Sets the upper bound that numeric fields must match.void
setConditionNumericMin(double value)
Sets the lower bound that numeric fields must match.void
setConditionString(adams.core.base.BaseRegExp value)
Sets the regular expression to apply to string fields.void
setField(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:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in 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:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in 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:
processData
in classAbstractMultiSpectrumFilter
- Parameters:
data
- the data to filter- Returns:
- the filtered data, null if failed to generate output
-
-