-
Notifications
You must be signed in to change notification settings - Fork 34
Add SRU opener / open-sru
#510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
I cleaned up to comments to make this issue more compact. |
Now I have the first usecase: I want to fetch all records from this SRU for records with query I need this here to create a productive workflow that collects all records: hbz/lobid-extra-holdings#8 |
Parameters: general:
sru specific:
Optional? |
I've assigend you because in our meeting today you asked why/if the |
https://github.com/TobiasNx/metafacture_workflows/tree/master/compareOaiAndSru: It seems that the oaiPmh only outputs the header The outputted file of oai can be processed. The file of sru breaks like this:
But interestingly at least something is written in the yaml file. Probably because of the streaming. |
|
After discussion: structure of an SRU lookup, e.g. <?xml version="1.0" encoding="UTF-8"?>
<harvest>
<searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/">
<version>1.1</version>
<numberOfRecords>3031</numberOfRecords>
<records>
<record>
<recordSchema>MARC21plus-xml</recordSchema>
<recordPacking>xml</recordPacking>
<recordData>
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record type="Bibliographic">
<leader>00000nas a2200000 c 4500</leader>
<controlfield tag="001">011156392</controlfield>
...
</record>
</collection>
</recordData>
<recordPosition>4</recordPosition>
</record>
</records>
<nextRecordPosition>5</nextRecordPosition>
<echoedSearchRetrieveRequest>
<version>1.1</version>
<query>dnb.isil=DE-Sol1</query>
<xQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<startRecord>4</startRecord>
<maximumRecords>1</maximumRecords>
<recordSchema>MARC21plus-xml</recordSchema>
</echoedSearchRetrieveRequest>
</searchRetrieveResponse>
<searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/">
<version>1.1</version>
<numberOfRecords>3031</numberOfRecords>
<records>
<record>
<recordSchema>MARC21plus-xml</recordSchema>
<recordPacking>xml</recordPacking>
<recordData>
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record type="Bibliographic">
<leader>00000nas a2200000 c 4500</leader>
<controlfield tag="001">011159960</controlfield>
...
<datafield ind1=" " ind2=" " tag="933">
<subfield code="a">CC0</subfield>
</datafield>
</record>
</collection>
</recordData>
<recordPosition>5</recordPosition>
</record>
</records>
<nextRecordPosition>6</nextRecordPosition>
<echoedSearchRetrieveRequest>
<version>1.1</version>
<query>dnb.isil=DE-Sol1</query>
<xQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<startRecord>5</startRecord>
<maximumRecords>1</maximumRecords>
<recordSchema>MARC21plus-xml</recordSchema>
</echoedSearchRetrieveRequest>
</searchRetrieveResponse>
</harvest> i.e. it's valid XML (by encapsulating everything with the |
This looks good in my opinion, as long as it is documented. +1 |
Like OAI PMH opener, metafacture should be able to retrieve all records of a SRU request. SRU is an important library standard like OAI PMH: See https://www.loc.gov/standards/sru/index.html
Besides being an important library standard.
We have two use-cases:
A new modul should be configurable with the specific SRU keywords.
The opener should be similarl to gist.github.com/jorol/989ea5dd464fb85bd99b4733710d2890#oai-pmh and https://github.com/LibreCat/Catmandu-SRU/tree/dev
In Flux something like:
| open-sru(base="https://services.dnb.de/sru/zdb", recordSchema="MARC21-xml", query="tit = soil biology")
[We do not need the extra parser since we are parsing it in the next step of a flux workflow]Possible other Java sources/repositories that could help develop an SRU opener for Metafacture:
https://github.com/HSG-Library/alma-sru-client
https://github.com/opacapp/opacclient/blob/master/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/SRU.java
https://github.com/indexdata/yaz4j
https://github.com/rism-international/sru-downloader
https://github.com/indexdata/cql-java
https://www.loc.gov/standards/sru/resources/products.html
https://github.com/kitodo/kitodo-production/blob/main/Kitodo/src/main/java/org/kitodo/production/services/data/ImportService.java
Inspiration from a commandline tool for sru https://github.com/ubleipzig/srufetch
The text was updated successfully, but these errors were encountered: