| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- $Revision: 3660 $ $Date: 2016-10-24 16:42:22 +0100 (Mon, 24 Oct 2016) $ $HeadURL: https://volute.g-vo.org/svn/trunk/projects/grid/uws/doc/UWS.xsd $ --> |
| 3 |
<!-- UWS schema - Paul Harrison May 2008 --> |
| 4 |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 5 |
targetNamespace="http://www.ivoa.net/xml/UWS/v1.0" xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0" |
| 6 |
xmlns:xlink="http://www.w3.org/1999/xlink" elementFormDefault="qualified" |
| 7 |
attributeFormDefault="unqualified" |
| 8 |
version="1.1-REC-20161024" |
| 9 |
> |
| 10 |
<xs:import namespace="http://www.w3.org/1999/xlink" |
| 11 |
schemaLocation="http://docs.g-vo.org/schemata/xlink.xsd"/> |
| 12 |
<xs:complexType name="ShortJobDescription"> |
| 13 |
<xs:sequence> |
| 14 |
<xs:element name="phase" type="uws:ExecutionPhase"> |
| 15 |
<xs:annotation> |
| 16 |
<xs:documentation> |
| 17 |
the execution phase - returned at |
| 18 |
/{jobs}/{job-id}/phase |
| 19 |
</xs:documentation> |
| 20 |
</xs:annotation> |
| 21 |
</xs:element> |
| 22 |
<xs:element name="runId" type="xs:string" maxOccurs="1" |
| 23 |
minOccurs="0" > |
| 24 |
<xs:annotation> |
| 25 |
<xs:documentation> |
| 26 |
this is a client supplied identifier - the UWS system |
| 27 |
does nothing other than to return it as part of the |
| 28 |
description of the job |
| 29 |
</xs:documentation> |
| 30 |
</xs:annotation> |
| 31 |
</xs:element> |
| 32 |
<xs:element name="ownerId" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"> |
| 33 |
<xs:annotation> |
| 34 |
<xs:documentation> |
| 35 |
the owner (creator) of the job - this should be |
| 36 |
expressed as a string that can be parsed in accordance |
| 37 |
with IVOA security standards. If there was no |
| 38 |
authenticated job creator then this should be set to |
| 39 |
NULL. |
| 40 |
</xs:documentation> |
| 41 |
</xs:annotation> |
| 42 |
</xs:element> |
| 43 |
<xs:element name="creationTime" type="xs:dateTime" |
| 44 |
nillable="false" |
| 45 |
maxOccurs="1" minOccurs="0"> |
| 46 |
<xs:annotation> |
| 47 |
<xs:documentation> |
| 48 |
The instant at which the job was created. |
| 49 |
</xs:documentation> |
| 50 |
</xs:annotation> |
| 51 |
</xs:element> |
| 52 |
|
| 53 |
</xs:sequence> |
| 54 |
<xs:attribute name="id" type="uws:JobIdentifier" |
| 55 |
use="required" |
| 56 |
> |
| 57 |
</xs:attribute> |
| 58 |
<xs:attributeGroup ref="uws:reference"></xs:attributeGroup> |
| 59 |
</xs:complexType> |
| 60 |
<xs:attributeGroup name="reference"> |
| 61 |
<xs:annotation> |
| 62 |
<xs:documentation>standard xlink references |
| 63 |
</xs:documentation> |
| 64 |
</xs:annotation> |
| 65 |
<xs:attribute ref="xlink:type" use="optional" |
| 66 |
default="simple" /> |
| 67 |
<xs:attribute ref="xlink:href" use="optional" /> |
| 68 |
</xs:attributeGroup> |
| 69 |
<xs:simpleType name="ExecutionPhase"> |
| 70 |
<xs:annotation> |
| 71 |
<xs:documentation> |
| 72 |
Enumeration of possible phases of job execution |
| 73 |
</xs:documentation> |
| 74 |
</xs:annotation> |
| 75 |
<xs:restriction base="xs:string"> |
| 76 |
<xs:enumeration value="PENDING"> |
| 77 |
<xs:annotation> |
| 78 |
<xs:documentation> |
| 79 |
The first phase a job is entered into - this is where |
| 80 |
a job is being set up but no request to run has |
| 81 |
occurred. |
| 82 |
</xs:documentation> |
| 83 |
</xs:annotation> |
| 84 |
</xs:enumeration> |
| 85 |
<xs:enumeration value="QUEUED"> |
| 86 |
<xs:annotation> |
| 87 |
<xs:documentation> |
| 88 |
A job has been accepted for execution but is waiting |
| 89 |
in a queue |
| 90 |
</xs:documentation> |
| 91 |
</xs:annotation> |
| 92 |
</xs:enumeration> |
| 93 |
<xs:enumeration value="EXECUTING"> |
| 94 |
<xs:annotation> |
| 95 |
<xs:documentation>A job is running</xs:documentation> |
| 96 |
</xs:annotation> |
| 97 |
</xs:enumeration> |
| 98 |
<xs:enumeration value="COMPLETED"> |
| 99 |
<xs:annotation> |
| 100 |
<xs:documentation> |
| 101 |
A job has completed successfully |
| 102 |
</xs:documentation> |
| 103 |
</xs:annotation> |
| 104 |
</xs:enumeration> |
| 105 |
<xs:enumeration value="ERROR"> |
| 106 |
<xs:annotation> |
| 107 |
<xs:documentation> |
| 108 |
Some form of error has occurred |
| 109 |
</xs:documentation> |
| 110 |
</xs:annotation> |
| 111 |
</xs:enumeration> |
| 112 |
<xs:enumeration value="UNKNOWN"> |
| 113 |
<xs:annotation> |
| 114 |
<xs:documentation> |
| 115 |
The job is in an unknown state. |
| 116 |
</xs:documentation> |
| 117 |
</xs:annotation> |
| 118 |
</xs:enumeration> |
| 119 |
<xs:enumeration value="HELD"> |
| 120 |
<xs:annotation> |
| 121 |
<xs:documentation> |
| 122 |
The job is HELD pending execution and will not |
| 123 |
automatically be executed - can occur after a |
| 124 |
PHASE=RUN request has been made (cf PENDING). |
| 125 |
</xs:documentation> |
| 126 |
</xs:annotation> |
| 127 |
</xs:enumeration> |
| 128 |
<xs:enumeration value="SUSPENDED"> |
| 129 |
<xs:annotation> |
| 130 |
<xs:documentation> |
| 131 |
The job has been suspended by the system during |
| 132 |
execution |
| 133 |
</xs:documentation> |
| 134 |
</xs:annotation> |
| 135 |
</xs:enumeration> |
| 136 |
<xs:enumeration value="ABORTED"> |
| 137 |
<xs:annotation> |
| 138 |
<xs:documentation> |
| 139 |
The job has been aborted, either by user request or by |
| 140 |
the server because of lack or overuse of resources. |
| 141 |
</xs:documentation> |
| 142 |
</xs:annotation> |
| 143 |
</xs:enumeration> |
| 144 |
<xs:enumeration value="ARCHIVED"> |
| 145 |
<xs:annotation> |
| 146 |
<xs:documentation> |
| 147 |
The job has been archived by the server at destruction time. An archived job |
| 148 |
may have deleted the results to reclaim resources, but must have job metadata preserved. |
| 149 |
This is an alternative that the server may choose in contrast to completely destroying all record of the job. |
| 150 |
</xs:documentation> |
| 151 |
</xs:annotation> |
| 152 |
</xs:enumeration> |
| 153 |
</xs:restriction> |
| 154 |
</xs:simpleType> |
| 155 |
<xs:complexType name="JobSummary"> |
| 156 |
<xs:annotation> |
| 157 |
<xs:documentation> |
| 158 |
The complete representation of the state of a job |
| 159 |
</xs:documentation> |
| 160 |
</xs:annotation> |
| 161 |
<xs:sequence> |
| 162 |
<xs:element name="jobId" type="uws:JobIdentifier" /> |
| 163 |
<xs:element name="runId" type="xs:string" maxOccurs="1" |
| 164 |
minOccurs="0" |
| 165 |
> |
| 166 |
<xs:annotation> |
| 167 |
<xs:documentation> |
| 168 |
this is a client supplied identifier - the UWS system |
| 169 |
does nothing other than to return it as part of the |
| 170 |
description of the job |
| 171 |
</xs:documentation> |
| 172 |
</xs:annotation> |
| 173 |
</xs:element> |
| 174 |
<xs:element name="ownerId" type="xs:string" nillable="true"> |
| 175 |
<xs:annotation> |
| 176 |
<xs:documentation> |
| 177 |
the owner (creator) of the job - this should be |
| 178 |
expressed as a string that can be parsed in accordance |
| 179 |
with IVOA security standards. If there was no |
| 180 |
authenticated job creator then this should be set to |
| 181 |
NULL. |
| 182 |
</xs:documentation> |
| 183 |
</xs:annotation> |
| 184 |
</xs:element> |
| 185 |
<xs:element name="phase" type="uws:ExecutionPhase"> |
| 186 |
<xs:annotation> |
| 187 |
<xs:documentation> |
| 188 |
the execution phase - returned at |
| 189 |
/{jobs}/{job-id}/phase |
| 190 |
</xs:documentation> |
| 191 |
</xs:annotation> |
| 192 |
</xs:element> |
| 193 |
<xs:element name="quote" type="xs:dateTime" nillable="true" |
| 194 |
maxOccurs="1" minOccurs="0" |
| 195 |
> |
| 196 |
<xs:annotation> |
| 197 |
<xs:documentation> |
| 198 |
A Quote predicts when the job is likely to complete - |
| 199 |
returned at /{jobs}/{job-id}/quote "don't know" is |
| 200 |
encoded by setting to the XML null value |
| 201 |
xsi:nil="true" |
| 202 |
</xs:documentation> |
| 203 |
</xs:annotation> |
| 204 |
</xs:element> |
| 205 |
<xs:element name="creationTime" type="xs:dateTime" |
| 206 |
nillable="false" |
| 207 |
maxOccurs="1" minOccurs="0"> |
| 208 |
<xs:annotation> |
| 209 |
<xs:documentation> |
| 210 |
The instant at which the job was created. |
| 211 |
</xs:documentation> |
| 212 |
<xs:documentation> |
| 213 |
Note that the version 1.1 of the specification requires that this element be present. |
| 214 |
It is optional only in versions 1.x of the schema for backwards compatibility. |
| 215 |
2.0+ versions of the schema will make this formally mandatory in an XML sense. |
| 216 |
</xs:documentation> |
| 217 |
</xs:annotation> |
| 218 |
</xs:element> |
| 219 |
<xs:element name="startTime" type="xs:dateTime" |
| 220 |
nillable="true" |
| 221 |
> |
| 222 |
<xs:annotation> |
| 223 |
<xs:documentation> |
| 224 |
The instant at which the job started execution. |
| 225 |
</xs:documentation> |
| 226 |
</xs:annotation> |
| 227 |
</xs:element> |
| 228 |
<xs:element name="endTime" type="xs:dateTime" |
| 229 |
nillable="true" |
| 230 |
> |
| 231 |
<xs:annotation> |
| 232 |
<xs:documentation> |
| 233 |
The instant at which the job finished execution |
| 234 |
</xs:documentation> |
| 235 |
</xs:annotation> |
| 236 |
</xs:element> |
| 237 |
<xs:element name="executionDuration" type="xs:int" |
| 238 |
nillable="false" |
| 239 |
> |
| 240 |
<xs:annotation> |
| 241 |
<xs:documentation> |
| 242 |
The duration (in seconds) for which the job should be |
| 243 |
allowed to run - a value of 0 is intended to mean |
| 244 |
unlimited - returned at |
| 245 |
/{jobs}/{job-id}/executionduration |
| 246 |
</xs:documentation> |
| 247 |
</xs:annotation> |
| 248 |
</xs:element> |
| 249 |
<xs:element name="destruction" type="xs:dateTime" |
| 250 |
nillable="true" |
| 251 |
> |
| 252 |
<xs:annotation> |
| 253 |
<xs:documentation> |
| 254 |
The time at which the whole job + records + results |
| 255 |
will be destroyed. returned at |
| 256 |
/{jobs}/{job-id}/destruction |
| 257 |
</xs:documentation> |
| 258 |
</xs:annotation> |
| 259 |
</xs:element> |
| 260 |
<xs:element ref="uws:parameters" maxOccurs="1" minOccurs="0"> |
| 261 |
<xs:annotation> |
| 262 |
<xs:documentation> |
| 263 |
The parameters to the job (where appropriate) can also |
| 264 |
be retrieved at /{jobs}/{job-id}/parameters |
| 265 |
</xs:documentation> |
| 266 |
</xs:annotation> |
| 267 |
</xs:element> |
| 268 |
<xs:element ref="uws:results"> |
| 269 |
<xs:annotation> |
| 270 |
<xs:documentation> |
| 271 |
The results for the job - can also be retrieved at |
| 272 |
/{jobs}/{job-id}/results |
| 273 |
</xs:documentation> |
| 274 |
</xs:annotation> |
| 275 |
</xs:element> |
| 276 |
<xs:element name="errorSummary" type="uws:ErrorSummary" |
| 277 |
maxOccurs="1" minOccurs="0" |
| 278 |
> |
| 279 |
</xs:element> |
| 280 |
<xs:element name="jobInfo" maxOccurs="1" minOccurs="0"> |
| 281 |
<xs:annotation> |
| 282 |
<xs:documentation> |
| 283 |
This is arbitrary information that can be added to the |
| 284 |
job description by the UWS implementation. |
| 285 |
</xs:documentation> |
| 286 |
</xs:annotation> |
| 287 |
<xs:complexType> |
| 288 |
<xs:sequence> |
| 289 |
<xs:any namespace="##any" processContents="lax" |
| 290 |
minOccurs="0" maxOccurs="unbounded" |
| 291 |
/> |
| 292 |
</xs:sequence> |
| 293 |
</xs:complexType> |
| 294 |
</xs:element> |
| 295 |
</xs:sequence> |
| 296 |
<xs:attribute name="version" type="uws:UWSVersion" use="optional"> |
| 297 |
<xs:annotation> |
| 298 |
<xs:documentation>note that this attribute is actually required by the 1.1 specification - however remains optional in the schema |
| 299 |
for backwards compatibility. It will be formally required in the next major revision.</xs:documentation> |
| 300 |
</xs:annotation> |
| 301 |
</xs:attribute> |
| 302 |
|
| 303 |
</xs:complexType> |
| 304 |
<xs:simpleType name="JobIdentifier"> |
| 305 |
<xs:annotation> |
| 306 |
<xs:documentation> The identifier for the job |
| 307 |
</xs:documentation> |
| 308 |
</xs:annotation> |
| 309 |
<xs:restriction base="xs:string" /> |
| 310 |
</xs:simpleType> |
| 311 |
<xs:simpleType name="UWSVersion"> |
| 312 |
<xs:annotation> |
| 313 |
<xs:documentation>The version of the UWS standard that the server complies with. |
| 314 |
</xs:documentation> |
| 315 |
</xs:annotation> |
| 316 |
<xs:restriction base="xs:string" /> |
| 317 |
</xs:simpleType> |
| 318 |
<xs:element name="job" type="uws:JobSummary"> |
| 319 |
<xs:annotation> |
| 320 |
<xs:documentation> This is the information that is returned |
| 321 |
when a GET is made for a single job resource - i.e. |
| 322 |
/{jobs}/{job-id}</xs:documentation> |
| 323 |
</xs:annotation> |
| 324 |
</xs:element> |
| 325 |
<xs:element name="jobs"> |
| 326 |
<xs:annotation> |
| 327 |
<xs:documentation> The list of job references returned at |
| 328 |
/(jobs)</xs:documentation> |
| 329 |
<xs:documentation>The list presented may be affected by the current security context and may be filtered</xs:documentation> |
| 330 |
</xs:annotation> |
| 331 |
<xs:complexType> |
| 332 |
<xs:sequence> |
| 333 |
<xs:element name="jobref" type="uws:ShortJobDescription" |
| 334 |
maxOccurs="unbounded" minOccurs="0" |
| 335 |
> |
| 336 |
</xs:element> |
| 337 |
</xs:sequence> |
| 338 |
<xs:attribute name="version" type="uws:UWSVersion" use="optional"> |
| 339 |
<xs:annotation> |
| 340 |
<xs:documentation>note that this attribute is actually required by the 1.1 specification - however remains optional in the schema |
| 341 |
for backwards compatibility. It will be formally required in the next major revision.</xs:documentation> |
| 342 |
</xs:annotation> |
| 343 |
</xs:attribute> |
| 344 |
</xs:complexType> |
| 345 |
</xs:element> |
| 346 |
<xs:complexType name="ResultReference" mixed="false"> |
| 347 |
<xs:annotation> |
| 348 |
<xs:documentation> A reference to a UWS result. |
| 349 |
</xs:documentation> |
| 350 |
</xs:annotation> |
| 351 |
<xs:attribute name="id" type="xs:string" use="required"></xs:attribute> |
| 352 |
<xs:attributeGroup ref="uws:reference"></xs:attributeGroup> |
| 353 |
<xs:attribute name="size" type="xs:long" use="optional" ></xs:attribute> |
| 354 |
<xs:attribute name="mime-type" type="xs:string" use="optional"></xs:attribute> |
| 355 |
<xs:anyAttribute namespace="urn:uwscustom" processContents="lax" /> |
| 356 |
</xs:complexType> |
| 357 |
<xs:element name="results"> |
| 358 |
<xs:annotation> |
| 359 |
<xs:documentation> The element returned for |
| 360 |
/{jobs}/{job-id}/results</xs:documentation> |
| 361 |
</xs:annotation> |
| 362 |
<xs:complexType> |
| 363 |
<xs:sequence> |
| 364 |
<xs:element name="result" type="uws:ResultReference" |
| 365 |
maxOccurs="unbounded" minOccurs="0" |
| 366 |
></xs:element> |
| 367 |
</xs:sequence> |
| 368 |
</xs:complexType> |
| 369 |
</xs:element> |
| 370 |
<xs:complexType name="ErrorSummary"> |
| 371 |
<xs:annotation> |
| 372 |
<xs:documentation> |
| 373 |
A short summary of an error - a fuller representation of the |
| 374 |
error may be retrieved from /{jobs}/{job-id}/error |
| 375 |
</xs:documentation> |
| 376 |
</xs:annotation> |
| 377 |
<xs:sequence> |
| 378 |
<xs:element name="message" type="xs:string"></xs:element> |
| 379 |
</xs:sequence> |
| 380 |
<xs:attribute name="type" type="uws:ErrorType" use="required"> |
| 381 |
<xs:annotation> |
| 382 |
<xs:documentation> |
| 383 |
characterization of the type of the error |
| 384 |
</xs:documentation> |
| 385 |
</xs:annotation> |
| 386 |
</xs:attribute> |
| 387 |
<xs:attribute name="hasDetail" type="xs:boolean" use="required"> |
| 388 |
<xs:annotation> |
| 389 |
<xs:documentation>if true then there is a more detailed error message available at /{jobs}/{job-id}/error</xs:documentation> |
| 390 |
</xs:annotation></xs:attribute> |
| 391 |
</xs:complexType> |
| 392 |
<xs:simpleType name="ErrorType"> |
| 393 |
<xs:restriction base="xs:string"> |
| 394 |
<xs:enumeration value="transient"></xs:enumeration> |
| 395 |
<xs:enumeration value="fatal"></xs:enumeration> |
| 396 |
</xs:restriction> |
| 397 |
</xs:simpleType> |
| 398 |
<xs:complexType name="Parameter" mixed="true"> |
| 399 |
<xs:annotation> |
| 400 |
<xs:documentation> the list of input parameters to the job - if |
| 401 |
the job description language does not naturally have |
| 402 |
parameters, then this list should contain one element which |
| 403 |
is the content of the original POST that created the job. |
| 404 |
</xs:documentation> |
| 405 |
</xs:annotation> |
| 406 |
<xs:attribute name="byReference" type="xs:boolean" |
| 407 |
default="false" |
| 408 |
> |
| 409 |
<xs:annotation> |
| 410 |
<xs:documentation> if this attribute is true then the |
| 411 |
content of the parameter represents a URL to retrieve the |
| 412 |
actual parameter value.</xs:documentation> |
| 413 |
<xs:documentation> It is up to the implementation to decide |
| 414 |
if a parameter value cannot be returned directly as the |
| 415 |
content - the basic rule is that the representation of |
| 416 |
the parameter must allow the whole job element to be |
| 417 |
valid XML. If this cannot be achieved then the parameter |
| 418 |
value must be returned by reference.</xs:documentation> |
| 419 |
</xs:annotation> |
| 420 |
</xs:attribute> |
| 421 |
<xs:attribute name="id" type="xs:string" use="required"> |
| 422 |
<xs:annotation> |
| 423 |
<xs:documentation> the identifier for the parameter |
| 424 |
</xs:documentation> |
| 425 |
</xs:annotation> |
| 426 |
</xs:attribute> |
| 427 |
<xs:attribute name="isPost" type="xs:boolean"></xs:attribute> |
| 428 |
</xs:complexType> |
| 429 |
<xs:element name="parameters"> |
| 430 |
<xs:complexType> |
| 431 |
<xs:sequence> |
| 432 |
<xs:element name="parameter" type="uws:Parameter" |
| 433 |
maxOccurs="unbounded" minOccurs="0" |
| 434 |
></xs:element> |
| 435 |
</xs:sequence> |
| 436 |
</xs:complexType> |
| 437 |
</xs:element> |
| 438 |
</xs:schema> |
| 439 |
|
| 440 |
<!-- --> |