openannotation / annotator-store

A backend store for the Annotator
http://annotateit.org/
MIT License
177 stars 66 forks source link

Document plugin removing links without type #116

Closed gergely-ujvari closed 9 years ago

gergely-ujvari commented 9 years ago

Folks, this is about a change I've introduced here

I've introduced this function to sweep out incomplete links (who either have no type or no href) Unfortunately, I've forgotten, that we in Hypothes.is fill the document's field with links which has no type

So, we this is an example of what we're saving:

            "link": [
            {
                "href": "http://www.forbes.com/sites/realspin/2014/03/31/the-ipccs-latest-report-deliberately-excludes-and-misrepresents-important-climate-science/print/"
            },
            {
                "href": "http://onforb.es/1ffC1p9",
                "type": "",
                "rel": "shortlink"
            }
            ]

And because the first one does not have a link type, we drop that. My question is, should we keep them, or should we modify our document filling mechanism at H to provide a type for those links?

tilgovi commented 9 years ago

Where do we do this and why?

gergely-ujvari commented 9 years ago

Actually the annotator document plugin does it, that we use. https://github.com/openannotation/annotator/blob/v1.2.x/src/plugin/document.coffee#L101

It creates a link without a type for the current document.location.href.

I think I should allow links without type then. @nickstenning: Your thoughts on this?

tilgovi commented 9 years ago

We currently store that information also in the annotation's uri field so I'm not concerned about dropping it. I'd rather spend time on crafting a different approach to document metadata.