Changeset 2889


Ignore:
Timestamp:
05/14/13 17:24:02 (11 years ago)
Author:
olhsha
Message:

adjusting the schema

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd

    r2888 r2889  
    3636        </xs:sequence>
    3737    </xs:complexType>
     38   
     39    <!-- //////////////////////// -->
     40    <!-- Version lists -->
     41   
     42    <xs:complexType name="Versions">
     43        <xs:sequence>
     44            <xs:element name="version" type="Version" minOccurs="1" maxOccurs="unbounded"/>
     45        </xs:sequence>       
     46        <xs:attribute name="URI" type="xs:anyURI" use="required"/>
     47    </xs:complexType>
     48
     49
     50    <xs:complexType name="Version">
     51        <xs:sequence>
     52            <xs:element name="version" type="xs:string"/>
     53            <xs:element name="cachedRepresentations" type="CachedRepresentations"/>
     54        </xs:sequence>
     55    </xs:complexType>
     56   
    3857
    3958    <!--////////////////////////////-->
     
    4362    <xs:complexType name="Source">
    4463        <xs:sequence>
    45             <xs:element name="cachedRepresentations" type="CachedRepresentations" minOccurs="1"/>
    46             <xs:element name="versions-siblings" type="Versions" minOccurs="1"/>
     64            <xs:element name="versions-siblings" type="ResourceREF" minOccurs="1"/>
    4765        </xs:sequence>
    4866        <xs:attribute name="URI" type="xs:anyURI" use="required"/>
     
    7896
    7997
    80     <xs:complexType name="Versions">
    81         <xs:sequence>
    82             <xs:element name="version" type="ResourceREF" minOccurs="1" maxOccurs="unbounded"/>
    83         </xs:sequence>
    84     </xs:complexType>
    8598
    8699    <!-- News sources, new/old sources  -->
     
    175188        <xs:complexContent>
    176189            <xs:extension base="ResourceREF">
    177                 <xs:attribute name="permission" type="Permission"/>
     190                <xs:attribute name="permission" type="Permission" use="required"/>
    178191            </xs:extension>
    179192        </xs:complexContent>
     
    182195    <xs:complexType name="PermissionList">
    183196        <xs:sequence>
    184             <xs:element name="user" type="UserWithPermission" maxOccurs="unbounded"/>
    185         </xs:sequence>
    186         <xs:attribute name="eMail" type="xs:string" use="required"/>
     197            <xs:element name="user" type="UserWithPermission" minOccurs="1" maxOccurs="unbounded"/>
     198        </xs:sequence>
    187199    </xs:complexType>
    188200
     
    263275            <xs:extension base="ResourceREF">
    264276                <xs:sequence>
    265                     <xs:element name="notebook" type="ResourceREF"/>
    266277                    <xs:element name="title" type="xs:string"/>
    267278                </xs:sequence>
     
    286297    <xs:simpleType name="PermissionActionName">
    287298        <xs:restriction base="xs:string">
    288             <xs:enumeration value="ASK_USER_INFO"/>
     299            <xs:enumeration value="PROVIDE_USER_INFO"/>
    289300        </xs:restriction>
    290301    </xs:simpleType>
     
    338349        <xs:sequence>               
    339350            <xs:element name="content" type="AnnotationResponseContent" minOccurs="1" maxOccurs="1"/>
    340             <xs:element name="actions" type="AnnotationActionList" minOccurs="0" maxOccurs="1"/>
     351            <xs:element name="actions" type="AnnotationActionList" minOccurs="1" maxOccurs="1"/>
    341352        </xs:sequence>
    342353    </xs:complexType>
     
    350361        <xs:sequence>               
    351362            <xs:element name="content" type="PermissionResponseContent" minOccurs="1" maxOccurs="1"/>
    352             <xs:element name="actions" type="PermissionActionList" minOccurs="0" maxOccurs="1"/>
     363            <xs:element name="actions" type="PermissionActionList" minOccurs="1" maxOccurs="1"/>
    353364        </xs:sequence>
    354365    </xs:complexType>
     
    357368    <xs:complexType name="AnnotationResponseContent">
    358369        <xs:choice>
    359             <xs:element name="resolvedAnnotation" type="Annotation"/>
    360             <xs:element name="unresolvedAnnotation" type="Annotation"/>
     370            <xs:element name="annotation" type="Annotation"/>
    361371        </xs:choice>
    362372    </xs:complexType>
    363373
    364     <!-- above: consistency check is left to "schematron":
    365         it has to check if the element with the name resolvedAnnotation indeed contains ALL target resolved; AND
    366         if the element with the name unResolvedAnnotation has at least one unresolved target;
    367         below: similar consistence check for permissions
    368     -->
    369 
     374   
    370375    <xs:complexType name="PermissionResponseContent">
    371376        <xs:choice>
    372             <xs:element name="resolvedPermissionList" type="PermissionList"/>
    373             <xs:element name="unresolvedPermissionList" type="PermissionList"/>
     377            <xs:element name="permissions" type="PermissionList"/>
    374378        </xs:choice>
    375379    </xs:complexType>
     
    385389
    386390    <!--/////////////////////////////////////-->
    387     <!-- GET api/annotations/AIDxyz  respond -->
     391    <!-- GET api/annotations/AIDzzz  resolvable  -->
     392    <!--  GET api/annotations/AID0xyy unresolvable target sources, step 1-->
    388393    <xs:element name="annotation" type="Annotation"/>
    389394
    390 
    391     <!--/////////////////////////////////////-->
    392     <!--  GET api/annotations/AID0xyz/sources   respond (non-resolvable)-->
    393     <xs:element name="sources" type="SourceInfos"/>
    394 
    395     <!--/////////////////////////////////////-->
    396     <!--  GET api/sources/SID0xyz/  respond  -->
    397     <xs:element name="source" type="Source  "/>
    398 
    399     <!--/////////////////////////////////////-->
    400     <!-- GET api/sources/SID05/cached/CID0efef/metadata (example usage for unresolvable target sources)   -->
     395    <!--/////////////////////////////////////-->
     396    <!--  GET api/sources/SID0xyz/  unresolvable target sources, step 2  -->
     397    <xs:element name="source" type="Source"/>
     398   
     399    <!--/////////////////////////////////////-->
     400    <!--  GET api/versions/VIDaacc  unresolvable target sources, step 3  -->
     401    <xs:element name="versions" type="Versions"/>
     402   
     403
     404    <!--/////////////////////////////////////-->
     405    <!-- GET api/sources/SID05/cached/CID0efef/metadata (unresolvable target sources step, 4)   -->
    401406    <xs:element name="cashedRepresentation" type="CachedRepresentation"/>
    402407
    403408    <!--/////////////////////////////////////-->
    404     <!-- POST api/annotation, annotation body  -->
     409    <!-- POST api/annotation   -->
    405410    <!-- request body -->
    406411    <xs:element name="newAnnotation" type="Annotation"/>
    407412   
    408     <!-- NEW: add examples !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
    409    
    410413    <!-- respond -->
    411414    <xs:element name="respondNewAnnotation" type="ResponseBody"/>
    412     <!-- add two examples: resolved and unresolved targets -->
    413 
    414    
    415     <!-- GET api/annotations/<aid>/permissions -->
    416 
    417     <xs:element name="listOfPermissions" type="PermissionList"/>
    418415
    419416    <!--///////////////////////////////////-->
    420417    <!-- PUT api/annotations/<aid> -->
    421 
     418   
    422419    <!-- Body of the request -->
    423420    <xs:element name="newBody" type="AnnotationBody"/>
    424 
     421    <!-- Body of the respond -->
    425422    <xs:element name="respondNewAnnotationBody" type="ResponseBody"/>
    426     <!-- example all targets are known, since it is just a body correction, empty list of actions -->
     423   
     424   
     425    <!-- GET api/annotations/<aid>/permissions -->
     426
     427    <xs:element name="permissions" type="PermissionList"/>
     428
     429   
    427430   
    428431    <!--///////////////////////////////////-->
     
    433436    <!-- PUT api/annotations/<aid>/permissions -->
    434437    <!-- request body -->
    435     <xs:element name="newPermission"  type="PermissionList"/>
    436    
    437     <!-- request response -->
    438     <xs:element name="respondNewPermissionList" type="ResponseBody"/>
    439     <!-- two examples: resolved and unresolved, with the action add user info -->
     438    <!--  permissions element-->
    440439   
    441440    <!--///////////////////////////////////-->
     
    465464    <!--/////////////////////////////////// -->
    466465    <!--  GET api/notebooks/<nid>/annotations -->
    467     <xs:element name="notebookAnnotations" type="AnnotationInfos"/>
     466    <!-- annotations element -->
    468467   
    469468    <!--/////////////////////////////////// -->
Note: See TracChangeset for help on using the changeset viewer.