From 8f71a32e520c5c14bda5a61ce3ea5f43922b3e53 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 17 Dec 2025 01:36:35 +0000 Subject: [PATCH] Bug 41462: Add Koha::OAI::Set(s) and Koha::OAI::Set::Biblio(s) This architectural changes makes these tables available to the Koha namespace, and therefore the REST APIs. To test: Confirm t/00-load.t tests pass and check for any syntax/tidy errors. Sponsored-by: Auckland University of Technology Signed-off-by: David Nind --- Koha/OAI/Set.pm | 46 ++++++++++++++++++++++++++++++++++ Koha/OAI/Set/Biblio.pm | 46 ++++++++++++++++++++++++++++++++++ Koha/OAI/Set/Biblios.pm | 55 +++++++++++++++++++++++++++++++++++++++++ Koha/OAI/Sets.pm | 55 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 202 insertions(+) create mode 100644 Koha/OAI/Set.pm create mode 100644 Koha/OAI/Set/Biblio.pm create mode 100644 Koha/OAI/Set/Biblios.pm create mode 100644 Koha/OAI/Sets.pm diff --git a/Koha/OAI/Set.pm b/Koha/OAI/Set.pm new file mode 100644 index 0000000000..5b52edc316 --- /dev/null +++ b/Koha/OAI/Set.pm @@ -0,0 +1,46 @@ +package Koha::OAI::Set; + +# Copyright 2025 Aleisha Amohia +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Koha::Database; + +use base qw(Koha::Object); + +=head1 NAME + +Koha::OAI::Set - Koha OaiSet Object class + +=head1 API + +=head2 Class methods + +=cut + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'OaiSet'; +} + +1; diff --git a/Koha/OAI/Set/Biblio.pm b/Koha/OAI/Set/Biblio.pm new file mode 100644 index 0000000000..a54bb97bdf --- /dev/null +++ b/Koha/OAI/Set/Biblio.pm @@ -0,0 +1,46 @@ +package Koha::OAI::Set::Biblio; + +# Copyright 2025 Aleisha Amohia +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Koha::Database; + +use base qw(Koha::Object); + +=head1 NAME + +Koha::OAI::Set::Biblio - Koha OaiSetsBiblio Object class + +=head1 API + +=head2 Class methods + +=cut + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'OaiSetsBiblio'; +} + +1; diff --git a/Koha/OAI/Set/Biblios.pm b/Koha/OAI/Set/Biblios.pm new file mode 100644 index 0000000000..7d0ddef1c6 --- /dev/null +++ b/Koha/OAI/Set/Biblios.pm @@ -0,0 +1,55 @@ +package Koha::OAI::Set::Biblios; + +# Copyright 2025 Aleisha Amohia +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Koha::Database; +use Koha::OAI::Set::Biblio; + +use base qw(Koha::Objects); + +=head1 NAME + +Koha::OAI::Set::Biblios - Koha OaiSetsBiblio Object set class + +=head1 API + +=head2 Class methods + +=cut + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'OaiSetsBiblio'; +} + +=head3 object_class + +=cut + +sub object_class { + return 'Koha::OAI::Set::Biblio'; +} + +1; diff --git a/Koha/OAI/Sets.pm b/Koha/OAI/Sets.pm new file mode 100644 index 0000000000..16bb543504 --- /dev/null +++ b/Koha/OAI/Sets.pm @@ -0,0 +1,55 @@ +package Koha::OAI::Sets; + +# Copyright 2025 Aleisha Amohia +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Koha::Database; +use Koha::OAI::Set; + +use base qw(Koha::Objects); + +=head1 NAME + +Koha::OAI::Sets - Koha OaiSets Object set class + +=head1 API + +=head2 Class methods + +=cut + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'OaiSet'; +} + +=head3 object_class + +=cut + +sub object_class { + return 'Koha::OAI::Set'; +} + +1; -- 2.39.5