Package adams.data.objectfilter
Class RenameLabels
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.objectfilter.AbstractObjectFilter
-
- adams.data.objectfilter.RenameLabels
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,ObjectFilter,FlowContextHandler,Serializable
public class RenameLabels extends AbstractObjectFilter
For renaming labels in the meta-data, stored under a specific key.
The rules for renaming are specified: old=new.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-key <java.lang.String> (property: key) The key in the meta-data containing the label. default: type
-rule <adams.core.base.BaseKeyValuePair> [-rule ...] (property: rules) The renaming rules for the labels (old=new pairs). default:
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_Keythe key in the meta-data containing the labels.protected Map<String,String>m_Lookupthe lookup table.protected BaseKeyValuePair[]m_Rulesthe renaming rules (old=new).-
Fields inherited from class adams.data.objectfilter.AbstractObjectFilter
m_FlowContext
-
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 RenameLabels()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected LocatedObjectsdoFilter(LocatedObjects objects)Filters the image objects.StringgetKey()Returns the key in the meta-data containing the label.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.BaseKeyValuePair[]getRules()Returns the rules for renaming the labels.StringglobalInfo()Returns a string describing the object.StringkeyTipText()Returns the tip text for this property.protected voidreset()Resets the scheme.StringrulesTipText()Returns the tip text for this property.voidsetKey(String value)Sets the key in the meta-data containing the label.voidsetRules(BaseKeyValuePair[] value)Sets the rules for renaming the labels.-
Methods inherited from class adams.data.objectfilter.AbstractObjectFilter
check, filter, getFlowContext, requiresFlowContext, setFlowContext
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Key
protected String m_Key
the key in the meta-data containing the labels.
-
m_Rules
protected BaseKeyValuePair[] m_Rules
the renaming rules (old=new).
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractOptionHandler
-
setKey
public void setKey(String value)
Sets the key in the meta-data containing the label.- Parameters:
value- the key
-
getKey
public String getKey()
Returns the key in the meta-data containing the label.- Returns:
- the key
-
keyTipText
public String keyTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRules
public void setRules(BaseKeyValuePair[] value)
Sets the rules for renaming the labels.- Parameters:
value- the rules
-
getRules
public BaseKeyValuePair[] getRules()
Returns the rules for renaming the labels.- Returns:
- the rules
-
rulesTipText
public String rulesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractObjectFilter- Returns:
- null if no info available, otherwise short string
-
doFilter
protected LocatedObjects doFilter(LocatedObjects objects)
Filters the image objects.- Specified by:
doFilterin classAbstractObjectFilter- Parameters:
objects- the located objects- Returns:
- the updated list of objects
-
-