Class TapCapabilityPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class TapCapabilityPanel extends JPanel
Panel displaying the capability information retrieved from a TAP service.
Since:
8 Mar 2011
Author:
Mark Taylor
See Also:
  • Constructor Details

    • TapCapabilityPanel

      public TapCapabilityPanel()
      Constructor.
  • Method Details

    • setCapability

      public void setCapability(TapCapability capability)
      Configures this panel to display a given capability object.
      Parameters:
      capability - capability object; may be null
    • getCapability

      public TapCapability getCapability()
      Returns the capability object currently displayed by this panel.
      Returns:
      current capability
    • getQueryLanguage

      public TapLanguage getQueryLanguage()
      Returns the query language object currently selected in this panel. If none has been explicitly selected, one representing ADQL will be returned.
      Returns:
      selected query language
    • getQueryLanguageName

      public String getQueryLanguageName()
      Returns the formatted name of the query language currently selected in this panel. This may include version information formatted as required by the TAP LANG parameter (for instance "ADQL-2.0").
      Returns:
      formatted language name
    • getMaxrec

      public long getMaxrec()
      Returns the maximum record value selected in this panel. If none has been explicitly selected, -1 is returned.
      Returns:
      maxrec value, or -1
    • getUploadLimit

      public long getUploadLimit(String units)
      Returns an upload limit for the currently displayed capability. A particular unit is specified (normally TapLimit.ROWS or TapLimit.BYTES) and the corresponding value is returned. If no limit with the given unit has been specified (including if no capability is currently displayed), -1 is returned.
      Parameters:
      units - limit unit string
      Returns:
      limit value, or -1
    • canUpload

      public static boolean canUpload(TapCapability tcap)
      Indicates whether the TAP load dialogue is capable of uploads for a given capability object.
      Parameters:
      tcap - capability metadata
      Returns:
      true iff tcap permits inline uploads