Closed balmas closed 8 years ago
Eventually we want to handle this through semantic annotation capabilities in Arethusa. In the interim, we can leverage the existing cite_publications_controller/create_from_linked_urn route and the agent module in Perseids SoSOL. This api-ish route supports a link in to Perseids
/cite_publications/<identifier_type>/create_from_linked_urn/<cite collection urn>[?init_param[]=identifierspecificinitializationdata]
<identifier_type>
is the Cite Identifier type, for this use case it's Oa
(open annotation)
<cite_collection_urn>
is the name of the cite collection to assign the data it. We can use the default annotation collection urn:cite:perseus:pdlann
init_param
is identifier-type specific. In the case of the Oa type, it's expected to be a uri of a registered Agent for creating new data in SoSOL.
Up until now the supported uris for this type were Hypothes.is Annotations and Google Spreadsheets (for import of annotation data from these sources).
I have added a new supported Agent uri type, that of the CTS URN. If a CTS URN is supplied in the init_param, and that urn is available at the configured CTS endpoint for Perseids, then a new annotation will be created with that urn as the resource of the target.
The annotation editor tool will also be configured with a default CTS endpoint, so when the annotation is retrieved for editing, the URN will be resolved to the passage text by the tool.
I went back and forth about whether to enforce coupling of the URN with the service used at creation time of the annotation, but have decided against this for now. We still need to come up with a coherent way of dealing with URN resolution (and redirection) in annotations. This is hopefully something we can come up with a standard solution for via the Collections API and DTS working group. (I like the direction of the W3C annotation group's new standard, which allows for specification of a CanonicalID for an annotation along with the URI. It would be interesting to see if we could apply this to annotation targets and bodies as well.)
For now, Perseids is using a variety of hacky solutions in different circumstances. Up until this change, we didn't support CTS URNs as Oa annotation targets without identification of a specific URL from which the annotation could be served. I have been using temporary URL of a proxies provided through Perseids, with the idea that these would be turned into stable URLs upon finalization of the annotations, but this latter has been handled as a manual post-processing step so far.
This change allows us to use URNs without URL prefixes to reference CTS targets which are external to the publication. It still applies a URL prefix to the CTS body resources both internal and external. This should probably be changed so that the only URL prefixes enforced by the SoSOL component are for texts which are present in the publication, with it being up to the annotation editor to offer CTS services for resolution of all external resources.
prototype integration with the Digital Athenaeus
we'd like to be able to create links in from Digital Athenaeus that create new annotations targeting CTS URN targets without requiring the CTS text be in the publication.