ProjectMirador / mirador

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
https://projectmirador.org
Apache License 2.0
548 stars 258 forks source link

Should json-ld 'source' field for an annotation be 'full'? #551

Closed glenrobson closed 8 years ago

glenrobson commented 9 years ago

I've been playing around with the annotations in mirador and trying to store them in a jena database for a simple annotation store demonstration. I'm storing the annotation generated as its created by osd-region-rect-tool.js as in the following example:

{
    "@context": "http://iiif.io/api/presentation/2/context.json",
    "@type": "oa:Annotation",
    "motivation": ["oa:commenting"],
    "resource": [{
        "@type": "dctypes:Text",
        "format": "text/html",
        "chars": "<p>test<\/p>"
    }],
    "on": {
        "@type": "oa:SpecificResource",
        "source": "http://oculus-dev.harvardx.harvard.edu/manifests/drs:14033171/canvas/canvas-14033925.json",
        "selector": {
            "@type": "oa:FragmentSelector",
            "value": "xywh=399,446,311,134"
        },
        "scope": {
            "@context": "http://www.harvard.edu/catch/oa.json",
            "@type": "catch:Viewport",
            "value": "xywh=-2167,312,6038,1234"
        }
    }
}

when I convert it from JSON-LD to RDF XML it loses the source element and I think its because source is missing in:

http://iiif.io/api/presentation/2/context.json

I changed 'source' to 'full' (in osd-region-rect-tool.js line 228) and on conversion it now converts it to the following:

<oa:hasSource rdf:resource="http://oculus-dev.harvardx.harvard.edu/manifests/drs:14033171/canvas/canvas-14033925.json"/>

should either the mirador osd-region-rect-tool.js use 'full' or should the context.json be changed so that its called source (or hasSource if we're following http://www.openannotation.org/spec/core/publishing.html).

Cheers

Glen

azaroth42 commented 9 years ago

We have the same issue with Triannon and the non-existant catch context. I think the scope should just be taken out completely. Mirador doesn't do anything with it anyway ... right?

And "source" should be "full" (being the actual canvas that is selected from)

glenrobson commented 9 years ago

Yes I lost the catch content as well but didn't know if it was needed with a non catch store.