Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpecificResource instead of TextualBody when using tag URI #94

Closed
LvanWissen opened this issue Nov 30, 2021 · 2 comments
Closed

SpecificResource instead of TextualBody when using tag URI #94

LvanWissen opened this issue Nov 30, 2021 · 2 comments
Assignees

Comments

@LvanWissen
Copy link

Currently, if you use a vocabulary that includes URIs for tags in the tag widget, they are added as instances of TextualBody in the annotation data. Example of some parts I used in Recogito-JS:

  myVocab = [
      {
        label: "material",
        uri: "http://vocab.getty.edu/aat/300010358",
      }
  ]

  const r = new Recogito({
    widgets: [
      {
        widget: "TAG",
        vocabulary: myVocab,
      },
    ],
   // etc.
  });
  {
    "type": "TextualBody",
    "value": "material",
    "purpose": "tagging",
    "source": "http://vocab.getty.edu/aat/300010358"
  }

But, according to the Web Annotation Model (https://www.w3.org/TR/annotation-model/, see under "4.1 Purpose for External Web Resources") this is a SpecificResource, since an external URI is used as source value. The body should therefore be:

  {
    "type": "SpecificResource",
    "value": "material",
    "purpose": "tagging",
    "source": "http://vocab.getty.edu/aat/300010358"
  }

Or is it an option to make such a body both a TextualBody (to keep the value) as well as a SpecificResource (for the source)?

@rsimon
Copy link
Member

rsimon commented Nov 30, 2021

Ah - looks like you are right. (Although, to be honest: I simply find the W3C docs very confusing in this regard...)

Keeping both the URI and the value in the same body would be fairly important, I think. I wonder what the proper way to handle this would be. Perhaps a value would be acceptable in a SpecificResource, too? The only other pattern I could imagine might be something like this:

{
  "type": "SpecificResource",
  "purpose": "tagging",
  "source": {
    "id": "http://vocab.getty.edu/aat/300010358",
    "label": "material"
  }
}

@LvanWissen
Copy link
Author

I completely agree with you regarding the W3C Web Annotation docs...

Having the name/label of the tag available in the Annotation (e.g. 'material' in the example) possibly prevents an external lookup. Coming from the docs:

Specific Resources and Specifiers may be External Web Resources with their own IRIs, such as in the example for the Selector construction, however it is recommended that they be included in the Annotation's representation to avoid requiring unnecessary network interactions to retrieve all of the information needed to process the Annotation.

Though having a value in a SpecificResource wouldn't hurt, it does seem that this property is commonly used on TextualBody resources only (and some Selectors) in the Annotation Vocab. Therefore, your example pattern is maybe a nice solution: including the label (or any property of?) the external resource in the annotation itself.

And since I gave an example of a URI from the AAT, adding a label besides a URI also resembles the modelling pattern used in the Linked.Art project in which a rdfs:label (_label) is given when external URIs are specified.

@rsimon rsimon self-assigned this Dec 28, 2021
@rsimon rsimon closed this as completed in f476922 Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants