public class StiltsCommand extends Object
Use a CommandFormatter
instance to export this object
into a useful external form, such as a shell command line.
Constructor and Description |
---|
StiltsCommand(Task task,
String taskName,
SettingGroup[] groups)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static StiltsCommand |
createCommand(Task task,
SettingGroup[] groups)
Creates an instance of this class with an automatically determined
task name.
|
static Setting |
createDefaultParamSetting(Parameter<?> param)
Creates a Setting corresponding to a given task parameter,
set to its default value.
|
static List<Setting> |
createInputTableSettings(AbstractInputTableParameter<?> inParam,
StarTable table,
TableNamer namer,
FilterParameter filterParam,
CredibleString selection)
Returns settings associated with an InputTableParameter and table.
|
static <T> Setting |
createParamSetting(Parameter<T> param,
T tval)
Creates a Setting corresponding to a given task parameter.
|
static Setting |
createProgressSetting(FilterParameter filterParam)
Returns a setting that corresponds to adding a progress filter
to a filter parameter.
|
SettingGroup[] |
getGroups()
Returns an array of objects that together contain all the parameter
settings required to specify this task to stilts.
|
static <T> Parameter<T> |
getParameterByType(Task task,
Class<T> ptype)
Returns unique parameter of given type.
|
Task |
getTask()
Returns the task corresponding to this object.
|
String |
getTaskName()
Returns the name of this object's task, as used by the
stilts command line.
|
static List<SettingGroup> |
toGroups(int level,
List<Setting> settings)
Groups a list of settings into zero or more SettingGroups.
|
String |
toString() |
public StiltsCommand(Task task, String taskName, SettingGroup[] groups)
task
- tasktaskName
- name of the task as used by stilts command linegroups
- all name-value pairs specifying the configuration
of the task, grouped for cosmetic purposespublic Task getTask()
public String getTaskName()
public SettingGroup[] getGroups()
public static StiltsCommand createCommand(Task task, SettingGroup[] groups)
task
- taskgroups
- all name-value pairs specifying the configuration
of the task, grouped for cosmetic purposespublic static List<Setting> createInputTableSettings(AbstractInputTableParameter<?> inParam, StarTable table, TableNamer namer, FilterParameter filterParam, CredibleString selection)
inParam
- input table parametertable
- table associated with this parameterselection
- row selection expression, or nullnamer
- table namer capable of naming the supplied tablepublic static <T> Setting createParamSetting(Parameter<T> param, T tval)
param
- task parametertval
- typed value for parameterpublic static Setting createDefaultParamSetting(Parameter<?> param)
param
- task parameterpublic static Setting createProgressSetting(FilterParameter filterParam)
filterParam
- filter parameterpublic static <T> Parameter<T> getParameterByType(Task task, Class<T> ptype)
public static List<SettingGroup> toGroups(int level, List<Setting> settings)
level
- level for all returned groupssettings
- input list of settingsCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.