nom.tam.fits
Class FitsFactory

java.lang.Object
  extended by nom.tam.fits.FitsFactory

public class FitsFactory
extends java.lang.Object

This class contains the code which associates particular FITS types with header and data configurations. It comprises a set of Factory methods which call appropriate methods in the HDU classes. If -- God forbid -- a new FITS HDU type were created, then the XXHDU, XXData classes would need to be added and this file modified but no other changes should be needed in the FITS libraries.


Constructor Summary
FitsFactory()
           
 
Method Summary
static Data dataFactory(Header hdr)
          Given a Header return an appropriate datum.
static boolean getAllowTerminalJunk()
          Is terminal junk (i.e., non-FITS data following a valid HDU) allowed.
static boolean getUseHierarch()
          Are we processing HIERARCH style keywords
static BasicHDU HDUFactory(Header hdr, Data d)
          Given Header and data objects return the appropriate type of HDU.
static BasicHDU HDUFactory(java.lang.Object o)
          Given an object, create the appropriate FITS header to describe it.
static void setAllowTerminalJunk(boolean flag)
          Do we allow junk after a valid FITS file?
static void setCheckAsciiStrings(boolean flag)
          Enable/Disable checking of strings values used in tables to ensure that they are within the range specified by the FITS standard.
static void setUseAsciiTables(boolean flag)
          Indicate whether ASCII tables should be used where feasible.
static void setUseHierarch(boolean flag)
          Enable/Disable hierarchical keyword processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitsFactory

public FitsFactory()
Method Detail

setUseAsciiTables

public static void setUseAsciiTables(boolean flag)
Indicate whether ASCII tables should be used where feasible.


setUseHierarch

public static void setUseHierarch(boolean flag)
Enable/Disable hierarchical keyword processing.


setCheckAsciiStrings

public static void setCheckAsciiStrings(boolean flag)
Enable/Disable checking of strings values used in tables to ensure that they are within the range specified by the FITS standard. The standard only allows the values 0x20 - 0x7E with null bytes allowed in one limited context. Disabled by default.


getUseHierarch

public static boolean getUseHierarch()
Are we processing HIERARCH style keywords


setAllowTerminalJunk

public static void setAllowTerminalJunk(boolean flag)
Do we allow junk after a valid FITS file?


getAllowTerminalJunk

public static boolean getAllowTerminalJunk()
Is terminal junk (i.e., non-FITS data following a valid HDU) allowed.


dataFactory

public static Data dataFactory(Header hdr)
                        throws FitsException
Given a Header return an appropriate datum.

Throws:
FitsException

HDUFactory

public static BasicHDU HDUFactory(java.lang.Object o)
                           throws FitsException
Given an object, create the appropriate FITS header to describe it.

Parameters:
o - The object to be described.
Throws:
FitsException

HDUFactory

public static BasicHDU HDUFactory(Header hdr,
                                  Data d)
                           throws FitsException
Given Header and data objects return the appropriate type of HDU.

Throws:
FitsException