Changes between Version 24 and Version 25 of DASISH/XSD and XML


Ignore:
Timestamp:
04/25/13 16:02:40 (11 years ago)
Author:
olhsha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DASISH/XSD and XML

    v24 v25  
    2020--  Each of these types has an obligatory attribute "URI" which contains DASISH identifier pointing to the location of the resource on the DASISH server.
    2121
    22 -- There are five lists-of-reference types:{ {{CachedRepresentations}}}, {{{Sources}}}, {{{Users}}}, {{{Annotations}}}, {{{Notebooks}}}. Their names are just plural English forms of the corresponding types. 
     22-- There are five lists-of-reference types:{{{CachedRepresentations}}}, {{{Sources}}}, {{{Users}}}, {{{Annotations}}}, {{{Notebooks}}}. Their names are just plural English forms of the corresponding types. 
    2323
    2424-- There five corresponding resource-infor types: {{{CachedRepresentationInfo}}},  {{{SourceInfo}}}, {{{UserInfo}}}, {{{AnnotationInfo}}}, {{{NotebookInfo}}}. They contain reference to the corresponding resource plus the most important information about the resource.
    2525
    26 -- There five corresponding list-of-resource-infor types: {{{CachedRepresentationInfos}}},  {{{SourceInfos}}}, {{UserInfos}}}, {{{AnnotationInfos}}},{{{NotebookInfos}}}.
     26-- There five corresponding list-of-resource-infor types: {{{CachedRepresentationInfos}}},  {{{SourceInfos}}}, {{{UserInfos}}}, {{{AnnotationInfos}}},{{{NotebookInfos}}}.
    2727
    2828There is a number of auxiliary types as well. A commonly-used one is ResourceREF which contains the attribute "ref" of type {{{xs:anyURI}}}. It allows to have announce elements-references and avoid mixing-them-up with elements-resources, without adding REF to the name. For instance {{{<owner ref="http:/dasish.eu/users/UIDefef"  />}}}.
     
    330330{{{#!xml
    331331<?xml version="1.0" encoding="UTF-8"?>
    332 <userInfo
    333     xmlns="http://www.dasish.eu/ns/addit" 
    334     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    335     xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
    336     currentUser="true">
    337     <uid>ID01</uid>
    338 </userInfo>
    339 }}}
    340 
    341 
    342 == Responding GET api/annotations?source="http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia"&access=read  ==
     332<currentUserInfo xmlns="http://www.dasish.eu/ns/addit"
     333 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     334 xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
     335 ref="http://dasish.eu/users/UIDefef"
     336 currentUser="true"/>
     337}}}
     338
     339
     340== Responding GET api/annotations?link="http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia"&access=read  ==
     341
     342The root element below is of type {{{AnnotationInfos}}} (the list of {{{AnnotationInfo}}}).
    343343
    344344{{{#!xml
    345345<?xml version="1.0" encoding="UTF-8"?>
    346 <annotationsOfSource xmlns="http://www.dasish.eu/ns/addit"
    347     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    348     xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd">
    349     <annotations>
    350         <annotation id="AID03">
    351             <owner ref="ID02"/>
    352             <headline>My client is not in a hurry</headline>
    353             <targetSources>
    354                 <targetSource ref="SID015"/>
    355             </targetSources>
    356         </annotation>
    357         <annotation id="AID02">
    358             <owner ref="ID01"/>
    359             <headline>Nativity Facade</headline>
    360             <targetSources>
    361                 <targetSource ref="SID015"/>
    362                 <targetSource ref="SID017"/>
    363             </targetSources>
    364         </annotation>
    365         <annotation id="AID01">
    366             <owner ref="ID01"/>
    367             <headline>Nativity Facade (old site)</headline>
    368             <targetSources>
    369                 <targetSource ref="SID005"/>
    370                 <targetSource ref="SID007"/>
    371             </targetSources>
    372         </annotation>
    373     </annotations>
    374 </annotationsOfSource>
    375 
    376 }}}
    377 
    378 
    379 
    380 == Responding GET api/annotations/AID02 (example usage for resolvable target sources) ==
     346<annotationsOfLink xmlns="http://www.dasish.eu/ns/addit"
     347 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     348 xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd">
     349    <annotation ref="http://dasish.eu/annotations/AIDxyxy">
     350        <owner ref="http://dasish.eu/users/UIDefef"/>
     351        <headline>My client is not in a hurry</headline>
     352        <targetSources>
     353            <targetSource ref="http://dasish.eu/sources/SIDacdc"/>
     354        </targetSources>
     355    </annotation>
     356    <annotation ref="http://dasish.eu/annotations/AIDzzz">
     357        <owner ref="http://dasish.eu/users/UIDe1fe1f"/>
     358        <headline>Nativity Facade</headline>
     359        <targetSources>
     360            <targetSource ref="http://dasish.eu/sources/SIDaacc"/>
     361            <targetSource ref="http://dasish.eu/sources/SIDaaaa"/>
     362        </targetSources>
     363    </annotation>
     364    <annotation ref="http://dasish.eu/annotations/AIDzyy">
     365        <owner ref="http://dasish.eu/users/UIDefef"/>
     366        <headline>Nativity Facade (old site)</headline>
     367        <targetSources>
     368            <targetSource ref="http://dasish.eu/sources/SIDbbbb"/>
     369            <targetSource ref="http://dasish.eu/sources/SIDrrrr"/>
     370        </targetSources>
     371    </annotation>
     372</annotationsOfLink>
     373}}}
     374
     375
     376
     377== Responding GET api/annotations/AIDzzz (example of resolvable target sources) ==
    381378
    382379{{{#!xml
     
    385382 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    386383 xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
    387  xml:id="AID02"
    388  URI="http://www.dasish.eu/DB/AID002"
     384 URI="http://dasish/annotations/AIDzzz"
    389385 timeStamp="2013-05-04T18:13:51.0Z">
    390     <owner ref="ID01"/>
     386    <owner ref="http://dasish.eu/users/UIde1fe1f"/>
    391387    <headline>Nativity Facade</headline>
    392388    <body type="relation">
    393389        <relation>different</relation>
    394         <this ref="SID015"/>
    395         <that ref="SID017"/>  
     390        <this ref="http://dasish.eu/sources/SIDaacc"/>
     391        <that ref="http://dasish.eu/sources/SIDaaaa"/> 
    396392    </body>
    397393    <targetSources>
    398         <targetSource xml:id="SID015">
    399             <URI>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Nativity_Fa.C3.A7ade</URI>
    400             <version>5.0</version>
     394        <targetSource ref="http://dasish.eu/sources/SIDaacc">
     395            <link>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Nativity_Fa.C3.A7ade</link>
     396            <version>20.04.2013</version>
    401397        </targetSource>
    402         <targetSource xml:id="SID017">
    403             <URI>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Passion_Fa.C3.A7ade</URI>
    404             <version>5.0</version>
     398        <targetSource ref="http://dasish.eu/sources/SIDaaaa">
     399            <link>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Passion_Fa.C3.A7ade</link>
     400            <version>20.04.2013</version>
    405401        </targetSource>
    406402    </targetSources>
    407403    <readers>
    408         <reader ref="ID01"/>
    409         <reader ref="ID03"/>
    410         <reader ref="ID04"/>
     404        <reader ref="http://dasish.eu/users/UIde1fe1f"/>
     405        <reader ref="http://dasish.eu/users/UIdefef"/>
     406        <reader ref="http://dasish.eu/users/UIdefff"/>
    411407    </readers>
    412408    <writers>
    413         <writer ref="ID01"/>
    414         <writer ref="ID03"/>
     409        <writer ref="http://dasish.eu/users/UIde1fe1f"/>
     410        <writer ref="http://dasish.eu/users/UIdefef"/>
    415411    </writers>
    416 </annotation>
    417 }}}
    418 
    419 
    420 
    421 == Responding GET api/annotations/AID01 (example usage for unresolvable target sources) ==
    422 
    423 The respond for an annotation with unresolved target sources and the respond for an annotation with resolved target sources (see above) are both instances of the same schema element.
     412</annotation>}}}
     413
     414
     415
     416== Responding GET api/annotations/AIDzyy (example usage for unresolvable target sources) ==
     417
     418The respond for an annotation with unresolved target sources and the respond for an annotation with resolved target sources (see above) are both instances of the same schema element.  However, the annotation refers to an obsolete version of the page. Later, having the target source references, the client will ask for cached representations of the obsolete web-page.
    424419
    425420{{{#!xml
    426421<?xml version="1.0" encoding="UTF-8"?>
    427422<annotation xmlns="http://www.dasish.eu/ns/addit"
    428     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    429     xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
    430     xml:id="AID01"
    431     URI="http://www.dasish.eu/DB/AID002"
    432     timeStamp="2010-05-04T18:13:51.0Z">
    433     <owner ref="ID01"/>
    434     <headline>Nativity Facade (old site)</headline>
     423 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     424 xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
     425 URI="http://dasish/annotations/AIDzyy"
     426 timeStamp="2013-05-04T18:13:51.0Z">
     427    <owner ref="http://dasish.eu/users/UIde1fe1f"/>
     428    <headline>Nativity Facade (old page)</headline>
    435429    <body type="relation">
    436430        <relation>different</relation>
    437         <this ref="SID005"/>
    438         <that ref="SID007"/>  
     431        <this ref="http://dasish.eu/sources/SIDbbbb"/>
     432        <that ref="http://dasish.eu/sources/SIDrrrr"/> 
    439433    </body>
    440434    <targetSources>
    441         <targetSource xml:id="SID005">
    442             <URI>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Nativity_Fa.C3.A7ade</URI>
    443             <version>1.0</version>
     435        <targetSource ref="http://dasish.eu/sources/SIDbbb">
     436            <link>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Nativity_Fa.C3.A7ade</link>
     437            <version>29.01.2010</version>
    444438        </targetSource>
    445         <targetSource xml:id="SID007">
    446             <URI>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Passion_Fa.C3.A7ade</URI>
    447             <version>1.0</version>
     439        <targetSource ref="http://dasish.eu/sources/SIDrrrr">
     440            <link>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Passion_Fa.C3.A7ade</link>
     441            <version>29.01.2010</version>
    448442        </targetSource>
    449443    </targetSources>
    450444    <readers>
    451         <reader ref="ID01"/>
    452         <reader ref="ID03"/>
    453         <reader ref="ID04"/>
     445        <reader ref="http://dasish.eu/users/UIde1fe1f"/>
     446        <reader ref="http://dasish.eu/users/UIdefef"/>
     447        <reader ref="http://dasish.eu/users/UIdefff"/>
    454448    </readers>
    455449    <writers>
    456         <writer ref="ID01"/>
    457         <writer ref="ID03"/>
     450        <writer ref="http://dasish.eu/users/UIde1fe1f"/>
     451        <writer ref="http://dasish.eu/users/UIdefef"/>
    458452    </writers>
    459453</annotation>
     
    461455
    462456
    463 == Responding GET api/annotations/AID01/sources (example usage for unresolvable target sources) ==
    464 
    465 {{{#!xml
    466 <?xml version="1.0" encoding="UTF-8"?>
    467 <sources xmlns="http://www.dasish.eu/ns/addit"
    468     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    469     xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd">
    470     <targetSource xml:id="SID005" lastModified="2006-05-04T18:13:51.0Z">
    471         <URI>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Nativity_Fa.C3.A7ade</URI>
    472         <version>1.0</version>
    473         <versions>
    474             <version ref="SID005"/>
    475             <version ref="SID015"/>
    476         </versions>
    477         <cachedRepresentations>
    478             <cachedRepresentation xml:id="CID005" URI="http://www.dasish.eu/DB/CID005" mimeType="text/html" tool="tool1" type="text"/>
    479             <cachedRepresentation xml:id="CID005A" URI="http://www.dasish.eu/DB/CID005A" mimeType="image/png" tool="tool2" type="screenshot"/>
    480             <cachedRepresentation xml:id="CID015" URI="http://www.dasish.eu/DB/CID015" mimeType="mimeType3" tool="tool3" type="type3"/>
    481         </cachedRepresentations>
    482     </targetSource>
    483     <targetSource xml:id="SID007" lastModified="2006-05-04T18:13:51.0Z">
    484         <URI>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Passion_Fa.C3.A7ade</URI>
    485         <version>1.0</version>
    486         <versions>
    487             <version ref="SID007"/>
    488             <version ref="SID017"/>
    489         </versions>
    490         <cachedRepresentations>
    491             <cachedRepresentation xml:id="CID007" URI="http://www.dasish.eu/DB/CID007" mimeType="mimeType5" tool="tool5" type="type5"/>
    492             <cachedRepresentation xml:id="CID017" URI="http://www.dasish.eu/DB/CID017" mimeType="mimeType7" tool="tool7" type="type7"/>
    493         </cachedRepresentations>
    494     </targetSource>
    495 </sources>
    496 }}}
     457== Responding GET api/sources/SIDbbb (example usage for unresolvable target sources) ==
     458
     459{{{#!xml
     460<source xmlns="http://www.dasish.eu/ns/addit"
     461 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     462 xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
     463 URI="http://dasish.eu/sources/SIDbbbb"
     464 timeSatmp="2011-05-04T18:13:51.0Z"
     465 link="http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Passion_Fa.C3.A7ade"
     466 version="1.0">
     467    <cachedRepresentations>
     468        <cachedRepresentation ref="http://dasish.eu/cached/CIDtttt"/>
     469        <cachedRepresentation ref="http://dasish.eu/cached/CIDttxvv"/>
     470    </cachedRepresentations>
     471    <versions-siblings>
     472        <version ref="http://dasish.eu/sources/SIDaacc"/>
     473    </versions-siblings>
     474</source>}}}
    497475
    498476=== Remarks by Menzo ===
    499 
    500 The versions list contains the version you looking at as well, e.g., the version list of SID005 consists of SID005 and SID015. Is this so because the list is ordered and we can determine the position of the version under consideration?
    501477
    502478
     
    507483
    508484
    509 == Responding GET api/sources/SID05/cached/CID005A/metadata (example usage for unresolvable target sources) ==
     485== Responding GET api/sources/SIDbbb/cached/CIDtttt/metadata (example usage for unresolvable target sources) ==
    510486
    511487{{{#!xml
     
    514490 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    515491 xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
    516  xml:id="CID005A" URI="http://www.dasish.eu/DB/CID005A" mimeType="image/png" tool="tool2" type="screenshot"/>
    517 }}}
     492 URI="http://dasish.eu/cached/CIDtttt"
     493 mimeType="image/png"
     494 tool="tool1"
     495 type="screenshot"/>}}}
    518496
    519497== Request body for POST api/annotations ==
    520498
     499
     500
     501The version of the POST with an unknown target source, signalling the client to provide a cached representation for it: 
    521502{{{#!xml
    522503<?xml version="1.0" encoding="UTF-8"?>
    523 <newAnnotation xmlns="http://www.dasish.eu/ns/addit"
    524     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    525     xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
    526     xml:id="tempAID06"
    527     timeStamp="2013-05-04T18:13:51.0Z">
    528     <owner ref="ID02"/>
     504<annotation xmlns="http://www.dasish.eu/ns/addit"
     505 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     506 xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
     507 URI="tempAIDgfgf"
     508 timeStamp="2013-05-29T18:13:51.0Z">
     509    <owner ref="http://dasish.eu/users/UIde1fe1f"/>
    529510    <headline>Organ</headline>
    530511    <body>
     
    532513    </body>
    533514    <targetSources>
    534         <targetSource xml:id="SID018">
    535             <URI>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Organ</URI>
    536             <version>5.0</version>
     515        <targetSource>
     516            <action>CREATE_CACHED_REPRESENTATION</action>
     517            <link>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Organ</link>
     518            <version>20.04.2013</version>
    537519        </targetSource>
    538520    </targetSources>
    539521    <readers>
    540         <reader ref="ID02"/>
     522        <reader ref="http://dasish.eu/users/UIde1fe1f"/>
    541523    </readers>
    542524    <writers>
    543         <writer ref="ID02"/>
     525        <writer ref="http://dasish.eu/users/UIde1fe1f"/>
    544526    </writers>
    545 </newAnnotation>
    546 }}}
    547 
    548 The version of the POST with an unknown target source, signalling the client to provide a cached representation for it: 
    549 {{{#!xml
    550 <?xml version="1.0" encoding="UTF-8"?>
    551 <newAnnotation xmlns="http://www.dasish.eu/ns/addit"
    552     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    553     xsi:schemaLocation="http://www.dasish.eu/ns/addit file:/Users/olhsha/repositories/DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd"
    554     xml:id="tempAID06"
    555     timeStamp="2013-05-04T18:13:51.0Z">
    556     <owner ref="ID02"/>
    557     <headline>Organ</headline>
    558     <body>
    559         <note>installed in 2010</note>
    560     </body>
    561     <targetSources>
    562         <targetSource xml:id="SID018">
    563             <URI>http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia#Organ</URI>
    564             <version>5.0</version>
    565             <action>CREATE_CACHED_REPRESENTATION</action>
    566         </targetSource>
    567     </targetSources>
    568     <readers>
    569         <reader ref="ID02"/>
    570     </readers>
    571     <writers>
    572         <writer ref="ID02"/>
    573     </writers>
    574 </newAnnotation>
    575 }}}
     527</annotation>
     528}}}