[annotator-dev] beforeAnnotationsLoaded event

Riccardo Tasso riccardo.tasso at gmail.com
Wed Dec 18 20:58:13 UTC 2013


Ok Randall, I've already seen that page, and it's very usefull to me.

My problem is that my backend doesn't know anything about the html
structure of the page, so he shouldn't store the xpath for start and end of
each annotation.

I'd like to receive annotations from the backend, and let the client
translate from my own format to annotateit format, since it's the only
which really knows the html structure. Hence, after the store plugin
receive the annotations, I'd like to apply a function to them and let
annotateit make his job.

If you help me understanding where the store plugin receives the
annotations from the backend, and what does with them I could try to work
on it, but I think It's a pity rewrite a storage plugin just for this task.

Probably another option would be that of passing a function as a storage
plugin option, called for example annotationsProcessor.

What do you think about it?

Cheers,
   Riccardo

P.S. are you on IRC channel?


2013/12/18 Randall Leeds <tilgovi at hypothes.is>

> You can customize the Store plugin to load from your backend, if it's just
> a matter of configuration.
> https://github.com/okfn/annotator/wiki/Store-Plugin
>
> I would like to know how you would use a beforeAnnotationsLoaded event, in
> case there's another way the use case should be supported.
>
>
> On Tue, Dec 17, 2013 at 12:38 PM, Riccardo Tasso <riccardo.tasso at gmail.com
> > wrote:
>
>> Since I'm not fluent in coffeescript, I understood that for the
>> creation/update/delete I should register for the corresponding events in my
>> plugin.
>>
>>
>> What should I do to make my plugin load the annotation list from my own
>> backend?
>>
>>
>> Thanks,
>>
>>    Riccardo
>>
>>
>> Il 17/dic/2013 20:31 "Randall Leeds" <tilgovi at hypothes.is> ha scritto:
>>
>>> No. There is no such event. You should take care of this transformation
>>> in your store plugin. You may need to extend the existing Store plugin to
>>> suit your needs.
>>>
>>>
>>>  On Tue, Dec 17, 2013 at 11:07 AM, Riccardo Tasso <
>>> riccardo.tasso at gmail.com> wrote:
>>>
>>>> Hi, does exist an event which holds just after the annotations are
>>>> returned by the store?
>>>>
>>>> My store uses an internal format and I'd like to change its results a
>>>> little bit before the annotations are drawn.
>>>>
>>>> Thanks,
>>>>    Riccardo
>>>>
>>>> _______________________________________________
>>>> annotator-dev mailing list
>>>> annotator-dev at lists.okfn.org
>>>> https://lists.okfn.org/mailman/listinfo/annotator-dev
>>>> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>>>>
>>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20131218/953bf4d6/attachment-0004.html>


More information about the annotator-dev mailing list