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:
  • Field Details

    • LANGUAGE_PROPERTY

      public static final String LANGUAGE_PROPERTY
      Name of property associated with currently selected language.
      See Also:
    • MAXREC_PROPERTY

      public static final String MAXREC_PROPERTY
      Name of property associated with current MAXREC value.
      See Also:
  • Constructor Details

    • TapCapabilityPanel

      public TapCapabilityPanel(Action authAction)
      Constructor.
      Parameters:
      authAction - action for authentication; it is just included in this component for GUI organisation reasons, it's not managed as part of capabilities
  • 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
    • 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
    • getSelectedLanguage

      public VersionedLanguage getSelectedLanguage()
      Returns the currently selected VersionedLanguage. If none is selected, one representing a suitable version of ADQL will be returned.
      Returns:
      selected language, not null
    • 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