public class SkycatCatalog extends Object implements PlotableCatalog
ARCHIVE, CATALOG, DIRECTORY, IMAGE_SERVER, LOCAL, NAME_SERVER
Constructor and Description |
---|
SkycatCatalog(SkycatConfigEntry entry)
Initialize the catalog from the given catalog configuration entry.
|
SkycatCatalog(SkycatConfigEntry entry,
HTMLQueryResultHandler handler)
Initialize the catalog from the given catalog configuration entry.
|
SkycatCatalog(SkycatConfigEntry entry,
SkycatTable table)
Initialize the catalog from the given catalog configuration entry.
|
SkycatCatalog(SkycatTable table)
Initialize the catalog from the given table.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_setMaxRows(QueryArgs queryArgs,
SearchCondition[] sc)
Check for a "Max Objects" argument and if found, set queryArgs.maxRows with the value.
|
protected void |
_setQueryRegion(QueryArgs queryArgs,
SearchCondition[] sc)
Determine the query region based on the given query arguments
|
Object |
clone()
Implementation of the clone method (makes a shallow copy).
|
SkycatConfigEntry |
getConfigEntry()
Return the object used to manage the configuration info for this catalog
|
String |
getDescription()
Return a description of the catalog (same as name here)
|
URL |
getDocURL()
Return a URL pointing to documentation for the catalog, or null if not available
|
double |
getEquinox()
Return the value of the "equinox" property, if defined, otherwise 2000.
|
String |
getId()
Return the id of the catalog (same as name here)
|
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.
|
FieldDesc |
getParamDesc(int i)
Return a description of the ith query parameter
|
FieldDesc |
getParamDesc(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.
|
int |
getQueryCount()
Returns the number of querries made so far
|
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
|
SkycatTable |
getTable()
Return the table data (for local catalogs) or null, if not known.
|
String |
getTitle()
Return the title of the catalog (same as name here)
|
String |
getType()
Return the catalog type (normally one of the Catalog 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.
|
boolean |
isPix()
Return true if the catalog has X and Y columns (assumed to be image pixel coordinates)
|
boolean |
isSymbolsEdited()
Return true if the user edited the plot symbol definitions otherwise false
|
boolean |
isWCS()
Return true if the catalog has RA and DEC coordinate columns
|
static void |
main(String[] args)
Test cases
|
QueryResult |
query(QueryArgs queryArgs)
Query the catalog using the given argument and return the result.
|
void |
saveSymbolConfig()
Save the catalog symbol information to disk with the user's changes
|
void |
setConfigEntry(SkycatConfigEntry entry)
Set the object used to manage the configuration info for this catalog
|
void |
setHTMLQueryResultHandler(HTMLQueryResultHandler handler)
Optional handler, used to report HTML format errors from HTTP servers
|
void |
setName(String name)
Set the name of the catalog
|
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.
|
void |
setSymbols(TablePlotSymbol[] symbols)
Set the array of catalog table plot symbol definitions for use with this catalog
|
void |
setSymbolsEdited(boolean edited)
Set to true if the user edited the plot symbol definitions (default: false)
|
String |
toString()
Return the name of the catalog
|
public SkycatCatalog(SkycatConfigEntry entry)
entry
- the catalog configuration file entry describing the catalogpublic SkycatCatalog(SkycatConfigEntry entry, SkycatTable table)
entry
- the catalog configuration file entry describing the catalogtable
- the data for the catalog (optional, only for local catalgs)public SkycatCatalog(SkycatTable table)
table
- the data for the catalog (optional, only for local catalgs)public SkycatCatalog(SkycatConfigEntry entry, HTMLQueryResultHandler handler)
entry
- the catalog configuration file entry describing the cataloghandler
- used to report HTML errors from the HTTP serverpublic Object clone()
public void setName(String name)
public String getName()
public SkycatConfigEntry getConfigEntry()
public int getQueryCount()
public void setConfigEntry(SkycatConfigEntry entry)
public SkycatTable getTable()
public String toString()
public String getId()
public String getTitle()
public String getDescription()
getDescription
in interface Catalog
public URL getDocURL()
public int getNumParams()
getNumParams
in interface Catalog
public FieldDesc getParamDesc(int i)
getParamDesc
in interface Catalog
public FieldDesc getParamDesc(String name)
getParamDesc
in interface Catalog
public int getNumSymbols()
getNumSymbols
in interface PlotableCatalog
public TablePlotSymbol getSymbolDesc(int i)
getSymbolDesc
in interface PlotableCatalog
public TablePlotSymbol[] getSymbols()
getSymbols
in interface PlotableCatalog
public void setSymbols(TablePlotSymbol[] symbols)
setSymbols
in interface PlotableCatalog
public void setSymbolsEdited(boolean edited)
setSymbolsEdited
in interface PlotableCatalog
public boolean isSymbolsEdited()
isSymbolsEdited
in interface PlotableCatalog
public void saveSymbolConfig()
saveSymbolConfig
in interface PlotableCatalog
public String getShortName()
public boolean isWCS()
public double getEquinox()
public boolean isPix()
public boolean isLocal()
public boolean isImageServer()
isImageServer
in interface Catalog
public String getType()
public void setParent(CatalogDirectory catDir)
public CatalogDirectory getParent()
public Catalog[] getPath()
public QueryResult query(QueryArgs queryArgs) throws IOException
query
in interface Catalog
queryArgs
- An object describing the query arguments.IOException
protected void _setQueryRegion(QueryArgs queryArgs, SearchCondition[] sc) throws IOException
IOException
protected void _setMaxRows(QueryArgs queryArgs, SearchCondition[] sc)
public void setHTMLQueryResultHandler(HTMLQueryResultHandler handler)
public void setRegionArgs(QueryArgs queryArgs, CoordinateRadius region)
setRegionArgs
in interface Catalog
queryArgs
- (in/out) describes the query argumentsregion
- (in) describes the query region (center and radius range)public static void main(String[] args)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.