[annotator-dev] Previously created Annotations not getting loaded

Apurva Jalit apurva.jalit at gmail.com
Wed Apr 8 16:51:04 UTC 2015


Hello All,
I have implemented my own storage backend. I am not using authentication
and the permission plugins as of now.

On initialising annotator for a web page, I can see that I receive some
annotations in the response but they are not getting loaded on the webpage.

When I compare the response that my backend sends with the response
received on the annotatorjs home page, i can the difference in the format
presentation of the response: the response sent by my server backend
appears as a single line with all the correct parameters in json type
(mentioned in the end of the mail) whereas the one on annotatorjs page, is
presented as properly indented and well presented json objects. Can this be
the reason for the difference?
(I am using chrome dev tools to see the response data on calling APIs)

Please go through the following if I am missing out on something else too.

*Annotator initalise*
content.annotator();
content.annotator('addPlugin', 'Tags');
content.annotator('addPlugin', 'Store', {
        // The endpoint of the store on your server.
        prefix: 'http://localhost:5555/api/Annotation',
        annotationData: {
            'uri': pageURL,
            'user': userID

        },

        loadFromSearch: {
            'count': 20,
            'uri': pageURL,
            'user': userID

        }
    });



*Response on search called during annotator init*
{"total":1,"rows":[{"ranges":[{"start":"/div[2]/p[1]","startoffset":401,"end":"/div[2]/p[1]","endoffset":404}],"quote":"as","text":"asdasd","tags":[],"uri":"
http://localhost:5555/Home/TestPopup
","user":2,"id":10030,"created":"2011-05-24T18:52:08.036814","updated":"2011-05-24T18:52:08.036814"}]}


*Request Data when annotation is created*
{"ranges":[{"start":"/div[2]/p[1]","startoffset":589,"end":"/div[2]/p[1]","endoffset":595}],"quote":"Cicero","text":"place","tags":[],"uri":"
http://localhost:5555/Home/TestPopup
","user":2,"id":10031,"created":"2011-05-24T18:52:08.036814","updated":"2011-05-24T18:52:08.036814"}


Thanks,
Apurva Jalit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150408/7b79254c/attachment-0003.html>


More information about the annotator-dev mailing list