Will be used to send feedback message to user in case they attempt to create an annotation with a body that is a duplicate of a previously existing annotation for the same target file.
Output: boolean duplicate True/False
Inputs: target_url (str), intended (new) annotation body (dict).
Process:
1) Retrieve all annotations with target jsonld_id that of the target file.
2a) New annotation to be semantic tag: check whether any of the retrieved annotations uses the same jsonld_id as the intended new one (exclude checking free-text).
2b) New annotation to be free-text: check whether any of the retrieved annotations uses the same body.value as the intended new one (includes either semantic-tag or free-text).
3) Return boolean result of check.
Will be used to send feedback message to user in case they attempt to create an annotation with a body that is a duplicate of a previously existing annotation for the same target file.
Output: boolean duplicate True/False
Inputs: target_url (str), intended (new) annotation body (dict).
Process: 1) Retrieve all annotations with target jsonld_id that of the target file. 2a) New annotation to be semantic tag: check whether any of the retrieved annotations uses the same jsonld_id as the intended new one (exclude checking free-text). 2b) New annotation to be free-text: check whether any of the retrieved annotations uses the same body.value as the intended new one (includes either semantic-tag or free-text). 3) Return boolean result of check.