Interface IHierarchKeyFormatter

All Known Implementing Classes:
BlanksDotHierarchKeyFormatter, StandardIHierarchKeyFormatter

public interface IHierarchKeyFormatter
Interface for formatting HIERARCH-style header keywords. Our own standard is to define such keywords internally as starting with the string HIERARCH. followed by a dot-separated hierarchy, or just an unusually long FITS keywords that cannot be represented by a standard 8-byte keyword. The HIERARCH formatted will take such string keywords and will format them according to its rules when writing them to FITS headers.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Appends the formatted HIERARCH keyword to the Fits line buffer.
    int
    Returns the extra spaces required when printing the key, relative to a space separated components following "HIERARCH " and the "= " prior to the value.
    boolean
    Checks if this formatter allows support for case-sensitive (mixed-case) hierarchical keywords.
    void
    setCaseSensitive(boolean value)
    Sets whether case-sensitive (mixed-case) HIERARCH keywords are supported.
    Returns the string reppresentation of the specified HIERARCH keyword in the FITS header
  • Method Details

    • toHeaderString

      String toHeaderString(String key)
      Returns the string reppresentation of the specified HIERARCH keyword in the FITS header
      Parameters:
      key - the HIERARCH keyword, in the dot separated convention of this library
      Returns:
      how this key looks in the FITS header with this formatting convention.
      Since:
      1.16
    • append

      void append(String key, FitsLineAppender buffer)
      Appends the formatted HIERARCH keyword to the Fits line buffer. For example as a step towards builing up the header card for this keyword.
      Parameters:
      key - The HIERARCH keyword in out own internal representation (HIERARCH. followed by the dot-sepatated hierarchical components).
      buffer - The FITS line buffer to which we want the formatted HIERARCH-style keyword to be appended.
    • getExtraSpaceRequired

      int getExtraSpaceRequired(String key)
      Returns the extra spaces required when printing the key, relative to a space separated components following "HIERARCH " and the "= " prior to the value.
      Parameters:
      key - the HIERARCH-style header key.
      Returns:
      the number of extra spaces relative to the most compact notation for the components.
      Since:
      1.16
    • setCaseSensitive

      void setCaseSensitive(boolean value)
      Sets whether case-sensitive (mixed-case) HIERARCH keywords are supported.
      Parameters:
      value - If false (default), then all HIERARCH keywords will be converted to upper-case. Otherwise, case will be preserved.
      Since:
      1.16
      See Also:
    • isCaseSensitive

      boolean isCaseSensitive()
      Checks if this formatter allows support for case-sensitive (mixed-case) hierarchical keywords.
      Returns:
      If false (default), then all HIERARCH keywords will be converted to upper-case. Otherwise, case will be preserved.
      Since:
      1.16