Package uk.ac.starlink.ttools.plot2.task
Class PlotStiltsCommand
java.lang.Object
uk.ac.starlink.ttools.task.StiltsCommand
uk.ac.starlink.ttools.plot2.task.PlotStiltsCommand
StiltsCommand subclass for plot2 commands.
- Since:
- 15 Sep 2017
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionPlotStiltsCommand
(AbstractPlot2Task task, String taskName, SettingGroup[] groups) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic <P,
A> PlotStiltsCommand createPlotCommand
(PlotSpec<P, A> plotSpec, TableNamer tableNamer, Suffixer layerSuffixer, Suffixer zoneSuffixer) Turns a PlotSpec into an abstract model of a STILTS command line to regenerate the same plot.getTask()
Returns the plot task corresponding to this object.Methods inherited from class uk.ac.starlink.ttools.task.StiltsCommand
createCommand, createDefaultParamSetting, createInputTableSettings, createParamSetting, createProgressSetting, getGroups, getParameterByType, getTaskName, toGroups, toString
-
Constructor Details
-
PlotStiltsCommand
Constructor.- Parameters:
task
- plot tasktaskName
- name of the plot task as used by stilts command linegroups
- all name-value pairs specifying the configuration of the task, grouped for cosmetic purposes
-
-
Method Details
-
getTask
Returns the plot task corresponding to this object.- Overrides:
getTask
in classStiltsCommand
- Returns:
- plot task object
-
createPlotCommand
public static <P,A> PlotStiltsCommand createPlotCommand(PlotSpec<P, A> plotSpec, TableNamer tableNamer, Suffixer layerSuffixer, Suffixer zoneSuffixer) throws uk.ac.starlink.util.LoadExceptionTurns a PlotSpec into an abstract model of a STILTS command line to regenerate the same plot. Various methods are provided to export this in a way that can be presented to the user or executed.This is the method that does the work of mapping the internal plot representation to a STILTS command line. It has to understand how the AbstractPlot2Task parameters are specified, which is a complicated job. So (1) the output is not bulletproof, and may get broken by implementation or interface changes elsewhere in the code base, and therefore (2) lots of tests are a good idea. It works on a best efforts basis.
- Parameters:
plotSpec
- programmatic representation of a plottableNamer
- controls table naminglayerSuffixer
- controls suffixes for layerszoneSuffixer
- cotrols suffixes for zones- Returns:
- new command
- Throws:
uk.ac.starlink.util.LoadException
-