jsky.catalog
Interface CatalogDirectory

All Superinterfaces:
Catalog, java.lang.Cloneable, QueryResult, javax.swing.tree.TreeModel
All Known Implementing Classes:
AbstractCatalogDirectory, AstroCatConfig, SkycatConfigFile

public interface CatalogDirectory
extends Catalog, javax.swing.tree.TreeModel

This defines the interface for a catalog directory, allowing catalogs to be organized in a hierarchy.


Field Summary
 
Fields inherited from interface jsky.catalog.Catalog
ARCHIVE, CATALOG, DIRECTORY, IMAGE_SERVER, LOCAL, NAME_SERVER
 
Method Summary
 void addCatalog(Catalog cat)
          Add the given catalog to the catalog list.
 Catalog getCatalog(int i)
          Return the ith catalog in the directory
 Catalog getCatalog(java.lang.String catalogName)
          Return the named catalog, if found in this directory
 TableQueryResult getCatalogList()
          Return a memory catalog describing the list of catalogs in the directory
 java.util.List getNameServers()
          Return a list of name servers (Catalogs with type equal to "namesvr") to use to resolve astronomical object names.
 int getNumCatalogs()
          Return the number of catalogs in this directory
 Catalog[] getPath(Catalog cat)
          Return an array of catalogs describing the path to the given catalog or catalog directory.
 int indexOf(Catalog cat)
          Return the index of the given catalog in the directory
 CatalogDirectory loadSubDir(java.net.URL url)
          Attempt to read a catalog subdirectory from the given URL and insert the object for it in the catalog tree.
 void moveCatalog(Catalog cat, boolean up)
          Move the the given catalog up or down in the list.
 void moveCatalogToEnd(Catalog cat, boolean up)
          Move the the given catalog all the way up or down in the list, as far as possible.
 CatalogDirectory reload()
          Reload the catalog directory and return the new (or existing) object for it.
 void removeCatalog(Catalog cat)
          Remove the given catalog from the catalog list.
 void replaceCatalog(Catalog oldCat, Catalog newCat)
          Replace the given old catalog with the given new catalog in the catalog list.
 void save()
          Save the contents of this catalog directory to make it permanent (for example, in a config file under ~/.jsky/...).
 
Methods inherited from interface jsky.catalog.Catalog
clone, getDescription, getDocURL, getId, getName, getNumParams, getParamDesc, getParamDesc, getParent, getPath, getTitle, getType, isImageServer, isLocal, query, setName, setParent, setRegionArgs
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
 

Method Detail

getNumCatalogs

int getNumCatalogs()
Return the number of catalogs in this directory


getCatalog

Catalog getCatalog(int i)
Return the ith catalog in the directory


getCatalog

Catalog getCatalog(java.lang.String catalogName)
Return the named catalog, if found in this directory


indexOf

int indexOf(Catalog cat)
Return the index of the given catalog in the directory


getCatalogList

TableQueryResult getCatalogList()
Return a memory catalog describing the list of catalogs in the directory


getPath

Catalog[] getPath(Catalog cat)
Return an array of catalogs describing the path to the given catalog or catalog directory.


addCatalog

void addCatalog(Catalog cat)
Add the given catalog to the catalog list. An error message is displayed if the catalog is already in the list. If a separate catalog with the same name is in the list, the user is asked if it should be removed.


removeCatalog

void removeCatalog(Catalog cat)
Remove the given catalog from the catalog list.


replaceCatalog

void replaceCatalog(Catalog oldCat,
                    Catalog newCat)
Replace the given old catalog with the given new catalog in the catalog list.


moveCatalog

void moveCatalog(Catalog cat,
                 boolean up)
Move the the given catalog up or down in the list.


moveCatalogToEnd

void moveCatalogToEnd(Catalog cat,
                      boolean up)
Move the the given catalog all the way up or down in the list, as far as possible.


save

void save()
Save the contents of this catalog directory to make it permanent (for example, in a config file under ~/.jsky/...).


reload

CatalogDirectory reload()
Reload the catalog directory and return the new (or existing) object for it.


loadSubDir

CatalogDirectory loadSubDir(java.net.URL url)
Attempt to read a catalog subdirectory from the given URL and insert the object for it in the catalog tree.

Returns:
the new CatalogDirectory
Throws:
java.lang.RuntimeException - if the catalog directory could not be created

getNameServers

java.util.List getNameServers()
Return a list of name servers (Catalogs with type equal to "namesvr") to use to resolve astronomical object names.