Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Latest commit

 

History

History
36 lines (26 loc) · 1.21 KB

README.md

File metadata and controls

36 lines (26 loc) · 1.21 KB

AnnoStore

This allows users to store annotations.

Posting an annotation

  • Post against the path /annostore
  • The posted graph must contain exactly one resource of type http://www.w3.org/ns/oa#Annotation
  • No particular permission is required to post an annotation but the current user will be added as a the value of a DC:creator property

The following posts a meaningless annotation (mea

curl -i -X POST -H "Content-Type: text/turtle" \
 -H "Accept: application/rdf+xml" \
--data \
' @prefix oa: <http://www.w3.org/ns/oa#> .
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] a oa:Annotation ;
   rdfs:commend "an meaningless annotation" ;
   oa:hasTarget <http://example.org/foo> . ' http://localhost:8080/annostore

Retrieving annotations

For retrieving annotations AnnoStore provides a service to dereference the context of a resource

GET /annostore with the IRI of the resource of which the context is requested as value of the iri query parameter.

Example: curl -H "Accept: application/rdf+xml"
http://localhost:8080/annostore?iri=http://example.org/foo .

If the annotations have themselves IRIs you will need to request those annotations one by one.