relaton / relaton-ogc

Relaton for OGC
MIT License
2 stars 0 forks source link

Update DataFetcher to support newly available URIs and PDF links #23

Closed andrew2net closed 10 months ago

andrew2net commented 1 year ago

OGC doesn't handle multiple formats. I just found out that the earlier version OGC source dataset has only URL's but URI's were null for all the documents. No PDF links were provided:

{
  "1": {
    "title": "OGC SensorThings API Part 1: Sensing Version 1.1",
    "alternative": "SensorThings API Part 1: Sensing",
    "URI": null,
    "identifier": "18-088",
    "URL": "https://docs.ogc.org/is/18-088/18-088.html",
    ...

However, in the latest version of the dataset, all the documents have both URI and URL links. Some of the documents have a PDF link:

{
  "1": {
    "title": "OGC Abstract Specification Topic 2: Referencing by coordinates (Including corrigendum 1 and corrigendum\t2)",
    "alternative": "OGC Abstract Specification Topic 2: Referencing by coordinates",
    "URI": "http://www.opengis.net/doc/AS/topic-2/6.0",
    "identifier": "18-005r8",
    "URL": "https://docs.ogc.org/as/18-005r8/18-005r8.pdf",
    ...

It seems we need to update the RelatonOgc::DataFetcher.

Originally posted by @andrew2net in https://github.com/relaton/relaton-ccsds/issues/4#issuecomment-1714704789

ronaldtse commented 1 year ago

We should also contain "URI" in Relaton bibliographic items because they are unique identifiers of the source item (read: not accessible URL links, they are just identifiers).

andrew2net commented 1 year ago

@ronaldtse it seems the the URI links redirected to URL links. They open same page as URL links do. Do we really need to save them in our dataset?

ronaldtse commented 11 months ago

@andrew2net yes, because URIs are meant as identifiers, they do not need to be resolvable.

andrew2net commented 10 months ago

Fixed in v1.17.1

$ relaton fetch 'OGC 18-088'
[relaton-ogc] (OGC 18-088) Fetching from Relaton repository ...
[relaton-ogc] (OGC 18-088) Found: `18-088`
<bibdata type="standard" schema-version="v1.2.7">
  <fetched>2023-12-07</fetched>
  <title type="title-main" format="text/plain" language="en" script="Latn">OGC SensorThings API Part 1: Sensing Version 1.1</title>
  <title type="main" format="text/plain" language="en" script="Latn">OGC SensorThings API Part 1: Sensing Version 1.1</title>
  <uri type="src">http://www.opengis.net/doc/is/sensorthings/1.1</uri>
  <uri type="obp">https://docs.ogc.org/is/18-088/18-088.html</uri>
  ...

$ relaton fetch 'OGC 18-005r8'
[relaton-ogc] (OGC 18-005r8) Fetching from Relaton repository ...
[relaton-ogc] (OGC 18-005r8) Found: `18-005r8`
<bibdata type="standard" schema-version="v1.2.7">
  <fetched>2023-12-07</fetched>
  <title type="title-main" format="text/plain" language="en" script="Latn">OGC Abstract Specification Topic 2: Referencing by coordinates (Including corrigendum 1 and corrigendum 2)</title>
  <title type="main" format="text/plain" language="en" script="Latn">OGC Abstract Specification Topic 2: Referencing by coordinates (Including corrigendum 1 and corrigendum       2)</title>
  <uri type="src">http://www.opengis.net/doc/AS/topic-2/6.0</uri>
  <uri type="pdf">https://docs.ogc.org/as/18-005r8/18-005r8.pdf</uri>
  ...