jsky.catalog
Interface Catalog

All Superinterfaces:
java.lang.Cloneable, QueryResult
All Known Subinterfaces:
CatalogDirectory, PlotableCatalog, TableQueryResult
All Known Implementing Classes:
AbstractCatalogDirectory, AstroCatalog, AstroCatConfig, AstroCatTable, MemoryCatalog, NavigatorFITSTable, SkycatCatalog, SkycatConfigFile, SkycatTable, TestCatalog, TestCatalog, TestTableQueryResult

public interface Catalog
extends QueryResult, java.lang.Cloneable

This interface defines the common interface to all catalogs.

Version:
$Revision: 1.1 $
Author:
Allan Brighton

Field Summary
static java.lang.String ARCHIVE
          Value returned by getType() for servers that return a table containing pointers to images and other data
static java.lang.String CATALOG
          Value returned by getType() for servers that return a table
static java.lang.String DIRECTORY
          Value returned by getType() for catalogs that return a list of other catalogs
static java.lang.String IMAGE_SERVER
          Value returned by getType() for servers that return an image
static java.lang.String LOCAL
          Value returned by getType() for local catalog files.
static java.lang.String NAME_SERVER
          Value returned by getType() for servers that return the RA,Dec coordinates for an object name
 
Method Summary
 java.lang.Object clone()
          Implementation of the clone method (makes a shallow copy).
 java.lang.String getDescription()
          Return a description of the catalog, or null if not available
 java.net.URL getDocURL()
          Return a URL pointing to documentation for the catalog, or null if not available
 java.lang.String getId()
          Return the Id or short name of the catalog
 java.lang.String getName()
          Return the name of the catalog
 int getNumParams()
          If this catalog can be querried, return the number of query parameters that it accepts
 FieldDesc getParamDesc(int i)
          Return a description of the ith query parameter
 FieldDesc getParamDesc(java.lang.String name)
          Return a description of the named query parameter
 CatalogDirectory getParent()
          Return a reference to the parent catalog directory, or null if not known.
 Catalog[] getPath()
          Return an array of Catalog or CatalogDirectory objects representing the path from the root catalog directory to this catalog.
 java.lang.String getTitle()
          Return a string to display as a title for the catalog in a user interface
 java.lang.String getType()
          Return the catalog type (one of the constants: CATALOG, ARCHIVE, DIRECTORY, LOCAL, IMAGE_SERVER)
 boolean isImageServer()
          Return true if this object represents an image server.
 boolean isLocal()
          Return true if this is a local catalog, and false if it requires network access or if a query could hang.
 QueryResult query(QueryArgs queryArgs)
          Query the catalog using the given arguments and return the result.
 void setName(java.lang.String name)
          Set the catalog's name
 void setParent(CatalogDirectory catDir)
          Set the parent catalog directory
 void setRegionArgs(QueryArgs queryArgs, CoordinateRadius region)
          Given a description of a region of the sky (center point and radius range), and the current query argument settings, set the values of the corresponding query parameters.
 

Field Detail

CATALOG

static final java.lang.String CATALOG
Value returned by getType() for servers that return a table

See Also:
Constant Field Values

ARCHIVE

static final java.lang.String ARCHIVE
Value returned by getType() for servers that return a table containing pointers to images and other data

See Also:
Constant Field Values

IMAGE_SERVER

static final java.lang.String IMAGE_SERVER
Value returned by getType() for servers that return an image

See Also:
Constant Field Values

NAME_SERVER

static final java.lang.String NAME_SERVER
Value returned by getType() for servers that return the RA,Dec coordinates for an object name

See Also:
Constant Field Values

DIRECTORY

static final java.lang.String DIRECTORY
Value returned by getType() for catalogs that return a list of other catalogs

See Also:
Constant Field Values

LOCAL

static final java.lang.String LOCAL
Value returned by getType() for local catalog files.

See Also:
Constant Field Values
Method Detail

clone

java.lang.Object clone()
Implementation of the clone method (makes a shallow copy).


getName

java.lang.String getName()
Return the name of the catalog


setName

void setName(java.lang.String name)
Set the catalog's name


getId

java.lang.String getId()
Return the Id or short name of the catalog


getTitle

java.lang.String getTitle()
Return a string to display as a title for the catalog in a user interface


getDescription

java.lang.String getDescription()
Return a description of the catalog, or null if not available


getDocURL

java.net.URL getDocURL()
Return a URL pointing to documentation for the catalog, or null if not available


getNumParams

int getNumParams()
If this catalog can be querried, return the number of query parameters that it accepts


getParamDesc

FieldDesc getParamDesc(int i)
Return a description of the ith query parameter


getParamDesc

FieldDesc getParamDesc(java.lang.String name)
Return a description of the named query parameter


setRegionArgs

void setRegionArgs(QueryArgs queryArgs,
                   CoordinateRadius region)
Given a description of a region of the sky (center point and radius range), and the current query argument settings, set the values of the corresponding query parameters.

Parameters:
queryArgs - (in/out) describes the query arguments
region - (in) describes the query region (center and radius range)

isLocal

boolean isLocal()
Return true if this is a local catalog, and false if it requires network access or if a query could hang. A local catalog query is run in the event dispatching thread, while others are done in a separate thread.


isImageServer

boolean isImageServer()
Return true if this object represents an image server.


getType

java.lang.String getType()
Return the catalog type (one of the constants: CATALOG, ARCHIVE, DIRECTORY, LOCAL, IMAGE_SERVER)


setParent

void setParent(CatalogDirectory catDir)
Set the parent catalog directory


getParent

CatalogDirectory getParent()
Return a reference to the parent catalog directory, or null if not known.


getPath

Catalog[] getPath()
Return an array of Catalog or CatalogDirectory objects representing the path from the root catalog directory to this catalog.


query

QueryResult query(QueryArgs queryArgs)
                  throws java.io.IOException
Query the catalog using the given arguments and return the result. The result of a query may be any class that implements the QueryResult interface. It is up to the calling class to interpret and display the result. In the general case where the result is downloaded via HTTP, The URLQueryResult class may be used.

Parameters:
queryArgs - An object describing the query arguments.
Returns:
An object describing the result of the query.
Throws:
java.io.IOException