-
Notifications
You must be signed in to change notification settings - Fork 62
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
SLUB API - pending items #595
Comments
Regarding item 1 (get status)I implemented it with completeable futures and I guess it's done correctly (also verifed by this small python script), but the result is prohibitively slow.
Even with 1000 Mbps link speed it takes almost 10 seconds for the search results to show up. It seems that there's nothing we can do to speed this up as the web catalog needs roughly the same time as the app: Web catalog: (20 status queries) App: (the search query itself followed by the 20 status queries) The queries appear to be blocked on the server side. For the web catalog, this looks OK as you see the search results after 1-2 seconds and then the pending status icons get updated to , or within the next 8 seconds (see example). The app, however, waits for all the status queries be completed and only then shows the results including status markers. As far as I understand it's not possible in the app to update the status markers after the results are shown. If so I don't want to include the availability status in the app as it simply takes way too long to get the search results. |
Regarding item 2 (references)References are mostly links to other SLUB catalog entries, typically references to differently named preceding or following editions of periodical items or references to online/print editions of print/online items. Right now we just show the text without links as links would open the web catalog in the browser: opacclient/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/SLUB.kt Lines 264 to 267 in 4b65dba
Example: https://katalog.slub-dresden.de/id/0-130446319/#detail: JSON from API: opacclient/opacclient/libopac/src/test/resources/slub/search/item-copies_in_multiple_arrays.json Lines 39 to 45 in 4b65dba
These libero links can be resolved to |
Your implementation for the status looks correct to me.
Yes, unfortunately this is not possible yet. We have also thought about that, as it would also be helpful to speed up some of the other APIs as well. I have put some ideas regarding this into issue #607.
Well, it might be possible to put these references into the DetailedItem as |
Yes, this could be a workaround. The only drawback is that the references will appear under the subheading "Volumes" or "Enthaltene Werke" (from |
Hm, both would solutions be fine for me. @raphaelm, any preference? |
I'm not a huge fan on adding another list to Given the examples @StefRe showed, I think using One possible solution would be to extend the Thinking this further, we could even add a Instead of adding interface complexity for something that (so far) only SLUB requires, we'd add a similar amount of complexity but get a positive effect almost everywhere. @StefRe @johan12345 What are your thoughts on this approach? |
Hm, indeed this sounds like a good and more general solution. It would also be possible to simply add an item ID as an additional property of the |
yes, all (SLUB target) references are references to details, see 1st paragraph of this comment. In fact, SLUB terminology differentiates between links which refer to external resources and references which refer to SLUB catalog items.
This sounds great but I guess it'll be a rather big change in the frontend code. So for the time being I'm going to use the volumes workaround. Maybe it makes sense to file a separate issue for this proposed new link handling to keep things clear. Btw, I noticed that there's a boolean |
I implemented
The reason for this is that opacclient/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/BaseApi.java Lines 486 to 489 in 2040420
According to RFC3986 this is by no means obligatory. An example of a SLUB reference is
The additional (EDIT: the following is no longer valid, see next comment below... Further I noticed that the test for opacclient/opacclient/libopac/src/test/java/de/geeksfactory/opacclient/apis/ApacheBaseApiTest.java Line 15 in 2040420
is in ApacheBaseApiTest.java rather than in BaseApiTest.java (cleanUrl is a method of BaseApi and not ApacheBaseApi ). I guess this is for historical reasons. Is it OK if I move this test to its proper class?
|
@raphaelm opacclient/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/BaseApi.java Lines 487 to 488 in 2040420
I wrote a test for it and fixed it. So the only remaining question is if the tests for |
Ah, nice! Probably something we've just never encountered before.
Sure, go ahead! |
The API works (catalog and account features) but there are still some TODOs to be completed from #553:
get status: low priority due to the limited usefulness of the status as in many many cases it just says "click for more information about availability" (in the online web catalogue), so you'll have to open the details page anyway.
Implementation idea: use asyncGet and then put all the CompletableFutures constructed into a list before calling get() on them (thanks to @johan12345 here and here)
--> to be put off until Allow OpacApi functions to return intermediate results #607 is implemented
references: libero links must be resolved to
rsn
entries in current SLUB catalog and they then in turn toid
entries (similar to next below)Resolved by SLUB: Add references to other SLUB catalog items as volumes #613.
id
of reserved itemsbc
entries to be resolved toid
entries by intercepting redirection (modifygetResultById
to take a prefixedid
and resolve thisid
to anid
entry if the prefix is not"id"
. AdoptgetShareUrl
,parseSearchResults
,parseResultById
andparseAccountData
accordingly.)Resolved by SLUB: Get Results by Id for Lent and Reserved Items #598.
id
of lent itemsbc
entries to be resolved toid
entries by intercepting redirection (same as above)Resolved by SLUB: Get Results by Id for Lent and Reserved Items #598.
actual ready date of stack request: works but could be refined, need more examples to examine
inter-library loans renewability: need example (
X_is_flrenewable
field exists in json but not sure if it's actually used/properly set)Resolved by SLUB: Fix interlibrary loans and requests #611.
getSupportedLanguages and setLanguage: low priority as all information concerning inter-library loans, most other account information and most of the captions/titles for links remain in German even in the English version of the online catalog
The text was updated successfully, but these errors were encountered: