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 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 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.


getUseHierarch

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


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