net.aerith.misao.catalog.io
Class Gsc11Reader

java.lang.Object
  |
  +--net.aerith.misao.catalog.io.CatalogReader
        |
        +--net.aerith.misao.catalog.io.Gsc11Reader
Direct Known Subclasses:
GscActReader

public class Gsc11Reader
extends CatalogReader

The Gsc11Reader is a class to read GSC 1.1 CD-ROMs.

The (x,y) position is also set properly so that (0,0) represents the specified R.A. and Decl. to open method and (1,1) represents the position 1 deg to the west and 1 deg to the north.


Field Summary
protected  CircumArea circum_area
          The circum area to read stars.
protected  short current_area_number
          The current area number.
protected  int current_file_index
          The index of current file.
protected  java.io.DataInputStream current_stream
          The current input stream.
protected static int[] dir_max
          The array of number of files in each directory.
protected static int dir_N
          The number of directories of data.
protected static java.lang.String[] dir_name
          The array of directory names.
protected  java.util.Vector filename_list
          The list of filename to be read.
protected  java.lang.String[] plate_date
          The array of plate date.
protected  java.lang.String[] plate_date_id
          The array of plate date IDs.
 
Fields inherited from class net.aerith.misao.catalog.io.CatalogReader
center_coor, date, limiting_mag, url_set
 
Constructor Summary
Gsc11Reader()
          Constructs an empty Gsc11Reader.
Gsc11Reader(java.net.URL url)
          Constructs a Gsc11Reader with URL of directory containing GSC 1.1 CD-ROMs data.
 
Method Summary
 void close()
          Closes a catalog.
 java.lang.String getHelpMessage()
          Gets the help message.
 double getMaximumPositionErrorInArcsec()
          Gets the maximum error of position in arcsec.
 java.lang.String getName()
          Gets the catalog name.
 boolean isAct()
          Checks if reading GSC-ACT or not.
 boolean isInDirectory()
          Checks if the catalog data is in a directory.
 void open(Coor coor, double fov)
          Opens a catalog.
 CatalogStar readNext()
          Reads one data from the opened catalog.
 boolean supportsExamination()
          Checks if the catalog supports the use in PIXY examination.
 
Methods inherited from class net.aerith.misao.catalog.io.CatalogReader
addURL, getDateLimit, getDateLimitMessage, getFovLimit, getFovLimitMessage, hasDateLimit, hasFovLimit, isDateDependent, isFile, open, read, setDate, setDefaultURL, setLimitingMagnitude
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

dir_N

protected static final int dir_N
The number of directories of data.

dir_max

protected static final int[] dir_max
The array of number of files in each directory.

dir_name

protected static final java.lang.String[] dir_name
The array of directory names.

current_stream

protected java.io.DataInputStream current_stream
The current input stream.

current_file_index

protected int current_file_index
The index of current file.

current_area_number

protected short current_area_number
The current area number.

circum_area

protected CircumArea circum_area
The circum area to read stars.

plate_date_id

protected java.lang.String[] plate_date_id
The array of plate date IDs.

plate_date

protected java.lang.String[] plate_date
The array of plate date.

filename_list

protected java.util.Vector filename_list
The list of filename to be read.
Constructor Detail

Gsc11Reader

public Gsc11Reader()
Constructs an empty Gsc11Reader.

Gsc11Reader

public Gsc11Reader(java.net.URL url)
Constructs a Gsc11Reader with URL of directory containing GSC 1.1 CD-ROMs data.
Parameters:
url - the URL of directory containing CD-ROMs data.
Method Detail

getName

public java.lang.String getName()
Gets the catalog name. It must be unique among all subclasses.
Overrides:
getName in class CatalogReader
Returns:
the catalog name.

isInDirectory

public boolean isInDirectory()
Checks if the catalog data is in a directory.
Overrides:
isInDirectory in class CatalogReader
Returns:
true if the catalog data is in a directory.

supportsExamination

public boolean supportsExamination()
Checks if the catalog supports the use in PIXY examination.
Overrides:
supportsExamination in class CatalogReader
Returns:
true if the catalog can be used in PIXY examination.

isAct

public boolean isAct()
Checks if reading GSC-ACT or not.
Returns:
true if reading GSC-ACT.

getMaximumPositionErrorInArcsec

public double getMaximumPositionErrorInArcsec()
Gets the maximum error of position in arcsec. It is the search area size to identify with other stars.
Overrides:
getMaximumPositionErrorInArcsec in class CatalogReader
Returns:
the maximum error of position in arcsec.

getHelpMessage

public java.lang.String getHelpMessage()
Gets the help message.
Overrides:
getHelpMessage in class CatalogReader
Returns:
the help message.

open

public void open(Coor coor,
                 double fov)
          throws java.io.IOException,
                 java.io.FileNotFoundException,
                 CdromNotFoundException
Opens a catalog. This method must be invoked at first.
Overrides:
open in class CatalogReader
Parameters:
coor - the R.A. and Decl. of the center.
fov - the field of view to read in degree.
Throws:
java.io.IOException - if a file cannot be accessed.
java.io.FileNotFoundException - if a file does not exists in any URL, and the file is in any CD-ROMs.
CdromNotFoundException - if a file does not exists in any URL, and the file is in a CD-ROM.

readNext

public CatalogStar readNext()
                     throws java.io.IOException,
                            java.io.FileNotFoundException,
                            CdromNotFoundException,
                            QueryFailException
Reads one data from the opened catalog. After this method is invoked, the cursor is promoted to tne next star. When every data is read, it returns null. Note that data with the same ID are also returned one by one.
Overrides:
readNext in class CatalogReader
Returns:
a star data.
Throws:
java.io.IOException - if a file cannot be accessed.
java.io.FileNotFoundException - if a file does not exists in any URL, and the file is in any CD-ROMs.
CdromNotFoundException - if a file does not exists in any URL, and the file is in a CD-ROM.
QueryFailException - if the query to the server is failed.

close

public void close()
           throws java.io.IOException
Closes a catalog. This method must be invoked finally.
Overrides:
close in class CatalogReader
Throws:
java.io.IOException - if a file cannot be accessed.