Package adams.gui.scripting
Class TimeseriesCommandProcessor
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.scripting.AbstractCommandProcessor
-
- adams.gui.scripting.CommandProcessor
-
- adams.gui.scripting.TimeseriesCommandProcessor
-
- All Implemented Interfaces:
LoggingSupporter,SizeOfHandler,Stoppable,UndoHandler,Serializable
public class TimeseriesCommandProcessor extends CommandProcessor
General actions:
connect <driver> <URL> <user> [password]
Connects to the database.
delete-data <comma-separated list of DB-IDs>
Deletes the timeseries containers with the specified DB-IDs from the database.
disconnect
Disconnects from the database.
run-tool <tool + options>
Runs the specified tool.
Actions for adams.gui.core.UndoHandler:
disable-undo
Disables the undo support, if available.
enable-undo
Enables the undo support, if available.
Actions for knir.gui.visualization.spectrum.TimeseriesPanel:
add-data <comma-separated list of DB-IDss>
Adds the timeseries containers to the currently loaded ones.
add-data-file <spectrum-reader scheme>
Adds the spectrum loaded via the given reader to the currently loaded ones.
clear-data
Removes all timeseries containers.
filter <classname + options>
Executes the filter on the visible timeseries containers, replaces the original ones.
filter-overlay <classname + options>
Executes the filter on the visible timeseries containers, overlays the original ones.
invisible <comma-separated list of 1-based indices>
Sets the visibility of the specified timeseries containers to false.
NB: index is based on the order the timeseries containers haven beeen loaded into the
system, includes all timeseries containers, not just visible ones.
remove-data <comma-separated list of 1-based indices>
Removes the timeseries containers with the specified indices.
NB: index is based on the order the timeseries containers haven beeen loaded into the
system, includes all timeseries containers, not just visible ones.
run-flow <filename>
Executes the flow stored in the given file.
The base actor has to be 'adams.flow.control.SubProcess'.
The processed timeseries containers replace the currently loaded ones.
run-flow-overlay <filename>
Executes the flow stored in the given file.
The base actor has to be 'adams.flow.control.SubProcess'.
The processed timeseries containers overlay the currently loaded ones.
select-wave-number <wave number>
Selects a wave number.
set-data <index> <DB-ID>
Replaces the currently loaded spectrum at the specified 1-based index with
the one associated with the database ID.
visible <comma-separated list of 1-based indices>
Sets the visibility of the specified timeseries containers to true.
NB: index is based on the order the timeseries containers haven beeen loaded into the
system, includes all timeseries containers, not just visible ones.
write-spectrum <1-based index> <filename>
Saves the spectrum at the specified position to the file.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.scripting.AbstractCommandProcessor
m_Actions, m_BasePanel, m_CurrentScriptlet, m_Owner
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description TimeseriesCommandProcessor()Initializes the processor.TimeseriesCommandProcessor(AbstractScriptingEngine owner)Initializes the processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcheckRequirement(Class requirement)Checks the following requirement.DataContainerPanelgetDataContainerPanel()Returns the DataContainer panel.protected ClassgetRequiredFlowClass()Returns the class that is required in the flow.TimeseriesPanelgetTimeseriesPanel()Returns the spectrum panel, if available.protected ObjectgetUndoObject()Returns the object that is to be used for the undo point.-
Methods inherited from class adams.gui.scripting.CommandProcessor
getDatabaseConnection
-
Methods inherited from class adams.gui.scripting.AbstractCommandProcessor
addUndoPoint, checkRequirements, createRequirementError, findScriptlet, getBasePanel, getDataContainerUpdatingPostProcessor, getOwner, getStatusMessageHandler, getUndo, globalInfo, initScriptlets, isUndoSupported, process, setBasePanel, setOwner, setUndo, setupScriptlet, showStatus, stopExecution
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Constructor Detail
-
TimeseriesCommandProcessor
public TimeseriesCommandProcessor()
Initializes the processor. Still needs to set the owner.
-
TimeseriesCommandProcessor
public TimeseriesCommandProcessor(AbstractScriptingEngine owner)
Initializes the processor.- Parameters:
owner- the owning scripting engine
-
-
Method Detail
-
getUndoObject
protected Object getUndoObject()
Returns the object that is to be used for the undo point.- Overrides:
getUndoObjectin classCommandProcessor- Returns:
- the object to store as undo point
- See Also:
AbstractCommandProcessor.addUndoPoint(String, String)
-
getDataContainerPanel
public DataContainerPanel getDataContainerPanel()
Returns the DataContainer panel.- Overrides:
getDataContainerPanelin classAbstractCommandProcessor- Returns:
- the panel or null
-
getTimeseriesPanel
public TimeseriesPanel getTimeseriesPanel()
Returns the spectrum panel, if available.- Returns:
- the panel
-
getRequiredFlowClass
protected Class getRequiredFlowClass()
Returns the class that is required in the flow.- Overrides:
getRequiredFlowClassin classAbstractCommandProcessor- Returns:
- the required class
-
checkRequirement
protected String checkRequirement(Class requirement)
Checks the following requirement.- Overrides:
checkRequirementin classAbstractCommandProcessor- Parameters:
requirement- the requirement class that needs to be present- Returns:
- "" if met, error message if not met, null if not processed
-
-