Changeset 2836 for DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/conversion.utils.js
- Timestamp:
- 04/26/13 11:31:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/conversion.utils.js
r2812 r2836 46 46 function om_object2annotation(om_object){ 47 47 var note = om_object.oid_property.match(/<NOTE>(.+?)<\/NOTE>/)[1]; 48 var hyperanchor = om_object.oid_property.match(/<HYPER_ANCHOR>(.+?)<\/HYPER_ANCHOR>/)[1]; 49 var style=''; 48 50 var timestamp = new Date(om_object.oid_date); 51 52 hyperanchor = unescape(hyperanchor); 53 54 annotationProxy.log('hyperanchor : '+hyperanchor); 55 hyperanchor.match(/^(.+\([0-9]+\)\([0-9]+\)\([\s\S]*\))&(.+\([0-9]+\)\([0-9]+\)\([\s\S]*\))&(.+)$/); 56 57 style = RegExp.$3; 49 58 50 59 var path = {}; … … 66 75 67 76 var annotation = '<?xml version="1.0"?>\n\ 68 <annotation xmlns="http://dasish.eu/ns/addit" timeStamp="'+timestamp.toISOString()+'">\n\ 77 <annotation \n\ 78 xmlns="http://dasish.eu/ns/addit" \n\ 79 xmlns:xhtml="http://www.w3.org/1999/xhtml"\n\ 80 URI="tempAIDgfgf" \n\ 81 timeStamp="'+timestamp.toISOString()+'">\n\ 82 <owner ref="http://dasish.eu/users/how_will_this_be_sent_from_the_client"/>\n\ 83 <headline>'+om_object.doc_title+'</headline>\n\ 84 <body type="Note">\n\ 85 <xhtml:span style="'+style+'">'+note+'</xhtml:span>\n\ 86 </body>\n\ 69 87 <targetSources>\n\ 70 <targetSource xml:id="" source="'+om_object.doc_url+xpointer+'"/>\n\ 88 <action>CREATE_CACHED_REPRESENTATION</action>\n\ 89 <link>'+om_object.doc_url+xpointer+'</link>\n\ 90 <version>'+timestamp.toISOString()+'</version>\n\ 71 91 </targetSources>\n\ 72 <body type="Note">'+note+'</body>\n\73 92 </annotation>'; 74 93 return annotation;
Note: See TracChangeset
for help on using the changeset viewer.