1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
2 |
<html><head> |
3 |
|
4 |
|
5 |
|
6 |
|
7 |
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>VODML Parser</title></head><body> |
8 |
<h1>VODML Parser Service<br> |
9 |
</h1> |
10 |
|
11 |
<h2>Summary</h2> |
12 |
<h4>Service</h4> |
13 |
This web service transforms a VOTABLE into a variety of formats. |
14 |
The input table can contain the proposed VODML mapping syntax (<a href="https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/xsd/ext/VOTable-1.4_vodml.xsd" target="_blank">VOTable-1.4_vodml.xsd</a>). An <a href="https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/xsd/ext/VOTable-1.4_extvodml.xsd" target="_blank">alternate form of the xsd</a> uses "include" to access the VODML schema from a separate file.<br> |
15 |
<h4>Client</h4> |
16 |
In addition to the web service, the MAST Portal client can display the |
17 |
content of VODML annotated VOTABLEs. Use the link below to active |
18 |
that version of the MAST Portal, then load the VOTABLE via URL in the |
19 |
search box or via "Upload Target List" (really means upload any table).<br> |
20 |
<a href="https://masttest.stsci.edu/vodml/Mashup/Clients/Mast/Portal.html" target="_blank">https://masttest.stsci.edu/vodml/Mashup/Clients/Mast/Portal.html</a><br> |
21 |
After loading a table via URL, you can grab a shortcut link to the |
22 |
Portal with that table loaded using the "Copy Link for this Search" |
23 |
button. <img style="width: 32px; height: 32px;" alt="Link" src="link_32x32.png"><br> |
24 |
<br> |
25 |
<h2>Notes / Todo<br> |
26 |
</h2> |
27 |
|
28 |
|
29 |
<ul> |
30 |
<li><span style="font-weight: bold;"></span>The parser doesn't |
31 |
currently parse FITS files, so 100 rows of fake data are generated for |
32 |
VOTABLEs that use FITS. (Once the parser can recognize FITS, it |
33 |
still won't be able to find "file:" references to those FITS files.</li> |
34 |
<li>The template filling and reference following happens only in the |
35 |
client now. Maybe a future extension of the parser can do that |
36 |
server-side as well.</li><li>The client doesn't dereference and REMOTEREFERENCE or FOREIGNKEY references.</li> |
37 |
<li>The client should demonstrate that it "knows" certain models (e.g., sample, CAOM).</li> |
38 |
<ul> |
39 |
<li>This could/should include validating that the model matches the VODML annotations.</li> |
40 |
</ul> |
41 |
<li><br> |
42 |
</li> |
43 |
</ul> |
44 |
|
45 |
|
46 |
<h2>Arguments</h2> |
47 |
|
48 |
<ul> |
49 |
|
50 |
<li><span style="font-weight: bold;">format</span> - The desired |
51 |
output format. Available choices (not case sensitive) are |
52 |
below:</li> |
53 |
<br> |
54 |
<ul> |
55 |
<li><span style="font-weight: bold;">json</span> - A JSON |
56 |
serialization of all the VODML instances from the input VOTABLE. |
57 |
All non-VODML content of the VOTABLE is discarded.<br> |
58 |
</li> |
59 |
<li><span style="font-weight: bold;">jsonlite</span> - A slightly |
60 |
shorter serialization of all the VODML instances. The only real |
61 |
difference is in the leaf nodes for primitive data values.</li><li><span style="font-weight: bold;">extjs</span> - A complex JSON |
62 |
serialization intended for use by the MAST Discivery Portal. This |
63 |
format contains all the data from the original table along with some |
64 |
client-specific information such as histograms of the data |
65 |
columns. It also contains the same object returned by the json |
66 |
format above.</li> |
67 |
<li><span style="font-weight: bold;">votable</span> - Echoes back a |
68 |
VOTABLE that was constructed from the internal model created by the |
69 |
parser, but is hopefully equivalent to the input VOTABLE.<br> |
70 |
</li> |
71 |
|
72 |
<li><span style="font-weight: bold;">csv</span> - A csv containing |
73 |
the TABLEDATA from the first table in the input VOTABLE. Most |
74 |
metadata is discarded.<br> |
75 |
</li> |
76 |
</ul> |
77 |
</ul> |
78 |
|
79 |
<ul> |
80 |
|
81 |
<li><span style="font-weight: bold;">votable</span> - The input |
82 |
votable. Value can be specified as:<br> |
83 |
</li> |
84 |
<ul> |
85 |
<li>URL (must be accessible to the masttest.stsci.edu server)<br> |
86 |
</li> |
87 |
<li>Local file (only available when using the parseVodmlForm |
88 |
version of the web service)<br> |
89 |
</li> |
90 |
</ul> |
91 |
</ul> |
92 |
|
93 |
<h2>Service Entry Points</h2> |
94 |
|
95 |
The service has two different versions, both of which have the base URL |
96 |
<span style="font-style: italic;">https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/</span><br> |
97 |
|
98 |
<ul> |
99 |
|
100 |
<li><span style="font-weight: bold;">parseVodml</span> - Takes the |
101 |
arguments as url parameters.</li> |
102 |
<ul> |
103 |
<li>votable value must be URL accessible to the masttest server.</li> |
104 |
</ul> |
105 |
<ul> |
106 |
<li>This example URL, which can be used with <span style="font-style: italic;">curl</span> or in a browser, parses |
107 |
test5.votable-1.4.xml from volute, and outputs the resulting VODML |
108 |
instances in <span style="font-weight: bold;">json</span> format:</li> |
109 |
</ul> |
110 |
</ul><a href="https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodml?format=json&votable=https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/mapping/test5.votable-1.4.xml" target="_blank">https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodml?format=json&votable=https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/mapping/test5.votable-1.4.xml</a><br> |
111 |
|
112 |
<ul> |
113 |
|
114 |
<li><span style="font-weight: bold;">parseVodmlForm</span> - Takes |
115 |
the arguments as form data.</li> |
116 |
<ul> |
117 |
<li>votable value can be URL or can specify a file from your local |
118 |
disk.</li> |
119 |
<li>The first example does the same thing as the URL above, but |
120 |
with the arguments as form data:</li> |
121 |
</ul> |
122 |
</ul> |
123 |
|
124 |
<pre>curl \<br> -F "format=json" \<br> -F "votable=https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/mapping/test5.votable-1.4.xml" \<br> https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodmlForm<br><br></pre> |
125 |
|
126 |
<ul> |
127 |
|
128 |
<ul> |
129 |
<li>The second example does the same thing, but loads the votable |
130 |
from the local disk:</li> |
131 |
</ul> |
132 |
</ul> |
133 |
|
134 |
<pre>curl \<br> -F "format=json" \<br> -F "votable=@/Users/tom/myfiles/test5.votable-1.4.xml" \<br> https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodmlForm<br></pre> |
135 |
<h2><br> |
136 |
</h2> |
137 |
<h2>Examples<br> |
138 |
</h2> |
139 |
<h4>Create JSON format for some annotated VOTABLEs in volute</h4> |
140 |
|
141 |
<a href="https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodml?format=json&votable=https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/mapping/test5.votable-1.4.xml" target="_blank">test5.votable-1.4.xml</a><br> |
142 |
<br> |
143 |
<a href="https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodml?format=json&votable=https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/tesselation/%20votable.annotatedRef.xml" target="_blank">votable.annotatedRef.xml</a><br> |
144 |
<br> |
145 |
<a href="https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodml?format=json&votable=https://volute.g-vo.org/svn/trunk/projects/dm/CubeDM-1.0/examples/chandra_2Dsky_image_annotated.vot" target="_blank">chandra_2Dsky_image_annotated.vot</a><br> |
146 |
<br> |
147 |
<a href="https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodml?format=json&votable=https://volute.g-vo.org/svn/trunk/projects/dm/CubeDM-1.0/examples/chandra_2Dsky_image_annotated_byref.vot" target="_blank">chandra_2Dsky_image_annotated_byref.vot</a><br> |
148 |
<br> |
149 |
<a href="https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodml?format=json&votable=https://volute.g-vo.org/svn/trunk/projects/dm/CubeDM-1.0/examples/chandra_events_annotated.vot" target="_blank">chandra_events_annotated.vot</a><br> |
150 |
<br> |
151 |
<h4>Run MAST portal on some annotated VOTABLEs in volute</h4> |
152 |
<a href="https://masttest.stsci.edu/vodml/Mashup/Clients/Mast/Portal.html?searchQuery=%7B%22service%22%3A%22VOTABLE%22%2C%22inputText%22%3A%22https%3A%2F%2Fvolute.g-vo.org%2Fsvn%2Ftrunk%2Fprojects%2Fdm%2Fvo-dml%2Fmapping%2Ftest5.votable-1.4.xml%22%2C%22paramsService%22%3A%22Vo.Generic.Table%22%2C%22title%22%3A%22https%3A%2F%2Fvolute.g-vo.org%2Fsvn%2Ftrunk%2Fprojects%2Fdm%2Fvo-dml%2Fmapping%2Ftest5.votable-1.4.xml%22%2C%22columns%22%3A%22*%22%7D" target="_blank">test5.votable-1.4.xml</a><br> |
153 |
<a href="https://masttest.stsci.edu/vodml/Mashup/Clients/Mast/Portal.html?searchQuery=%7B%22service%22%3A%22VOTABLE%22%2C%22inputText%22%3A%22https%3A%2F%2Fvolute.g-vo.org%2Fsvn%2Ftrunk%2Fprojects%2Fdm%2FCubeDM-1.0%2Fexamples%2Fchandra_2Dsky_image_annotated.vot%22%2C%22paramsService%22%3A%22Vo.Generic.Table%22%2C%22title%22%3A%22https%3A%2F%2Fvolute.g-vo.org%2Fsvn%2Ftrunk%2Fprojects%2Fdm%2FCubeDM-1.0%2Fexamples%2Fchandra_2Dsky_image_annotated.vot%22%2C%22columns%22%3A%22*%22%7D" target="_blank"><br> |
154 |
chandra_2Dsky_image_annotated.vot</a><br> |
155 |
<br> |
156 |
<br> |
157 |
<br> |
158 |
<br> |
159 |
<br> |
160 |
|
161 |
</body></html> |