** ** VOCLient Library -- Client interface library to the DAL Server ** application. This API allows non-Java programs to make use of the DAL ** client interface by means of a remote procedure call between this ** interface and the DAL server. State is maintained in the server and ** values passed back are language-neutral integer 'handles' on the remote ** objects, or simple int/double/string values. ** ** All tasks must initialize the VO Client and establish a connection to ** the DAL server by calling voc_initVOClient() before making any service ** connections, thereafter new connections may be opened/closed at will. ** Convenience procedures allow for easy use of specific services, e.g. Cone ** or Siap. Service-specific parameters may be added to a query using the ** voc_addParam() calls. No action is taken until an execute of the ** query is performed, applications may get back a handle on the result and ** interrogate attributes directly, the raw VOTable or a CSV/TSV/ASCII ** representation of the result may also be returned. ** ** High-Level Functions: ** --------------------- ** ** voc_initVOClient (config_opts) ** voc_closeVOClient (shutdown_flag) ** voc_abortVOClient (errcode, errmsg) ** ** string = voc_coneCaller (url, ra, dec, sr, otype) ** status = voc_coneCallerToFile (url, ra, dec, sr, otype, file) ** string = voc_siapCaller (url, ra, dec, rsize, dsize, fmt, otype) ** status = voc_siapCallerToFile (url, ra, dec, rsize, dsize, fmt, otype, file) ** string = voc_ssapCaller (url, ra, dec, size, band, time, fmt) ** status = voc_ssapCallerToFile (url, ra, dec, size, band, time, fmt, file) ** ** string = voc_getRawURL (url, buflen) ** ** ** Main DAL Interface Procedures: ** ------------------------------ ** ** dal = voc_openConnection (svc_url, type) ** dal = voc_openConeConnection (svc_url) # Utility aliases ** dal = voc_openSiapConnection (svc_url) ** dal = voc_openSsapConnection (svc_url) ** voc_closeConnection (dal) ** ** count = voc_getServiceCount (dal) ** voc_addServiceURL (dal, svc_url) ** url = voc_getServiceURL (dal, index) ** ** query = voc_getQuery (dal, type) ** query = voc_getConeQuery (dal, ra, dec, sr) ** query = voc_getSiapQuery (dal, ra, dec, ra_size, dec_size, format) ** query = voc_getSsapQuery (dal, ra, dec, size, band, time, format) ** ** stat = voc_addIntParam (query, pname, ival) ** stat = voc_addFloatParam (query, pname, dval) ** stat = voc_addStringParam (query, pname, str) ** ** url_str = voc_getQueryString (query, type, index) ** ** qr = voc_executeQuery (query) ** qr = voc_getQueryResponse (query) ** csv_tab = voc_executeCSV (query) ** tsv_tab = voc_executeTSV (query) ** ascii = voc_executeASCII (query) ** vot_str = voc_executeVOTable (query) ** ** count = voc_getRecordCount (qr) ** rec = voc_getRecord (qr, recnum) ** str = voc_getFieldAttr (qr, fieldnum, attr) ** ** attr = voc_getAttribute (rec, char *attrname) ** count = voc_getAttrCount (rec) ** list_str = voc_getAttrList (rec) ** ** ival = voc_intValue (attr) ** dval = voc_floatValue (attr) ** str = voc_stringValue (attr) ** ** stat = voc_getDataset (rec, acref, fname) ** ** ** Sesame Name Resolver Interface: ** ------------------------------- ** ** sr = voc_nameResolver (target) ** pos_str = voc_resolverPos (sr) ** radeg = voc_resolverRA (sr) ** decdeg = voc_resolverDEC (sr) ** ra_err = voc_resolverRAErr (sr) ** dec_err = voc_resolverDECErr (sr) ** typ_str = voc_resolverOtype (sr) ** ** ** ** RegistryQuery ** ---------------------- ** ** High-Level Query: ** ** res = voc_regSearch (sql, keywords, orValues) ** res =voc_regSearchByService (svc, term, orValues) ** ** Programmatic Query: ** ** query = voc_regQuery (term, orValues) // OR keyword list? ** ** voc_regConstSvcType (query, svcType) // search constraints ** voc_regConstWaveband (query, waveband) ** voc_regDALOnly (query, value) ** voc_regSortRes (query, value) ** ** voc_regAddSearchTerm (query, term, orValue) // OR term w/ previous ** voc_regRemoveSearchTerm (query, term) // remove search term ** count = voc_regGetSTCount (query) ** ** str = voc_regGetQueryString (query) // GET form of query ** ** res = voc_regExecute (query) // return result obj ** str = voc_regExecuteRaw (query) // return raw XML ** ** RegistryQueryResult ** ** count = voc_resGetCount (res) ** ** str = voc_resGetStr (res, attribute, index) ** dval = voc_resGetFloat (res, attribute, index) ** ival = voc_resGetInt (res, attribute, index) ** ** For this implementation, we've chose to use the NVO Registry at ** JHU/STScI, specifically the QueryRegistry() method which provides a ** 'SimpleResource' form of the resource record. Support for the newer ** IVOA standard will be added later, for now we can quickly access the most ** commonly used fields of a resource using both a keyword and SQL form of ** the search. ** */