Package adams.data.spectrumfilter
Class ReportFieldFromStringValue
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.AbstractFilter<Spectrum>
-
- adams.data.spectrumfilter.ReportFieldFromStringValue
-
- 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<adams.data.filter.Filter>
,adams.core.SizeOfHandler
,adams.data.filter.Filter<Spectrum>
,Serializable
,Comparable
public class ReportFieldFromStringValue extends adams.data.filter.AbstractFilter<Spectrum>
Sets a report field with the value extracted from another string field via a regular expression.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.data.conversion.Conversion
m_Conversion
the conversion to apply.protected String
m_Group
the group to use as value for the target field.protected adams.core.base.BaseRegExp
m_RegExp
the regular expression to apply.protected adams.data.report.Field
m_Source
the source field.protected adams.data.report.Field
m_Target
the target field.
-
Constructor Summary
Constructors Constructor Description ReportFieldFromStringValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
conversionTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.adams.data.conversion.Conversion
getConversion()
Returns the conversion to apply to the extracted string value.String
getGroup()
Returns group expression for generating the value to be stored.adams.core.base.BaseRegExp
getRegExp()
Returns the regular expression to apply for identifying the group(s) to extract from the string.adams.data.report.Field
getSource()
Returns the source field in the report to get the string to apply the regular expression to.adams.data.report.Field
getTarget()
Returns the target field in the report to store the result in.String
globalInfo()
Returns a string describing the object.String
groupTipText()
Returns the tip text for this property.protected Spectrum
processData(Spectrum data)
Performs the actual filtering.String
regExpTipText()
Returns the tip text for this property.void
setConversion(adams.data.conversion.Conversion value)
Sets the conversion to apply to the extracted string value.void
setGroup(String value)
Sets the group expression for generating the value to be stored.void
setRegExp(adams.core.base.BaseRegExp value)
Sets the regular expression to apply for identifying the group(s) to extract from the string.void
setSource(adams.data.report.Field value)
Sets the source field in the report to get the string to apply the regular expression to.void
setTarget(adams.data.report.Field value)
Sets the target field in the report to store the result in.String
sourceTipText()
Returns the tip text for this property.String
targetTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.filter.AbstractFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, 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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
m_Source
protected adams.data.report.Field m_Source
the source field.
-
m_RegExp
protected adams.core.base.BaseRegExp m_RegExp
the regular expression to apply.
-
m_Group
protected String m_Group
the group to use as value for the target field.
-
m_Conversion
protected adams.data.conversion.Conversion m_Conversion
the conversion to apply.
-
m_Target
protected adams.data.report.Field m_Target
the target field.
-
-
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 classadams.data.filter.AbstractFilter<Spectrum>
-
setSource
public void setSource(adams.data.report.Field value)
Sets the source field in the report to get the string to apply the regular expression to.- Parameters:
value
- the field
-
getSource
public adams.data.report.Field getSource()
Returns the source field in the report to get the string to apply the regular expression to.- Returns:
- the field
-
sourceTipText
public String sourceTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRegExp
public void setRegExp(adams.core.base.BaseRegExp value)
Sets the regular expression to apply for identifying the group(s) to extract from the string.- Parameters:
value
- the expression
-
getRegExp
public adams.core.base.BaseRegExp getRegExp()
Returns the regular expression to apply for identifying the group(s) to extract from the string.- Returns:
- the expression
-
regExpTipText
public String regExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setGroup
public void setGroup(String value)
Sets the group expression for generating the value to be stored.- Parameters:
value
- the group expression
-
getGroup
public String getGroup()
Returns group expression for generating the value to be stored.- Returns:
- the group expression
-
groupTipText
public String groupTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setConversion
public void setConversion(adams.data.conversion.Conversion value)
Sets the conversion to apply to the extracted string value.- Parameters:
value
- the conversion
-
getConversion
public adams.data.conversion.Conversion getConversion()
Returns the conversion to apply to the extracted string value.- Returns:
- the conversion
-
conversionTipText
public String conversionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTarget
public void setTarget(adams.data.report.Field value)
Sets the target field in the report to store the result in.- Parameters:
value
- the field
-
getTarget
public adams.data.report.Field getTarget()
Returns the target field in the report to store the result in.- Returns:
- the field
-
targetTipText
public String targetTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
-