|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.aerith.misao.util.OperationObservable | +--net.aerith.misao.database.CatalogTreeManager | +--net.aerith.misao.database.CatalogDBManager
The CatalogDBManager
represents a database manager of
the catalog stars.
The database consists of two parts with different classification policies. One is classified by the star name. Another one is by the R.A. and Decl.
Field Summary | |
protected FileManager |
file_manager
The file manager. |
protected FileSystem |
file_system
The file system of the database. |
Fields inherited from class net.aerith.misao.database.CatalogTreeManager |
EXCLUDE_SUBFOLDERS,
INCLUDE_SUBFOLDERS |
Fields inherited from class net.aerith.misao.util.OperationObservable |
observer_list |
Constructor Summary | |
CatalogDBManager(FileSystem file_system,
FileManager file_manager)
Constructs a CatalogDBManager in the
specified file system. |
Method Summary | |
void |
addElement(CatalogStar star)
Adds the catalog star. |
void |
addElements(java.util.Vector list_stars)
Adds the catalog stars. |
protected Folder |
createNameOrientedDBFolder(CatalogStar star)
Creates the database folder classified by the star name. |
protected Folder |
createPositionOrientedDBFolder(Coor coor)
Creates the database folder classified by the position. |
void |
deleteElement(CatalogStar star)
Deletes the catalog star. |
void |
deleteElements(java.util.Hashtable hash_stars)
Deletes the catalog stars. |
CatalogDBAccessor |
getAccessor(Coor coor,
double radius)
Gets the sequential accessor to the catalog star records within the specified circular area. |
protected java.util.Vector |
getCatalogSubfolders(java.util.Vector folder_list)
Gets the sub folders in the specified path. |
CatalogStar |
getElement(CatalogStar star)
Gets the catalog star in the database. |
CatalogStar |
getElement(java.util.Vector mag_folder_hierarchy)
Gets the catalog star indicated by the specified path in the magnitude database. |
java.util.Vector |
getElements(java.util.Vector folder_list)
Gets the elements in the specified path in the name oriented database. |
protected java.util.Hashtable |
getHierarchy(int method)
Gets the folder hierarchy of the database. |
protected java.lang.String |
getNameOrientedDBFolder()
Gets the top folder of the database classified by the star name. |
protected java.lang.String |
getPositionOrientedDBFolder()
Gets the top folder of the database classified by the position. |
protected java.util.Vector |
getStars(java.util.Vector folder_list)
Gets the stars in the specified path. |
void |
setFileManager(FileManager file_manager)
Sets a file manager. |
private void |
setHierarchy(java.util.Hashtable hash,
Folder folder,
int level)
Sets the folder hierarchy of the catalog database recurrsively. |
Methods inherited from class net.aerith.misao.database.CatalogTreeManager |
getCatalogHierarchy,
getCatalogSubfolders,
getStars |
Methods inherited from class net.aerith.misao.util.OperationObservable |
addObserver,
deleteObserver,
notifyEnd,
notifyFailed,
notifyStart,
notifySucceeded,
notifyWarned |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected FileSystem file_system
protected FileManager file_manager
Constructor Detail |
public CatalogDBManager(FileSystem file_system, FileManager file_manager)
CatalogDBManager
in the
specified file system.file_system
- the file system to create the database.file_manager
- the file manager.Method Detail |
public void setFileManager(FileManager file_manager)
file_manager
- the file manager.protected java.lang.String getNameOrientedDBFolder()
protected java.lang.String getPositionOrientedDBFolder()
public void addElement(CatalogStar star) throws java.io.IOException
star
- the catalog star.public void addElements(java.util.Vector list_stars) throws java.io.IOException
list_stars
- the list of catalog stars.public void deleteElement(CatalogStar star) throws java.io.IOException
star
- the catalog star.public void deleteElements(java.util.Hashtable hash_stars) throws java.io.IOException
hash_stars
- the hash table of the catalog stars to delete.public CatalogStar getElement(CatalogStar star) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
star
- the catalog star.public CatalogStar getElement(java.util.Vector mag_folder_hierarchy) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
mag_folder_hierarchy
- the folder hierarchy in the
magnitude database.public java.util.Vector getElements(java.util.Vector folder_list) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
folder_list
- the folder hierarchy.protected Folder createNameOrientedDBFolder(CatalogStar star) throws java.io.IOException
star
- the catalog star.protected Folder createPositionOrientedDBFolder(Coor coor) throws java.io.IOException
coor
- the R.A. and Decl.public CatalogDBAccessor getAccessor(Coor coor, double radius)
coor
- the R.A. and Decl. of the center.radius
- the radius in degree.protected java.util.Hashtable getHierarchy(int method) throws java.io.IOException
method
- the method.private void setHierarchy(java.util.Hashtable hash, Folder folder, int level)
hash
- the hash table to set the hierarchy.folder
- the folder.level
- the acceptable nest level.protected java.util.Vector getCatalogSubfolders(java.util.Vector folder_list) throws java.io.IOException
folder_list
- the list of folders.protected java.util.Vector getStars(java.util.Vector folder_list) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
folder_list
- the list of folders.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |