While writing an annotation (forum post, comment) user wants to insert a link to a statement about particular painting. For example, they may want to insert a link to the date of creation of a painting.
First, user needs to search for a particular painting and select it from the result set.
User browses painting's data and selects a statement. A link to the statement is inserted in the RTF editor. The link has a meaningful name.
When reading an annotation (forum post, comment) user clicks on a link to a statement. This navigates them to:
- If statement is in data layer (original, approved) the painting's data form is shown and it is positioned on the relevant field (i.e. year of production)
- If statement is in annotation layer only - TBD
When creating a link, user chooses from data layer. That is, approved or original data/statements. After link is created though, data layer can change. Certain statements can be disapproved or replaced. When this happens, they will exist in annotation layer only.
In order for the created link to be still valid, we need not link to data layer but to annotation layer.
All statements in data layer have representation in annotation layer but not vice versa:
- Annotations are precreated for everything in the data layer after migration
- Before certain statements get into data layer they should be created as annotations (proposed) and later approved
- Annotation are never deleted, statements in data layer are.
Links to annotations are based on their URIs. The URIs themselves cannot be used for navigation so we need to navigate to some link that would interpret the annotation URI and would navigate to the relevant painting and data field.
We can create a rest service (http://.../redirectToAnnotation) and we can have URLs like /redirectToAnnotation?uri=rso:2926/part/1/a/1 in the annotation content.
When redirectToAnnotation is accessed it will load annotation by URI, fetch painting (annotation's main URI), get its Nuxeo UID and navigate to details page passing subject, predicate and old/new object as parameters.