/** */
export default class InvenioRDMAdapter {
/** */
constructor(canvasId, annotations) {
this.canvasId = canvasId;
this.annotations = annotations
this.readOnly = true;
}
/** */
get annotationPageId() {
// assume for now that canvas.jpg has an associated canvas.jpg.short.wadm
// ideally have an endpoint in /api/iiif which is more flexible
let filename = this.canvasId.split('/').pop()
let url = this.annotations[filename];
return url;
}
/** */
async all() {
return (await fetch(this.annotationPageId)).json();
}
}
Closes Issue https://github.com/zenodo/zenodo-rdm/issues/876
InvenioRDMAdapter
Annotation in Files
Annotations in Media Files
No Annotations