oduwsdl / MemGator

A Memento Aggregator CLI and Server in Go
https://memgator.cs.odu.edu/api.html
MIT License
56 stars 11 forks source link

Include rel="self timemap" in served TimeMap bodies #108

Closed machawk1 closed 4 years ago

machawk1 commented 6 years ago

Inspired by https://github.com/oduwsdl/ipwb/issues/293, both tools serve TimeMaps in multiple formats. Include the relation type "self timemap" for the URI-T of the TimeMap currently being viewed and simply rel="timemap" for other TimeMap related to the one currently being viewed.

This is already implicitly implied by the @id line, as you referenced conveys "self" in JSON-LD but let's be explicit.

ibnesayeed commented 6 years ago

In the Link format, rel is the only way to add metadata, so adding a URI that points to the document in question warrants a rel=self. However, in other formats such as JSON (or CDXJ) we are not forced to encode everything using rel. A clear example of this can be seen in how links to various TimeMaps are added under the !meta without using rel in CDXJ. Similar is the case with JSON format which is how LANL has done it. This same information in Link format is represented using rel=timemap.

This approach not only reflects how reference to self is usually presented under @id in JSON-LD, but also keeps the meat of a TimeMap (i.e., list of mementos) clear from the other metadata, hence, easier for parsing (which is a selling point of CDXJ).

machawk1 commented 6 years ago

@ibnesayeed That's a good explanation that I think should be retained here for future reference justifying the rationale.

ibnesayeed commented 4 years ago

Closing this as there is no further action needed on it for now.