[annotator-dev] Annotations Not getting loaded on initializing annotator
Apurva Jalit
apurva.jalit at gmail.com
Fri Mar 27 15:58:36 UTC 2015
Hello,
I am implementing the REST APIs required to support annotatorjs. My server
is SQL server and APIs are written in C#.
I have been able to write APIs for search and create. Everything execute
perfectly fine without any error being seen on the browser page. But after
creation, I am testing the loading of previously created annotations but I
fail to see any of these annotations and no error as well.
When I initialize the annotator, I have included the following :
content.annotator('addPlugin', 'Store', {
// The endpoint of the store on your server.
prefix: 'http://localhost:5555/api/Annotation',
// Attach the uri of the current page to all annotations to
allow search.
annotationData: {
'uri': pageURL
},
// This will perform a "search" action when the plugin loads.
Will
// request the last 20 annotations for the current url.
// eg. /store/endpoint/search?limit=20&uri=
http://this/document/only
loadFromSearch: {
'count': 20,
'uri': pageURL
}
});
The response I get is as follows:
{
"total":1,
"annotations":[
{"id":0,
"annotator_schema_version":"v1.0",
"created":"2015-03-27T15:32:48Z",
"updated":"2015-03-27T15:32:48Z",
"text":"asdsad",
"quote":"extension",
"uri":"file:///C:/Users/apurva.jalit/work/NotocolExtension/Google%20Chrome%20Extension1/index.htm",
"ranges":[{"start":"/p[3]","startoffset":37,"end":"/p[3]","endoffset":47}],
"user":"aps",
"consumer":"",
"tags":[],
"permission":
{"read":["group:__world__"],
"admin":null,
"update":null,
"delete":null
}
}
]
}
Is this not enough? Do I have to explicitly make a call to some function to
load this annotation?
Thanks,
Apurva Jalit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150327/ceca876b/attachment-0003.html>
More information about the annotator-dev
mailing list