Skip to content

[FINNA-2838] Add Finna specific OAI metadata format#3097

Merged
EreMaijala merged 11 commits intoNatLibFi:devfrom
LuomaJuha:extend-oai-server
Jan 15, 2025
Merged

[FINNA-2838] Add Finna specific OAI metadata format#3097
EreMaijala merged 11 commits intoNatLibFi:devfrom
LuomaJuha:extend-oai-server

Conversation

@LuomaJuha
Copy link

@LuomaJuha LuomaJuha commented Dec 3, 2024

Adds couple fields to be exposed in the OAI response.

Could also be possible to open this in upstream with options to allow additional prefixes, but think it could be maybe unnecessary?

Requires:

@LuomaJuha LuomaJuha requested review from EreMaijala and removed request for EreMaijala December 3, 2024 13:57
Copy link

@EreMaijala EreMaijala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tässä voisi olla hyötyä siitä, että yläjuoksulla tuo ensimmäinen blokki attachNonDeleted:stä irrotettaisiin omaksi metodiksi, jota attachNonDeleted kutsuu, niin ei tarvitsisi koko metodia yliajaa.

$ref: '#/components/schemas/Url'
usageRights:
vufind.method: getUsageRights
description: Usage rights

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usage rights (see [usage_rights_str_mv at https://www.kiwi.fi/display/Finna/Kenttien+mappaukset+eri+formaateista+Finnan+indeksiin](https://github.com/NatLibFi/RecordManager-Finna/blob/dev/mappings/usage_rights.map.sample))

type: string
usageRightsExtended:
vufind.method: getUsageRightsExt
description: Usage rights extended

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extended usage rights (see https://github.com/NatLibFi/RecordManager-Finna/blob/dev/mappings/usage_rights_ext.map.sample)

// the supplied metadataPrefix is available.
// If RecordDriver returns nothing, skip this record.
if (empty($xml)) {
return true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tämän pitäisi olla return false;

@LuomaJuha LuomaJuha added in progress upstream dependency If something is needed from the upstream and removed question labels Dec 16, 2024
@LuomaJuha LuomaJuha requested review from EreMaijala and removed request for EreMaijala December 20, 2024 12:46
type: string
ctrlnum:
vufind.method: getCtrlNum
description: Ctrl num

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Record control numbers

type: string
majorGenres:
vufind.method: getMajorGenres
description: Major genres as array

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pelkkä Major genres (type: array kertoo tyypin)

public function getMediaTypesAsStrings(): array
{
return array_map(
fn ($entry) => $entry instanceof \VuFind\I18n\TranslatableString ? $entry->__toString() : $entry,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tässä pitäisi riittää (string)$entry kaikissa tapauksissa.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohops, totta tosiaan

@LuomaJuha LuomaJuha requested a review from EreMaijala December 23, 2024 09:39
@LuomaJuha LuomaJuha removed the upstream dependency If something is needed from the upstream label Jan 14, 2025
@EreMaijala
Copy link

Hyvältä näyttää, mutta ajattelin, että voisi vielä selkeyttää noita kenttien ja metodien nimiä.

LuomaJuha and others added 4 commits January 15, 2025 15:36
Co-authored-by: Ere Maijala <ere.maijala@helsinki.fi>
Co-authored-by: Ere Maijala <ere.maijala@helsinki.fi>
Co-authored-by: Ere Maijala <ere.maijala@helsinki.fi>
Co-authored-by: Ere Maijala <ere.maijala@helsinki.fi>
@LuomaJuha LuomaJuha requested a review from EreMaijala January 15, 2025 13:37
@EreMaijala EreMaijala merged commit 829da11 into NatLibFi:dev Jan 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants