public class AstroCatalog extends Object implements PlotableCatalog
Constructor and Description |
---|
AstroCatalog()
Default constructor
|
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.
|
Object |
clone()
Implementation of the clone method (makes a shallow copy).
|
String |
getDescription()
Return a description of the catalog, or null if not available
|
URL |
getDocURL()
Return a URL pointing to documentation for the catalog, or null if not available
|
String |
getHandlerClass()
Return the name of a class implementing the QueryResultHandler interface.
|
String |
getHost()
Return the host name where the catalog server lives
|
String |
getId()
Return the Id or short name of the catalog
|
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, if found, otherwise null.
|
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 |
getPort()
Return the host name where the catalog server lives
|
String |
getProtocol()
Return the protocol to use to access the catalog.
|
TablePlotSymbol |
getSymbolDesc(int i)
Return the ith plot symbol description
|
TablePlotSymbol[] |
getSymbols()
Return the array of symbol descriptions
|
String |
getTitle()
Return a string to display as a title for the catalog in a user interface
|
String |
getType()
Return the catalog type (one of the constants: CATALOG, ARCHIVE, DIRECTORY, LOCAL, IMAGE_SERVER)
|
URL |
getURL()
Return the URL of the XML file describing this catalog, if known, otherwise null.
|
String |
getURLPath()
Return the path name to the catalog 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 |
isSymbolsEdited()
Return true if the user edited the plot symbol definitions otherwise false
|
static void |
main(String[] args)
Test cases
|
QueryResult |
query(QueryArgs queryArgs)
Query the catalog using the given arguments and return the result.
|
void |
saveSymbolConfig()
Save the catalog symbol information to disk with the user's changes
|
void |
setDescription(String description)
Set the catalog description or copyright info
|
void |
setDocURL(String docURL)
Set a URL pointing to more information about the catalog
|
void |
setHandlerClass(String handlerClass)
May be set to the name of a class implementing the QueryResultHandler interface.
|
void |
setHost(String host)
Set the host name where the catalog server lives
|
void |
setId(String id)
Set the catalog ID (short name)
|
void |
setName(String name)
Set the display name of the catalog
|
void |
setParams(FieldDesc[] params)
Set the array of query parameters for this catalog
|
void |
setParent(CatalogDirectory dir)
Set the parent catalog directory
|
void |
setPort(int port)
Set the host name where the catalog server lives
|
void |
setProtocol(String protocol)
Set the protocol to use to access the catalog.
|
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)
|
void |
setType(String type)
Set the catalog type (one of the constants: CATALOG, ARCHIVE, DIRECTORY, LOCAL, IMAGE_SERVER)
|
void |
setURL(URL url)
Set the URL of the XML file describing this catalog.
|
void |
setURLPath(String path)
Set the path name to the catalog server
|
String |
toString()
Return the name of the catalog
|
public Object clone()
public URL getURL()
public void setURL(URL url)
public CatalogDirectory getParent()
Catalog
public void setParent(CatalogDirectory dir)
Catalog
public Catalog[] getPath()
public String toString()
public void setId(String id)
public String getId()
public void setName(String name)
public String getName()
public void setDescription(String description)
public String getDescription()
getDescription
in interface Catalog
public void setDocURL(String docURL)
public URL getDocURL()
public void setType(String type)
public String getType()
public void setProtocol(String protocol)
public String getProtocol()
public void setHost(String host)
public String getHost()
public void setPort(int port)
public int getPort()
public void setURLPath(String path)
public String getURLPath()
public void setParams(FieldDesc[] params)
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 void setHandlerClass(String handlerClass)
public String getHandlerClass()
public String getTitle()
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 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 boolean isLocal()
public boolean isImageServer()
isImageServer
in interface Catalog
public QueryResult query(QueryArgs queryArgs) throws IOException
query
in interface Catalog
queryArgs
- An object describing the query arguments.IOException
protected void _setMaxRows(QueryArgs queryArgs, SearchCondition[] sc)
public static void main(String[] args)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.