|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.catalog.irsa.IRSACatalog
public class IRSACatalog
Represents a catalog server, as described in an IRSA XML catalog description file. This class is responsible for generating the catalog query.
Field Summary |
---|
Fields inherited from interface jsky.catalog.Catalog |
---|
ARCHIVE, CATALOG, DIRECTORY, IMAGE_SERVER, LOCAL |
Constructor Summary | |
---|---|
IRSACatalog(File file,
IRSATable table)
Create an IRSACatalog object for searching a local catalog file in the IRSA format. |
|
IRSACatalog(String desc,
String server,
String database,
String catname,
String ddname,
URL url)
Create an IRSACatalog with the given settings (normally from the nph-catlist.xml file) |
Method Summary | |
---|---|
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 |
IRSAFieldDesc[] |
getFieldDesc()
Download the XML file describing the catalog's table columns and return an array of field descriptions corresponding to the columns. |
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. |
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 |
JComponent |
makeComponent(QueryResultDisplay display)
Implement the CatalogUIHandler interface to get a custom GUI |
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 |
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 |
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 |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IRSACatalog(String desc, String server, String database, String catname, String ddname, URL url)
desc
- IRSA catalog titleserver
- IRSA server id to pass to cgi-bin script (not hostname)database
- IRSA database idcatname
- IRSA catalog idddname
- IRSA Data dictionary idurl
- the URL of the XML file containing the description of this catalogpublic IRSACatalog(File file, IRSATable table)
file
- the local filetable
- the table data for the catalog (optional)Method Detail |
---|
public Object clone()
clone
in interface Catalog
clone
in class Object
public URL getURL()
public void setURL(URL url)
public CatalogDirectory getParent()
Catalog
getParent
in interface Catalog
public void setParent(CatalogDirectory dir)
Catalog
setParent
in interface Catalog
public Catalog[] getPath()
getPath
in interface Catalog
public String toString()
toString
in class Object
public void setId(String id)
public String getId()
getId
in interface Catalog
public void setName(String name)
setName
in interface Catalog
public String getName()
getName
in interface Catalog
public void setDescription(String description)
public String getDescription()
getDescription
in interface Catalog
public void setDocURL(String docURL)
public URL getDocURL()
getDocURL
in interface Catalog
public void setType(String type)
public String getType()
getType
in interface Catalog
public void setProtocol(String protocol)
public void setHost(String host)
public void setPort(int port)
public void setURLPath(String path)
public String getURLPath()
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 getTitle()
getTitle
in interface Catalog
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()
isLocal
in interface Catalog
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 IRSAFieldDesc[] getFieldDesc() throws MalformedURLException, IOException
MalformedURLException
IOException
public JComponent makeComponent(QueryResultDisplay display)
CatalogUIHandler
interface to get a custom GUI
makeComponent
in interface CatalogUIHandler
display
- can be used to display the results of a catalog query
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |