Changeset 5680
- Timestamp:
- 09/26/14 09:21:36 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/client/branches/webannotator-basic/chrome/markingcollection/content/markingcollection/annotator-service/conversion.utils.js
r5483 r5680 120 120 var backend_url = annotationFramework.getBackend(); 121 121 var backend_relpath = backend_url.substring(backend_url.indexOf(":")+3); 122 pos = backend_relpath.indexOf("/"); 123 backend_relpath = backend_relpath.substring(pos) 122 var pos = backend_relpath.indexOf("/"); 123 124 /* Notes on var annotation: 125 * UUID is hardcoded starting with a letter (below), because value is used for attribute xml:id as well. */ 124 126 125 127 var annotation = '<?xml version="1.0" encoding="UTF-8"?>\n\ … … 128 130 xsi:schemaLocation="http://www.dasish.eu/ns/addit http://dasish.eu/DASISH-schema.xsd"\n\ 129 131 xmlns:xhtml="http://www.w3.org/1999/xhtml"\n\ 130 URI="' + annotationFramework.getBackend() + '/api/annotations/00000000-0000-0000-' + om_object.oid.substring(0, 4) + '-' + om_object.oid.substring(4, 14) + '00"\n\ 131 ownerRef="' + annotationFramework.getBackend() + '/api/principals/00000000-0000-0000-' + om_object.oid.substring(0, 4) + '-' + om_object.oid.substring(4, 14) + '00">\n\ 132 xml:id="aaa00000-0000-0000-' + om_object.oid.substring(0, 4) + '-' + om_object.oid.substring(4, 14) + '00"\n\ 133 href="' + backend_relpath.substring(pos) + '/api/annotations/aaa00000-0000-0000-' + om_object.oid.substring(0, 4) + '-' + om_object.oid.substring(4, 14) + '00"\n\ 134 <ownerHref>' + backend_relpath.substring(pos) + '/api/principals/aaa00000-0000-0000-' + om_object.oid.substring(0, 4) + '-' + om_object.oid.substring(4, 14) + '00</ownerHref>\n\ 132 135 <headline>' + om_object.oid_title + '</headline>\n\ 133 136 <lastModified>' + timestamp.toISOString() + '</lastModified>\n\ … … 139 142 </body>\n\ 140 143 <targets>\n\ 141 <targetInfo ref="' + annotationFramework.getBackend() + '/api/targets/ 00000000-0000-0000-' + om_object.oid.substring(0, 4) + '-' + om_object.oid.substring(4, 14) + '00">\n\144 <targetInfo ref="' + annotationFramework.getBackend() + '/api/targets/aaa00000-0000-0000-' + om_object.oid.substring(0, 4) + '-' + om_object.oid.substring(4, 14) + '00">\n\ 142 145 <link>' + om_object.doc_url + xpointer + '</link>\n\ 143 146 <version>' + timestamp.toISOString() + '</version>\n\
Note: See TracChangeset
for help on using the changeset viewer.