jsky.catalog.skycat
Class SkycatConfigEntry

java.lang.Object
  extended by jsky.catalog.skycat.SkycatConfigEntry

public class SkycatConfigEntry
extends java.lang.Object

Manages the configuration information for a Skycat style catalog.

Version:
$Revision: 1.2 $ $Date: 2004/07/01 15:35:13 $
Author:
Allan Brighton

Field Summary
static java.lang.String B1950
          Alternative equinox.
static java.lang.String DEC
          parameter: DEC coordinate
static java.lang.String EQUINOX
          parameter: equinox of RA,Dec
static java.lang.String HEIGHT
          parameter: height of query area (in arcmin or pixels)
static java.lang.String J2000
          Default equinox.
static java.lang.String MAX_OBJECTS
          parameter: max number of objects to return from a query.
static java.lang.String MAX_RADIUS
          parameter: maximum radius for center coordinates in arcmin (from RA,Dec), or pixels (from X,Y).
static java.lang.String MIN_RADIUS
          parameter: minimum radius for center coordinates in arcmin (from RA,Dec), or pixels (from X,Y).
static java.lang.String NAME_SERVER
          parameter: name server to use to resolve an object (star, galaxy, ...) name.
static java.lang.String OBJECT
          parameter: object (star, galaxy,...) name (to be resolved by a name server)
static java.lang.String RA
          parameter: RA coordinate
static java.lang.String WIDTH
          parameter: width of query area (in arcmin or pixels)
static java.lang.String X
          parameter: X coordinate (image coords)
static java.lang.String Y
          parameter: Y coordinate (image coords)
 
Constructor Summary
SkycatConfigEntry(java.util.Properties properties)
          Initialize the config entry from the given catalog configuration properties.
SkycatConfigEntry(SkycatConfigFile configFile, java.util.Properties properties)
          Initialize the config entry from the given catalog configuration properties.
 
Method Summary
protected  void checkSearchCols(java.util.Vector params)
          Check for additional search parameters defined in the "search_cols" property and add them to the given parameter description vector.
protected  void determineSearchParameters()
          Skycat catalogs normally default to the following parameters: objectName, nameServer, ra, dec, minRadius, maxRadius, maxObjects.
 CatalogDirectory getConfigFile()
          Return a reference to the SkycatConfigFile object containing this catalog, or null if not known.
 java.net.URL getDocURL()
          Return a URL pointing to documentation for the catalog, or null if not available
static NameValue[] getEquinoxOptions()
           
 java.lang.String getLongName()
          Return the long 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
 int getNumSymbols()
          Return the number of plot symbol definitions associated with this catalog.
 int getNumURLs()
          Return the number of query URLs defined
 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, if found, otherwise null.
 java.util.Properties getProperties()
          Return the fields of this catalog entry as a property table.
 java.lang.String getProperty(java.lang.String key)
          Return the value of the named property as a String
 RowCoordinates getRowCoordinates()
          Return the object storing the column indexes where RA,Dec or X,Y are found
 java.lang.String getServType()
          Return the value from the serv_type field.
 java.lang.String getShortName()
          Return a short name or alias for the catalog
 TablePlotSymbol getSymbolDesc(int i)
          Return the ith plot symbol description
 TablePlotSymbol[] getSymbols()
          Return the array of symbol descriptions
 java.lang.String getURL(int n)
          Return the nth query URL
 boolean isSymbolsEdited()
          Return true if the user edited the plot symbol definitions otherwise false
protected  void parseProperties()
          Parse the catalog properties and set the values for the member variables as needed.
 void setConfigFile(CatalogDirectory configFile)
          Return a reference to the SkycatConfigFile object containing this catalog, or null if not known.
 void setName(java.lang.String name)
          Set the name of the catalog
 void setParamDesc(FieldDescAdapter[] paramDesc)
          Set the array describing the query parameters.
 void setServType(java.lang.String servType)
          Return the value from the serv_type field.
 void setSymbols(TablePlotSymbol[] symbols)
          Set the array of catalog table plot symbol definitions
 void setSymbolsEdited(boolean edited)
          Set to true if the user edited the plot symbol definitions (default: false)
 void setURLs(java.lang.String[] urls)
          Return the nth query URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT

public static final java.lang.String OBJECT
parameter: object (star, galaxy,...) name (to be resolved by a name server)

See Also:
Constant Field Values

NAME_SERVER

public static final java.lang.String NAME_SERVER
parameter: name server to use to resolve an object (star, galaxy, ...) name.

See Also:
Constant Field Values

RA

public static final java.lang.String RA
parameter: RA coordinate

See Also:
Constant Field Values

DEC

public static final java.lang.String DEC
parameter: DEC coordinate

See Also:
Constant Field Values

EQUINOX

public static final java.lang.String EQUINOX
parameter: equinox of RA,Dec

See Also:
Constant Field Values

X

public static final java.lang.String X
parameter: X coordinate (image coords)

See Also:
Constant Field Values

Y

public static final java.lang.String Y
parameter: Y coordinate (image coords)

See Also:
Constant Field Values

MIN_RADIUS

public static final java.lang.String MIN_RADIUS
parameter: minimum radius for center coordinates in arcmin (from RA,Dec), or pixels (from X,Y).

See Also:
Constant Field Values

MAX_RADIUS

public static final java.lang.String MAX_RADIUS
parameter: maximum radius for center coordinates in arcmin (from RA,Dec), or pixels (from X,Y).

See Also:
Constant Field Values

MAX_OBJECTS

public static final java.lang.String MAX_OBJECTS
parameter: max number of objects to return from a query.

See Also:
Constant Field Values

WIDTH

public static final java.lang.String WIDTH
parameter: width of query area (in arcmin or pixels)

See Also:
Constant Field Values

HEIGHT

public static final java.lang.String HEIGHT
parameter: height of query area (in arcmin or pixels)

See Also:
Constant Field Values

J2000

public static final java.lang.String J2000
Default equinox.

See Also:
Constant Field Values

B1950

public static final java.lang.String B1950
Alternative equinox.

See Also:
Constant Field Values
Constructor Detail

SkycatConfigEntry

public SkycatConfigEntry(SkycatConfigFile configFile,
                         java.util.Properties properties)
Initialize the config entry from the given catalog configuration properties. See the Skycat web page for links to a description of the standard keywords.

Parameters:
configFile - a reference to the SkycatConfigFile object containing this entry, if known (used to search for a name server entry)
properties - contains (keyword : value) pairs, such as those found in a (skycat style) catalog configuration file, describing the catalog features.

SkycatConfigEntry

public SkycatConfigEntry(java.util.Properties properties)
Initialize the config entry from the given catalog configuration properties. See the Skycat web page for links to a description of the standard keywords.

Parameters:
properties - contains (keyword : value) pairs, such as those found in a (skycat style) catalog configuration file, describing the catalog features.
Method Detail

getProperties

public java.util.Properties getProperties()
Return the fields of this catalog entry as a property table.


getConfigFile

public CatalogDirectory getConfigFile()
Return a reference to the SkycatConfigFile object containing this catalog, or null if not known.


setConfigFile

public void setConfigFile(CatalogDirectory configFile)
Return a reference to the SkycatConfigFile object containing this catalog, or null if not known.


parseProperties

protected void parseProperties()
Parse the catalog properties and set the values for the member variables as needed.


determineSearchParameters

protected void determineSearchParameters()
Skycat catalogs normally default to the following parameters: objectName, nameServer, ra, dec, minRadius, maxRadius, maxObjects. In addition, the search_cols config field may add search parameters.

Parse the search column information from the catalog config entry, if found, and set the paramDesc member variable. The format of the search_cols value is: name minLabel MaxLabel : ..., (in Tcl list format).


checkSearchCols

protected void checkSearchCols(java.util.Vector params)
Check for additional search parameters defined in the "search_cols" property and add them to the given parameter description vector.


getEquinoxOptions

public static NameValue[] getEquinoxOptions()

getProperty

public java.lang.String getProperty(java.lang.String key)
Return the value of the named property as a String


setName

public void setName(java.lang.String name)
Set the name of the catalog


getName

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


getDocURL

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


getServType

public java.lang.String getServType()
Return the value from the serv_type field.


setServType

public void setServType(java.lang.String servType)
Return the value from the serv_type field.


getNumParams

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


getParamDesc

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


getParamDesc

public FieldDesc getParamDesc(java.lang.String name)
Return a description of the named query parameter, if found, otherwise null.


setParamDesc

public void setParamDesc(FieldDescAdapter[] paramDesc)
Set the array describing the query parameters.


getShortName

public java.lang.String getShortName()
Return a short name or alias for the catalog


getLongName

public java.lang.String getLongName()
Return the long name of the catalog


getNumURLs

public int getNumURLs()
Return the number of query URLs defined


getURL

public java.lang.String getURL(int n)
Return the nth query URL


setURLs

public void setURLs(java.lang.String[] urls)
Return the nth query URL


getRowCoordinates

public RowCoordinates getRowCoordinates()
Return the object storing the column indexes where RA,Dec or X,Y are found


getNumSymbols

public int getNumSymbols()
Return the number of plot symbol definitions associated with this catalog.


getSymbolDesc

public TablePlotSymbol getSymbolDesc(int i)
Return the ith plot symbol description


getSymbols

public TablePlotSymbol[] getSymbols()
Return the array of symbol descriptions


setSymbols

public void setSymbols(TablePlotSymbol[] symbols)
Set the array of catalog table plot symbol definitions


setSymbolsEdited

public void setSymbolsEdited(boolean edited)
Set to true if the user edited the plot symbol definitions (default: false)


isSymbolsEdited

public boolean isSymbolsEdited()
Return true if the user edited the plot symbol definitions otherwise false