Class SkySysConfigKey


public class SkySysConfigKey extends OptionConfigKey<SkySys>
ConfigKey for selecting sky coordinate systems.
Since:
10 Sep 2014
Author:
Mark Taylor
  • Constructor Details

    • SkySysConfigKey

      public SkySysConfigKey(ConfigMeta meta, boolean includeNull, boolean isViewComparison)
      Constructor.

      The isViewComparison parameter does not affect the behaviour of this key itself, but may be used by external code that needs to know whether values configured here are resolved with reference to the sky system applying to the plot as a whole.

      Parameters:
      meta - config key metadata
      includeNull - true iff null is a permitted option
      isViewComparison - true iff this key is used to configure a system that will be compared with the plot view system
  • Method Details

    • valueToString

      public String valueToString(SkySys sys)
      Description copied from class: OptionConfigKey
      Invokes the toString method of the supplied option. May be overridden.
      Overrides:
      valueToString in class OptionConfigKey<SkySys>
      Parameters:
      sys - possible value associated with this key
      Returns:
      string representation
    • stringToValue

      public SkySys stringToValue(String str) throws ConfigException
      Description copied from class: OptionConfigKey
      Calls valueToString repeatedly looking for a match. This means that if valueToString is overridden it is usually not necessary to override this method.
      Overrides:
      stringToValue in class OptionConfigKey<SkySys>
      Parameters:
      str - string representation of value
      Returns:
      value
      Throws:
      ConfigException
    • getXmlDescription

      public String getXmlDescription(SkySys sys)
      Description copied from class: OptionConfigKey
      Returns a description in XML of the given option value. This, along with OptionConfigKey.valueToString(T), is used by the OptionConfigKey.getOptionsXml() method to assemble a described list of the options.
      Specified by:
      getXmlDescription in class OptionConfigKey<SkySys>
      Parameters:
      sys - possible value of this key
      Returns:
      short snippet of XML (not wrapped in any outer element) describing the value; may be null if no description required or available
    • isViewComparison

      public boolean isViewComparison()
      Indicates whether this key is used to select a sky system that will be compared with the view system of the plot itself.
      Returns:
      true for view comparison keys