{"action":"created","issue":{"url":"https://api.github.com/repos/IIIF/mirador/issues/766","repository_url":"https://api.github.com/repos/IIIF/mirador","labels_url":"https://api.github.com/repos/IIIF/mirador/issues/766/labels{/name}","comments_url":"https://api.github.com/repos/IIIF/mirador/issues/766/comments","events_url":"https://api.github.com/repos/IIIF/mirador/issues/766/events","html_url":"https://github.com/IIIF/mirador/issues/766","id":136664743,"number":766,"title":"Annotation compliance with IIIF Presentation API and JSON-LD","user":{"login":"yuricus","id":4907835,"avatar_url":"https://avatars.githubusercontent.com/u/4907835?v=3","gravatar_id":"","url":"https://api.github.com/users/yuricus","html_url":"https://github.com/yuricus","followers_url":"https://api.github.com/users/yuricus/followers","following_url":"https://api.github.com/users/yuricus/following{/other_user}","gists_url":"https://api.github.com/users/yuricus/gists{/gist_id}","starred_url":"https://api.github.com/users/yuricus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuricus/subscriptions","organizations_url":"https://api.github.com/users/yuricus/orgs","repos_url":"https://api.github.com/users/yuricus/repos","events_url":"https://api.github.com/users/yuricus/events{/privacy}","received_events_url":"https://api.github.com/users/yuricus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-26T11:02:19Z","updated_at":"2016-02-26T13:51:36Z","closed_at":null,"body":"\r\n# Short version\r\n\r\nAnnotation document generated with Mirador does not comply with JSON-LD and IIIF Presentation API 2.0, this may affect annotation endpoint implementations as well. I suggest following the standard but it may be painful in terms of changes it might entail.\r\n\r\n# Long version\r\n\r\nIIIF Presentation API uses JSON-LD as data format. JSON-LD is the way to represent RDF data structures. To simplify interoperation with non-RDF-aware sources, IIIF Presentation API uses 'framed' JSON-LD documents, consumer or producer of those documents does not need to know about RDF data triples. In JSON-LD documents there is a @context which specifies translation of JSON fields to RDF Linked Data entities.\r\n\r\nWhen Mirador produces JSON-LD for annotations, it creates incorrect JSON-LD documents, those documents do not correspond to specified @context.\r\n\r\nSpecifically, the error is in specifying original canvas annotation refers to. Mirador uses 'source' field for that. There's no 'source' field mentioned in IIIF Presentation @context, but there is 'full' field witch is mapped onto “oa:hasSource” property.\r\n\r\nI mentioned in #748 that this affects ongoing annotation work, but this problem persisted for a long time. Unfortunately, this also affects annotation endpoint. Like, for SimpleASEndpoint there's a code:\r\n\r\nhttps://github.com/glenrobson/SimpleAnnotationServer/blob/master/src/main/java/uk/org/llgc/annotation/store/AnnotationUtils.java, lines 97-101\r\n// Fix Mirador bug (rename source to full): \r\n```\r\nMap<String, Object> tOn = (Map<String, Object>)tRoot.get(\"on\"); \r\nObject tSource = tOn.get(\"source\"); \r\ntOn.remove(\"source\");\r\ntOn.put(\"full\", tSource); \r\n```\r\nThat also affects Catch endpoint, as far as I understand.\r\n\r\nIn ResearchSpace we store data as RDF triples natively, so compliance with JSON-LD specification is important for us.\r\n\r\nI understand that changing this to comply with the standard may cause incompatibility between Mirador and annotation endpoints, and, in the worst case, this goes down to data storage as well.\r\n\r\nHowever, I encourage to apply the change to comply with the standard.\r\n"},"comment":{"url":"https://api.github.com/repos/IIIF/mirador/issues/comments/189285151","html_url":"https://github.com/IIIF/mirador/issues/766#issuecomment-189285151","issue_url":"https://api.github.com/repos/IIIF/mirador/issues/766","id":189285151,"user":{"login":"sdellis","id":609368,"avatar_url":"https://avatars.githubusercontent.com/u/609368?v=3","gravatar_id":"","url":"https://api.github.com/users/sdellis","html_url":"https://github.com/sdellis","followers_url":"https://api.github.com/users/sdellis/followers","following_url":"https://api.github.com/users/sdellis/following{/other_user}","gists_url":"https://api.github.com/users/sdellis/gists{/gist_id}","starred_url":"https://api.github.com/users/sdellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdellis/subscriptions","organizations_url":"https://api.github.com/users/sdellis/orgs","repos_url":"https://api.github.com/users/sdellis/repos","events_url":"https://api.github.com/users/sdellis/events{/privacy}","received_events_url":"https://api.github.com/users/sdellis/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T13:51:35Z","updated_at":"2016-02-26T13:51:35Z","body":"@yuricus, I just want to make sure it's understood that you are requesting the property name be changed from \"source\" to \"full\", along with updates to the relevant annotation servers to handle it?  \r\n\r\n@rsinghal is this something you could look at when you start the \"LocalStorage as an annotation fallback\" work (couldn't find a issue for that)?  "}}