1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <application |
---|
3 | xmlns="http://research.sun.com/wadl/2006/10" |
---|
4 | xmlns:xs="http://www.w3.org/2001/XMLSchema" |
---|
5 | xmlns:cat="http://www.isocat.org/" |
---|
6 | xmlns:dcif="http://www.isocat.org/ns/dcif" |
---|
7 | xmlns:mds="http://cmdi.clarin.eu/mdservice/" |
---|
8 | xmlns:sru="http://www.loc.gov/standards/sru/specs/" |
---|
9 | > |
---|
10 | <doc title="CLARIN Metadata Service" > |
---|
11 | This is a draft description of the REST-interface of <code>CLARIN Metadata Service</code>. Especially the response description is very sketchy yet.<br/> |
---|
12 | Also the <code>@base</code> is an abstract one (more like a namespace). The actual URL is: <a href="http://clarin.aac.ac.at/MDService2/">http://clarin.aac.ac.at/MDService2/</a> |
---|
13 | </doc> |
---|
14 | |
---|
15 | <grammars> |
---|
16 | <include href="http://www.isocat.org/12620/schemas/DCIF.rng"/> |
---|
17 | </grammars> |
---|
18 | |
---|
19 | <resources base="http://cmdi.clarin.eu/mdservice/"> |
---|
20 | |
---|
21 | <param name="format" type="xs:string" style="matrix" > |
---|
22 | <option value="xml" mediaType="application/xml"/> |
---|
23 | <option value="htmltable" mediaType="application/html"/> |
---|
24 | <option value="htmldetail" mediaType="text/html"/> |
---|
25 | <option value="htmlpage" mediaType="text/html"/> |
---|
26 | </param> |
---|
27 | |
---|
28 | <param name="repository" type="xs:int" style="matrix" default="1"> |
---|
29 | <doc>allows to dynamically select one of the available repositories for the queries.<br/> |
---|
30 | Probably this should be rather a semantic identifier (a string-key instead of int) |
---|
31 | </doc> |
---|
32 | </param> |
---|
33 | |
---|
34 | <param name="cache" type="xs:string" style="matrix" default="use"> |
---|
35 | <option value="use" /> |
---|
36 | <option value="skip" /> |
---|
37 | <option value="refresh" /> |
---|
38 | </param> |
---|
39 | |
---|
40 | |
---|
41 | <resource id="basic-userinterface" path=""> |
---|
42 | <doc title="Default path" > |
---|
43 | This is the default application trying to make sense of any parameters that are passed. |
---|
44 | So that it is possible to bookmark/send a query as a simple URI (REST at its best ;). |
---|
45 | Sot it accepts the same parameters as the search-interface, but displays the query within the main user-interface. |
---|
46 | </doc> |
---|
47 | |
---|
48 | <method name="GET"> |
---|
49 | <request> |
---|
50 | <param name="q" type="sru:CQL" style="query" > |
---|
51 | </param> |
---|
52 | <param name="squery" type="xs:string" style="query" ><doc title="Simple Query" >just individual terms</doc> |
---|
53 | </param> |
---|
54 | <param name="columns" type="mds:cmdIndex" style="query" repeating="true" > |
---|
55 | </param> |
---|
56 | <param name="collection" type="xs:URI" style="query" > |
---|
57 | </param> |
---|
58 | <param name="startRecord" type="xs:positiveInteger" style="query" ></param> |
---|
59 | <param name="maximumRecords" type="xs:positiveInteger" style="query" ></param> |
---|
60 | |
---|
61 | </request> |
---|
62 | <response> |
---|
63 | <representation mediaType="text/html" > |
---|
64 | </representation> |
---|
65 | </response> |
---|
66 | </method> |
---|
67 | </resource> |
---|
68 | |
---|
69 | |
---|
70 | <resource id="collections" path="collections/{format}/{collection}"> |
---|
71 | <doc title="Collections" > |
---|
72 | This provides a summary of collections in the repository (it is passed on to <code>getCollections</code>-method of MdRepository) |
---|
73 | </doc> |
---|
74 | <method name="GET"> |
---|
75 | <request> |
---|
76 | <param name="collection" type="xs:URI" style="template" repeating="yes"/> |
---|
77 | <param name="maxdepth" type="xs:positiveInteger" style="query" /> |
---|
78 | </request> |
---|
79 | <response> |
---|
80 | <representation mediaType="application/xml" element="mds:Collections"> |
---|
81 | <param name="collection_name" path="//Collection" repeating="true" type="xs:QName" style="plain"> |
---|
82 | <link resource_type="#collection"/> |
---|
83 | </param> |
---|
84 | </representation> |
---|
85 | |
---|
86 | </response> |
---|
87 | </method> |
---|
88 | </resource> |
---|
89 | |
---|
90 | <resource id="model" path="model/{format}/{term}"> |
---|
91 | <doc title="Model" > |
---|
92 | This provides a summary of the xml-structure in the repository (aggregated XML-subtrees) (it is passed on to <code>queryModel</code>-method of MdRepository)<br/> |
---|
93 | The starting context can be part of the url (template-style) or in the q parameter. |
---|
94 | <span class="note">What happens if both are defined?</span> |
---|
95 | </doc> |
---|
96 | |
---|
97 | <method name="GET"> |
---|
98 | <request> |
---|
99 | <param name="term" type="mds:cmdIndex" style="template"/> |
---|
100 | <param name="q" type="mds:cmdIndex" style="query" /> |
---|
101 | <param name="maxdepth" type="xs:positiveInteger" style="query" /> |
---|
102 | </request> |
---|
103 | <response> |
---|
104 | <representation mediaType="application/xml" element="mds:Terms"> |
---|
105 | <param name="cmdIndex" path="//mds:Terms/@path" repeating="true" type="xs:anyURI" style="plain"> |
---|
106 | </param> |
---|
107 | </representation> |
---|
108 | |
---|
109 | </response> |
---|
110 | </method> |
---|
111 | </resource> |
---|
112 | |
---|
113 | <resource id="terms" path="terms/{format}/{term}"> |
---|
114 | <doc title="Terms" > |
---|
115 | This combines the information from MdRepository (model-interface), Component Registry and optionally Data Category Registry and RelationRegistry |
---|
116 | providing a summary of the profiles actually used in the repository together with mapping to data-categories. |
---|
117 | </doc> |
---|
118 | |
---|
119 | <method name="GET"> |
---|
120 | <request> |
---|
121 | <param name="format" type="xs:string" style="template" > |
---|
122 | <option value="xml" mediaType="application/xml"/> |
---|
123 | <option value="flat" mediaType="application/html"/> |
---|
124 | <option value="autocomplete" mediaType="text/html"/> |
---|
125 | <option value="htmlselect" mediaType="text/html"/> |
---|
126 | <option value="htmlpage" mediaType="text/html"/> |
---|
127 | </param> |
---|
128 | <param name="term" type="mds:cmdIndex" style="template"> |
---|
129 | <option value="all" /> |
---|
130 | <option value="{profile name}" /> |
---|
131 | </param> |
---|
132 | <param name="q" type="mds:cmdIndex" style="query" /> |
---|
133 | <param name="maxdepth" type="xs:positiveInteger" style="query" /> |
---|
134 | |
---|
135 | </request> |
---|
136 | <response> |
---|
137 | <representation mediaType="application/xml" element="mds:Terms"> |
---|
138 | <param name="cmdIndex" path="//mds:Terms/@path" repeating="true" type="xs:anyURI" style="plain"> |
---|
139 | </param> |
---|
140 | </representation> |
---|
141 | |
---|
142 | </response> |
---|
143 | </method> |
---|
144 | </resource> |
---|
145 | |
---|
146 | |
---|
147 | <resource id="recordset" path="recordset/{format}/"> |
---|
148 | <doc title="Search" > |
---|
149 | This is the actual search interface allowing to retrieve MDRecords from the MDRepository. |
---|
150 | Main parameter is q expected to be a valid CQL-query. The query is translated into XPath and passed on to the <code>searchRetrieve</code>-method of MDRepository, which already returns a valid (SRU-protocol compliant) <code>searchRetrieveResponse</code>. |
---|
151 | </doc> |
---|
152 | |
---|
153 | <method name="GET"> |
---|
154 | <request> |
---|
155 | <param name="q" type="sru:CQL" style="query" > |
---|
156 | </param> |
---|
157 | <param name="squery" type="xs:string" style="query" ><doc title="Simple Query" >just individual terms</doc> |
---|
158 | </param> |
---|
159 | <param name="columns" type="mds:cmdIndex" style="query" repeating="true" > |
---|
160 | </param> |
---|
161 | <param name="collection" type="xs:URI" style="query" > |
---|
162 | </param> |
---|
163 | <param name="maxDepth" type="xs:positiveInteger"/> |
---|
164 | <param name="startRecord" type="xs:positiveInteger" style="query" ></param> |
---|
165 | <param name="maximumRecords" type="xs:positiveInteger" style="query" ></param> |
---|
166 | |
---|
167 | </request> |
---|
168 | |
---|
169 | <response> |
---|
170 | <representation mediaType="application/xml" element="mds:searchRetrieveResponse"> |
---|
171 | <param name="records" path="//records" repeating="false" type="xs:anyURI" style="plain"> |
---|
172 | </param> |
---|
173 | </representation> |
---|
174 | |
---|
175 | </response> |
---|
176 | </method> |
---|
177 | </resource> |
---|
178 | |
---|
179 | <resource id="record" path="record/{format}/{q}"> |
---|
180 | <doc title="Record detail" > |
---|
181 | Special method for retrieving a full individual record. It is also translated into XPath (<code>MdSelfLink</code>) and served by the <code>searchRetrieve</code>-method of MDRepository. |
---|
182 | </doc> |
---|
183 | |
---|
184 | <method name="GET"> |
---|
185 | <request> |
---|
186 | <param name="q" type="xs:URI" style="template" ><doc>PID - handle of the record</doc> |
---|
187 | </param> |
---|
188 | <param name="cacheid" type="xs:int" style="query" optional="yes" ><doc>Proposed parameter, to remember the recordset, the record comes in from, to be able, to retrieve it directly from MDService's cache and save the trip to MDRepository (for data, that is already locally available)</doc> |
---|
189 | </param> |
---|
190 | </request> |
---|
191 | <response> |
---|
192 | <representation mediaType="application/xml" element="mds:searchRetrieveResponse"> |
---|
193 | <param name="records" path="//records" repeating="false" type="xs:anyURI" style="plain"> |
---|
194 | </param> |
---|
195 | </representation> |
---|
196 | |
---|
197 | </response> |
---|
198 | </method> |
---|
199 | </resource> |
---|
200 | </resources> |
---|
201 | |
---|
202 | <resources base="http://cmdi.clarin.eu/mdservice/"> |
---|
203 | |
---|
204 | <resource id="workspaceprofile" path="workspaceprofile/{type}"> |
---|
205 | <doc title="Workspace profile" > |
---|
206 | Delivers the configuration-structure. A server profile or an user specific (plus a special "default"-profile for the anonymous user).<br/> |
---|
207 | The profiles are stored as xml-files on the server and handed out as JSON-files to the client. |
---|
208 | </doc> |
---|
209 | <method name="GET"> |
---|
210 | <request> |
---|
211 | <param name="type" type="xs:string" style="template" > |
---|
212 | <option value="server" /> |
---|
213 | <option value="user" /> |
---|
214 | </param> |
---|
215 | </request> |
---|
216 | <response> |
---|
217 | <representation mediaType="application/json" element="mds:WorkspaceProfile"> |
---|
218 | </representation> |
---|
219 | |
---|
220 | </response> |
---|
221 | </method> |
---|
222 | </resource> |
---|
223 | |
---|
224 | <resource id="workspaceprofilesave" path="workspaceprofilesave"> |
---|
225 | <doc title="Save workspace profile" > |
---|
226 | Allows to save back the configuration-file. |
---|
227 | </doc> |
---|
228 | <method name="POST"> |
---|
229 | <request> |
---|
230 | <param name="data" type="xs:string" style="query" default="public"> |
---|
231 | </param> |
---|
232 | </request> |
---|
233 | <response> |
---|
234 | <representation mediaType="application/json" element="mds:WorkspaceProfile"> |
---|
235 | </representation> |
---|
236 | </response> |
---|
237 | </method> |
---|
238 | </resource> |
---|
239 | |
---|
240 | </resources> |
---|
241 | |
---|
242 | <resources base="http://cmdi.clarin.eu/mdservice/admin/"> |
---|
243 | |
---|
244 | <resource id="cache" path="cache/{format}"> |
---|
245 | <doc title="Cache" > |
---|
246 | Allows to view the cache-index |
---|
247 | </doc> |
---|
248 | <method name="GET"> |
---|
249 | <request> |
---|
250 | <param name="format" type="xs:string" style="template" default="public" > |
---|
251 | <option value="xml" /> |
---|
252 | <option value="htmlpage" /> |
---|
253 | </param> |
---|
254 | </request> |
---|
255 | <response> |
---|
256 | <representation mediaType="text/html"> |
---|
257 | </representation> |
---|
258 | </response> |
---|
259 | </method> |
---|
260 | <resource id="cache-del" path="del"> |
---|
261 | <doc title="Cache" > |
---|
262 | Allows to delete/flush (parts of) cache; parameters constraint the part of cache to be deleted; |
---|
263 | no param means: delete everything |
---|
264 | </doc> |
---|
265 | <method name="GET"> |
---|
266 | <request> |
---|
267 | <param name="actionkey" type="xs:string" style="query" default="public" optional="yes"></param> |
---|
268 | <param name="repository" type="xs:int" style="query" default="public" optional="yes"></param> |
---|
269 | <param name="date" type="xs:date" style="query" default="public" optional="yes"></param> |
---|
270 | </request> |
---|
271 | <response> |
---|
272 | <representation mediaType="text/html"></representation> |
---|
273 | </response> |
---|
274 | </method> |
---|
275 | </resource> |
---|
276 | </resource> |
---|
277 | |
---|
278 | |
---|
279 | </resources> |
---|
280 | |
---|
281 | </application> |
---|