Package adams.flow.processor
Class CheckStorageUsage
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.processor.AbstractActorProcessor
-
- adams.flow.processor.CheckStorageUsage
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<ActorProcessor>
,SizeOfHandler
,ActorProcessor
,CheckProcessor
,GraphicalOutputProducingProcessor
,Serializable
,Comparable<ActorProcessor>
public class CheckStorageUsage extends AbstractActorProcessor implements GraphicalOutputProducingProcessor, CheckProcessor
Performs a 'soft' check whether storage names in use are actually set somewhere in the flow.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-output-counts <boolean> (property: outputCounts) If enabled, the counts get output regardless of warnings. default: false
- 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_OutputCounts
whether to output counts regardless of warnings.protected NamedCounter
m_SetCount
the set counter.protected NamedCounter
m_UsageCount
the usage counter.protected String
m_Warnings
the warnings that were produced.-
Fields inherited from class adams.flow.processor.AbstractActorProcessor
m_Errors
-
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 CheckStorageUsage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.Component
getGraphicalOutput()
Returns the graphical output that was generated.boolean
getOutputCounts()
Returns whether to output the counts regardless of warnings.String
getTitle()
Returns the title for the dialog.String
getWarningHeader()
Returns the string that explains the warnings.String
getWarnings()
Returns the warnings, if any, on variables that might never get set.String
globalInfo()
Returns a string describing the object.boolean
hasGraphicalOutput()
Returns whether graphical output was generated.protected void
initialize()
Initializes the members.String
outputCountsTipText()
Returns the tip text for this property.protected void
processActor(Actor actor)
Performs the actual processing.void
setOutputCounts(boolean value)
Sets whether to output the counts regardless of warnings.-
Methods inherited from class adams.flow.processor.AbstractActorProcessor
addError, addError, checkData, compareTo, equals, getErrors, hasErrors, process, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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
-
Methods inherited from interface adams.flow.processor.ActorProcessor
compareTo, getErrors, hasErrors, process, shallowCopy, shallowCopy
-
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_OutputCounts
protected boolean m_OutputCounts
whether to output counts regardless of warnings.
-
m_UsageCount
protected NamedCounter m_UsageCount
the usage counter.
-
m_SetCount
protected NamedCounter m_SetCount
the set counter.
-
m_Warnings
protected String m_Warnings
the warnings that were produced.
-
-
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
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractActorProcessor
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setOutputCounts
public void setOutputCounts(boolean value)
Sets whether to output the counts regardless of warnings.- Parameters:
value
- true if to output counts
-
getOutputCounts
public boolean getOutputCounts()
Returns whether to output the counts regardless of warnings.- Returns:
- true if to output counts
-
outputCountsTipText
public String outputCountsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
processActor
protected void processActor(Actor actor)
Performs the actual processing.- Specified by:
processActor
in classAbstractActorProcessor
- Parameters:
actor
- the actor to process- See Also:
ModifyingProcessor
-
getWarningHeader
public String getWarningHeader()
Returns the string that explains the warnings.- Specified by:
getWarningHeader
in interfaceCheckProcessor
- Returns:
- the heading for the warnings, null if not available
-
getWarnings
public String getWarnings()
Returns the warnings, if any, on variables that might never get set.- Specified by:
getWarnings
in interfaceCheckProcessor
- Returns:
- the warnings
-
hasGraphicalOutput
public boolean hasGraphicalOutput()
Returns whether graphical output was generated.- Specified by:
hasGraphicalOutput
in interfaceGraphicalOutputProducingProcessor
- Returns:
- true if graphical output was generated
-
getTitle
public String getTitle()
Returns the title for the dialog.- Specified by:
getTitle
in interfaceGraphicalOutputProducingProcessor
- Returns:
- the title
-
getGraphicalOutput
public Component getGraphicalOutput()
Returns the graphical output that was generated.- Specified by:
getGraphicalOutput
in interfaceGraphicalOutputProducingProcessor
- Returns:
- the graphical output
-
-