[annotator-dev] Annotation uri empty in openshakespeare example.

Ewald Zietsman ewald at siyavula.com
Fri Aug 5 12:15:24 UTC 2011


OK so it looks like something is wrong with my annotator.


I've changed the dev.html to include the local store I'm running.

 <script>
      var devAnnotator
      jQuery(function ($) {
        var elem = document.getElementById('airlock');


        this.options = {

            user: { },


            store: { prefix: 'http://localhost:5000/api' }

         }


        devAnnotator = new Annotator(elem)

          .addPlugin('Auth')

          .addPlugin('Tags')

          .addPlugin('User')
          .addPlugin('Store', this.options.store);



devAnnotator.plugins['User'].setUser('alice');
      });
    </script>



I've also changed the store backend to print out the annotation for me every
time I create a new one. I get the following:

127.0.0.1 - - [05/Aug/2011 14:07:37] "POST /api/annotations HTTP/1.1" 200 -
Annotation sent to Roundup module
---------------------------------
account_id    :    None
tags    :    [u'']
text    :    tst3
_rev    :    1-6d881fc51f0ae696bae49cbc878a587b
created    :    2011-08-05T14:07:54.580436
uri    :    None
ranges    :    [{u'start': u'/p', u'end': u'/ol/li', u'startOffset': 427,
u'endOffset': 11}]
annotator_schema_version    :    v1.0
user    :    {'id': u'alice'}
quote    :    None
_id    :    bafa68b0a94965f0c7eff1c637008729
type    :    Annotation
id    :    bafa68b0a94965f0c7eff1c637008729
permissions    :    {'read': [], 'admin': [], 'update': [], 'delete': []}


It seems that everything is going through but for some reason the actual
quote field containing the text portion of the highlighted area is not.



On Fri, Aug 5, 2011 at 1:52 PM, Rufus Pollock <rufus.pollock at okfn.org>wrote:

> On 5 August 2011 12:22, Ewald Zietsman <ewald at siyavula.com> wrote:
>
>> Hi all,
>>
>> I'm trying to get the annotator to send annotations to a xml-rpc server.
>> I'm doing this via the annotator-store by adding the functionality in the
>> python backend. I'd like to not only send the textrange but also the actual
>> text that was highlighted. Is there an easy way to get the annotator to
>> include this in its message (that gets saved)? If not, the uri of the page
>> that was annotated should be in the annotation
>>
>
>
> That is already in the text that gets saved -- in the "quote" field I
> believe (though I note this does not preserve html formatting -- for obvious
> reasons!).
>
>
>> that goes into the store, but mine says 'None'.
>>
>
> You have to set the uri yourself when initializing the annotator on that
> page -- I guess we could default it to window.location but the point was for
> the Service to set the uri so that it could be used as a docid if wanted.
> (also means if you move pages around you can still get the right annotations
> ...)
>
> Rufus
>
>
>> --
>> *
>> Ewald Zietsman
>>
>> Technical Coor**dinator*
>> *
>> *
>> *
>> *
>> Website: www.siyavula.com
>> The Open Innovation Studio, 27 Buitenkant Street, Cape Town, 8001
>>
>> A Shuttleworth Foundation Seeded Project
>> Website: www.shuttleworthfoundation.org
>>
>>
>> _______________________________________________
>> annotator-dev mailing list
>> annotator-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/annotator-dev
>>
>>
>
>
> --
> Co-Founder, Open Knowledge Foundation
> Promoting Open Knowledge in a Digital Age
> http://www.okfn.org/ - http://blog.okfn.org/
>
>
>


-- 
*
Ewald Zietsman

Technical Coor**dinator*
*
*
*
*
Website: www.siyavula.com
The Open Innovation Studio, 27 Buitenkant Street, Cape Town, 8001

A Shuttleworth Foundation Seeded Project
Website: www.shuttleworthfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20110805/a5d16bca/attachment-0002.html>


More information about the annotator-dev mailing list