Module ivoa
Back to master index
Module ivoaVersion:1.0.0
Package:org.astrogrid.acr.ivoa
IVOA standard services.
Configuration Points
ivoa.caches
1 configuration points
Service Points
ivoa.adql
ivoa.cache
ivoa.capabilityTester
ivoa.cone
ivoa.externalRegistry
ivoa.registry
ivoa.siap
ivoa.ssap
ivoa.vosi
ivoa.vospacevfs
10 service points
Contribution to framework.acrServices
<acrService id="ssap" interface="Ssap" />
<acrService id="siap" interface="Siap" />
<acrService id="cone" interface="Cone" />
<acrService id="adql" interface="Adql" />
<acrService id="registry" interface="Registry" />
<acrService id="externalRegistry" interface="ExternalRegistry" />
<acrService id="cache" interface="CacheFactory" />
<acrService id="vosi" interface="Vosi" />
Contribution to framework.descriptors
<acr-module description="IVOA Standard Services" name="ivoa" >
  • <component description="AR Service: Support for working with ADQL queries." excluded="true" interface-class="org.astrogrid.acr.ivoa.Adql" name="adql" >
    • <method description="convert an adql/s string to an adql/x document" name="s2x" >
      • <return description="xml equivalent of the adql/s input" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="" name="s" type="java.lang.String" uitype="String" />
      </method>
    </component>
  • <component description="" excluded="true" interface-class="org.astrogrid.acr.ivoa.CacheFactory" name="cache" >
    • <method description="flush all cached data - for example registry entries" name="flush" >
      • <return description="" type="java.lang.Void" uitype="void" />
      </method>
    </component>
  • <component description="AR Service: Query for <b>Catalogs</b> from Cone-Search Services (DAL). <p /> <blockquote><b>Note: </b>This class provides functions to construct a DAL query. To execute that query, see the examples and methods in the <tt>Dal</tt> class. </blockquote> <h2>Constructing a Query</h2> The first stage in querying a cone-service is to select the service to query, find the position to query at, and then call the <tt>constructQuery(URI, double, double, double)</tt> function: <pre><b>Example: </b> "Contructing a Cone Query (Python)" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') cone = ar.ivoa.cone #take a reference to the AR Cone component #the Cone service to query (selected using voexplorer) service = "ivo://irsa.ipac/2MASS-PSC" #resolve an object name to a position pos = ar.cds.sesame.resolve('m54') #build a query query = cone.constructQuery(service,pos['ra'],pos['dec'],0.001) print "QueryURL",query </pre> This script produces a query URL (shown below), which can the be passed to the methods in the <tt>Dal</tt> class. <blockquote><tt> QueryURL http://irsa.ipac.caltech.edu/cgi-bin/Oasis/CatSearch/nph-catsearch?CAT=fp_psc&RA=283.7636667&DEC=-30.4785&SR=0.0010 </tt></blockquote> <h2>Adding the VERB parameter</h2> The optional <tt>VERB</tt> parameter determines how many columns are to be returned by the service. From the Cone specification: <blockquote><i> The query MAY contain the optional parameter, VERB, whose value is an integer - either <tt>1</tt>, <tt>2</tt>, or <tt>3</tt> - which determines how many columns are to be returned in the resulting table. Support for this parameter by a Cone Search service implementation is optional. If the service supports the parameter, then when the value is <tt>1</tt>, the response should include the bare minimum of columns that the provider considers useful in describing the returned objects. When the value is <tt>3</tt>, the service should return all of the columns that are available for describing the objects. A value of <tt>2</tt> is intended for requesting a medium number of columns between the minimum and maximum (inclusive) that are considered by the provider to most typically useful to the user. When the VERB parameter is not provided, the server should respond as if <tt>VERB=2</tt>. If the <tt>VERB</tt> parameter is not supported by the service, the service should ignore the parameter and should always return the same columns for every request. </i></blockquote> A query that includes the VERB parameter can be constructed as follows: <pre><b>Example: </b> "Constructing a Query with the VERB parameter (Python)" #build a query, as before. query = cone.constructQuery(service,pos['ra'],pos['dec'],0.001) #add a 'verb' parameter query = cone.addOption(query,"VERB",3) </pre><dl> <dt>Note:</dt><dd> This service extends the <tt>Dal</tt> interface, which provides functions to execute queries. The functions listed within this interface are just for <i>constructing</i> that query.</dd> <dt>See:</dt><dd> <a href='http://www.ivoa.net/Documents/latest/ConeSearch.html'>IVOA Cone Search Standard Document</a>, Dal, </dd></dl>" interface-class="org.astrogrid.acr.ivoa.Cone" name="cone" >
    • <method description="Add an additional option to a previously constructed query. <p/> Sometimes neccessary, for some DAL protocols, to provide optional query parameters." name="addOption" >
      • <return description="<tt>query</tt> with the option appended." type="java.net.URL" uitype="URL" />
      • <param description="the query url" name="query" type="java.net.URL" uitype="URL" />
      • <param description="name of the option to add" name="optionName" type="java.lang.String" uitype="String" />
      • <param description="value for the new option" name="optionValue" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Execute a DAL query, returning a datastructure<dl> <dt>Note:</dt><dd> When querying a SIAP service, the result uses keys drawn from the SIAP dataset datamodel</dd></dl>" name="execute" >
      • <return description="The service response parsed as a list of of rows. Each row is represented is a map between UCD or datamodel keys and values from the response" type="java.util.Map[]" uitype="Map[]" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="Execute a DAL query, returning a Votable document.<dl> <dt>Note:</dt><dd> This is a convenience method that just performs a 'GET' on the query url. Many programming languages support this functionality internally.</dd></dl>" name="executeVotable" >
      • <return description="a votable document." type="org.w3c.dom.Document" uitype="XML" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="<b>Deprecated: </b>- use executeVotable()<p /> " excluded="true" name="getResults" >
      • <return description="" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="" name="url" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="Execute a DAL query and save the resulting document.<dl> <dt>Note:</dt><dd> in the case of saving to myspace, the myspace server performs the query - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="executeAndSave" >
      • <return description="" type="java.lang.Void" uitype="void" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location to save result document - For example a <tt>file:/</tt>, <tt>ivo://</tt> (myspace), <tt>ftp://</tt> location" name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="<b>Deprecated: </b>- use executeAndSave()<p /> " excluded="true" name="saveResults" >
      • <return description="" type="java.lang.Void" uitype="void" />
      • <param description="" name="url" type="java.net.URL" uitype="URL" />
      • <param description="" name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Execute a DAL query, and save the datasets referenced by the response. <p /> Applies to those DAL protocols (<tt>Siap</tt>, <tt>Ssap</tt>, <tt>Stap</tt>) where the response points to external data files.<dl> <dt>Note:</dt><dd> In the case of saving to myspace or vospace, the myspace server performs the query and dataset download - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Siap Example of Use, Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="saveDatasets" >
      • <return description="number of datasets saved." type="int" uitype="int" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location of a directory in which to save the datasets. May be any of the filesystem types listed in <tt>Systems#listSchemes()</tt>." name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Execute a DAL query, and save a subset of the datasets referenced by the response. <p /> Applies to those DAL protocols (<tt>Siap</tt>, <tt>Ssap</tt>, <tt>Stap</tt>) where the response points to external data files.<dl> <dt>Note:</dt><dd> in the case of saving to myspace or vospace, the myspace server performs the query and dataset download - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="saveDatasetsSubset" >
      • <return description="number of datasets saved." type="int" uitype="int" />
      • <param description="the DAL query" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location of a directory in which to save the datasets. May be any of the filesystem types listed in <tt>Systems#listSchemes()</tt>." name="saveLocation" type="java.net.URI" uitype="URI" />
      • <param description="list of Integers - indexes of the rows in the query response for which to save the dataset. (0= first row)" name="rows" type="java.util.List" uitype="List" />
      </method>
    • <method description="Returns a SRQL query that, when passed to the registry, will return all know services of that type. <br/> can be used as a starting point for filters, etc. <blockquote><b>Warning: </b>In the case of <tt>Cone</tt> the registry query will return far too many to be useful - it is necessary to use this xquery as a starting point for building a more tightly-constrained query.</blockquote> <pre><b>Example: </b> "Example of querying for cone services related to 'dwarf'" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this method to get a query to list all Cone-search services. coneQuery = ar.ivoa.cone.getRegistryQuery() #combine it into a more tightly contrained query myQuery = coneQuery + ' and subject=dwarf' # perform the query rs = ar.ivoa.registry.searcg(myQuery) #inspect the results print len(rs) for r in rs: print r['id'] </pre><dl> <dt>See:</dt><dd> <a href='http://eurovotech.org/twiki/bin/view/VOTech/SimpleRegistryQueryLanguage'>SRQL Language Description</a>, #getRegistryXQuery() alternative that returns an XQuery, </dd></dl>" name="getRegistryQuery" >
      • <return description="a SRQL query string" type="java.lang.String" uitype="String" />
      </method>
    • <method description="<b>Deprecated: </b><p /> helper method - returns an ADQL/s query that should be passed to a registry to list all available DAL services of this type. <br/> can be used as a starting point for filters, etc." excluded="true" name="getRegistryAdqlQuery" >
      • <return description="an adql query string" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Return an XQuery that, when passed to the registry, will return all known services of that type. <blockquote><b>Warning: </b>In the case of <tt>Cone</tt> the registry query will return far too many to be useful - it is necessary to use this xquery as a starting point for building a more tightly-constrained query.</blockquote> <pre><b>Example: </b> "Example of querying for cone services related to 'dwarf'" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this method to get a query to list all Cone-search services. coneQuery = ar.ivoa.cone.getRegistryXQuery() #combine it into a more tightly contrained query myQuery = "let $cq := " + coneQuery + """ for $r in $cq where contains($r/content/subject,'dwarf') return $r """ # perform the query rs = ar.ivoa.registry.xquerySearch(myQuery) #inspect the results print len(rs) for r in rs: print r['id'] </pre> the output of this script is <pre> 2 ivo://nasa.heasarc/rasswd ivo://nasa.heasarc/mcksion </pre><dl> <dt>See:</dt><dd> #getRegistryQuery() alternative that returns a SRQL query., <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, </dd></dl>" name="getRegistryXQuery" >
      • <return description="an xquery string" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Construct a Cone-Search Query. The cone search standard allows queries on Right Ascension, Declination and Search Radius, all given in decimal degrees.<dl> <dt>See:</dt><dd> Sesame Sesame - resolves object names to RA,Dec positions, #getRegistryXQuery() getRegistryXQuery() - a query to list all Cone Search Services., </dd></dl>" name="constructQuery" >
      • <return description="A query URL. The query can then be performed by either <ul> <li> programmatically performing a HTTP GET on the query URL </li> <li> passing the query URL to one of the <tt>Dal</tt> <tt>execute</tt> methods - such as <tt>executeAndSave(URL, URI)</tt> </li> </ul>" type="java.net.URL" uitype="URL" />
      • <param description="Resource Identifier <i>or</i> URL of the Service to query. <i>Prefer providing a Resource Identifier, as this insulates against changes in service endpoint</i>. <blockquote><dl> <dt>Resource Identifier</dt><dd> The resource ID of the Cone Search service to query, as returned by <tt>Resource#getId()</tt>. Example: <tt>ivo://irsa.ipac/2MASS-XSC</tt> <br/>The <tt>Registry</tt> will be queried to resolve the resource ID into a <tt>Resource</tt> object, from which the <tt>ConeCapability</tt> will be found, from which in turn the first <tt>AccessURL</tt> will be used. </dd> <dt>URL of the Service</dt><dd> The endpoint URL. Can be any <tt>http://</tt> URL. </dd> </dl></blockquote>" name="service" type="java.net.URI" uitype="URI" />
      • <param description="right ascension e.g <tt>6.950</tt>" name="ra" type="double" uitype="double" />
      • <param description="declination e.g. <tt>-1.6</tt>" name="dec" type="double" uitype="double" />
      • <param description="search radius e.g. <tt>0.1</tt>" name="sr" type="double" uitype="double" />
      </method>
    </component>
  • <component description="AR Service: Query an arbitrary IVOA Registry. This component gives access to a range of querying functions - for querying using keywords or XQuery. The functions either return a raw XML document, or a series of datastructures that contain the parsed information of the registry entries. <blockquote><b>Note: </b>These functions are useful when you want to access records in a registry other than the 'system configured' registry, or if you wish to access the raw xml of the records. For other cases, we recommend using the simple <tt>Registry</tt> service.</blockquote> The first parameter to each query method is the endpoint URL of the registry service to connect to. These functions will also accept the Resource Identifier of a registry service - which will then be resolved into an endpoint URL using the System Registry.<dl> <dt>See:</dt><dd> <a href="http://www.ivoa.net/Documents/latest/IDs.html">IVOA Identifiers</a>, <a href="http://www.ivoa.net/Documents/latest/VOResource.html">IVOA VOResource Definition</a>, <a href='http://www.ivoa.net/Documents/latest/RegistryInterface.html'>IVOA Registry Interface Standard</a>, <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, org.astrogrid.acr.ivoa.Registry Registry - simpler interface to system registry, </dd></dl>" interface-class="org.astrogrid.acr.ivoa.ExternalRegistry" name="externalRegistry" >
    • <method description="Perform an ADQL/x query" excluded="true" name="adqlxSearchXML" >
      • <return description="" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="" name="adqlx" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="" name="identifiersOnly" type="boolean" uitype="boolean" />
      </method>
    • <method description="Perform an ADQL/x query, returning an array of datastructures." excluded="true" name="adqlxSearch" >
      • <return description="" type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="" name="adqlx" type="org.w3c.dom.Document" uitype="XML" />
      </method>
    • <method description="Perform a ADQL/s query.<dl> <dt>Warning:</dt><dd> The ADQL support is poorly defined in the registry standard, and implementations vary. We recommend using XQuery or keyword searching wherever possible.</dd> <dt>XMLRPC:</dt><dd> will return a string containing the xml document</dd></dl>" excluded="true" name="adqlsSearchXML" >
      • <return description="xml document of search results - a series of matching registry records contained within an element called <tt>VOResources</tt> in the namespace <tt>http://www.ivoa.net/wsdl/RegistrySearch/v1.0</tt>" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="identifier or endpoint of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="a string query (string form of ADQL)" name="adqls" type="java.lang.String" uitype="String" />
      • <param description="" name="identifiersOnly" type="boolean" uitype="boolean" />
      </method>
    • <method description="Perform an ADQL/s query, returning an array of datastructures.<dl> <dt>Warning:</dt><dd> The ADQL support is poorly defined in the registry standard, and implementations vary. We recommend using XQuery or keyword searching wherever possible.</dd></dl>" excluded="true" name="adqlsSearch" >
      • <return description="" type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="" name="adqls" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Perform a keyword search, returning an XML Document.<dl> <dt>See:</dt><dd> #getResourceXML(URI, URI) Example of registry resource XML, </dd></dl>" name="keywordSearchXML" >
      • <return description="xml document of search results - A series of <tt>VOResource</tt> elements contained within an element called <tt>VOResources</tt> in the namespace <tt>http://www.ivoa.net/xml/RegistryInterface/v1.0</tt>" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="resource identifier or endpoint URL of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="space separated list of keywords to search for" name="keywords" type="java.lang.String" uitype="String" />
      • <param description="- true to 'OR' together matches. false to 'AND' together matches" name="orValues" type="boolean" uitype="boolean" />
      </method>
    • <method description="Perform a keyword search. <p/> A more convenient variant of <tt>keywordSearchXML</tt> <p /> <pre><b>Example: </b> "Python Example" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this function regEndpoint = 'http://www.my.registry.endpoint' rs = ar.ivoa.externalRegistry.keywordSearch(regEndpoint,"abell",False) #see what we've got print len(rs) #list first 10 identifiers for r in rs[:10] print r['id']: </pre> The output is <pre> 150 ivo://CDS.VizieR/J/A+A/486/755 ivo://uk.ac.le.star.tmpledas/ledas/ledas/abell ivo://nasa.heasarc/wblgalaxy ivo://nasa.heasarc/wbl ivo://nasa.heasarc/twosigma ivo://nasa.heasarc/rassebcs ivo://nasa.heasarc/noras ivo://nasa.heasarc/eingalclus ivo://nasa.heasarc/abell ivo://CDS.VizieR/VII/96 </pre>" name="keywordSearch" >
      • <return description="list of matching resources." type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="resource identifier or endpoint URL of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="space separated list of keywords to search for" name="keywords" type="java.lang.String" uitype="String" />
      • <param description="- true to 'OR' together matches. false to 'AND' together matches" name="orValues" type="boolean" uitype="boolean" />
      </method>
    • <method description="Retrieve a named resource from a registry, as an XML document. <blockquote><b>Note: </b>Try to use <tt>getResource(URI, URI)</tt> instead, which returns a result in a more usable format</blockquote> <p /> <pre><b>Example: </b> "Python Example" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this function regEndpoint = 'http://www.my.registry.endpoint' resourceID = 'ivo://uk.ac.cam.ast/IPHAS/images/SIAP' xml = ar.ivoa.externalRegistry.getResourceXML(regEndpoint,resourceID) </pre> <pre><b>Example: </b> "Java Example" import org.astrogrid.acr.*; import java.net.URI; import org.astrogrid.acr.ivoa.ExternalRegistry; import org.astrogrid.acr.builtin.ACR Finder f = new Finder(); ACR acr = f.find(); ExternalRegistry reg = (ExternalRegistry)acr.getService(ExternalRegistry.class); URI regEndpoint = new URI("http://www.my.registry.endpoint"); URI resourceID =new URI("ivo://uk.ac.cam.ast/IPHAS/images/SIAP"); Document xml = reg.getResourceXML(regEndpoint,resourceID); </pre> The output will look something like <pre> <ri:Resource xmlns:cea="http://www.ivoa.net/xml/CEA/v1.0rc1" xmlns:ri="http://www.ivoa.net/xml/RegistryInterface/v1.0" xmlns:va="http://www.ivoa.net/xml/VOApplication/v1.0rc1" xmlns:vg="http://www.ivoa.net/xml/VORegistry/v1.0" xmlns:vr="http://www.ivoa.net/xml/VOResource/v1.0" xmlns:vs="http://www.ivoa.net/xml/VODataService/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" created="2008-02-22T10:27:11" status="active" updated="2008-02-22T14:15:22" xsi:schemaLocation="http://www.ivoa.net/xml/VOResource/v1.0 http://software.astrogrid.org/schema/registry/RegistryInterface/v1.0/RegistryInterface.xsd http://www.ivoa.net/xml/VOResource/v1.0 http://software.astrogrid.org/schema/vo-resource-types/VOResource/v1.0/VOResource.xsd http://www.ivoa.net/xml/VODataService/v1.0 http://software.astrogrid.org/schema/vo-resource-types/VODataService/v1.0/VODataService.xsd http://www.ivoa.net/xml/VOTable/v1.0 http://software.astrogrid.org/schema/vo-formats/VOTable/v1.0/VOTable.xsd" xsi:type="vr:Service"> <title>IPHAS images</title> <identifier xmlns:sia="http://www.ivoa.net/xml/SIA/v1.0">ivo://uk.ac.cam.ast/IPHAS/images/SIAP</identifier> <curation> <publisher ivo-id="ivo://uk.ac.cam.ast/CASU">CASU</publisher> <creator> <name>IPHAS collaboration</name> </creator> <contact> <name>Guy Rixon</name> <email>gtr@ast.cam.ac.uk</email> </contact> </curation> <content> <subject>image, photometry, Halpha, INT-WFC</subject> <description>Images from the initial data release (IDR) of the INT Photometric Halpha Survey (IPHAS). The survey as a wholeis mapping the northern Galactic Plane in the latitude range |b|&lt;5 deg in the Halpha, r' and i' bands using the Wide Field Camera on the 2.5-m INT telescope at La Palma to a depth of r'=20 (10????). The IDR (Gonzalez-Solares et al. 2007) contains the data obtained between September 2003 and December 2005 during a total of 212 nights. Between these dates, approximately 60 percent of the total survey area was covered in terms of final survey quality.</description> <referenceURL>http://casu.ast.cam.ac.uk/surveys-projects/iphas</referenceURL> <type>Other</type> <contentLevel>Research</contentLevel> </content> <capability xmlns:sia="http://www.ivoa.net/xml/SIA/v1.0" standardID="ivo://ivoa.net/std/SIA" xsi:type="sia:SimpleImageAccess"> <interface xsi:type="vs:ParamHTTP"> <accessURL use="base">http://astrogrid.ast.cam.ac.uk/iphas/siap-atlas/queryImage?</accessURL> </interface> <imageServiceType>Pointed</imageServiceType> <maxQueryRegionSize> <long>360</long> <lat>360</lat> </maxQueryRegionSize> <maxImageExtent> <long>360</long> <lat>360</lat> </maxImageExtent> <maxImageSize> <long>4096</long> <lat>4096</lat> </maxImageSize> <maxFileSize>16800000</maxFileSize> <maxRecords>15000</maxRecords> </capability> </ri:Resource> </pre><dl> <dt>XMLRPC:</dt><dd> will return a string containing the xml document</dd></dl>" name="getResourceXML" >
      • <return description="xml document of the registry entry - a <tt>Resource</tt> document in the <tt>http://www.ivoa.net/xml/VOResource/v1.0</tt> namespace" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="resource identifier or endpoint URL of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="identifier of the registry resource to retrieve. e.g.<tt>ivo://uk.ac.cam.ast/IPHAS/images/SIAP</tt>" name="id" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Retrieve a named resource from a registry. For most uses, it's better to use this method instead of <tt>getResourceXML</tt>, because the result is easier to work with.<dl> <dt>XMLRPC:</dt><dd> will return a struct. See <tt>Resource</tt> for details of keys</dd></dl>" name="getResource" >
      • <return description="a datastructue representing the registry entry - will be a <tt>Resource</tt> or one of it's subclasses depending on the registry entry type." type="org.astrogrid.acr.ivoa.resource.Resource" uitype="Resource" />
      • <param description="resource identifier or endpoint URL of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="identifier of the registry entry to retrieve" name="id" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Search a registry using an XQuery, returning results as XML. <p /> This method can accept an arbitrary XQuery, unlike <tt>xquerySearch(URI, String)</tt>, which requires that the XQuery return a list of VOResource elements. <pre><b>Example: </b> "Python Example" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this function xquery =""" <ssap-wavebands> { (:find all spectral services :) let $ssap := //vor:Resource[capability/@standardID="ivo://ivoa.net/std/SSA"] (: find the distinct set of wavebands these services cover (no duplicates) :) for $waveband in distinct-values($ssap/coverage/waveband) order by $waveband (: print each waveband in turn :) return <band name="{data($waveband)</pre>"> { (: list IDs of all services that cover this band :) for $r in $ssap[coverage/waveband=$waveband] return $r/identifier } </band> } </ssap-wavebands> """ regEndpoint = "http://www.my.registry.endpoint" xml = ar.ivoa.externalRegistry.xquerySearchXML(regEndpoint,xquery) } This will return the following result <pre> <ssap-wavebands> <band name="EUV"> <identifier>ivo://iap.fr/FUSE/SSA</identifier> <identifier>ivo://www.g-vo.org/ssa.service.tmap</identifier> </band> <band name="Infrared"> <identifier>ivo://archive.eso.org/ESO-SAF-SSAP</identifier> <identifier>ivo://basebe.obspm.fr/bess0.1</identifier> ... </band> <band name="Millimeter"> <identifier>ivo://svo.laeff/models/dalessio</identifier> <identifier>ivo://voparis.obspm.gepi/BeStars/BeSS/SSAP</identifier> </band> <band name="Optical"> <identifier>ivo://archive.eso.org/ESO-SAF-SSAP</identifier> <identifier>ivo://basebe.obspm.fr/bess0.1</identifier> ... </band> <band name="Radio"> <identifier>ivo://obspm.fr/SSA_HIG</identifier> <identifier>ivo://voparis.obspm.gepi/BeStars/BeSS/SSAP</identifier> </band> <band name="UV"> <identifier>ivo://archive.eso.org/ESO-SAF-SSAP</identifier> <identifier>ivo://basebe.obspm.fr/bess0.1</identifier> ... </band> <band name="X-ray"> <identifier>ivo://svo.iaa/models/SSP/Xray</identifier> <identifier>ivo://www.g-vo.org/ssa.service.tmap</identifier> </band> </ssap-wavebands> </pre><dl> <dt>Note:</dt><dd> The XML view in VOExplorer is useful for constructing new XQueries. Enable it by <tt>Preferences > System > Show Advanced Features</tt></dd> <dt>XMLRPC:</dt><dd> will return the string representation of the xml document.</dd> <dt>See:</dt><dd> <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, </dd></dl>" name="xquerySearchXML" >
      • <return description="the result of executing this xquery over the specified registry - a document of arbitrary structure." type="org.w3c.dom.Document" uitype="XML" />
      • <param description="resource identifier or endpoint URL of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="the query to perform. Must return a well-formed xml document - i.e. starting with a single root element." name="xquery" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Search a registry using an XQuery. <p /> <blockquote><b>Warning: </b>This method returns an array of matching <tt>Resource</tt> objects - so the XQuery used must produce whole <tt>VOResource</tt> elements</blockquote> <pre><b>Example: </b> "Python Example" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this function xquery ="//vor:Resource[@xsi:type &= '*DataCollection']" regEndpoint = "http://www.my.registry.endpoint" rs = ar.ivoa.externalRegistry.xquerySearch(regEndpoint,xquery) </pre> The above XQuery could be written in a longer equivalent form, which is convenient when there are many filter clauses: <pre> for $r in //vor:Resource where $r/@xsi:type &= '*DataCollection' return $r </pre><dl> <dt>Note:</dt><dd> The XML view in VOExplorer is useful for constructing new XQueries. Enable it by <tt>Preferences > System > Show Advanced Features</tt></dd> <dt>XMLRPC:</dt><dd> will return an array of struct. See <tt>Resource</tt> for details of keys</dd> <dt>See:</dt><dd> <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, </dd></dl>" name="xquerySearch" >
      • <return description="an array containing any registry records present in the query result." type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="resource identifier or endpoint URL of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      • <param description="An XQuery that should return a document, or nodeset, containing whole <tt><Resource></tt> elements. Results are not required to be single-rooted, and resource elements may be embedded within other elements - although the parser will fail in extreme cases." name="xquery" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Access the resource describing a registry itself, as an XML Document.<dl> <dt>XMLRPC:</dt><dd> will return the string representation of the xml document.</dd> <dt>See:</dt><dd> #getResourceXML(URI, URI) Example of registry resource XML, </dd></dl>" name="getIdentityXML" >
      • <return description="that registry's own service description - a single Resource documnt" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="resource identifier or endpoint URL of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Access the resource describing a registry itself<dl> <dt>XMLRPC:</dt><dd> will return a struct. See <tt>Resource</tt> for details of keys</dd></dl>" name="getIdentity" >
      • <return description="that registry's own service description" type="org.astrogrid.acr.ivoa.resource.RegistryService" uitype="RegistryService" />
      • <param description="resource identifier or endpoint URL of the registry to connect to" name="registry" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Build an array of resource objects from an XML document." name="buildResources" >
      • <return description="the parsed resource objects" type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="an xml document of resources, for example one returned from a call to <tt>keywordSearchXML(URI, String, boolean)</tt>" name="doc" type="org.w3c.dom.Document" uitype="XML" />
      </method>
    • <method description="<b>Deprecated: </b>registry of registries does not provide a search interface<p /> " excluded="true" name="getRegistryOfRegistriesEndpoint" >
      • <return description="always null" type="java.net.URI" uitype="URI" />
      </method>
    </component>
  • <component description="AR Service: Query the system-configured Registry. AstroRuntime uses an IVOA-compliant registry to retrieve details of available resources - servers, applications, catalogues, etc. <p/> This component provides a range of different methods to search the registry. The most convenient is to use the <tt>search(String)</tt> method, which accepts a simple query in the form used by VOExplorer's smart-lists. <p/> The endpoint of this registry service can be inspected by calling <tt>getSystemRegistryEndpoint()</tt>. In cases where this service is unavailable, registry queries will automatically fall-back to the backup registry service, whose endpoint is defined by <tt>getFallbackSystemRegistryEndpoint()</tt>. The query functions in this interface are the equivalent to their counterparts in the <tt>ExternalRegistry</tt> interface, but operate against the System and Fallback registries. <blockquote><b>Note: </b>These endpoints can be altered by using the UI preferences pane, or the web interface, or via commandline properties, or programmatically using the <tt>Configuration</tt> service.</blockquote><dl> <dt>See:</dt><dd> <a href="http://www.ivoa.net/Documents/latest/IDs.html">IVOA Identifiers</a>, <a href="http://www.ivoa.net/Documents/latest/VOResource.html">IVOA VOResource Definition</a>, <a href='http://www.ivoa.net/Documents/latest/RegistryInterface.html'>IVOA Registry Interface Standard</a>, <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, ExternalRegistry External Registry - fuller interface to an arbitrary registry, </dd></dl>" interface-class="org.astrogrid.acr.ivoa.Registry" name="registry" >
    • <method description="Perform a search using the query language used by VOExplorer SmartLists (SRQL) <p/> <pre><b>Example: </b> "Search for IR Redshift resources (Python)" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this function rs = ar.ivoa.registry.search("ucd = redshift AND waveband = infrared") #see what we've got print len(rs) #list first 10 identifiers for r in rs[:10]: print r['id'] </pre> The output is <pre> 109 ivo://CDS.VizieR/J/ApJ/655/51 ivo://CDS.VizieR/J/ApJ/653/1004 ivo://CDS.VizieR/J/ApJ/649/63 ivo://CDS.VizieR/J/ApJ/634/128 ivo://CDS.VizieR/J/AJ/117/102 ivo://CDS.VizieR/J/AN/329/418 ivo://CDS.VizieR/J/ApJS/166/470 ivo://CDS.VizieR/VII/173 ivo://CDS.VizieR/VII/157 ivo://CDS.VizieR/J/other/PBeiO/18.7 </pre><dl> <dt>Equivalent To:</dt><dd><tt> xquerySearch(toXQuery(srql))</tt></dd> <dt>See:</dt><dd> <a href='http://eurovotech.org/twiki/bin/view/VOTech/SimpleRegistryQueryLanguage'>SRQL Language Description</a>, </dd></dl>" name="search" >
      • <return description="list of matching resources" type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="query to perform" name="srql" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Perform an ADQL/x registry search, return a list of matching resources<dl> <dt>Warning:</dt><dd> The ADQL support is poorly defined in the registry standard, and implementations vary. We recommend using XQuery or keyword searching wherever possible.</dd> <dt>See:</dt><dd> ExternalRegistry#adqlxSearch, </dd></dl>" excluded="true" name="adqlxSearch" >
      • <return description="" type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="" name="adqlx" type="org.w3c.dom.Document" uitype="XML" />
      </method>
    • <method description="Perform an ADQL/s registry search, return a list of matching resources.<dl> <dt>Warning:</dt><dd> The ADQL support is poorly defined in the registry standard, and implementations vary. We recommend using XQuery or keyword searching wherever possible.</dd> <dt>See:</dt><dd> ExternalRegistry#adqlsSearch, </dd></dl>" excluded="true" name="adqlsSearch" >
      • <return description="a list of matching resources" type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="a string query (string form of ADQL)" name="adqls" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Perform a keyword search. <p/> {@example "Python Example" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this function rs = ar.ivoa.registry.keywordSearch("abell",False) #see what we've got print len(rs) #list first 10 identifiers for r in rs[:10] print r['id']: </pre> The output is <pre> 150 ivo://CDS.VizieR/J/A+A/486/755 ivo://uk.ac.le.star.tmpledas/ledas/ledas/abell ivo://nasa.heasarc/wblgalaxy ivo://nasa.heasarc/wbl ivo://nasa.heasarc/twosigma ivo://nasa.heasarc/rassebcs ivo://nasa.heasarc/noras ivo://nasa.heasarc/eingalclus ivo://nasa.heasarc/abell ivo://CDS.VizieR/VII/96 </pre>" name="keywordSearch" >
      • <return description="list of matching resources." type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="space separated list of keywords to search for" name="keywords" type="java.lang.String" uitype="String" />
      • <param description="- true to 'OR' together matches. false to 'AND' together matches" name="orValues" type="boolean" uitype="boolean" />
      </method>
    • <method description="Translate a SRQL query (as used by VOExplorer SmartLists) into an equivalent XQuery<dl> <dt>See:</dt><dd> <a href='http://eurovotech.org/twiki/bin/view/VOTech/SimpleRegistryQueryLanguage'>SRQL Language Description</a>, </dd></dl>" name="toXQuery" >
      • <return description="the equivalent XQuery" type="java.lang.String" uitype="String" />
      • <param description="the query to translate" name="srql" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Retrieve a named resource from the registry.<dl> <dt>XMLRPC:</dt><dd> will return a struct. See <tt>Resource</tt> for details of keys</dd></dl>" name="getResource" >
      • <return description="a datastructure representing the registry entry - will be a <tt>Resource</tt> or one of it's subclasses depending on the registry entry type." type="org.astrogrid.acr.ivoa.resource.Resource" uitype="Resource" />
      • <param description="identifier of the registry resource to retrieve. e.g.<tt>ivo://uk.ac.cam.ast/IPHAS/images/SIAP</tt>" name="id" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Search the registry using an XQuery. <p/> <blockquote><b>Warning: </b>This method returns an array of matching <tt>Resource</tt> objects - so the XQuery used must produce whole <tt>VOResource</tt> elements</blockquote> <pre><b>Example: </b> "Python Example" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this function xquery ="//vor:Resource[@xsi:type &= '*DataCollection']" rs = ar.ivoa.registry.xquerySearch(xquery) </pre> The above XQuery could be written in a longer equivalent form, which is convenient when there are many filter clauses: <pre> for $r in //vor:Resource where $r/@xsi:type &= '*DataCollection' return $r </pre><dl> <dt>Note:</dt><dd> The XML view in VOExplorer is useful for constructing new XQueries. Enable it by <tt>Preferences > System > Show Advanced Features</tt></dd> <dt>XMLRPC:</dt><dd> will return an array of struct. See <tt>Resource</tt> for details of keys</dd> <dt>See:</dt><dd> <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, Dal#getRegistryXQuery() Dal.getRegistryXQuery() - produces XQueries to list all DAL services., </dd></dl>" name="xquerySearch" >
      • <return description="an array containing any registry records present in the query result." type="org.astrogrid.acr.ivoa.resource.Resource[]" uitype="Resource[]" />
      • <param description="An XQuery that should return a document, or nodeset, containing whole <tt><Resource></tt> elements. Results are not required to be single-rooted, and resource elements may be embedded within other elements - although the parser will fail in extreme cases." name="xquery" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Search the registry using an XQuery, returning results as XML. <p /> This method can accept an arbitrary XQuery, unlike <tt>xquerySearch(String)</tt>, which requires that the XQuery return a list of VOResource elements. <pre><b>Example: </b> "Python Example" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this function xquery =""" <ssap-wavebands> { (:find all spectral services :) let $ssap := //vor:Resource[capability/@standardID="ivo://ivoa.net/std/SSA"] (: find the distinct set of wavebands these services cover (no duplicates) :) for $waveband in distinct-values($ssap/coverage/waveband) order by $waveband (: print each waveband in turn :) return <band name="{data($waveband)</pre>"> { (: list IDs of all services that cover this band :) for $r in $ssap[coverage/waveband=$waveband] return $r/identifier } </band> } </ssap-wavebands> """ xml = ar.ivoa.registry.xquerySearchXML(regEndpoint,xquery) } This will return the following result <pre> <ssap-wavebands> <band name="EUV"> <identifier>ivo://iap.fr/FUSE/SSA</identifier> <identifier>ivo://www.g-vo.org/ssa.service.tmap</identifier> </band> <band name="Infrared"> <identifier>ivo://archive.eso.org/ESO-SAF-SSAP</identifier> <identifier>ivo://basebe.obspm.fr/bess0.1</identifier> ... </band> <band name="Millimeter"> <identifier>ivo://svo.laeff/models/dalessio</identifier> <identifier>ivo://voparis.obspm.gepi/BeStars/BeSS/SSAP</identifier> </band> <band name="Optical"> <identifier>ivo://archive.eso.org/ESO-SAF-SSAP</identifier> <identifier>ivo://basebe.obspm.fr/bess0.1</identifier> ... </band> <band name="Radio"> <identifier>ivo://obspm.fr/SSA_HIG</identifier> <identifier>ivo://voparis.obspm.gepi/BeStars/BeSS/SSAP</identifier> </band> <band name="UV"> <identifier>ivo://archive.eso.org/ESO-SAF-SSAP</identifier> <identifier>ivo://basebe.obspm.fr/bess0.1</identifier> ... </band> <band name="X-ray"> <identifier>ivo://svo.iaa/models/SSP/Xray</identifier> <identifier>ivo://www.g-vo.org/ssa.service.tmap</identifier> </band> </ssap-wavebands> </pre><dl> <dt>Note:</dt><dd> The XML view in VOExplorer is useful for constructing new XQueries. Enable it by <tt>Preferences > System > Show Advanced Features</tt></dd> <dt>XMLRPC:</dt><dd> will return the string representation of the xml document.</dd> <dt>See:</dt><dd> <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, ExternalRegistry#getResourceXML(URI, URI) Example of registry resource XML, </dd></dl>" name="xquerySearchXML" >
      • <return description="the result of executing this xquery over the specified registry - a document of arbitrary structure." type="org.w3c.dom.Document" uitype="XML" />
      • <param description="the query to perform. Must return a well-formed xml document - i.e. starting with a single root element." name="xquery" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Access the resource that describing the system registry itself. <p /> This returned resource describes what search capabilities are provided by the registry<dl> <dt>See:</dt><dd> SearchCapability, ExternalRegistry#getIdentity, </dd></dl>" name="getIdentity" >
      • <return description="" type="org.astrogrid.acr.ivoa.resource.RegistryService" uitype="RegistryService" />
      </method>
    • <method description="Access the endpoint of the system registry" name="getSystemRegistryEndpoint" >
      • <return description="" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Access the endpoint of the fallback system registry" name="getFallbackSystemRegistryEndpoint" >
      • <return description="" type="java.net.URI" uitype="URI" />
      </method>
    </component>
  • <component description="AR Service: Query for <b>Images</b> from Simple Image Access Protocol (SIAP) services (DAL). <p /> <blockquote><b>Note: </b>This class provides functions to construct a DAL query. To execute that query, see the examples and methods in the <tt>Dal</tt> class. </blockquote> <h2>Example</h2> The following example constructs a query URL, performs the query, and then downloads the resulting images. See <tt>Dal</tt> for other things that can be done with a query URL. <pre><b>Example: </b> "Query a SIAP service and download images (Python)" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') siap = ar.ivoa.siap #take a reference to the AR SIAP component #the SIAP service to query (selected using voexplorer) service = "ivo://irsa.ipac/MAST-Scrapbook" #resolve an object name to a position pos = ar.cds.sesame.resolve('m54') #build a query query = siap.constructQuery(service,pos['ra'],pos['dec'],0.001) print "QueryURL",query #execute the query rows = siap.execute(query) #inspect what we've got. print "Rows Returned",len(rows) print "Metadata Keys",rows[0].keys() print "Image URLs" for r in rows : print r['AccessReference'] #download these datasets into current directory #compute url for current directory from urlparse import urlunsplit from os import getcwd currentDirURL = urlunsplit(['file','',getcwd(),'','']) print "Downloading images to",currentDirURL siap.saveDatasets(query,currentDirURL) </pre> The output from this script is shown below. The result is that 3 files (<tt>data-0.fits</tt>, <tt>data-1.fits</tt>, <tt>data-2.fits</tt>) are downloaded to the current directory. <blockquote><tt> QueryURL http://irsa.ipac.caltech.edu/cgi-bin/Atlas/nph-atlas?mission=Scrapbook&hdr_location=%5CScrapbookDataPath%5C&collection_desc=The+MAST+Image%2FSpectra+Scrapbook+%28Scrapbook%29&SIAP_ACTIVE=1&POS=283.7636667%2C-30.4785&SIZE=0.0010<br /> Rows Returned 3<br /> Metadata Keys ['Scale', 'crpix1', 'crpix2', 'Title', 'inst_id', 'cd2_1', 'ctype2', 'ctype1', 'cd2_2', 'DEC', 'size', 'RADAR', 'Format', 'naxis1', 'naxis2', 'object_id', 'MAST', 'bandpass_id', 'fname', '2mass_fits', 'Naxes', 'RA', 'mjd', 'AccessReference', 'crval2', 'crval1', 'bandpass_unit', 'Naxis', 'GIF', 'ra4', 'bandpass_lolimit', 'ra2', 'ra3', 'ra1', 'dec4', 'dec1', 'dec2', 'dec3', 'cd1_2', 'VOX:WCS_CDMatrix', 'cd1_1', 'data_id', '2mass_jpeg', 'bandpass_refvalue', 'bandpass_hilimit']<br /> Image URLs<br /> http://archive.stsci.edu/cgi-bin/hst_preview_search?imfmt=fits&name=U37GA405R<br /> http://archive.stsci.edu/cgi-bin/hst_preview_search?imfmt=fits&name=U37GA40CR<br /> http://archive.stsci.edu/cgi-bin/hst_preview_search?imfmt=fits&name=O5HJT3DYQ<br /> Downloading images to file:///Users/noel/Documents/workspace/python </tt></blockquote><dl> <dt>See:</dt><dd> Dal, <a href="http://www.ivoa.net/Documents/latest/SIA.html">IVOA SIAP Standard Document</a>, Sesame Sesame - resolves object names to RA,Dec positions, #getRegistryXQuery() getRegistryXQuery() - a query to list all SIAP Services., </dd></dl>" interface-class="org.astrogrid.acr.ivoa.Siap" name="siap" >
    • <method description="Construct a SIAP Query on Right Ascension, Declination and Search radius (decimal degrees)." name="constructQuery" >
      • <return description="A query URL. The query can then be performed by either <ul> <li> programmatically performing a HTTP GET on the query URL </li> <li> passing the query URL to one of the <tt>Dal</tt> <tt>execute</tt> methods - such as <tt>executeAndSave(URL, URI)</tt> </li> </ul>" type="java.net.URL" uitype="URL" />
      • <param description="Resource Identifier <i>or</i> URL of the Service to query. <i>Prefer providing a Resource Identifier, as this insulates against changes in service endpoint</i>. <blockquote><dl> <dt>Resource Identifier</dt><dd> The resource ID of the SIAP service to query, as returned by <tt>Resource#getId()</tt>. Example: <tt>ivo://nasa.heasarc/skyview/halpha</tt> <br/>The <tt>Registry</tt> will be queried to resolve the resource ID into a <tt>Resource</tt> object, from which the <tt>SiapCapability</tt> will be found, from which in turn the first <tt>AccessURL</tt> will be used. </dd> <dt>URL of the Service</dt><dd> The endpoint URL. Can be any <tt>http://</tt> URL. </dd> </dl></blockquote>" name="service" type="java.net.URI" uitype="URI" />
      • <param description="right ascension e.g <tt>6.950</tt>" name="ra" type="double" uitype="double" />
      • <param description="declination e.g. <tt>-1.6</tt>" name="dec" type="double" uitype="double" />
      • <param description="radius of cone e.g. <tt>0.1</tt>" name="size" type="double" uitype="double" />
      </method>
    • <method description="Construct a SIAP Query on Right Ascension, Declination, Search radius (decimal degrees), and Format." name="constructQueryF" >
      • <return description="A query URL. The query can then be performed by either <ul> <li> programmatically performing a HTTP GET on the query URL </li> <li> passing the query URL to one of the <tt>Dal</tt> <tt>execute</tt> methods - such as <tt>executeAndSave(URL, URI)</tt> </li> </ul>" type="java.net.URL" uitype="URL" />
      • <param description="Resource Identifier <i>or</i> URL of the Service to query. <i>Prefer providing a Resource Identifier, as this insulates against changes in service endpoint</i>. <blockquote><dl> <dt>Resource Identifier</dt><dd> The resource ID of the SIAP service to query, as returned by <tt>Resource#getId()</tt>. Example: <tt>ivo://nasa.heasarc/skyview/halpha</tt> <br/>The <tt>Registry</tt> will be queried to resolve the resource ID into a <tt>Resource</tt> object, from which the <tt>SiapCapability</tt> will be found, from which in turn the first <tt>AccessURL</tt> will be used. </dd> <dt>URL of the Service</dt><dd> The endpoint URL. Can be any <tt>http://</tt> URL. </dd> </dl></blockquote>" name="service" type="java.net.URI" uitype="URI" />
      • <param description="right ascension e.g <tt>6.950</tt>" name="ra" type="double" uitype="double" />
      • <param description="declination e.g. <tt>-1.6</tt>" name="dec" type="double" uitype="double" />
      • <param description="radius of cone e.g. <tt>0.1</tt>" name="size" type="double" uitype="double" />
      • <param description="format of images e.g. <tt>FITS</tt>" name="format" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Construct a SIAP Query on Right Ascension, Declination, and Search area in RA and Dec" name="constructQueryS" >
      • <return description="A query URL. The query can then be performed by either <ul> <li> programmatically performing a HTTP GET on the query URL </li> <li> passing the query URL to one of the <tt>Dal</tt> <tt>execute</tt> methods - such as <tt>executeAndSave(URL, URI)</tt> </li> </ul>" type="java.net.URL" uitype="URL" />
      • <param description="Resource Identifier <i>or</i> URL of the Service to query. <i>Prefer providing a Resource Identifier, as this insulates against changes in service endpoint</i>. <blockquote><dl> <dt>Resource Identifier</dt><dd> The resource ID of the SIAP service to query, as returned by <tt>Resource#getId()</tt>. Example: <tt>ivo://nasa.heasarc/skyview/halpha</tt> <br/>The <tt>Registry</tt> will be queried to resolve the resource ID into a <tt>Resource</tt> object, from which the <tt>SiapCapability</tt> will be found, from which in turn the first <tt>AccessURL</tt> will be used. </dd> <dt>URL of the Service</dt><dd> The endpoint URL. Can be any <tt>http://</tt> URL. </dd> </dl></blockquote>" name="service" type="java.net.URI" uitype="URI" />
      • <param description="right ascension e.g <tt>6.950</tt>" name="ra" type="double" uitype="double" />
      • <param description="declination e.g. <tt>-1.6</tt>" name="dec" type="double" uitype="double" />
      • <param description="size of <tt>ra</tt> e.g. <tt>0.1</tt>" name="ra_size" type="double" uitype="double" />
      • <param description="size of <tt>dec</tt> e.g. <tt>0.2</tt>" name="dec_size" type="double" uitype="double" />
      </method>
    • <method description="Construct a SIAP Query on Right Ascension, Declination, Search area in RA and Dec, and Format." name="constructQuerySF" >
      • <return description="A query URL. The query can then be performed by either <ul> <li> programmatically performing a HTTP GET on the query URL </li> <li> passing the query URL to one of the <tt>Dal</tt> <tt>execute</tt> methods - such as <tt>executeAndSave(URL, URI)</tt> </li> </ul>" type="java.net.URL" uitype="URL" />
      • <param description="Resource Identifier <i>or</i> URL of the Service to query. <i>Prefer providing a Resource Identifier, as this insulates against changes in service endpoint</i>. <blockquote><dl> <dt>Resource Identifier</dt><dd> The resource ID of the SIAP service to query, as returned by <tt>Resource#getId()</tt>. Example: <tt>ivo://nasa.heasarc/skyview/halpha</tt> <br/>The <tt>Registry</tt> will be queried to resolve the resource ID into a <tt>Resource</tt> object, from which the <tt>SiapCapability</tt> will be found, from which in turn the first <tt>AccessURL</tt> will be used. </dd> <dt>URL of the Service</dt><dd> The endpoint URL. Can be any <tt>http://</tt> URL. </dd> </dl> </blockquote>" name="service" type="java.net.URI" uitype="URI" />
      • <param description="right ascension e.g <tt>6.950</tt>" name="ra" type="double" uitype="double" />
      • <param description="declination e.g. <tt>-1.6</tt>" name="dec" type="double" uitype="double" />
      • <param description="size of <tt>ra</tt> e.g. <tt>0.1</tt>" name="ra_size" type="double" uitype="double" />
      • <param description="size of <tt>dec</tt> e.g. <tt>0.2</tt>" name="dec_size" type="double" uitype="double" />
      • <param description="format of images <tt>FITS</tt>" name="format" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Add an additional option to a previously constructed query. <p/> Sometimes neccessary, for some DAL protocols, to provide optional query parameters." name="addOption" >
      • <return description="<tt>query</tt> with the option appended." type="java.net.URL" uitype="URL" />
      • <param description="the query url" name="query" type="java.net.URL" uitype="URL" />
      • <param description="name of the option to add" name="optionName" type="java.lang.String" uitype="String" />
      • <param description="value for the new option" name="optionValue" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Execute a DAL query, returning a datastructure<dl> <dt>Note:</dt><dd> When querying a SIAP service, the result uses keys drawn from the SIAP dataset datamodel</dd></dl>" name="execute" >
      • <return description="The service response parsed as a list of of rows. Each row is represented is a map between UCD or datamodel keys and values from the response" type="java.util.Map[]" uitype="Map[]" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="Execute a DAL query, returning a Votable document.<dl> <dt>Note:</dt><dd> This is a convenience method that just performs a 'GET' on the query url. Many programming languages support this functionality internally.</dd></dl>" name="executeVotable" >
      • <return description="a votable document." type="org.w3c.dom.Document" uitype="XML" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="<b>Deprecated: </b>- use executeVotable()<p /> " excluded="true" name="getResults" >
      • <return description="" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="" name="url" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="Execute a DAL query and save the resulting document.<dl> <dt>Note:</dt><dd> in the case of saving to myspace, the myspace server performs the query - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="executeAndSave" >
      • <return description="" type="java.lang.Void" uitype="void" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location to save result document - For example a <tt>file:/</tt>, <tt>ivo://</tt> (myspace), <tt>ftp://</tt> location" name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="<b>Deprecated: </b>- use executeAndSave()<p /> " excluded="true" name="saveResults" >
      • <return description="" type="java.lang.Void" uitype="void" />
      • <param description="" name="url" type="java.net.URL" uitype="URL" />
      • <param description="" name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Execute a DAL query, and save the datasets referenced by the response. <p /> Applies to those DAL protocols (<tt>Siap</tt>, <tt>Ssap</tt>, <tt>Stap</tt>) where the response points to external data files.<dl> <dt>Note:</dt><dd> In the case of saving to myspace or vospace, the myspace server performs the query and dataset download - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Siap Example of Use, Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="saveDatasets" >
      • <return description="number of datasets saved." type="int" uitype="int" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location of a directory in which to save the datasets. May be any of the filesystem types listed in <tt>Systems#listSchemes()</tt>." name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Execute a DAL query, and save a subset of the datasets referenced by the response. <p /> Applies to those DAL protocols (<tt>Siap</tt>, <tt>Ssap</tt>, <tt>Stap</tt>) where the response points to external data files.<dl> <dt>Note:</dt><dd> in the case of saving to myspace or vospace, the myspace server performs the query and dataset download - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="saveDatasetsSubset" >
      • <return description="number of datasets saved." type="int" uitype="int" />
      • <param description="the DAL query" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location of a directory in which to save the datasets. May be any of the filesystem types listed in <tt>Systems#listSchemes()</tt>." name="saveLocation" type="java.net.URI" uitype="URI" />
      • <param description="list of Integers - indexes of the rows in the query response for which to save the dataset. (0= first row)" name="rows" type="java.util.List" uitype="List" />
      </method>
    • <method description="Returns a SRQL query that, when passed to the registry, will return all know services of that type. <br/> can be used as a starting point for filters, etc. <blockquote><b>Warning: </b>In the case of <tt>Cone</tt> the registry query will return far too many to be useful - it is necessary to use this xquery as a starting point for building a more tightly-constrained query.</blockquote> <pre><b>Example: </b> "Example of querying for cone services related to 'dwarf'" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this method to get a query to list all Cone-search services. coneQuery = ar.ivoa.cone.getRegistryQuery() #combine it into a more tightly contrained query myQuery = coneQuery + ' and subject=dwarf' # perform the query rs = ar.ivoa.registry.searcg(myQuery) #inspect the results print len(rs) for r in rs: print r['id'] </pre><dl> <dt>See:</dt><dd> <a href='http://eurovotech.org/twiki/bin/view/VOTech/SimpleRegistryQueryLanguage'>SRQL Language Description</a>, #getRegistryXQuery() alternative that returns an XQuery, </dd></dl>" name="getRegistryQuery" >
      • <return description="a SRQL query string" type="java.lang.String" uitype="String" />
      </method>
    • <method description="<b>Deprecated: </b><p /> helper method - returns an ADQL/s query that should be passed to a registry to list all available DAL services of this type. <br/> can be used as a starting point for filters, etc." excluded="true" name="getRegistryAdqlQuery" >
      • <return description="an adql query string" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Return an XQuery that, when passed to the registry, will return all known services of that type. <blockquote><b>Warning: </b>In the case of <tt>Cone</tt> the registry query will return far too many to be useful - it is necessary to use this xquery as a starting point for building a more tightly-constrained query.</blockquote> <pre><b>Example: </b> "Example of querying for cone services related to 'dwarf'" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this method to get a query to list all Cone-search services. coneQuery = ar.ivoa.cone.getRegistryXQuery() #combine it into a more tightly contrained query myQuery = "let $cq := " + coneQuery + """ for $r in $cq where contains($r/content/subject,'dwarf') return $r """ # perform the query rs = ar.ivoa.registry.xquerySearch(myQuery) #inspect the results print len(rs) for r in rs: print r['id'] </pre> the output of this script is <pre> 2 ivo://nasa.heasarc/rasswd ivo://nasa.heasarc/mcksion </pre><dl> <dt>See:</dt><dd> #getRegistryQuery() alternative that returns a SRQL query., <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, </dd></dl>" name="getRegistryXQuery" >
      • <return description="an xquery string" type="java.lang.String" uitype="String" />
      </method>
    </component>
  • <component description="AR Service: Query for <b>Spectra</b> from Simple Spectral Access Protool (SSAP) Services (DAL). <p /> <blockquote><b>Note: </b>This class provides functions to construct a DAL query. To execute that query, see the examples and methods in the <tt>Dal</tt> class. </blockquote> <h2>Example</h2> The following example constructs a query URL, performs the query, and then downloads the first three spectra. See <tt>Dal</tt> for other things that can be done with a query URL. <pre><b>Example: </b> "Query a SSAP service and download a subset of spectra (Python)" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') ssap = ar.ivoa.ssap #take a reference to the AR SSAP component #the SSAP service to query (selected using voexplorer) service = "ivo://archive.eso.org/ESO-SAF-SSAP" #resolve an object name to a position pos = ar.cds.sesame.resolve('m1') #build a query query = ssap.constructQuery(service,pos['ra'],pos['dec'],0.005) print "QueryURL",query #execute the query rows = ssap.execute(query) #inspect what we've got. print "Rows Returned",len(rows) print "Metadata Keys",rows[0].keys() #download first three datasets into current directory #compute url for current directory from urlparse import urlunsplit from os import getcwd currentDirURL = urlunsplit(['file','',getcwd(),'','']) print "Downloading images to",currentDirURL ssap.saveDatasetsSubset(query,currentDirURL,[0,1,2]) </pre> The output of this script is shown below. <blockquote><tt> QueryURL http://archive.eso.org/apps/ssaserver/EsoProxySsap?POS=83.6332083%2C22.0144722&SIZE=0.0050&REQUEST=queryData <br /> Rows Returned 63<br /> Metadata Keys ['meta.bib.bibcode', 'SpectralLocation', 'time.duration;obs.exposure', 'meta.display.url', 'pos.eq', 'AssocID', 'time;meta.dataset', 'meta.id;obs.seq', 'SpectralAxisUnit', 'TimeCalibration', 'meta.code.class;obs', 'meta.ref.url', 'FluxCalibration', 'time.duration;obs', 'instr.fov', 'FovRef', 'Format', 'PublisherDate', 'Collection', 'meta.id;meta.dataset', 'meta.curation', 'meta.id;obs', 'DataLength', 'FluxAxisUnit', 'DatasetType', 'pos.eq.ra;meta.main', 'meta.id;instr', 'meta.title;obs.proposal', 'instr.bandwidth', 'meta.code.class;obs.param', 'time.start;obs', 'time.epoch', 'meta.version;meta.dataset', 'pos.eq.dec;meta.main', 'SpectralCalibration', 'instr.bandpass', 'time.equinox;pos.frame', 'PosAngle', 'meta.title;meta.dataset', 'Creator', 'meta.code.class', 'em;stat.min', 'CreationType', 'instr.setup', 'SpatialCalibration', 'meta.code.class;instr.setup', 'meta.id;src', 'SpaceFrameName', 'meta.code;obs.proposal', 'em;stat.max', 'DataSource', 'meta.id.PI', 'time.end;obs', 'DataModel', 'meta.id;instr.tel']<br /> Downloading images to file:///Users/noel/Documents/workspace/python </tt></blockquote><dl> <dt>See:</dt><dd> Dal, Sesame Sesame - resolves object names to RA,Dec positions, #getRegistryXQuery() getRegistryXQuery() - a query to list all SSAP Services., <a href='http://www.ivoa.net/Documents/latest/SSA.html'>IVOA SSAP Standard Document</a>, </dd></dl>" interface-class="org.astrogrid.acr.ivoa.Ssap" name="ssap" >
    • <method description="Construct a SSAP Query on Right Ascension, Declination and Search radius (decimal degrees)." name="constructQuery" >
      • <return description="A query URL. The query can then be performed by either <ul> <li> programmatically performing a HTTP GET on the query URL </li> <li> passing the query URL to one of the <tt>Dal</tt> <tt>execute</tt> methods - such as <tt>executeAndSave(URL, URI)</tt> </li> </ul>" type="java.net.URL" uitype="URL" />
      • <param description="Resource Identifier <i>or</i> URL of the Service to query. <i>Prefer providing a Resource Identifier, as this insulates against changes in service endpoint</i>. <blockquote><dl> <dt>Resource Identifier</dt><dd> The resource ID of the SSAP service to query, as returned by <tt>Resource#getId()</tt>. Example: <tt>ivo://archive.eso.org/ESO-SAF-SSAP</tt> <br/>The <tt>Registry</tt> will be queried to resolve the resource ID into a <tt>Resource</tt> object, from which the <tt>SsapCapability</tt> will be found, from which in turn the first <tt>AccessURL</tt> will be used. </dd> <dt>URL of the Service</dt><dd> The endpoint URL. Can be any <tt>http://</tt> URL. </dd> </dl></blockquote>" name="service" type="java.net.URI" uitype="URI" />
      • <param description="right ascension e.g <tt>6.950</tt>" name="ra" type="double" uitype="double" />
      • <param description="declination e.g. <tt>-1.6</tt>" name="dec" type="double" uitype="double" />
      • <param description="radius of cone e.g. <tt>0.1</tt>" name="size" type="double" uitype="double" />
      </method>
    • <method description="Construct a SSAP Query on Right Ascension, Declination, and Search area in RA and Dec" name="constructQueryS" >
      • <return description="A query URL. The query can then be performed by either <ul> <li> programmatically performing a HTTP GET on the query URL </li> <li> passing the query URL to one of the <tt>Dal</tt> <tt>execute</tt> methods - such as <tt>executeAndSave(URL, URI)</tt> </li> </ul>" type="java.net.URL" uitype="URL" />
      • <param description="Resource Identifier <i>or</i> URL of the Service to query. <i>Prefer providing a Resource Identifier, as this insulates against changes in service endpoint</i>. <blockquote><dl> <dt>Resource Identifier</dt><dd> The resource ID of the SSAP service to query, as returned by <tt>Resource#getId()</tt>. Example: <tt>ivo://archive.eso.org/ESO-SAF-SSAP</tt> <br/>The <tt>Registry</tt> will be queried to resolve the resource ID into a <tt>Resource</tt> object, from which the <tt>SsapCapability</tt> will be found, from which in turn the first <tt>AccessURL</tt> will be used. </dd> <dt>URL of the Service</dt><dd> The endpoint URL. Can be any <tt>http://</tt> URL. </dd> </dl></blockquote>" name="service" type="java.net.URI" uitype="URI" />
      • <param description="right ascension e.g <tt>6.950</tt>" name="ra" type="double" uitype="double" />
      • <param description="declination e.g. <tt>-1.6</tt>" name="dec" type="double" uitype="double" />
      • <param description="size of <tt>ra</tt> e.g. <tt>0.1</tt>" name="ra_size" type="double" uitype="double" />
      • <param description="size of <tt>dec</tt> e.g. <tt>0.2</tt>" name="dec_size" type="double" uitype="double" />
      </method>
    • <method description="Add an additional option to a previously constructed query. <p/> Sometimes neccessary, for some DAL protocols, to provide optional query parameters." name="addOption" >
      • <return description="<tt>query</tt> with the option appended." type="java.net.URL" uitype="URL" />
      • <param description="the query url" name="query" type="java.net.URL" uitype="URL" />
      • <param description="name of the option to add" name="optionName" type="java.lang.String" uitype="String" />
      • <param description="value for the new option" name="optionValue" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Execute a DAL query, returning a datastructure<dl> <dt>Note:</dt><dd> When querying a SIAP service, the result uses keys drawn from the SIAP dataset datamodel</dd></dl>" name="execute" >
      • <return description="The service response parsed as a list of of rows. Each row is represented is a map between UCD or datamodel keys and values from the response" type="java.util.Map[]" uitype="Map[]" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="Execute a DAL query, returning a Votable document.<dl> <dt>Note:</dt><dd> This is a convenience method that just performs a 'GET' on the query url. Many programming languages support this functionality internally.</dd></dl>" name="executeVotable" >
      • <return description="a votable document." type="org.w3c.dom.Document" uitype="XML" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="<b>Deprecated: </b>- use executeVotable()<p /> " excluded="true" name="getResults" >
      • <return description="" type="org.w3c.dom.Document" uitype="XML" />
      • <param description="" name="url" type="java.net.URL" uitype="URL" />
      </method>
    • <method description="Execute a DAL query and save the resulting document.<dl> <dt>Note:</dt><dd> in the case of saving to myspace, the myspace server performs the query - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="executeAndSave" >
      • <return description="" type="java.lang.Void" uitype="void" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location to save result document - For example a <tt>file:/</tt>, <tt>ivo://</tt> (myspace), <tt>ftp://</tt> location" name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="<b>Deprecated: </b>- use executeAndSave()<p /> " excluded="true" name="saveResults" >
      • <return description="" type="java.lang.Void" uitype="void" />
      • <param description="" name="url" type="java.net.URL" uitype="URL" />
      • <param description="" name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Execute a DAL query, and save the datasets referenced by the response. <p /> Applies to those DAL protocols (<tt>Siap</tt>, <tt>Ssap</tt>, <tt>Stap</tt>) where the response points to external data files.<dl> <dt>Note:</dt><dd> In the case of saving to myspace or vospace, the myspace server performs the query and dataset download - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Siap Example of Use, Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="saveDatasets" >
      • <return description="number of datasets saved." type="int" uitype="int" />
      • <param description="query url to execute" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location of a directory in which to save the datasets. May be any of the filesystem types listed in <tt>Systems#listSchemes()</tt>." name="saveLocation" type="java.net.URI" uitype="URI" />
      </method>
    • <method description="Execute a DAL query, and save a subset of the datasets referenced by the response. <p /> Applies to those DAL protocols (<tt>Siap</tt>, <tt>Ssap</tt>, <tt>Stap</tt>) where the response points to external data files.<dl> <dt>Note:</dt><dd> in the case of saving to myspace or vospace, the myspace server performs the query and dataset download - the data does not pass through the user's computer.</dd> <dt>See:</dt><dd> Systems#listSchemes() List of supported URI schemes for <tt>saveLocation</tt>, </dd></dl>" name="saveDatasetsSubset" >
      • <return description="number of datasets saved." type="int" uitype="int" />
      • <param description="the DAL query" name="query" type="java.net.URL" uitype="URL" />
      • <param description="location of a directory in which to save the datasets. May be any of the filesystem types listed in <tt>Systems#listSchemes()</tt>." name="saveLocation" type="java.net.URI" uitype="URI" />
      • <param description="list of Integers - indexes of the rows in the query response for which to save the dataset. (0= first row)" name="rows" type="java.util.List" uitype="List" />
      </method>
    • <method description="Returns a SRQL query that, when passed to the registry, will return all know services of that type. <br/> can be used as a starting point for filters, etc. <blockquote><b>Warning: </b>In the case of <tt>Cone</tt> the registry query will return far too many to be useful - it is necessary to use this xquery as a starting point for building a more tightly-constrained query.</blockquote> <pre><b>Example: </b> "Example of querying for cone services related to 'dwarf'" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this method to get a query to list all Cone-search services. coneQuery = ar.ivoa.cone.getRegistryQuery() #combine it into a more tightly contrained query myQuery = coneQuery + ' and subject=dwarf' # perform the query rs = ar.ivoa.registry.searcg(myQuery) #inspect the results print len(rs) for r in rs: print r['id'] </pre><dl> <dt>See:</dt><dd> <a href='http://eurovotech.org/twiki/bin/view/VOTech/SimpleRegistryQueryLanguage'>SRQL Language Description</a>, #getRegistryXQuery() alternative that returns an XQuery, </dd></dl>" name="getRegistryQuery" >
      • <return description="a SRQL query string" type="java.lang.String" uitype="String" />
      </method>
    • <method description="<b>Deprecated: </b><p /> helper method - returns an ADQL/s query that should be passed to a registry to list all available DAL services of this type. <br/> can be used as a starting point for filters, etc." excluded="true" name="getRegistryAdqlQuery" >
      • <return description="an adql query string" type="java.lang.String" uitype="String" />
      </method>
    • <method description="Return an XQuery that, when passed to the registry, will return all known services of that type. <blockquote><b>Warning: </b>In the case of <tt>Cone</tt> the registry query will return far too many to be useful - it is necessary to use this xquery as a starting point for building a more tightly-constrained query.</blockquote> <pre><b>Example: </b> "Example of querying for cone services related to 'dwarf'" # connect to the AR from xmlrpc import Server from os.path import expanduser ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc') #call this method to get a query to list all Cone-search services. coneQuery = ar.ivoa.cone.getRegistryXQuery() #combine it into a more tightly contrained query myQuery = "let $cq := " + coneQuery + """ for $r in $cq where contains($r/content/subject,'dwarf') return $r """ # perform the query rs = ar.ivoa.registry.xquerySearch(myQuery) #inspect the results print len(rs) for r in rs: print r['id'] </pre> the output of this script is <pre> 2 ivo://nasa.heasarc/rasswd ivo://nasa.heasarc/mcksion </pre><dl> <dt>See:</dt><dd> #getRegistryQuery() alternative that returns a SRQL query., <a href="http://www.w3schools.com/xquery/default.asp">XQuery Language Tutorial</a>, </dd></dl>" name="getRegistryXQuery" >
      • <return description="an xquery string" type="java.lang.String" uitype="String" />
      </method>
    </component>
  • <component description="Check availability of services. <p/> There's an upcoming standard IVOA standard for VOSI (VO Support Interfaces), which defines web-service methods that all services participating in the VO <i>should</i> implement. <p /> The most useful of these interfaces is <b>Availability</b>, which allows a client to check whether a service is functional, and be notified of any forthcoming service interruptions. <p /> This component provides availability information for services that support v0.4 of the VOSI standard, and will also make a best effort to provide basic availability information for services that support earlier versions of the VOSI standard (e.g. those that register a <tt>ivo://org.astrogrid/std/VOSI/v0.3#availability</tt> capability)<dl> <dt>See:</dt><dd> <a href='http://www.ivoa.net/cgi-bin/twiki/bin/view/IVOA/IvoaGridAndWebServices#Internal_Drafts'>VOSI Draft Specification</a>, </dd></dl>" interface-class="org.astrogrid.acr.ivoa.Vosi" name="vosi" >
    • <method description="Check the availability of a service." name="checkAvailability" >
      • <return description="a description of the service's availability. If the service fails to respond to the availabilitiy check, a bean will be returned which has <tt>available=false</tt>, which contains a description of the problem that was encountered." type="org.astrogrid.acr.ivoa.VosiAvailabilityBean" uitype="VosiAvailabilityBean" />
      • <param description="Resource ID of the service to query. The service have a VOSI Availability capability." name="serviceID" type="java.net.URI" uitype="URI" />
      </method>
    </component>
</acr-module>
Contribution to framework.preferences
<preference advanced="false" default-value="http://registry.astrogrid.org/astrogrid-registry/services/RegistryQueryv1_0" name="org.astrogrid.registry.query.endpoint" propagate-to-config="true" requires-restart="true" >
  • <ui-name >
    • Registry endpoint
    </ui-name>
  • <description >
    • http url of the main registry service
    </description>
  • <alternative >
    • http://alt.registry.astrogrid.org/astrogrid-registry/services/RegistryQueryv1_0
    </alternative>
  • <alternative >
    • http://msslxv.mssl.ucl.ac.uk:8080/mssl-registry/services/RegistryQueryv1_0
    </alternative>
  • <alternative >
    • http://harvesting-registry.roe.ac.uk/astrogrid-registry/services/RegistryQueryv1_0
    </alternative>
  • <alternative >
    • http://rakaposhi.star.le.ac.uk/astrogrid-registry/services/RegistryQueryv1_0
    </alternative>
  • <units >
    • url
    </units>
</preference>
<preference advanced="false" default-value="http://alt.registry.astrogrid.org/astrogrid-registry/services/RegistryQueryv1_0" name="org.astrogrid.registry.query.altendpoint" propagate-to-config="true" requires-restart="true" >
  • <ui-name >
    • Fallback Registry endpoint
    </ui-name>
  • <description >
    • http url of the main registry service
    </description>
  • <alternative >
    • http://registry.astrogrid.org/astrogrid-registry/services/RegistryQueryv1_0
    </alternative>
  • <alternative >
    • http://msslxv.mssl.ucl.ac.uk:8080/mssl-registry/services/RegistryQueryv1_0
    </alternative>
  • <alternative >
    • http://harvesting-registry.roe.ac.uk/astrogrid-registry/services/RegistryQueryv1_0
    </alternative>
  • <alternative >
    • http://rakaposhi.star.le.ac.uk/astrogrid-registry/services/RegistryQueryv1_0
    </alternative>
  • <units >
    • url
    </units>
</preference>
<preference default-value="86400" name="ivo.registry.cacheLife" requires-restart="true" >
  • <ui-name >
    • Cached entries expire after
    </ui-name>
  • <description >
    • 86400 seconds = a day, 604800 seconds = a week
    </description>
  • <units >
    • seconds
    </units>
</preference>
Contribution to hivemind.FactoryDefaults
<default symbol="registry.large.query.threshold" value="300" />
Contribution to hivemind.ObjectProviders
<provider prefix="cache" service-id="cache" />
Contribution to ivoa.caches
<cache diskPersistent="true" eternal="true" maxElementsInMemory="300" maxElementsOnDisk="5000" name="resources" overflowToDisk="true" registrySensitive="true" />
<cache diskPersistent="true" maxElementsInMemory="3" maxElementsOnDisk="20" name="documents" overflowToDisk="true" registrySensitive="true" timeToIdleSeconds="${ivo.registry.cacheLife}" timeToLiveSeconds="${ivo.registry.cacheLife}" />
<cache diskPersistent="true" maxElementsInMemory="1" maxElementsOnDisk="10" name="bulk" overflowToDisk="true" registrySensitive="true" timeToIdleSeconds="10" timeToLiveSeconds="10" />
<cache diskPersistent="true" maxElementsInMemory="3" maxElementsOnDisk="200" name="indexes" overflowToDisk="true" registrySensitive="true" timeToIdleSeconds="${ivo.registry.cacheLife}" timeToLiveSeconds="${ivo.registry.cacheLife}" />
Contribution to system.scheduledTasks
<object >
  • service:registry
</object>
Contribution to system.scheduledTasks
<object >
  • service:cache
</object>
Contribution to system.servletsIf:not (property ivoa.resource.servlet.disabled)
<servlet name="resource" path="/resource" servletClass="org.astrogrid.desktop.modules.ivoa.ResourceServlet" />
Contribution to system.vfsProviders
<provider implementation="service:vospacevfs" scheme="vos" />
Contribution to util.selftest
<object >
  • service-property:registry:selftest
</object>
Implementation for service ivoa.coneIf:property ivoa.cone.disabled
Implementation for service ivoa.externalRegistryIf:property ivoa.externalRegistry.disabled
Implementation for service ivoa.registryIf:property ivoa.registry.disabled
Implementation for service ivoa.siapIf:property ivoa.siap.disabled
Implementation for service ivoa.ssapIf:property ivoa.ssap.disabled

Back to master index