hbz / lobid-resources

Transformation, web frontend, and API for the hbz catalog as LOD
http://lobid.org/resources
Eclipse Public License 2.0
7 stars 7 forks source link

Provide Occurrences-API #1407

Open nichtich opened 2 years ago

nichtich commented 2 years ago

As part of coli-conc we created an Occurrences-API to query occurrences and co-occurrences of identified subjects in K10plus. For simple occurrences the API serves one use case:

given a subject, how many resources about it does the catalog include and how can I deep link to the result set of this resources?

It's just one query parameter member with URI if the SKOS concept (e.g. https://d-nb.info/gnd/2015876-2).

In lobid API this would need to be translated to http://lobid.org/resources/search?q=subject.id:https\:\/\/d\-nb.info\/gnd\/2015876\-2%20OR%20subject.componentList.id:https\:\/\/d\-nb.info\/gnd\/2015876\-2&format=json&size=0 to get the totalItems and add boilerplate with information about lobid-resources and a deep link into the catalog:

{
  "database": {
    "uri": "http://lobid.org/resources/dataset#!",
    "prefLabel": { "de": "lobid-resources – Der hbz-Verbundkatalog als Linked Open Data" },
    "url": "http://lobid.org/resources/"
  },
  "memberSet": [  { "uri": "https://d-nb.info/gnd/2015876-2" } ]
  "count": 52,
  "url": "http://lobid.org/resources/search?q=subject.id:https\\:\\/\\/d\\-nb.info\\/gnd\\/2015876\\-2%20OR%20subject.componentList.id:https\\:\\/\\/d\\-nb.info\\/gnd\\/2015876\\-2"
}

Sure this is no rocket science, could be done in the client as well.

acka47 commented 1 year ago

We won't be able to implement this in the coming months. Unassigning for now.

TobiasNx commented 4 months ago

@nichtich is this still needed?

nichtich commented 4 months ago

Yes, having this would simplify integration into Cocoda and the subject indexing application we are working on. Sure we can work without but then unlikely link to lobid.