mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
committed by
Rainer Killinger
parent
cbb949e397
commit
9854541a0c
@@ -172,6 +172,12 @@ export class DaiaDataProvider {
|
||||
storage,
|
||||
about,
|
||||
holdings: chronology?.about,
|
||||
open:
|
||||
(Array.isArray(available) &&
|
||||
available.some(
|
||||
item => item.service === 'openaccess',
|
||||
)) ||
|
||||
undefined,
|
||||
});
|
||||
} catch {
|
||||
// No element available
|
||||
@@ -191,22 +197,16 @@ export class DaiaDataProvider {
|
||||
);
|
||||
}
|
||||
|
||||
getHoldingLink(holding: DaiaHolding) {
|
||||
getHoldingLink(holding: DaiaHolding, open = false) {
|
||||
if (typeof this.hebisProxyUrl === 'undefined') {
|
||||
this.logger.error('HeBIS proxy url undefined');
|
||||
|
||||
return;
|
||||
}
|
||||
const resourceLink = holding.available?.href;
|
||||
|
||||
if (
|
||||
typeof resourceLink === 'undefined' ||
|
||||
holding.available?.service === 'openaccess'
|
||||
) {
|
||||
return resourceLink;
|
||||
}
|
||||
|
||||
return `${this.hebisProxyUrl}${encodeURIComponent(resourceLink)}`;
|
||||
return open
|
||||
? resourceLink
|
||||
: `${this.hebisProxyUrl}${encodeURIComponent(resourceLink as string)}`;
|
||||
}
|
||||
|
||||
holdingHasStatus(available: DaiaService[]): boolean {
|
||||
|
||||
Reference in New Issue
Block a user