| Type | Wavelength | Keywords |
<query type="DataServiceQuery" user="{AST-user-identifier}">
<criteria>
<and>
<field name="xx" value=""/>
<field name="xx" value=""/>
<field name="xx" value=""/>
<field name="xx" value=""/>
<or>
<field name="xx" value=""/>
<field name="xx" value=""/>
</or>
</and>
</criteria>
</query>
or a template structure :
<query type="DataServiceQuery" user="{AST-user-identifier}">
<criteria>
<dataService>
<wavelengthshort>xxx</wavelengthshort>
<wavelengthlong>xxx</wavelengthlong>
<wavelengthrange>xxx</wavelengthrange>
<sensitivity>xxx</sensitivity>
<format>VOTABLE</format>
</dataService>
</criteria>
</query>
My XML is probably wrong, please correct and let me know.
Would be nice to tie this together with other queries in AstroGrid.
Create one AstroGrid query language, or at least a common query structure, with variants for querying the registry, MySace? and the datasets.
<results type="DataServiceQueryResponse">
<dataServiceList>
<dataService identifier="{AST-service-identifier}">
<wavelengthshort>xxx</wavelengthshort>
<wavelengthlong>xxx</wavelengthlong>
<wavelengthrange>xxx</wavelengthrange>
<sensitivity>xxx</sensitivity>
<format>VOTABLE</format>
</dataService>
<dataService identifier="{AST-service-identifier}">
<wavelengthshort>xxx</wavelengthshort>
<wavelengthlong>xxx</wavelengthlong>
<wavelengthrange>xxx</wavelengthrange>
<sensitivity>xxx</sensitivity>
<format>VOTABLE</format>
</dataService>
</dataServiceList>
</results>
<query type="DataServiceFieldQuery" user="{AST-user-identifier}">
<dataServiceList>
<dataService identifier="{AST-service-identifier}"/>
<dataService identifier="{AST-service-identifier}"/>
<dataService identifier="{AST-service-identifier}"/>
</dataServiceList>
</query>
<results type="DataServiceFieldQueryResponse">
<dataService identifier="{AST-service-identifier}">
<table name="" identifier="{AST-table-identifier}">
<display-name>xx</display-name>
<field type="UCD" identifier="{AST-field-identifier}">
<display-name>xx</display-name>
<type type="integer">
<units>xx</units>
<scale>xx</scale>
<max>xx</max>
<min>xx</min>
</type>
</field>
<field type="UCD" identifier="{AST-field-identifier}">
<display-name>xx</display-name>
<type type="enum">
<option ident="XX">
<display-name>xx</display-name>
</option>
<option ident="YY">
<display-name>yy</display-name>
</option>
<option ident="ZZ">
<display-name>zz</display-name>
</option>
</type>
</field>
</table>
</dataService>
<dataService ident="{AST-service-identifier}">
....
</dataService>
</results>
<!-- Suggested XML syntax for a database table query -->
<query type="AST-TableQuery">
<tables>
<table identifier="{AST-table-identifier}"/>
<table identifier="{AST-table-identifier}"/>
</tables>
<fields>
<field identifier="{AST-field-identifier}"/>
<field identifier="{AST-field-identifier}"/>
</fields>
<criteria>
<and>
<field identifier="{AST-field-identifier}" oper="LESS-THAN" value="50000"/>
<field identifier="{AST-field-identifier}" oper="GREATER-THAN" value="20000"/>
</and>
<and>
<or>
<field identifier="{AST-field-identifier}" oper="NOT-EQUAL" value="##"/>
<field identifier="{AST-field-identifier}" oper="IS-NULL"/>
</or>
</and>
</criteria>
</query>
<!-- Suggested XML syntax for a database cone search -->
<query type="AST-ConeSearch">
<tables>
<table identifier="{AST-table-identifier}"/>
<table identifier="{AST-table-identifier}"/>
</tables>
<fields>
<field identifier="{AST-field-identifier}"/>
<field identifier="{AST-field-identifier}"/>
</fields>
<criteria>
<cone ra="xxx" dec="yyy" radius="zzz">
</criteria>
</query>
<!--+
| Task to concatenate VOTable data
| In this example, the task concatenates the VOTable results from three database searches into one VOTable document.
| The three database queries are nested inside the <inputs> section of the concatenate task.
+-->
<task type="ConcatenateVOTABLEData" user="{AST-user-identifier}">
<!-- List of data inputs to concatenate -->
<inputs>
<!-- A query to a database service -->
<task type="Iter02DataQuery" dataset="{AST-service-identifier}" user="{AST-user-identifier}">
<!-- Suggested XML syntax for a database table query -->
<query type="AST-TableQuery">
<tables>
<table identifier="{AST-table-identifier}"/>
<table identifier="{AST-table-identifier}"/>
</tables>
<fields>
<field identifier="{AST-field-identifier}"/>
<field identifier="{AST-field-identifier}"/>
</fields>
<criteria>
<and>
<field identifier="{AST-field-identifier}" oper="LESS-THAN" value="50000"/>
<field identifier="{AST-field-identifier}" oper="GREATER-THAN" value="20000"/>
</and>
<and>
<or>
<field identifier="{AST-field-identifier}" oper="NOT-EQUAL" value="##"/>
<field identifier="{AST-field-identifier}" oper="IS-NULL"/>
</or>
</and>
</criteria>
</query>
</task>
<!-- A query to a database service -->
<task type="Iter02DataQuery" dataset="{AST-service-identifier}" user="{AST-user-identifier}">
<query type="AST-TableQuery">
<tables>
<table identifier="{AST-table-identifier}"/>
<table identifier="{AST-table-identifier}"/>
</tables>
<fields>
<field identifier="{AST-field-identifier}"/>
<field identifier="{AST-field-identifier}"/>
</fields>
<criteria>
<and>
<field identifier="{AST-field-identifier}" oper="LESS-THAN" value="50000"/>
<field identifier="{AST-field-identifier}" oper="GREATER-THAN" value="20000"/>
</and>
<and>
<or>
<field identifier="{AST-field-identifier}" oper="NOT-EQUAL" value="##"/>
<field identifier="{AST-field-identifier}" oper="IS-NULL"/>
</or>
</and>
</criteria>
</query>
</task>
<!-- A query to a database service -->
<task type="Iter02DataQuery" dataset="{AST-service-identifier}" user="{AST-user-identifier}">
<!-- Suggested XML syntax for a database cone search -->
<query type="AST-ConeSearch">
<tables>
<table identifier="{AST-table-identifier}"/>
<table identifier="{AST-table-identifier}"/>
</tables>
<fields>
<field identifier="{AST-field-identifier}"/>
<field identifier="{AST-field-identifier}"/>
</fields>
<criteria>
<cone ra="xxx" dec="yyy" radius="zzz">
</criteria>
</query>
</task>
</inputs>
<!-- Where to store the results -->
<output>
<task type="Iter02DataStore" user="{AST-user-identifier}">
<!-- Which data repository to store it in -->
<repository ident="{AST-service-identifier}">
<!-- Whos MySpace tostore the data under -->
<user ident="{AST-user-identifier}"/>
<!-- Where to store the data (optional depends on type of repository -->
<path>optional/path/internal/to/repository</path>
</repository>
</task>
</output>
</task>
<query type="JobEnquiry" user="{AST-user-identifier}">
<job ident="{AST-job-identifier}"/>
</query>
<results type="JobEnquiry">
<job ident="{AST-job-identifier}">
<status value="IN-PROGRESS">
......
</status>
</job>
</results>
When job completes, data is stored in users MySpace (internal to JobController?).
<query type="JobEnquiry" user="{AST-user-identifier}">
<job ident="{AST-job-identifier}"/>
</query>
<results type="JobEnquiry">
<job ident="{AST-job-identifier}">
<status value="COMPLETE">
......
</status>
<results>
<data-instance ident="{AST-data-instance}">
<service ident="{AST-service-identifier}"/>
<location>
optional internal identifier for the data
</location>
<format ident="{AST-data-format}"/>
</data-instance>
</results>
</job>
</results>
<data-instance ident="{AST-data-instance}">
<!-- Which service to get the data from -->
<service ident="{AST-service-identifier}"/>
<!-- What data to request -->
<identifier>repository service specific identifier for the data</identifier>
<!-- What the data contains, and what format it is in -->
<format ident="{AST-data-format}"/>
</data-instance>
In addition, either the repository or the MySpace service, needs to provide something that will resolve into a http url.
![]() |
Click here for the AstroGrid Service Web |
This is the AstroGrid Development Wiki |
|