Class TopcatModelInfo

java.lang.Object
uk.ac.starlink.topcat.activate.TopcatModelInfo

public class TopcatModelInfo extends Object
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 Details

    • getTopcatModel

      public TopcatModel getTopcatModel()
      Returns the TopcatModel which this object is describing.
      Returns:
      topcat model
    • columnHasFlag

      public boolean columnHasFlag(int icol, ColFlag flag)
      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 object
      flag - characteristic type
      Returns:
      true iff column is marked with flag
    • tableHasFlag

      public boolean tableHasFlag(ColFlag flag)
      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

      public Suitability getUrlSuitability()
      Returns a standard suitability type for activation types that require only or mainly a URL column.
      Returns:
      suitability
    • getSkySuitability

      public Suitability getSkySuitability()
      Returns a standard suitability type for activation types that require only or mainly sky coordinates.
      Returns:
      suitability
    • createInfo

      public static TopcatModelInfo createInfo(TopcatModel tcModel)
      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