Package uk.ac.starlink.topcat
Class TopcatTableNamer
java.lang.Object
uk.ac.starlink.topcat.TopcatTableNamer
- All Implemented Interfaces:
uk.ac.starlink.ttools.task.TableNamer
TableNamer implementation for use with TOPCAT.
An instance of this class can be used to prepare a DescribedValue to be stashed in the Parameter list of a StarTable, where the value is the name to be used for that table.
- Since:
- 17 Sep 2024
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TopcatTableNamer
Namer instance that quotes filenames without directories.static final TopcatTableNamer
Namer instance that uses TopcatModel labels.static final TopcatTableNamer
Namer instance that quotes pathnames.static final TopcatTableNamer
Namer instance that uses topcat table sequence numbers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList
<uk.ac.starlink.ttools.task.Setting> createInputTableSettings
(uk.ac.starlink.ttools.task.AbstractInputTableParameter<?> inParam, uk.ac.starlink.ttools.task.FilterParameter filterParam, TopcatModel tcModel) Returns a list of settings for use with a stilts command that characterise a TopcatModel as an input table.static uk.ac.starlink.ttools.task.CredibleString
getSelectExpression
(RowSubset rset) Returns a best effort at an expression indicating row selection corresponding to a given RowSubset.static uk.ac.starlink.table.StarTable
getTable
(TopcatModel tcModel) Returns a table corresponding to the current apparent table of a topcat model, intended to be used with an instance of this class.uk.ac.starlink.table.TableBuilder
getTableFormat
(uk.ac.starlink.table.StarTable table) static TopcatTableNamer[]
Returns a list of TableNamer objects that give the user options for referencing TopcatModels by a text string in generated stilts commands.uk.ac.starlink.ttools.task.CredibleString
nameTable
(uk.ac.starlink.table.StarTable table) toString()
-
Field Details
-
PATHNAME_NAMER
Namer instance that quotes pathnames. -
FILENAME_NAMER
Namer instance that quotes filenames without directories. -
LABEL_NAMER
Namer instance that uses TopcatModel labels. -
TNUM_NAMER
Namer instance that uses topcat table sequence numbers.
-
-
Constructor Details
-
TopcatTableNamer
Constructor.- Parameters:
name
- TableNamer user namehasFormat
- whether to report table format when available
-
-
Method Details
-
nameTable
public uk.ac.starlink.ttools.task.CredibleString nameTable(uk.ac.starlink.table.StarTable table) - Specified by:
nameTable
in interfaceuk.ac.starlink.ttools.task.TableNamer
-
getTableFormat
public uk.ac.starlink.table.TableBuilder getTableFormat(uk.ac.starlink.table.StarTable table) - Specified by:
getTableFormat
in interfaceuk.ac.starlink.ttools.task.TableNamer
-
toString
-
getTableNamers
Returns a list of TableNamer objects that give the user options for referencing TopcatModels by a text string in generated stilts commands.- Returns:
- table namer user options
-
getTable
Returns a table corresponding to the current apparent table of a topcat model, intended to be used with an instance of this class.Its parameter list also contains parameters giving various naming options corresponding to the FileNamer instances defined by this class.
- Parameters:
tcModel
- topcat model- Returns:
- table view for use with TopcatTableNamer instance
-
createInputTableSettings
public List<uk.ac.starlink.ttools.task.Setting> createInputTableSettings(uk.ac.starlink.ttools.task.AbstractInputTableParameter<?> inParam, uk.ac.starlink.ttools.task.FilterParameter filterParam, TopcatModel tcModel) Returns a list of settings for use with a stilts command that characterise a TopcatModel as an input table.- Parameters:
inParam
- stilts table input parameterfilterParam
- stilts table input filter parameter, or nulltcModel
- topcat model to represent as input- Returns:
- list of settings
-
getSelectExpression
Returns a best effort at an expression indicating row selection corresponding to a given RowSubset. In some cases, for instance a subset defined by a bitmap, there's no way to do this that will result in an evaluatable expression, so in those cases just return the subset name or something.- Parameters:
rset
- row subset- Returns:
- attempt at expression giving row inclusion, not null
-