Changeset 2887
- Timestamp:
- 05/13/13 16:10:56 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd
r2886 r2887 125 125 </xs:sequence> 126 126 <xs:attribute name="URI" type="xs:anyURI" use="required"/> 127 <xs:attribute name=" name" type="xs:string" use="required"/>128 <xs:attribute name="eMail" type="xs:string" use="requ red"/>129 </xs:complexType> 130 127 <xs:attribute name="displayName" type="xs:string" use="required"/> 128 <xs:attribute name="eMail" type="xs:string" use="required"/> 129 </xs:complexType> 130 131 131 <!-- TODO: make a type for e-mail string --> 132 132 … … 141 141 <xs:complexContent> 142 142 <xs:extension base="ResourceREF"> 143 </xs:extension> 144 </xs:complexContent> 145 <xs:attribute name="eMail" type="xs:string" use="required"/> 143 <xs:attribute name="displayName" type="xs:string" use="required"/> 144 <xs:attribute name="eMail" type="xs:string" use="required"/> 145 </xs:extension> 146 </xs:complexContent> 146 147 </xs:complexType> 147 148 … … 174 175 <xs:complexType name="UserWithPermission"> 175 176 <xs:complexContent> 176 <xs:extension base="ResourceREF"></xs:extension> 177 </xs:complexContent> 178 <xs:attribute name="permission" type="Permission"/> 177 <xs:extension base="ResourceREF"> 178 <xs:attribute name="permission" type="Permission"/> 179 </xs:extension> 180 </xs:complexContent> 179 181 </xs:complexType> 180 182 … … 183 185 <xs:element name="user" type="UserWithPermission" maxOccurs="unbounded"/> 184 186 </xs:sequence> 185 <xs:attribute name=" URI" type="xs:anyURI" use="required"/>186 </xs:complexType> 187 187 <xs:attribute name="eMail" type="xs:string" use="required"/> 188 </xs:complexType> 189 188 190 <!-- no permission-list info required so far, it is just a list --> 189 191 … … 277 279 <!--- Actions (not a resource; used in the POST/PUT response envelope)--> 278 280 279 <xs:simpleType name="A ctionNames">281 <xs:simpleType name="AnnotationActionName"> 280 282 <xs:restriction base="xs:string"> 281 283 <xs:enumeration value="CREATE_CACHED_REPRESENTATION"/> 284 </xs:restriction> 285 </xs:simpleType> 286 287 <xs:simpleType name="PermissionActionName"> 288 <xs:restriction base="xs:string"> 282 289 <xs:enumeration value="ASK_USER_INFO"/> 283 290 </xs:restriction> 284 291 </xs:simpleType> 285 292 286 <xs:simpleType name="Action"> 287 <xs:attribute name="action" type="ActionName" use="required"/> 293 <xs:complexType name="BaseAction"> 288 294 <xs:attribute name="object" type="xs:anyURI"/> 289 </xs:simpleType> 290 291 <xs:complexType name="ActionList"> 292 <xs:sequence> 293 <xs:element name="action" type="Action" minOccurs="0"/> 294 </xs:sequence> 295 </xs:complexType> 296 295 <xs:attribute name="message" type="xs:string"/> 296 </xs:complexType> 297 298 299 <xs:complexType name="AnnotationAction"> 300 <xs:complexContent> 301 <xs:extension base="BaseAction"> 302 <xs:attribute name="action" type="AnnotationActionName" use="required"/> 303 </xs:extension> 304 </xs:complexContent> 305 </xs:complexType> 306 307 <xs:complexType name="PermissionAction"> 308 <xs:complexContent> 309 <xs:extension base="BaseAction"> 310 <xs:attribute name="action" type="PermissionActionName" use="required"/> 311 </xs:extension> 312 </xs:complexContent> 313 </xs:complexType> 314 315 <xs:complexType name="AnnotationActionList"> 316 <xs:sequence> 317 <xs:element name="action" type="AnnotationAction" minOccurs="0"/> 318 </xs:sequence> 319 </xs:complexType> 320 321 <xs:complexType name="PermissionActionList"> 322 <xs:sequence> 323 <xs:element name="action" type="PermissionAction" minOccurs="0"/> 324 </xs:sequence> 325 </xs:complexType> 326 327 297 328 <!-- response envelope (not a resource, used for all response on POST/PUT requests) --> 298 329 299 330 <!-- "envelope"--> 300 331 <xs:complexType name="ResponseBody"> 301 <xs:sequence> 302 <xs:element name="content" type="ResponseContent" minOccurs="0" maxOccurs="1"/> 303 <xs:element name="actions" type="ActionList" minOccurs="1" maxOccurs="1"/> 304 </xs:sequence> 305 </xs:complexType> 306 307 <!-- consistency check is left to "schematron": 332 <xs:choice> 333 <xs:element name="annotationResponse" type="AnnotationResponseBody"/> 334 <xs:element name="permissionResponse" type="PermissionResponseBody"/> 335 </xs:choice> 336 </xs:complexType> 337 338 <xs:complexType name="AnnotationResponseBody"> 339 <xs:sequence> 340 <xs:element name="content" type="AnnotationResponseContent" minOccurs="1" maxOccurs="1"/> 341 <xs:element name="actions" type="AnnotationActionList" minOccurs="0" maxOccurs="1"/> 342 </xs:sequence> 343 </xs:complexType> 344 345 <!-- above: consistency check is left to "schematron": 308 346 it has to check if the list objects for CREATE_CACHED_REPRESENTATION(s) conisides with unresolved targets in the content element-annotation 309 --> 310 311 <xs:complexType name="ResponceContent"> 312 <xs:complexContent> 313 <xs:choice> 314 <xs:element name="resolvedAnnotation" type="Annotation"/> 315 <xs:element name="unResolvedAnnotation" type="Annotation"/> 316 <!-- something else? --> 317 </xs:choice> 318 </xs:complexContent> 319 </xs:complexType> 320 321 <!-- consistency check is left to "schematron": 347 the same for permission lists 348 --> 349 350 <xs:complexType name="PermissionResponseBody"> 351 <xs:sequence> 352 <xs:element name="content" type="PermissionResponseContent" minOccurs="1" maxOccurs="1"/> 353 <xs:element name="actions" type="PermissionActionList" minOccurs="0" maxOccurs="1"/> 354 </xs:sequence> 355 </xs:complexType> 356 357 358 <xs:complexType name="AnnotationResponseContent"> 359 <xs:choice> 360 <xs:element name="resolvedAnnotation" type="Annotation"/> 361 <xs:element name="unresolvedAnnotation" type="Annotation"/> 362 </xs:choice> 363 </xs:complexType> 364 365 <!-- above: consistency check is left to "schematron": 322 366 it has to check if the element with the name resolvedAnnotation indeed contains ALL target resolved; AND 323 if the element with the name unResolvedAnnotation has at least one unresolved target --> 324 367 if the element with the name unResolvedAnnotation has at least one unresolved target; 368 below: similar consistence check for permissions 369 --> 370 371 <xs:complexType name="PermissionResponseContent"> 372 <xs:choice> 373 <xs:element name="resolvedPermissionList" type="PermissionList"/> 374 <xs:element name="unresolvedPermissionList" type="PermissionList"/> 375 </xs:choice> 376 </xs:complexType> 325 377 326 378 <!--/////////////////////////////////////--> … … 352 404 <!--/////////////////////////////////////--> 353 405 <!-- POST api/annotation, annotation body --> 406 <!-- request body --> 354 407 <xs:element name="newAnnotation" type="Annotation"/> 355 408 409 <!-- NEW: add examples !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> 410 411 <!-- respond --> 412 <xs:element name="respondNewAnnotation" type="ResponseBody"/> 413 <!-- add two examples: resolved and unresolved targets --> 414 415 416 <!-- GET api/annotations/<aid>/permissions --> 417 418 <xs:element name="listOfPermissions" type="PermissionList"/> 419 356 420 <!--///////////////////////////////////--> 357 <!-- GET api/annotations/<aid>/permissions -->358 359 <xs:element name="listOfPermissions" type="PermissionList"/>360 361 421 <!-- PUT api/annotations/<aid> --> 362 363 <!-- Body of the request--> 364 <xs:element name="newBody" type="AnnotationBody"/> 365 366 <xs:element name="AnnotationBodyUpdate" type="ResponseBody"/> 367 <!-- example all targets resolved, since it is just a body correction, empty list of actions --> 422 423 <!-- Body of the request --> 424 <xs:element name="newBody" type="AnnotationBody"/> 425 426 <xs:element name="respondNewAnnotationBody" type="ResponseBody"/> 427 <!-- example all targets are known, since it is just a body correction, empty list of actions --> 428 429 <!--///////////////////////////////////--> 430 <!-- GET api/users/info?email="xx@mpi.nl" --> 431 <xs:element name="user" type="UserInfo"/> 432 433 <!--///////////////////////////////////--> 434 <!-- PUT api/annotations/<aid>/permissions --> 435 <!-- request body --> 436 <xs:element name="newPermission" type="PermissionList"/> 437 438 <!-- request response --> 439 <xs:element name="respondNewPermissionList" type="ResponseBody"/> 440 <!-- two examples: resolved and unresolved, with the action add user info --> 441 442 <!--///////////////////////////////////--> 443 <!-- PUT api/annotations/<aid>/permissions/<uid>--> 444 <!-- request body --> 445 <xs:element name="accessLevel" type="Permission"/> 446 <!-- request response: no body, just http status --> 447 448 <!--/////////////////////////////////// --> 449 <!--remove a user from the permission list--> 450 <!-- DELETE api/annotations/<aid>/permissions/<uid> --> 451 <!-- request response: no body, just http status --> 452 453 <!--/////////////////////////////////// --> 454 <!--remove an annotation from the DB--> 455 <!-- DELETE api/annotations/<aid> --> 456 <!-- request response: no body, just http status --> 457 458 <!--/////////////////////////////////// --> 459 <!-- GET api/notebooks --> 460 <xs:element name="notebooks" type="NotebookInfos"/> 461 462 <!--/////////////////////////////////// --> 463 <!-- GET api/notebooks/<nid> --> 464 <xs:element name="notebook" type="NotebookInfo"/> 465 466 <!--/////////////////////////////////// --> 467 <!-- GET api/notebooks/<nid>/annotations --> 468 <xs:element name="notebookAnnotations" type="AnnotationInfos"/> 469 470 <!--/////////////////////////////////// --> 471 <!-- PUT api/notebooks/<nid>/<aid> --> 472 <!-- empty request body --> 473 <!-- empty response body, only http status --> 368 474 369 475 </xs:schema>
Note: See TracChangeset
for help on using the changeset viewer.