Class StandardIHierarchKeyFormatter

java.lang.Object
nom.tam.fits.header.hierarch.StandardIHierarchKeyFormatter
All Implemented Interfaces:
IHierarchKeyFormatter

public class StandardIHierarchKeyFormatter extends Object implements IHierarchKeyFormatter
HIERARCH keyword formatter based on the ESO convention. This formatter writes HIERARCH keywords that conform to the ESO convention, but takes a more liberal approach by supporting the full range of ASCII characters allowed in FITS headers, including the option to preserve case. (The ESO convention is upper-case only).
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new standard formatter for ESO HIERARCH style keywords.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(String key, nom.tam.fits.utilities.FitsLineAppender buffer)
    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.
    final 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

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface IHierarchKeyFormatter

    getAssignStringForSpace, getMinAssignLength
    Modifier and Type
    Method
    Description
    default String
    Returns the assignment string that separates the hierarchical key and value components, for the given amount of space available.
    default int
    Returns the minimum length of the sequence that separates keywords from values.
  • Constructor Details

    • StandardIHierarchKeyFormatter

      public StandardIHierarchKeyFormatter()
      Instantiates a new standard formatter for ESO HIERARCH style keywords.
  • Method Details

    • toHeaderString

      public String toHeaderString(String key)
      Description copied from interface: IHierarchKeyFormatter
      Returns the string reppresentation of the specified HIERARCH keyword in the FITS header
      Specified by:
      toHeaderString in interface IHierarchKeyFormatter
      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.
    • append

      public void append(String key, nom.tam.fits.utilities.FitsLineAppender buffer)
      Description copied from interface: IHierarchKeyFormatter
      Appends the formatted HIERARCH keyword to the Fits line buffer. For example as a step towards builing up the header card for this keyword.
      Specified by:
      append in interface IHierarchKeyFormatter
      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

      public int getExtraSpaceRequired(String key)
      Description copied from interface: IHierarchKeyFormatter
      Returns the extra spaces required when printing the key, relative to a space separated components following "HIERARCH " and the "= " prior to the value.
      Specified by:
      getExtraSpaceRequired in interface IHierarchKeyFormatter
      Parameters:
      key - the HIERARCH-style header key.
      Returns:
      the number of extra spaces relative to the most compact notation for the components.
    • setCaseSensitive

      public void setCaseSensitive(boolean value)
      Description copied from interface: IHierarchKeyFormatter
      Sets whether case-sensitive (mixed-case) HIERARCH keywords are supported.
      Specified by:
      setCaseSensitive in interface IHierarchKeyFormatter
      Parameters:
      value - If false (default), then all HIERARCH keywords will be converted to upper-case. Otherwise, case will be preserved.
      See Also:
    • isCaseSensitive

      public final boolean isCaseSensitive()
      Description copied from interface: IHierarchKeyFormatter
      Checks if this formatter allows support for case-sensitive (mixed-case) hierarchical keywords.
      Specified by:
      isCaseSensitive in interface IHierarchKeyFormatter
      Returns:
      If false (default), then all HIERARCH keywords will be converted to upper-case. Otherwise, case will be preserved.