net.aerith.misao.catalog.io
Class Ac2000Reader

java.lang.Object
  |
  +--net.aerith.misao.catalog.io.CatalogReader
        |
        +--net.aerith.misao.catalog.io.Ac2000Reader

public class Ac2000Reader
extends CatalogReader

The Ac2000Reader is a class to read the AC 2000.2 Catalogue.

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  int current_file_index
          The index of current file (0-13).
protected  int current_file_index_in_list
          The index of current file in file_list.
protected  int current_ra
          The index of current R.A.
protected  java.io.BufferedReader current_reader
          The current_input stream reader.
protected  int current_star_index
          The index of current star.
protected static int[] decl_end
          The end declinations.
protected static int[] decl_start
          The start declinations.
protected  java.util.Vector file_list
          The list of file index to be read.
protected static int file_N
          The number of files.
protected static java.lang.String[] filenames
          The file names.
protected static int[][] index
          The index of stars per 1 deg in R.A.
 
Fields inherited from class net.aerith.misao.catalog.io.CatalogReader
center_coor, date, limiting_mag, url_set
 
Constructor Summary
Ac2000Reader()
          Constructs an empty Ac2000Reader.
Ac2000Reader(java.net.URL url)
          Constructs a Ac2000Reader with URL of directory containing the AC 2000.2 Catalogue.
 
Method Summary
(package private) static void ()
          Sets the R.A.
 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.
private static void initialize_n00()
          Initializes the index in ac_n00.dat.
private static void initialize_n10()
          Initializes the index in ac_n10.dat.
private static void initialize_n20()
          Initializes the index in ac_n20.dat.
private static void initialize_n30()
          Initializes the index in ac_n30.dat.
private static void initialize_n40()
          Initializes the index in ac_n40.dat.
private static void initialize_n50()
          Initializes the index in ac_n50.dat.
private static void initialize_n60()
          Initializes the index in ac_n60.dat.
private static void initialize_p00()
          Initializes the index in ac_p00.dat.
private static void initialize_p10()
          Initializes the index in ac_p10.dat.
private static void initialize_p20()
          Initializes the index in ac_p20.dat.
private static void initialize_p30()
          Initializes the index in ac_p30.dat.
private static void initialize_p40()
          Initializes the index in ac_p40.dat.
private static void initialize_p50()
          Initializes the index in ac_p50.dat.
private static void initialize_p60()
          Initializes the index in ac_p60.dat.
 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

file_N

protected static final int file_N
The number of files.

filenames

protected static final java.lang.String[] filenames
The file names.

decl_start

protected static final int[] decl_start
The start declinations.

decl_end

protected static final int[] decl_end
The end declinations.

index

protected static final int[][] index
The index of stars per 1 deg in R.A. for each files.

current_reader

protected java.io.BufferedReader current_reader
The current_input stream reader.

current_file_index_in_list

protected int current_file_index_in_list
The index of current file in file_list.

current_file_index

protected int current_file_index
The index of current file (0-13).

current_ra

protected int current_ra
The index of current R.A. block (0-359).

current_star_index

protected int current_star_index
The index of current star.

circum_area

protected CircumArea circum_area
The circum area to read stars.

file_list

protected java.util.Vector file_list
The list of file index to be read.
Constructor Detail

Ac2000Reader

public Ac2000Reader()
Constructs an empty Ac2000Reader.

Ac2000Reader

public Ac2000Reader(java.net.URL url)
Constructs a Ac2000Reader with URL of directory containing the AC 2000.2 Catalogue.
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.

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.

initialize_p60

private static void initialize_p60()
Initializes the index in ac_p60.dat.

initialize_p50

private static void initialize_p50()
Initializes the index in ac_p50.dat.

initialize_p40

private static void initialize_p40()
Initializes the index in ac_p40.dat.

initialize_p30

private static void initialize_p30()
Initializes the index in ac_p30.dat.

initialize_p20

private static void initialize_p20()
Initializes the index in ac_p20.dat.

initialize_p10

private static void initialize_p10()
Initializes the index in ac_p10.dat.

initialize_p00

private static void initialize_p00()
Initializes the index in ac_p00.dat.

initialize_n00

private static void initialize_n00()
Initializes the index in ac_n00.dat.

initialize_n10

private static void initialize_n10()
Initializes the index in ac_n10.dat.

initialize_n20

private static void initialize_n20()
Initializes the index in ac_n20.dat.

initialize_n30

private static void initialize_n30()
Initializes the index in ac_n30.dat.

initialize_n40

private static void initialize_n40()
Initializes the index in ac_n40.dat.

initialize_n50

private static void initialize_n50()
Initializes the index in ac_n50.dat.

initialize_n60

private static void initialize_n60()
Initializes the index in ac_n60.dat.

static void ()
Sets the R.A. range of each block.