edu.nrao.sss.astronomy
Class EphemerisTableReaderFactory

java.lang.Object
  extended by edu.nrao.sss.astronomy.EphemerisTableReaderFactory

public class EphemerisTableReaderFactory
extends Object

A factory that produces readers of ephemeris table files.

CVS Info:

$Revision: 1707 $
$Date: 2008-11-14 10:23:59 -0700 (Fri, 14 Nov 2008) $
$Author: dharland $

Since:
2006-06-12
Author:
David M. Harland

Constructor Summary
EphemerisTableReaderFactory()
          Creates a new factory.
 
Method Summary
 EphemerisTableReader getNewReader(String readerName)
          Creates a new ephemeris table reader for the given readerName.
static EphemerisTableReaderFactory getSharedInstance()
          Returns a shared factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EphemerisTableReaderFactory

public EphemerisTableReaderFactory()
Creates a new factory.

Method Detail

getSharedInstance

public static EphemerisTableReaderFactory getSharedInstance()
Returns a shared factory.


getNewReader

public EphemerisTableReader getNewReader(String readerName)
                                  throws IllegalArgumentException
Creates a new ephemeris table reader for the given readerName. The readerName may be either one of the codes that is understood by this factory, or the prefix of a class that is not known by this factory (see below).

Known Reader Codes

The above codes are not case sensitive.

Class Name Conventions
If this factory does not know the given name of the reader, it will attempt to locate a class that follows the naming convention:

   XyzEphemerisTableReader
The incoming reader name will be transformed so that its first character is upper case and the rest are lower case. This means that the class name itself must follow the normal java naming conventions, but the parameter to this method is not case sensitive.

If a reader of the given name cannot be found, null is returned.

Parameters:
readerName - the name of the reader that is desired.
Returns:
a new ephemeris table reader.
Throws:
IllegalArgumentException - if readerName cannot be transformed into a reader.


Copyright © 2009. All Rights Reserved.