Package adams.flow.template
Class FromFile
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractActorTemplate>
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
StringReplace
public class FromFile extends AbstractActorTemplate
Merely loads an actor from a file.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The new name for the actor; leave empty to use current. default:
-template <adams.core.io.PlaceholderFile> (property: templateFile) The template file to load. default: .
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PlaceholderFile
m_TemplateFile
the file to load.-
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 FromFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected Actor
doGenerate()
Generates the actor.PlaceholderFile
getTemplateFile()
Returns the template file currently to load.String
globalInfo()
Returns a string describing the object.boolean
isInteractive()
Whether the flow generated is an interactive one.protected void
preGenerate()
Hook before generating the actor.void
setTemplateFile(PlaceholderFile value)
Sets the template file to load.String
templateFileTipText()
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, 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_TemplateFile
protected PlaceholderFile m_TemplateFile
the file to load.
-
-
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
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractActorTemplate
-
setTemplateFile
public void setTemplateFile(PlaceholderFile value)
Sets the template file to load.- Parameters:
value
- the file
-
getTemplateFile
public PlaceholderFile getTemplateFile()
Returns the template file currently to load.- Returns:
- the file
-
templateFileTipText
public String templateFileTipText()
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.
Can't tell without loading.- Specified by:
isInteractive
in classAbstractActorTemplate
- Returns:
- always false
-
preGenerate
protected void preGenerate()
Hook before generating the actor.
Checks whether the template file exists.- Overrides:
preGenerate
in classAbstractActorTemplate
-
doGenerate
protected Actor doGenerate()
Generates the actor.- Specified by:
doGenerate
in classAbstractActorTemplate
- Returns:
- the generated acto
-
-