Package uk.ac.starlink.topcat.activate
Class TopcatModelInfo
java.lang.Object
uk.ac.starlink.topcat.activate.TopcatModelInfo
Summarises information about a TopcatModel that may be useful for
determining whether and how to configure activation actions for it.
An instance of this class doesn't tell you anthing that you can't find out from the TopcatModel itself, but the process of obtaining the summary information required to construct it may be somewhat time-consuming, so constructing an instance of this class and passing it to all the known ActivationType instances allows that summarisation work to be done only once.
- Since:
- 23 Mar 2018
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionboolean
columnHasFlag
(int icol, ColFlag flag) Indicates whether a given column has been marked as having a particular characteristic.static TopcatModelInfo
createInfo
(TopcatModel tcModel) Constructs a TopcatModelInfo instance from a TopcatModel.Returns a standard suitability type for activation types that require only or mainly sky coordinates.Returns the TopcatModel which this object is describing.Returns a standard suitability type for activation types that require only or mainly a URL column.boolean
tableHasFlag
(ColFlag flag) Indicates whether a particular characteristic has been marked on at least one of the columns in this table.boolean
Indicates whether the table has been determined to contain sky coordinates.
-
Method Details
-
getTopcatModel
Returns the TopcatModel which this object is describing.- Returns:
- topcat model
-
columnHasFlag
Indicates whether a given column has been marked as having a particular characteristic.- Parameters:
icol
- column index; refers to the TableColumnModel at the construction time of this objectflag
- characteristic type- Returns:
- true iff column is marked with flag
-
tableHasFlag
Indicates whether a particular characteristic has been marked on at least one of the columns in this table.- Parameters:
flag
- characteristic type- Returns:
- true iff any column is marked with flag
-
tableHasSkyCoords
public boolean tableHasSkyCoords()Indicates whether the table has been determined to contain sky coordinates.- Returns:
- true iff table is known to have sky coordinates
-
getUrlSuitability
Returns a standard suitability type for activation types that require only or mainly a URL column.- Returns:
- suitability
-
getSkySuitability
Returns a standard suitability type for activation types that require only or mainly sky coordinates.- Returns:
- suitability
-
createInfo
Constructs a TopcatModelInfo instance from a TopcatModel. Indices refer to the column index in the TopcatModel's TableColumnModel (tcModel.getColumnModel()).Note that the 'apparent' table is used for assessment. That means firstly that, since the table rows and columns may change, the information should be used right away and not cached for later use, and secondly that this method should be invoked on the Event Dispatch Thread.
- Parameters:
tcModel
- topcat model- Returns:
- TopcatModelInfo representing topcat model table snapshot
-