Package adams.flow.template
Class StoreFilenameInVariable
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.template.AbstractActorTemplate
-
- adams.flow.template.StoreFilenameInVariable
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<AbstractActorTemplate>,SizeOfHandler,Serializable
public class StoreFilenameInVariable extends AbstractActorTemplate
Creates a sub-flow that stores the filename passing through in a user-specified variable.
Valid options are:
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-name <java.lang.String> (property: name) The new name for the actor; leave empty to use current. default:
-variable <adams.core.VariableName> (property: variableName) The variable to store the report value in. default: variable
-strip-path (property: stripPath) If enabled, the path gets stripped from the filename.
-strip-extension (property: stripExtension) If enabled, the extension gets stripped from the filename.
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_StripExtensionwhether to strip the extension.protected booleanm_StripPathwhether to strip the path.protected VariableNamem_VariableNamethe variable to store the value in.-
Fields inherited from class adams.flow.template.AbstractActorTemplate
m_Name
-
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 StoreFilenameInVariable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected ActordoGenerate()Generates the actor.booleangetStripExtension()Returns whether to strip the extension from the filename.booleangetStripPath()Returns whether to strip the path from the filename.VariableNamegetVariableName()Returns the variable to set.StringglobalInfo()Returns a string describing the object.booleanisInteractive()Whether the flow generated is an interactive one.voidsetStripExtension(boolean value)Sets whether to strip the extension from the filename.voidsetStripPath(boolean value)Sets whether to strip the path from the filename.voidsetVariableName(VariableName value)Sets the variable to set.StringstripExtensionTipText()Returns the tip text for this property.StringstripPathTipText()Returns the tip text for this property.StringvariableNameTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.template.AbstractActorTemplate
compareTo, equals, forCommandLine, forName, generate, getBaselineCorrections, getDefaultName, getName, nameTipText, postGenerate, preGenerate, setName, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, 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.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_VariableName
protected VariableName m_VariableName
the variable to store the value in.
-
m_StripPath
protected boolean m_StripPath
whether to strip the path.
-
m_StripExtension
protected boolean m_StripExtension
whether to strip the extension.
-
-
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 classAbstractActorTemplate
-
setVariableName
public void setVariableName(VariableName value)
Sets the variable to set.- Parameters:
value- the variable
-
getVariableName
public VariableName getVariableName()
Returns the variable to set.- Returns:
- the variable
-
variableNameTipText
public String variableNameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setStripPath
public void setStripPath(boolean value)
Sets whether to strip the path from the filename.- Parameters:
value- true if to strip
-
getStripPath
public boolean getStripPath()
Returns whether to strip the path from the filename.- Returns:
- true if stripped
-
stripPathTipText
public String stripPathTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setStripExtension
public void setStripExtension(boolean value)
Sets whether to strip the extension from the filename.- Parameters:
value- true if to strip
-
getStripExtension
public boolean getStripExtension()
Returns whether to strip the extension from the filename.- Returns:
- true if stripped
-
stripExtensionTipText
public String stripExtensionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
isInteractive
public boolean isInteractive()
Whether the flow generated is an interactive one.- Specified by:
isInteractivein classAbstractActorTemplate- Returns:
- true if interactive
-
doGenerate
protected Actor doGenerate()
Generates the actor.- Specified by:
doGeneratein classAbstractActorTemplate- Returns:
- the generated actor
-
-