hbz / lobid-organisations

Transformation, web frontend, and API for lobid-organisations
http://lobid.org/organisations
Eclipse Public License 2.0
13 stars 3 forks source link

Add api description #423

Closed dr0i closed 5 years ago

dr0i commented 5 years ago

Resolves #421.

dr0i commented 5 years ago

Deployed to staging. All: https://stage.lobid.org/organisations/search?q=_exists_%3AavailableChannel. Getting DAIA implementers: https://stage.lobid.org/organisations/search?q=availableChannel.serviceType%3A"DAIA"

acka47 commented 5 years ago

Against our usual workflow, I am doing the functional review in the PR.

I took a look at this and we need one round of adjustments:

  1. ~We should only add availableChannel when the value in subfield x is one of: DAIA, PAIA, SRU, Z39.50 or OpenURL (see also Jakob's manual), currently resulting in only eight entries being expanded~
  2. We should a) always have an array with availableChannel and b) add all channels if one institution provides more than one of those four.
  3. I corrected an error in https://github.com/hbz/lobid-organisations/issues/421#issuecomment-508453065. It should read: "Note that the type WebAPI [not as previously written ServiceChannel] should only be added when the value in subfield x is one of SRU, DAIA, PAIA, OpenURL."

Re. 2.), see e.g. DE-Hil2:

<ppxml:tag id="009Q" occ="">
  <ppxml:subf id="u">http://sru.gbv.de/opac-de-hil2</ppxml:subf>
  <ppxml:subf id="x">SRU</ppxml:subf>
  <ppxml:subf id="z">W</ppxml:subf>
</ppxml:tag>
<ppxml:tag id="009Q" occ="">
  <ppxml:subf id="u">https://paia.gbv.de/DE-Hil2/</ppxml:subf>
  <ppxml:subf id="x">PAIA</ppxml:subf>
  <ppxml:subf id="z">W</ppxml:subf>
</ppxml:tag>
<ppxml:tag id="009Q" occ="">
  <ppxml:subf id="u">https://paia.gbv.de/DE-Hil2/daia</ppxml:subf>
  <ppxml:subf id="x">DAIA</ppxml:subf>
  <ppxml:subf id="z">W</ppxml:subf>
</ppxml:tag>

In the JSON-LD it should look like this:

{
   "availableChannel":[
      {
         "serviceType":"PAIA",
         "type":[
            "WebAPI",
            "ServiceChannel"
         ],
         "serviceUrl":"https://paia.gbv.de/DE-Hil2/"
      },
      {
         "serviceType":"DAIA",
         "type":[
            "WebAPI",
            "ServiceChannel"
         ],
         "serviceUrl":"https://paia.gbv.de/DE-Hil2/daia"
      },
      {
         "serviceType":"SRU",
         "type":[
            "WebAPI",
            "ServiceChannel"
         ],
         "serviceUrl":"http://sru.gbv.de/opac-de-hil2"
      }
   ]
}
dr0i commented 5 years ago

Made changes, deployed, @acka47 please test again.

acka47 commented 5 years ago

Looks great but there is one last thing to do. We need to remove all ServiceChannels with serviceType "Weitere Informationen". These are nearly 7000 museums that only link to another registry. It is not a service by those instituions at all.

dr0i commented 5 years ago

Changed and deployed. Note that there are nonetheless 4 museums with the "Weitere Informationen" link. To fix these too I have to further investigate the underlying pica. @acka47 if you have time, could you manage to get the pica source of these resources?

dr0i commented 5 years ago

Ah @acka47 don't bother, these used the singular form of it. I will adjust the regular expression accordingly.

acka47 commented 5 years ago

+1 Looks good now, so please deploy to production.

(Note: A lot of links in there still are not really service URLs or at least service in a totaly different sense, e.g. Benutzungsordnung, Standort, Öffnungszeiten, see a list of all distinct values in the serviceType field). However, I do not think that keeping those is a problem, so we will not remove them now.)

dr0i commented 5 years ago

Deployed to production, closed.