digitalutsc / islandora_web_annotations

An Islandora module that enables annotation on Islandora objects, following the W3C Web annotation model.
GNU General Public License v3.0
7 stars 5 forks source link

Jsonld cleanup #198

Closed Natkeeran closed 7 years ago

Natkeeran commented 7 years ago

!Warning! This PR introduces backward breaking changed. You won't be work with existing annotations after applying this PR because it changes the structure of the jsonld.

What does this Pull Request do?

This is a major cleanup of the jsonld for annotation datastream (WADM). Some notable changes are:

Known issues:

How should this be tested?

kimpham54 commented 7 years ago

for testing purposes, @Natkeeran is it ok to pull in changes to the module and configurations that we were using in our VMs before this PR? Or does this require a completely fresh install ?

Natkeeran commented 7 years ago

@kimpham54 If you have the latest context, you can just get the PR. No need to re install.

MarcusBarnes commented 7 years ago

With the change in how we set the value for the target source property, we need to update how we extract the PID from that value. See https://github.com/digitalutsc/islandora_web_annotations/blob/7.x/islandora_web_annotations.module#L238. The result is that the annotationContainer for an object is not removed from Fedora when you delete the last annotations on an object.

MarcusBarnes commented 7 years ago

Thanks @Natkeeran. The issue with the annotation container not being deleted, noted in my earlier comment, has been address in the subsequent commit https://github.com/digitalutsc/islandora_web_annotations/pull/198/commits/57ff9f244c9aca5efece3ef96226fda92de5c89d.

kimpham54 commented 7 years ago

@Natkeeran the total property doesn't work for AnnotationContainer. Can we deprecate this?

kimpham54 commented 7 years ago

keep @ type, @ id, and add @ to //body/type for Annotation, //first/id and //first/type for Annotation Container.

Also, bodytext in Annotation needs to be changed to bodyValue https://www.w3.org/TR/annotation-model/#string-body

kimpham54 commented 7 years ago

looks good to me. @MarcusBarnes will you do a final test?