generated from ivoa-std/doc-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexamples-sample.html
72 lines (66 loc) · 2.56 KB
/
examples-sample.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.1">
<head>
<title>An Example for /examples</title>
</head>
<body vocab="http://www.ivoa.net/rdf/examples#">
<h1>An Example for /examples</h1>
<p>This document illustrates how to write a DALI-compliant examples
document using TAP's special table and query properties. Apart from the
actual examples blocks, you can add arbitrary additional material, for
instance, a table of contents:</p>
<ul id="toc">
<li>
<a href="#QueryforCALIFAobjectproperties"
>Query for CALIFA object properties</a>
</li>
<li>
<a href="#Queryagainstcoverage"
>Query against coverage</a>
</li>
</ul>
<p>Use the <a href="https://www.w3.org/2012/pyRdfa/Validator.html"
>W3C RDFa validator</a> to see what semantics your RDFa actually
conveys.</p>
<div typeof="example"
id="QueryforCALIFAobjectproperties"
resource="#QueryforCALIFAobjectproperties">
<h2 property="name">Query for CALIFA object properties</h2>
<p>This example shows how to combine the
<a href="/tableinfo/califadr3.objects">↗</a
><em property="table">califadr3.objects</em> table
of properties of CALIFA target galaxies with the
<a href="/tableinfo/califadr3.cubes">↗</a
><em class="dachs-ex-taptable" property="table">califadr3.cubes</em>
table of data cubes to select bright, early-type spirals:</p>
<pre class="dachs-ex-tapquery literal-block" property="query">
SELECT target_name, accref, hubtyp, magg
FROM califadr3.cubes
NATURAL JOIN califadr3.objects
WHERE hubtyp in ('S d', 'S cd', 'S c')
AND magg<13
</pre>
</div>
<div typeof="example"
id="Queryagainstcoverage"
resource="#Queryagainstcoverage">
<h2 property="name">Query against coverage</h2>
<p>When querying against geometric columns, in particular coverage,
use ADQL's contains or intersect functions, like this:</p>
<pre class="dachs-ex-tapquery literal-block" property="query">
SELECT accref, seeing
FROM cars.images
WHERE 1=INTERSECTS(coverage, circle('', 34, -4, 2))
ORDER BY seeing
</pre>
<p>Of course, this concerns all SIAP and SSAP tables
(<a href="/tableinfo/cars.images">↗</a
><em class="dachs-ex-taptable" property="table">cars.images</em> only
standing as an example here) as well as
<a href="/tableinfo/ivoa.obscore">↗</a
><em property="table">ivoa.obscore</em>
</p>
</div>
</body>
</html>