From 8aed694ad37822d33934abc9cf1f47c172eb1be0 Mon Sep 17 00:00:00 2001 From: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com> Date: Tue, 12 Nov 2024 08:34:37 +0100 Subject: [PATCH 1/8] Add default licenses - from ZCU update (#801) * Added flyway file to insert default licenses with license labels and mappings * Added required header --- ....6_2024.10.25__insert_default_licenses.sql | 183 ++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.10.25__insert_default_licenses.sql diff --git a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.10.25__insert_default_licenses.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.10.25__insert_default_licenses.sql new file mode 100644 index 000000000000..e74c5d3edf25 --- /dev/null +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.10.25__insert_default_licenses.sql @@ -0,0 +1,183 @@ +-- +-- The contents of this file are subject to the license and copyright +-- detailed in the LICENSE and NOTICE files at the root of the source +-- tree and available online at +-- +-- http://www.dspace.org/license/ +-- + +-- +-- Default License Definitions with Associated License Labels and Mappings +-- NOTE: Do NOT use this file if your repository already contains licenses. +-- + +-- +-- Data for Name: license_definition; Type: TABLE DATA; Schema: public; Owner: dspace +-- + +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (1, 'GNU General Public Licence, version 3', 'http://opensource.org/licenses/GPL-3.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (2, 'GNU General Public License, version 2', 'http://www.gnu.org/licenses/gpl-2.0.html', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (3, 'The MIT License (MIT)', 'http://opensource.org/licenses/mit-license.php', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (4, 'Artistic License 2.0', 'http://opensource.org/licenses/Artistic-2.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (5, 'Artistic License (Perl) 1.0', 'http://opensource.org/licenses/Artistic-Perl-1.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (6, 'Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0)', 'http://creativecommons.org/licenses/by-nc-nd/3.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (7, 'BSD 2-Clause "Simplified" or "FreeBSD" license', 'http://opensource.org/licenses/BSD-2-Clause', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (8, 'BSD 3-Clause "New" or "Revised" license', 'http://opensource.org/licenses/BSD-3-Clause', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (9, 'Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0)', 'http://creativecommons.org/licenses/by-nc/3.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (10, 'Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)', 'http://creativecommons.org/licenses/by-nc-sa/3.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (11, 'Attribution-NoDerivs 3.0 Unported (CC BY-ND 3.0)', 'http://creativecommons.org/licenses/by-nd/3.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (12, 'Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)', 'http://creativecommons.org/licenses/by-sa/3.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (13, 'Creative Commons - Attribution 3.0 Unported (CC BY 3.0)', 'http://creativecommons.org/licenses/by/3.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (14, 'Public Domain Dedication (CC Zero)', 'http://creativecommons.org/publicdomain/zero/1.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (22, 'Apache License 2.0', 'http://opensource.org/licenses/Apache-2.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (24, 'Affero General Public License 1 (AGPL-1.0)', 'http://www.affero.org/oagpl.html', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (25, 'Affero General Public License 3 (AGPL-3.0)', 'http://opensource.org/licenses/AGPL-3.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (26, 'Common Development and Distribution License (CDDL-1.0)', 'http://opensource.org/licenses/CDDL-1.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (27, 'Eclipse Public License 1.0 (EPL-1.0)', 'http://opensource.org/licenses/EPL-1.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (28, 'GNU General Public License 2 or later (GPL-2.0)', 'http://opensource.org/licenses/GPL-2.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (29, 'GNU Library or "Lesser" General Public License 2.1 (LGPL-2.1)', 'http://opensource.org/licenses/LGPL-2.1', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (30, 'GNU Library or "Lesser" General Public License 2.1 or later (LGPL-2.1)', 'http://opensource.org/licenses/LGPL-2.1', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (31, 'GNU Library or "Lesser" General Public License 3.0 (LGPL-3.0)', 'http://opensource.org/licenses/LGPL-3.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (32, 'Mozilla Public License 2.0', 'http://opensource.org/licenses/MPL-2.0', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (33, 'Open Data Commons Attribution License (ODC-By)', 'http://opendatacommons.org/licenses/by/summary/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (34, 'Open Data Commons Open Database License (ODbL)', 'http://opendatacommons.org/licenses/odbl/summary/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (35, 'Open Data Commons Public Domain Dedication and License (PDDL)', 'http://opendatacommons.org/licenses/pddl/summary/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (36, 'Public Domain Mark (PD)', 'http://creativecommons.org/publicdomain/mark/1.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (37, 'Creative Commons - Attribution 4.0 International (CC BY 4.0)', 'http://creativecommons.org/licenses/by/4.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (38, 'Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)', 'http://creativecommons.org/licenses/by-sa/4.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (39, 'Creative Commons - Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)', 'http://creativecommons.org/licenses/by-nd/4.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (40, 'Creative Commons - Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)', 'http://creativecommons.org/licenses/by-nc/4.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (41, 'Creative Commons - Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)', 'http://creativecommons.org/licenses/by-nc-sa/4.0/', NULL, NULL, NULL, 0, NULL); +INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (42, 'Creative Commons - Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)', 'http://creativecommons.org/licenses/by-nc-nd/4.0/', NULL, NULL, NULL, 0, NULL); + +-- +-- Data for Name: license_label; Type: TABLE DATA; Schema: public; Owner: dspace +-- + +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (20, 'PUB', 'Publicly Available', NULL, false); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (21, 'ACA', 'Academic Use', '\x89504e470d0a1a0a0000000d494844520000003500000016080600000060ded4e8000000097048597300000b1300000b1301009a9c1800000e256943435050686f746f73686f70204943432070726f66696c65000078dad5976750135c97c74f0a49e848ef448a204d7a514120201d218054a524a199841002084a13055190a28822a0f4a248095d407a551101b1a0d81ebb8f05441031fbc17df77d6676f6c3ceec97fd7dfacf9973e79c39e7cedcfb0710ec0c6230a84821001a9dc524da5ae1bd7d7cf1d847c00302200e1ab02d8814cdb074757582ff91d5fb80000098d50a6230a8f0bf43804c89260120340120921c4da201208a01c09ac460b20010cf00e06e1c8bc1024036018028d3dbc71700390c00a2a17ff40300100dfea33f028028d383480040010008c4924259002821008c309d1c4e07e05606c09893c282c800826400d0a4d122c90082b900a016fc8fb3a1ffd07ffa040000314224359289772258e30941d4f06066108b4286ff6368d4987fd54300001f85eee90e006a00200b0488042a440213f0e00404b0063c102008a8100ec1c08420600105c82cca61160000219211cf0c0f0d63e12d190c2a45136f4f27696be2f5747475e0ff13de3ebef83f6a851f10008008fff5ef987f3c80411800fac8bf630c5e806b5f00a4ff91a7ee06205f0bc06e27c53063ff3563c46d803f77e53f412100900020053ed0899045e4226590eda840b402fa19572fa6015b822be6aee7b9c9fb806f4560aba0a7d0f12d23c23f444dc458e26d12eb5286d20c9956d955791d85087cf5d6792511650b95a06df9aa5d6a6fd44103af49d0f2d60edf71442747b742ef8a7eb941a361b35191f179933cd3c49de45d4ebbf5cca4ccc1fce59edb167d96b556058434eb4336ae7b0d6de5ecc0ee8dfdbc43a7e379a72467928bf53e255784eb73b71e62917b9c879be7764fcefe59af1aef241f575f65df6f7ec3fe670e781d5439f877407be0b1208760c1e07ba47cb23b4594f220e47ca8679848d854f8c9089b43e8437d54164d8bf6825e11e9cb10620c47c5330da221fa05eb564c53ecb938c66162bc5e825cc2fa914747d989f949b1c9c4148d545ceaeb63fd69178e479e704c974fff9171e7645126f594f96981d34fb2dab253cf38e588e72ce5d6e431f3cdcf22cf8e9dcb29f0382f797eb1b0e4c2818bf2179f16155ef22b162fbe579253ea7299f7f2f8958c3242d9eff2a60a5aa56ae55f55c5d50ed59f6a926b856acbeaf4eafaea9dea97ae1ebaba762dbd41b8a1ecfa8eebbd8d4e8d8f9b429a569bd35b445baeb0b5d983adfb5a9fb645b5437b4e8742474b27a173be2ba28bd37df686ea8dde1e9f9e95de937dca7d8337836ffeeebf326033f07e306768cfd0dbe1c211a751d4e8cdb1b471e284f2247272796aedb6e49da8e9040010001d2041157c47b820d8485d642fca1bcd831ee72ac4c46129b8406e12cf11de5cbeebfc0f049142c65b42850b44a6c470e2161234c9cb5213d2ebb29a72eef2690a2df8fb5b7f2a892a6ba9386fa3aa26aae56caf52efd118d27ca2f546fbf98e4f3a3f75d7f556f4970dbe1bae1abd327e6572df747467c7aedadd4566d9e647f7845bb85a1a58491250844fd673361d7b2fd9a6d985da5b3b6c73e473fce034ea5ceb92becfdfd5c84dc8ed3d71dcbdd423dad369bffcfe2f5e23de053e145f633facdfacff9503f483bb02b8031e06d6063182f790b849b3e4524a68884ec846e870d8e970cf08c5885787d8d42334029d877e37f202831c65c294894647bf654dc4d4c69e8ca31df688374a9048583e327fb42fb134e94872400a2155e518fad8cbb4a9e3d527b2d21919ee270d33c533574fdd3fdd91559a9d7ce6608e592e3e0f97f7317ffa6ccbb97305acf33e859617142f222ffe553479a9a5b8b824a1d4ffb2c315d532c1b2f5f2c58abecacaaaeceaf81a4aad439d563db6fef6d5d3d7ec1bd00d5dd7631ab51bdf375535fbb708b64cb2d35a4d5a3fb655b47b77f0740c74c674a9773dedceba6171e3474f632fa54fb26ff6667abf59ffca40fd60e090ccd083e1f323c451fed1a9b133e36e1312137393c553945b5ab7566f0fddc99b0ebe6b3cc333f3f45eebec99b943f3f6f79517300bef1ecc3cbcf048efbff65f03eb0877441752035987d2438da0c95cfc5cc39864ac258e07f79cbb87a78837858fce4f16f017dc2fe4b98528ec2d724034482c423c5e2243324faa44ba45664076546e41febdc257fc9a2242895719a722bc4d50954f4d7a3bb73a5a03a1b1acf9516b517b6247bb4e896e8a1e459f60a06d88337c61d46f5c6672dc94bcd36a97ccaeefbbe7cddacdcfeda15bd8596a5821ac16093dd6c536717b5d6cb5ec78ed5edbf73b5c746438ed7596755e7599da77c5f5b09b035199b8ea3ee151ea19b5dfca4bd8eb9537db27c5d7dd4fceef8d7feb81d4836e010a016f039b82e2836d4882a487e40a0a354437e47b68575872b84b8448c4c2a1126a384d9df685de1999c4708a128e7ac4ac8aa6b3cc63b863e662cbe3e8874de2d1f1330925476847cd12f9131793ae2627a410531553578e8da7151f8f3d619b2e9bbe9271eb647966fc29e269f52c64d6a36cf699829cc85cbb3c7cde7afefdb39de70a0a98e71d0a552fa02f2c5dec2d2abd1453ec5562582a7a19ae20cbf8ca852b442b25aa64aa156a146a65ea24ebc5ae8a5e136910bd2ed628d924d32cd322c696685568536bd7ead0ea34e8b2ea76bb11d413dd9bde577273ac7f6960634879d8612461b479ecdd84f264e054f9adb53beed34d3342f7e26697e73317441eb01f452dea3fd95cda78817e65fbfaeabb9d1f777ece5eee5c6fe47000fefc1900003046001702007ce400dc6c01b276036c1b0490e00170e507f03005a4b62820be0f02c22ae71fefc74ef085a3500203f0128146a8219c100cc4394417620989416a233d9189c82ae45de43a4a09e5864a44d5a31ea27168137418ba087d870bc565c245e3aae07a8c11c3b8624e63c6b038ac2df604760cc78fdb8f2bc2bde4d6e266710ff388f19079d8bc58de00de4e3e613e1adf38bf0aff69fe65012f816e4115c112213ea123425fb6d0b77c12a6097f116189ac8ba689f189e58a4b88574a684b744b3a4a2e49c54af34857ca58ca3c9465c889c875c9fbc8ff52a8c4efc3ffde5aaf7840495869443951c544e5c7b62ed564b5bddb79b73f54afd488d774d052d3e6d25eda31a253ab7b4a2f4e9f62e06fe86eb4cfd8c664afa9fd4e975d81bbc3cde2cc8fed29b3e8b25cb4fadb5ad8c6746fa86dbe5dbd7d9543ae63aa538233c325765f946b941b8548778ff448f6ccda9fed55e87ddd67d077c6efb53fe7a07c8059a057d0b1e072d2040515a21b4a0e2b0a9f3d04542bda49fa5d864c5438b32dfa774c606cfb61fe787ac2dda3868915c95b5292523969d4e39fd269191f33c34e7dce6264afe51ccf53cb6f39e758305f9874d1f6924709f5f289b28e8ae96a74ad497dd4b5aaeb2f9ba5d8216da51d6fba77f744f74d0ff00f058d748c23267d6e5dbef361c66c3673fec603e1476e8ba94f879f7d7b29f197dd1be2bbd80f499f123fc77cf55d565879bd7a714d73bd6683fb1771f3e0ef140e0700742104cec3087c45c823ec112cc465c424621589473a21139035c839140aa5870a42e5a34650eb682d7420fa3cfa361796cb8a2b91ab87eb27c614138fe9c502d61a9b89bd8793c585e13ab9b9b97db9af72ffe6f1e269e6e5e5a5f00ef0a9f0a5f2bde077e4ef16c00b6408ac0a860b3e1172131ad9b2734bafb0a1709bc82e9101513bd119313fb1d7e231125889524913c9fb520c695ee97a19679915d9223973b90ff2a50a8e0a6bf8a6ad118a0a8a8f95ca94835554553e6e6b524d51dbb75d6efb0ff53b1ad59a27b542b46d77e8e848eb627457f45eeadf331832ec376a35669bb04d5b7676edeadb3d6a3667fe6ccf7b4bb4950041d5dadcc67f6f826da15d837d8b43bde355a746e72e97b17d33ae0b6e4bc4af1e084ff9fd5a5e26de9e3e2cdf4cbf72ff9b079e076002e5831c832348d964366531141b66141e1271f1d020f51b5d3d92c42889ba1d0dac5d31b1b1cd71dfe24d12a28e341cfd91b427393d65ea187f9acbf1b213df32b44f9eca5c382d9fc5cc9ecac1e746e70d9e153c175c3058b8f5425191c5a50f25459703cac4ca672bb3aa9d6b95ebde5c6d6cc86a0c6c3666cbb6aeb42f767675b7f694f4a5f69307fd86778f1a8ce327456ef1df5e9b5e9a19996d9faf5d38fd90fad8e189f992f8b36f2fe65e35bc3ef676ff7bf90f1f3eddf89cf1d57959606572b560cdf927ff46cf269dc30100538883365841e823a2102d8815a421f230b2178544d9a2b251f7d10a682aba930bc3e5c555c7b58171c1546138586f6c134e08178dbbc76dc05dc283e561f22cf17af00ef399f175f26bf2b3050c043a0409825342078596b79c12d614be25122b2a293a299628ae23fe5ca2509228252ab5205d20e323ab24fb4dae5b3e4f8184d7dfcabbf5a3e2a852a572864ae4363f552735f3eddaea1a1a8a9a4a5af2da6a3bb4748c75edf4fcf4230d720c6b8ca68d7f982aecb4dd15bdbbc1ecf51e790b7fcb4b564bd69a36c97be7eca4ed590eb34e2ace675c3eba12ddaeb94b79247abef5b2f7eef255f4cb3f803b9810b01c1412fc88ec4e990e7509bb19617da88f66416f675844f547ef618dc5bac4cdc60724bc3f1a9fb8969c912a73ace5b8ed89e90cd2c9f553c5597ad97339cc3cbefcee73c482cdc2e28bc245b1971e97b8960e5c312aabab90af2cafde56535fa75dcfbe66dcd0d368d134d262cf7edec66c5fed4ce8dabc71b657a5afb65f7de0da90f670e3a8ced8b50981c9ac5bbcb799775ede759b699a1598a3ce4f2ca83c487978ffb1e4a2f7930b4f179e893d27bec87879fdd5d05f8f5f73de8abd537aaff861eb47854f727f4bfdbdf9f9e997beaf25dfc296759797579abfd356f1abf33f62d6f8d62ad70dd66ffe74fc39b961ba51fb4be2d7d15fe39b629bc19bd737377edbfecefdfd90a3c4a172da391c80e8107dbd3f0e434a0e80e70b87f36e1f8000016093c4e1ac9971381b2f0130750067c3fff85000008c1040712600c05073ed7ff341ff017c3ece4feba5845a000000206348524d0000592b0000595f0000deb900008399000070e20000c0e400002f4b00001978d02b64290000042c4944415478dad498594c5c5518c77ff7323bcb40ca32436929ed80d2c5071393425994362969215553496c6dd3343e92b8251a1f348d892f7d50138dc697be9214ab95124b09d0326030b46a84a235b294916518d619665866e6dee3c3c4a1bcc89c312afe93efe5de73fff7ffffbe73cff9ee518410c431d5e1c2ebaec2ebae26f47b01db1da9bb26705475e3a872937f6cf8cfcb4adcd48da79a3105d3c82daac55909f6d26def09ff2f30dd03beb136c26941eaefbeb061aaf3b90fc9010a2b5e657d00d60721eaddfea60c0e301f02f31330defb11b3c0d1af5e4bb9f4d2be2a166fd4b337ff3cfe26088f821604c1f60f2d18d3bbd20759aec3cc3c9843a44f2aa2bdee630ad31ba13bf10c897fb11a8acce06a185ffec44060d8852117c2124f0b79570b0195cc3481aa4a3eab48e8324d42c0e732a0874dac79404f2e7da7dfcee6e1b4814b2ffba9ab58dd346a3da2f0d9b534ae77db08ae2a988c507b789537ce2c936addfcc2bfe24918ba0774d5a402108d82ae241e1aa0c1d0b09187d30654155afa7782b5207e0f0ddebf62a7a9dd464db985cbefeca1fe780e2d3d563eb8b61b8431311e195dd1686cfd88994a6ea2b7f6da301be1d993b95cfddac784bf80022601f0cc18f8a6cf426d958577df2a85e014358fcde1cc4ca5b8d4099919303bb8254f3288554a261bba023a44c270abdf4cf993664e1dcf420868b91385141be830369502c0c1833910f2826f00825e2e548c72649f17966712e291d6163715950c4da1e7272b81159563cfe451e20851e810b4b6cfa35b0b405358f0c74cd96c29b0ba049ab211f3a3b03c9b108fb4b6f8f4138ae40709ad7d1600aedf5aa4ad2dc4ea9a8e6f29c2772376caed2a0e7b6c21989b8f40448b09047e183651bc3342ba35b60a6ec58322929c7e8f663181585852f8f6672316b3c2c8d82a43630a51618c755b1dcb60cda6c419c56880ce9e45a2584083f92595c64fed9cb99c8d1086847864b56d544a97cb44db3d2b9aaef0deeb851c7f3a13740d80b38dbfd1dde72770c1c90edb1ca78f4468ea5ee1f9378dd41e4aa36bc044380aa74e3a515c0768fbbc7f4b9e0c7d2ec94a45e4a2f59e05b3112acb32c1330483b761f03627f6cf130eebdcbc9b02aa91576afd9cafb3b214d0b9d2610583898b0d3bb878361fe62712e391d4166b68afeeed244baf914a8500f69781d5063fde89671880bc3db0ab043c0fc0e7014541e417b3647192956586b5102ccec0d448ac33d98ae7fb76b9322daa5d8af8e2f19ba4aed722ed2a09188d1089fc93cd1f84cc6d06325cc3847f0555935afd9282169517a94a8cd75320c335ac52d4d04c980ea9bd407ab3fe1b21a32b4c07450dcd065ce7dc8c7f791fff808a4a0dff57e874613f701fd739f723bff3654daccde6a2881aa976ffbf861020942e2c393eeafb5edc7c460130d5e962a6a702afbb9ae0f8ee6d6f28add083a3aa9bbcca5ef28fc60f5efe180026b7b96a2d80c8d60000000049454e44ae426082', false); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (22, 'RES', 'Restricted Use', NULL, false); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (23, 'BY', 'Attribution Required', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004374944415478daec5bd171e23010154cfe4d07d081e9c0a402e800ae024a800e4c07d001e9c04e05261598abc05001a7e7d1ddf88824af644931096f66c70cd842fbb45aed4aeb17e617632e332e532113213a9c85e48deb6ff64088b9a45c4a2e3747528a36e33e2bbee45238545a2585f8af5e295e06505c66155f4a04e677f6058acb2c22f8d458f740f17bd9d8283230bc3fe272e0b2203f10456c369bb1e9745a5f2793492d52f77f3ed7723a9d589ee7b55caf5793fee5a26f571fa31e9938b9e572793b1e8fb7ae401b688b1369e21b9c4f093458513ab0d96c6e6559de5ca3aaaaba6d2211954b1248cacfe7732f8acb8880458422216a5be230222e4cdd14599651aca11309ad733e8ee35b5114c69ddfeff7b5c52449520b3ee33b1b6b401f083e21b22160dfa63c3a600a9df9e2371b10a6446613dd39571ed6d236776d2c8a48c2c624c2ab5c2b0fc08b5356115b1048f8e40f861202765c465266c6e33a38198d46bdccc60e8703e303a4bda58d804417e5bdbdbdf556f97fa1201f20449f0a4cef13a87b02b6aa27d334adc3d92ea090d795603c8f81d240a963a29a3b58aa5c0531bab51bbfd9fa17437f204da38fae3db32ab69791e03aa06a21bb90797ea76b332592e3d3aaf6faf8ec032dab4e4ccaef43c4f73ef3060d01699380c2c7dcc7d4314863a5d3a2ebf4d3f882b219f34b6fb289cf9b408cdf75a7076d74f5399af6c743b16f2fc562b1e8b4245d2e97ceeb7ad736a083262e980d4570f0794d4c92de073d54602b4e8189d202340f3d1c34015c6d01a3ef4e409b0548e951eddc3e2234ba4c86160f7d2702d890fd703c097812f024e049801438a4fc2ed0e902024e3f9880f30bf20dd5e662d76870b7dbfd97ccbcbebe929ecbb2ccd91e2180e3761d01b92c1f00011e6370dbd0d53501271448ccb948b751793aedb4238301ad1ec3f5ffc28a148516aba1b0002970d0f0e8c0e86baa4c7210705539c296fdf58700fc906afeb3460166904d5146dc060bb4359e36e300e5506fb7db871e7d8df97f9adfde0f46425a40cbe8973246bc1f8d852460bd5e1b1f8dd53108f3706e1f9a009c34317dc98c1209f350bd119280b6035846a82f56d606a1e12eab826f0208455305c579e214c14b898c6f026c4a645498330f4552be0820164f1a1753a76d24984e071f04106b059565726dd9096203e50121cedc102e53b337ea7dd44c1471fe6ab5621f1f1fdadb44b66b55414eaa1077b1449a02c515be4b658d488019faaaf4b8af394060c602578c93df15c079becb9aa2bf80bf2156897b7b8d26d2e50bb2f01905165daabef02cda208e7853797271f4c082082c27462922aa37e10021d89d513943383fec21fe7d65e6fdfdddb46fc8f07e85c83413467c832490542276098aa82d5608244766f93e802bc4ec6bde1fcc8425f606898993ec38e2bd52fc1e63b1c7e8f23de242b43976ddd941003f01973f15d7115394e4dc85ae17b15d7f12d7abaf0efe1160005144fe5e042ce31f0000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (24, 'SA', 'Share Alike', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004ab4944415478dadc5b8d75a24010461bc00eb403ed403bd00e4c075e07da81d781d7014905980af02a402b502be0f6e3418ee4606766990572f3de2426c2b2f3b333dfcc2ea3c02f4d0d2f0a5e199e156ca38be187e173f1197c0bbe1141e8a3e1c470a6c44931e67cc8826f0dc78a42db94b11d92e04bc36907827fe5b46f454c3bb238c5711f4b039abf0f40f82aef5d041909af0f0dff34fcc2be210c83d56a152c168bfcf76c36cbb98eaed76bce97cb25389fcf393f9f4fc9fc903936869f3eac1e4a22fb76bbcda228cada12c6c0584691922039f7b1de13aee0699a66da74bfdfb3fd7ecf55c45d53092167bd2f974b2f82d729024aee4a09a4dbc322a7d329eb9ae238e678436b2558859f4ea7599224595f046f98cfe79c9810ba087fb40d8c0763027d137349c452e1d7df41f82a3194b057097a43145ea004563c38d9029eabf0c810c7e3315bafd7b5eb16ffc3774875ae71851113c8a5b0b469d0656288d6489152688b00eb925da004223b580ba8c6e20696914e64b7dbb5c6f850049428553a5145caac0fb7f2909e442c3500110f6abd206aba4162011fc25761b6d25248eab07eeb878210c87c96bd124fc0b5dc8cb06bba5082ef11b4baa8fdb91e4978c19184bc88de1242c0a2268f09d5a53afccdadf6f01c6e3ab6c482b40a7c6a2f92a4218ef5b13ca8897363087729a09f6019676a85bd12d043ad7d098264e4f2fc7b2e59c6cab3c15ec3fd298b49bb431c8fe28e6931cebe11fc48a22dd6af96b52431859ba100c19ba0f1d8fc98d481023430293a1c0ef9752f2f748f14d76d361b51494a5d8fa62987d0906da0bc3beb9cfe24a0075e20ad258800c68e5390c53246fd179ac8cf457806a61761026f0aa094e02a3c37b80e42014d4a682b3c4701dc60dd74ff58ab773e994cf2a06494f0b12384bf2d016830a4e201554f0086d0ea16531e8014378825e083287ca111031a97003629fb26ad39d8c61917677006a9000ed0e100368b2cd7717120c91965958870341a3532679275f4fafa6afdbe0cb81461bbdda680b3f0a67ff1e46ce63a01abf56fb75b6beb13c6bc58cb6149cf5f2b5895c481d8dc4c4395c3a146094b556e927e0067fb9b5bae1399646a6d89a18ee692a5e4fca4045b9125d8fb677b14a725a6d214e57471aa753c1406214ac6260aa7a728318ca429aad216e77881c64e11772949dae2d68d1109ac75d907e4b2a4b822ac9f8ab6c624fd415f3b43d2ca92d897dc8a3747b94547b520d2129e0a9e5a9ba3eadbe3509ae07c5fe3264a97dbe3ea0724caf37ddc085f063adce3f22c62f9259ca3b20046d7a66e31f037a0251a20522a8fc096c761abcd14344e00a9cbe3b42e842ef2dbdb9bb5416cf8f77f77488a09a0c487a98f9a81a9e7b38271e0481115a4a4458e76c788217cea7a50927d425c1aa935889961ba392f5c2e892ebc015667620cf513e309b750f1717e18f1865b296a0b5f5542c4cde5b012b6b8db640bdc8b3184a832a9d6f9daafcc94e7090e921b801d90dfc1c8f94dad2c6084c7e3f18117dedfdfa573fb65f887af5766be42e621bd34752f7a1a9d524861858e3892b8bc2f6fe8e3fdc1b878f660682909922d2d3e28c1eb4e9dee02fd97a7773e5c7dd4419c58057f5f9f9f149fad4563f0f9f5f9b3cfa8fe478001008252cd9d372775a60000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (25, 'NC', 'Noncommercial', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000005024944415478dad45b3d76da401016760a77a24c876f20a5730737801b403a3a8e00398192130027c0a53bf009049d3be113002750f6535679b2bcff3f923cefcdc37991969dd1ce37df8c865ee0570644474463aa8f544572a67aa87cbe075f4822a209d18c68ee4833ba66d465c3a744538746f334a5dfd529c3b3060c679d8a561d81f8deb76038eb441887c6bde17d0ba22f0a80c695300c83a7a7a7e0f1f1df12b7dbcd74a9ef44e7f4ef57dd9b7bbafb26ba213ad13174329904711c173a1a8d84d71f0e87e07c3e179fd0f777ad0470a459e7e6e3c887aa20478ccea7d3699ea6696e2b5863b158146b2a86c4c547b688e8c252c397cb657eb95c72d78235b1b6a2239c3a41c9f8f178ecc570962370229a7242284b717822bbdd2e6f5af6fb7d3e180cbc3a411af35114e55996e56d094ec37038547142689205d64467dcb888a202a5fbfdbe91774b942f65369bfd4f89ba827bb7dbad2c3bfcd06577c2276f1bef00b4ea9a38d23682ac2339094b96a1771c86f7dbd793f7259bcd26204e105db262e101cb01309e691d019d4e1a5f7502c104e12532070c792c0f8ceef9f9b9b3c697823de2417124ae1750f70c0f3191683e9f17606323a0b8d820144fabcaffafd76bf0f6f6565c03279b3afae1e1a1a0dc02508413feb0fe6328231700bff57a6d4467419474aa3cd3ef2a4542969860b153dd1c08882ae5851136e52ebecb2443606f02da9cb2905f7b7365d1c32343b6c657d58470d5536d4da37a7d6fb54138a2faa4b06157c69b8682e41424550738ebe5819a62c30ac4c4abf10a0429ab727e2e10f9686321ae61581543707aea753f36efa29f20d84b912fc7bcf82e8f3236a2d190b08ae7b2dc85ba12c1de8b6cb0e4d5f7ac868442092ad5a6459082933bda43fbcc16e2f8c3bf414c56ab554154c8f115b12da9606d10a1a644d0878cb900a8927b718d423d2ec4822449bc7792b04f11105ae7dd12274c1d811845ccfb6aae4852b2bb38d56c5c72f9848b6e725d1a71409d05da002642cb65afb17107b8c4893a67f8520ea8e384697894ef1c4c71a27507b48d139d71405b38a1ed8026fbfdc009dd86890e4ec8d2a031116a90b058e1848c0831871cb0501be2aa02ade204d826e7ba3db718427cb98a739d1729ae4b70d82148c309b71c764586aac753d6dc9085800d4e88cae1d0473786d70f2c0ba02ac6e0a8ca5223ee735177b01a225c20acf7046c8db7d13a2639e01399525354371d4a5a50460a5cf0c02712a5b6b8495f4e80ba46a94d95f569d61d91f28b1193f21427c7a608b219c0c03d12c0ccb45e8dd9a444139657323b1b3179351688263f5d10233803eb40eba703a186d071d10c91a4d34c361196bb0c85a6264414df067d7afaf5f98093683a04dd557485bb2a78c58e3d0ac66e312bb4954d88609484692516c6d82bbea8abc69f4e27e13c95ca88cc4d341d862fc01775c9098ac6afe809ff20df3817bfd21b56222760d2c374b4adfeb2c2741d45e3318ff7cb64fdb58ca4b4d137a8b24e0506988a06259d4c88b7d13b50649bcee685a54e301d65f1d866773a31aefc5b016cce872370dc35cae02cf0f40bb3b50e8fc731b569ae82d480126bd6145a31df3370c292971d44e3b5406a203d5e8de3b38efa2058a51e8fc762225582ecbc49d09f4da4de61d0ce4fe544f13e6e9a7f84b4a9d0b6f13b9b34e742a2a09ddf0feee949ec8c0c75a64d2d9f78a70c674d9d2e02b7bf234ee99a03d79bed358013233a8c84cf7e3998241094ac57cadf8ff4f3e66b837f051800dd4b1284b44b8df00000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (26, 'ReD', 'Redeposit Modified', NULL, true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (27, 'ND', 'No Derivative Works', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000003bd4944415478daec5be191b230100dcefdc70eb003b502ec403bd00eb403ed403bd00e382b002b800ef0ab00ad802f8f89339e9784040910bc37b3a33348645f369bcdeee210b3f0a84c98cca88c98c89050b95189d877c83f6211a0f49e4a4c25af496236e6b8cb8a2fa984352a2d2363d925c57d2a69038abf4ada36115e43335e26611b4b03cc671d50fe59b6551471347fef5239505929dfe0ba64369b91c964527c8e46a34278b85eaf85244942a2282ae47ebfeb3c1f768e0595bb895977753cfb72b9cc8320c8df05c6c05894481d273936b1de6355c5d334cdeb469665f976bb552522ab93045765bdfbbe6f44711e1120b929124acd1e33723c1ef3a61186a18a35bc4d825479cff3f2388ef3b6006b188fc72a3ec1ada2fc5e3630fe180fd036149744a8abfcdc06e59fa140c2b616a7d745e5354850f2074799c3ebaaf28a3ea17429f83206db74783a2494ec0ed20394f0708320c416608b2c3945eacd3eccca3694f803ae1504a21bc0a86d28590a312fd617c6f6b602cb567547588b7ed8447cdf921520d023034600f77c4f0f38c2b3bb0d180e8764b158882e2f1e04b82c6dfd0babd58ad80e09019859cf6161ef37ef17d4840a1675806cce66b331a6d0e17028b24bba9620c82cadbe44b30ff3d7551eb8dd6ee472b9182300e3eb02a9b8f3f9ccb58201abd8706fea0b24bacc40c0b0ef0448964c6101dcab367b7f0d5d46830a37f58980a22e90f32ed03882f4098ec32f810cc887e38f804f27e0abee0151db3b9d4ec61e18e179dd0ebad653604936e66da9929b802ea2f1b00412d14cf605125dae20801b5ca334dd17e080262320d2bcc93a482633112e01c1e9a97704382c21c25d064110c8120ac2e3aa49ebc1c146e7988e67994ea7b2a448016e15783e9fe7b643921eff511ff8f8a4e8b7c84676bb9db56b1fe9334993d5af684d5818b1a126a839fbdcf298b03486fe1fdbb05eaf2b154885c5d1fd7edffbe2a8d40ac88794c7813e3748c42aced3da1619c42da4861619c0aa2629c54e31ed66ead236b92e04498abd8261d5582220255da26d364fc0292b289f928a8d920f7f50da24dd46ff10b6e5265a659549c04c34610d98750466a4858e71a57679786213f102fc8d629778edca3f9310a8262f314be8227f67b7c0bd184371c69ff77a4fb9625481086c275a4744ba3c8a6a3304c90c51e519999b474205df2bf419e08487ee0c23afccbc86cc5d7a692a63398d46e196c50a0d49a063f2a6aca18df70743f6df9d81afe324df9cf14e29fe0a8fadc7ba5f9e5e9b3075a7013f0197ff787d7e48042d39cf996cf2f3f5f9c8a457ff2fc0009a2c4cd8368e16c80000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (28, 'Inf', 'Inform Before Use', NULL, true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (29, 'CC', 'Distributed under Creative Commons', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004404944415478daec5b8b919b3010c5d700d701ee00776077e074e074e04905a403d2814ba004ec0a7007beabc07605448f810bc348bb2b217ee7eccc4eee2e42b0ff9fb40a868548e14ee1a6c6758d145c153e149eeb9f819fc1822056982abc292c3d6151ef19cd99f083c2dc23d126cceb77cd06f69ea52dc5dbd48c884692b84423e229d4fd3e03e2db98b810b2b25c1f2afca3f0a7f881300c76bb5db0d96caa7fd7eb75853af8f8f8a8f07abd06e7f3b9c2e7f369f37d881c3f143e87907a587b6391440e8743996559d917b007f6b2f40df124c42b6997499294f7fbbdf40dd8137be31d0226dc7d324144fc7ebf2f6fb75b39348011428df0c204967848c487aadb429ee7126de8cd0432ccc5713c8ad4296dc037087c42e8427cca113f84adbb80c0247297ec6e11c45b3021b1b1fbfb9288b76042dc4bf5a3289a2df10d303e81358588e2605114e5dc010262a2c3c1c9eb2309590a20443251c14efa50aba501e30fb45a70323d008e2e0d909f10a690eb3cbf76f176bb2d970a305b420ba26e7dff6da4dfd6028201c73603b2beb60fef9ba669a531baf08962495a3380e9b0613ca7d34848569a8213bea0683340bbe8743a895e8275c232b562aa299c82893a06f6894c603ab14755236c4d0b24498f65b3e2ab82ec3201bf4b99d86dbc70403c8f94bfca919d9c1f54deb58707621b3506a375ea2ec5e3f1487e27cc8faa0f3217f5621c4cf552ec818f3349166b005843a5dfd807489907e51388685085436dc383735826d5d7a977b76e6fb7ce8036ea0d7fd3d5542e5211996111b8e6fd26a99a1c67a3e6dd9e6197a0b6e429894a08176aabfe3f2800735c9eb3d124f8179f60fade379756d1e3f1d0fe5d49c57a2fcc01748039c218f016cc14dedfdf5f9b01262d7b19068c056f3ed5f372b99092d3d9bb692fcc055d7c870b780d83540285d085f0d60e95a66c92ea3f36711d114452147161d07b22a48bcfdd6c0c04e21dd4c7e912215dcd807554ddc2254283a6c240539edfe4f054418567b10efb504ca73481a85972633124e905301d17b62c6ea4c6b4af58e4ca7682c1c924e5b06eb8e25a0e4b7a16c4be7b2f0d11a898f4e3297b0513a40d119886a416a0d2f6765f70f09698d463732d31f816a9606c5a62dfb229ca4c89d2ff6df1ef3c1861a45f98cef85a3727e60a549b8d1a90bef47094d482a59882a0c3cc9e2f4e6dfaf90b3b2051fc3f222384ed2b1f926a20719df18d6df382f439776d9664dc786b4ac70801080e4a16ae0725c5e7841173c73609e15c729cf3c2ed0ecf18315e20f5694e8c37b5c3108c00e116670706bb3390491b15cd1cb0cf616a3c0b55b71c9d5bd9fcca8111880ebfad6e5745d1d7b519205ae1ddd157fbba4c7365e6f3d3fabe24aef3fc1a639eb00da6b92a47d9fb7eeca14ac81da91f09d33e61ce074436bec12366c1ccaed2465453c5a3aa9f8299df210eeb9233f32cedc310aabe1ac961ee827fd7e7b9930f988a62c27aad7fbe0cf9717f051800f651ef6054e44bf60000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (30, 'ZERO', 'No Copyright', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004704944415478daec5b8d71ea300c362c001b840dc206b0016f03d880be09e04d001bd04e001b0426081b00130426c8f39726776d706cc9719cf44777baf6dac489e44f3f96949e689602c953c9e39c4739ebe82cf92ef998ff0ebe892f44a1e48de48be4d411c7f99a4197059fe72f9a36cc71feacced0ccf16e53f9d2b62200c7a805c1cb1ce566e7959692930e08ff91573682f498d70f246f252fc8370c06623a9d663c1e8fc56834ca5845f7fb5d9ccfe78c8fc763c68fc783f37e881c7f243f9ad8f501c7c9cde7f374bfdfa775298ee36c2da9488e6f085b111e2fb95aadd2244952d78435b1365111894b2590849fcd66e9e572499b26280288f0a504a3f0d8111750e75214451434d4568236cc8561e865d77568984c2614250c6c84df98846fc2d66d88601231370c22bb3b5426fb619885a8e170c8d66a11e6aed7eba7bf2334224c826d68b15888b7b737dd256bc9ffa8769fb8dcf9c283074160745eb8c63692109010d6823e5e8efb62705614c155cfc2bd5c32f884887294ad5c0049098776bb5ded14176b70d166880e732baf0f58fa16de5609408e2153e4ed3eec9e43088d8cd435a56498dc706bf0074a14ecaa6ee0da222136b3196b3a348548e5f92b535c87f0fbb4ab100a4c450b772360b69af5827239cbc9432979fa66b3b1f217589b6b8ad4fac1de15ecb8c27351c30dc39a0df9941d3af1be38149962bb2d6a0ae61ebc0cef949d1126551770b5bd5c2ed9e1cc00d327c633b8a4f131b37edeb87822097f76ae8f1c5f47288b95e9e5e5c5e933a8cfcd695c69ffdcc407c4853fd5f6cbcc254d3488fa55ad2a8dd62a0b9a3a521542d7ebf573ad3d0832f4d57916439661bf8001e5855dc2ff703888d3e9f474ddebebabf148cc35038d2ce3bec54d4e4865fbd87928caa6ce60a900d16fa3a5845dbedd6ecabffb26ef0a80fdaa765f86b7c651d709056cb7dba76e0fba472a87f8ed1480dd8702544a716df79d5400a05fde7d145851d06c8bfa2e332e53e852556d55886802793a8a5d1c3a2827416aadc15450b129cc569d088180ab0b04706d188eaf6af7cb3d83bacfd2c872870294ff45e3834ba614b6ec0f54610fc2ab72049b67101470ece743054f8434959b7353bb3ac8f7ab4e8126c5db748e346b9eb5f540d70511cabaa6260ad737a19741a90bee5d94c3a98eb08a502e33dddb5449cc6b515455dca408cf2d8a1a4ae31b52599c5b18fdaa65f19fd61889bf7d6bcc50a09dff36476ddae35c53f88aed71ed800416e6ce08f81e9080b90a8b59a11f3b22f33b2465630a0512b8e6d0d4aca001f6a4d9207654102d4e897eccf30966150bcb41c9c21f18e78411737d0f4d1ab23cbff3c285f3f28106440602e4db99182f52d6261401c119297663df0c449c388e135e9d616adc8b35987904cbe67b168a40746035f551012a3e9901237c96c31d4263f993195d69acaaef22f9af8f72fa4474eba3a924cf5dbcd2c0942b78e24d9d30e78242d1cef7833bd1b14f6927baa28a43a8774e7095692c1da3629f1f639d43bde7411953f13e86839f43513192f3b18c2fde3f9f3fe7bf9f9a7cc1ff020c00b8b38128c9ee68580000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (31, 'GPLv3', 'GNU General Public License, version 3.0', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000004e54944415448c77dd5d96fd4e715c6f1cffc663cf6d8c62bdb00b62103b6716d106002c62d04255237acd2566aa4a4adaaaa7f01bd6f2e2ab554b9897a59a98bbaa4a9aa4895825a2ab2101a08e0408bcd6a8cc0061b30d878b03d335edf5ec47128697bee5ee93ccf7b2ecef93e319fad948c1d766b55af0c53065d74da3937e49f6e8e3df54edae280176c2ca95a96ac88a550900d9333f971fdde76448f99ff6dd0e045df4936ae4feeb04ba3554a91735f9fb33e726b66a6cfeffcc9c07f995b64bbd763d94c38144e848761213c59f3e16138110e854c8865fdd176d167e5fbbc9b9a3b108e85a9104208e3e166980e21845008f7c26c082184c9702c7485d49c77edfbc422be68b0cd4fcaf67e3b7e48ad01b7dcf077d76d95c4a85f199675cd800acf125dab9fdda0c7dd4f0d1abc92facacbf1970cba6741d68831ad9a4448b8e5b23c4a64ddd72219f5d5cf56f948f66383623f88beffa5d4cbee6ab6d99871092d3a9480847a299139799b640c5a2b1fdda80fe3bacdc7b1c38f36d6fdd0a45669c7957ad656eb8cba8f94bcac5a2d9a95f8a7159adcd2e272f168da194309a5ba8a377d5ddab08dde93b65791111f98526456ad017129e53ab549e8f6452b257ccdcf374d77b918d9e8f90dc903a6a4e58c6b5364c43155ba1cd4e18cb7e475a8f08e7119a5ee5b6ece01cf243d6f5364672cb3539359c50a22298f9d50a3d5843beea8d065c40519291f9a9534a3d88c26ed6219ed091da9aa5d6a149b9211f30f13c6f03783266c96f5c88c537a341bf15793b67a28526d9737ab721d91b665c94609351e48f902a62da8b5c6944885981171b3e28262cbecb4ca5d958a34aa48da12a9abb20a0d726eaab75ba443a7325f96f607539ed3ac47c16e9126ad068d6a14b35a257509e5a54a516dab0f4d7bac588b22cbcd98d4eff3f61b326f5cad3addeeb96a9b954829a53c211613434cab22175cf1821279efd9e0255b3ca34a95ef7acb294dceb8e29b368bf0b12e21972fcf2f9e458b6a8fad5570ce80061b3478c7512dda5df0a62679ab6416f73f2f4f2e61687ce5c8e245cdeb35eb9ae386bc68a531311fe8356ebd2e77641db47671c17920cb50c2a5c76dfd89fd62c8b9ec913b7698b14ea54bc61cb05ed6468d6af46b5e9207fdb2732ec5a5e73b57a69e5382b80ddae4b47b24618d65ae88f9aa6675fa1cb5c7ba25843df66bdde3e1b791b30b37bb5d5fbcbbb4b4245af51853a6dd4dbd265cd5a7a0ec0902f63b6be196eec835ef5f9f3ba2b044d56a431a553969da1abb5df5be1b46d4492fc90b8eb83ee7b8ab7133a6e7f68dd6ec54b748d9b80b1ad4396dcc6aab4dbbeca14a1dd62f1974fb99e19b5ed517c703d5a3edb9a27655609951d7345af08631ad92068df886e625920efaa9e3b9f04b6f988d63d670681cd81462db9522b2ca0391352eeab55acca0727b942eca47bde6f55078dbabee7ec2c45143d36d97d2d3b1269548aa57adcc8471a79d7756a7560970db6b7e11b2e7bce2fc93541e325c68ea4d0fc7d659212e2e6e415cb911ff92b4dc7a95669c77d8ef43f6bc1f7bd7c27f2643c27e47e3b96de170e809938b81321d2e87a3a127dc0e63a1271c0edb4222efa8fd8be33c156d9166dff3adf2bacdd11ebb64ac508c8231fd4e3be5cac2e46d7ff61b573efdfde9702db7c7417be375e5e53551ad32e48c1a5b98989cbfed84bf3865f2ffa533546bd3a9d3e7ac5682827b2e39e9a45e8f9e6efe379cddf27e00b2b0830000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (32, 'GPLv2', 'GNU General Public License, version 2.0', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000003fc4944415448c795955b6c936518c77f5ffbf1ad5f5b4ab7216c7127d846066c333bb1c112173c5c6036b30b41259198188877265c301363d44412d42c9a70a131124d8c12e38d0968c8300b07290293c8d898e28cb08aa056a05bd76e6bfbfdbdd8a97420f37ff5bec9f3ffbfcff3bccfc160216cca69a0856a4af001e38c30c0f7fcc0af24b28d8dacbb452ded3c468527b8d40a1836304154b1a9c46d86f996c3f433756f81529ee6396b4d99d540336b58891788f32797394b1f57a6a62ef3295f70f52e7ee3a29ecf8d68b976eb84224a2b1369457442bb552e23ca41ea712da4b7d16ba7dad5a398ee85987ad42e3b452f6dd912f5f4fa523b352447ff054743da295f8a5eeaef8cfda09ddaa5b01683b076c94e7190d2597a0e5dae68bb86164597a42175c815e56572a605363050a1a392d29ad0c47d8298c651558801368089978e9cca4e9af9895e463058c5a3acc6e11c3f22c060394d94f2373d8c524f236e36d2c9fecac90e06a09650954eeaa41e91572eb9e4d3365dd6a45e915fb63cf22857cfe8aace6b9d7c7a559392a4ef5425423ce4a2c9286f229ffd1c23cd2a0a18e710874892244e9a62f2b8cd371cc76182384904c05a9a30ca6974b1d10eb630cc310c9ee233dea3854a441a8002dee16d0a89f133498c8cc20dd28c1d64a3494dc05acd056e91cfb3345343094b28c102600945801fcdbd3c5f796b0858f15a93e220b9fc41927ccab8ce216240218f03708b8f8810268722ccace22d6019378a4dfc5e3c248125588cf016bf63d04c13060637f91007833a5a21cb071b2ff84d0c03132f0609e2f8584b8a3053081036d5047990add47261a67d67f3307d3289c7fd694ab08870894edee563bae75e59c1ebd4e263d95cef4c328a05e490200171936bb757dca48142aef03e13388448ce0998145294313c1c8e700d03832dac6414ae990c8ed6fc626e650b0738493f0e637858871f0787344e46d40e70894b002ca792688a4193d38927cee46de32552f410c5621d1dbc401eb994513cf39dd3d3ae684ece8d451f89514e1b34f2416dc3011af98b8bdcc0a2942a0238fc46180feb593a431a63706ea6bab9ce5e2e9ee745584ab79d7c4d894537b3244dea0dd949baa7d5db18ae56e87f0984542d86699bf6c7cb9beef1edbab268fa556d977b9cbd7867f353c5e180b3479145d123daa380c3d754656e8736ce059d2e8ddc973ea22e051dced176e74e31e9a02fe0ecd0d9998171f7d49dd50e051cfa7872416f61b29923ee789df6a9ff2ebb21a67eed539dcc0447d83c4fcf74c34515cfb3cd5fbcd6b58966ca79801c609208c39c21c490130bf3259f30345fa0d9cbd5cf263a79d85decf7e7b9f2f10171fee1a633164b8739c15784886512b2050072a9a19556d653800798e006839ce21417b9956dfc2f6ec53a03c4e284690000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (33, 'BSD', 'BSD', '\x89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af400000006624b4744000000000000f943bb7f000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000008c34944415458c3ad976b6c54651ac77f67ce9999ceadf442e96d5aa8564a0b95562a140a5b16f012244182bb62a29b266b4cc06c4282f1839744dd88624cc028f10388ae06814d40651502ac5c1a2d852d5b7a675aea3230b45c5a3a6da7a773aeef7ee8880501d1f84fce87c9799ff7ffbccf7f9ee7fc5f89bb4312300528036603d3817c2090783f04848136e024703af15bfba58da55f78ef4a902d0596005325494a73b95c2eb7dbed703a9d00188681a669b6aeeb9a10e21ad0091c02f601ed80f15b12c803fe043c0314a7a5a5b90b0b0b99397326454545e4e6e6e2f7fb0188c56244221142a1104d4d4d747575118d46e309f24f81dd40e42eab8d049403db81684a4a8a78ecb1c7c4b66ddb447b7bbb181c1c149665899b619aa68846a3a2b5b5556cd9b2453cfae8a32239395900d7807f00f7df45c57100d5c0b7b22c9ba5a5a5e2830f3e10172e5c10b66d8bbb856559221c0e8b4d9b3689929212e170380ce0205095e0b82d2a8023b22c9b8b172f16070f1e149aa6dd35f1cd88c7e362dfbe7da2baba5a381c0e339144d9edc80b807fcab26c2e59b244343434fcaa53df0eb66d8bfafa7ab170e14221cbb2999036ff66f224e06560a8bcbc5c1c3e7cf877211f2fc9810307446969a900a2c08b807b7c02f3808ef4f474b175eb56a11b86d08787457f73b3e8adad15d1ce4e61e9fa0d9b6ad1a818ecea12b1484458e364b24d538c5ebd2a62918888f7f509db34c7d66b9af8f0c30f456a6aaa005a80070164c00f3ce77038962e5bb64c5ebb762d6e4da3f5fdf7697ceb2dce7efe39bdb5b5b8fc7e92efbb0f87a230d0d141d33befd0b67933170f1d428b46094c9e8ce2f5d273f428a713713d478ea00d0ce0cdcec6939a4a4e4e0e6d6d6d8442a114a00f382127dae36f99999979eb5e78818ab232ba3efb8cc6b7dfc6d675dca9a944cf9c61a0ad8d8c59b370280aa75e7f9dce4f3f451f1e66f8dc397a8f1dc39391417261218d6fbec9b92fbfc4181961b0bb9bc8a143a8910869a5a5a4e7e763db36b5b5b5b2aaaa2ee0b80cac0056cc9933c7bb7af56a92749da677dfc588c598bd7e3d25ab57234912178f1c21909f8fa569b46ddeccc4b23266bdfa2a5955554892c4c4f2723c93267166eb567cc120951b3690f7f0c318b118170e1c0020abb2125f6a2ac78f1f271c0ebb81330a50a528ca848a071f243b3b9b584707b17098896565041f7984a4f474262f5bc6d99d3b19eaee0649c25455a6ac58c1bdab56212c8bc2279f44f1f918b978115bd7f1e7e793fd873fe00c04489f3993132fbec80f7bf6107ce82172abaa78e08107f8eebbef522ccb9ae70066783c1ea5a4b818b7cb85353a8a6518b8d2d2509292003055156159385c2e1c4e274208b4fe7e2c4d439265dce9e9c889b54863c34ed83600130a0b995a53831d8fd373f4282e59a6b8a404b7dbad00331420cfebf59293939398850e2460b8bb9bf0d75f234912ddbb7661eb3aa9d3a7935a5282272383b33b76907ccf3d4c59b10267e29b70ebc12e91316b16818202fa9b9ab0464608e6e6e2f57a255555f315c0e776bbf1f97c37c4f57eff3dfd2d2d0821d0a351148f07637898d4e2620a57ada279e3464ebefc32c3e130453535f882c1dbe6e09a30015f5e1e433ffc80118be1f7fb71bbdd007e05902449424a940e21c626535a1a29d3a681c381adeb0c767612dab68d8cd9b32979fe792459a6e3a38f38bd610303eded94bff4d275c97e56048703d9ed469826c2b2aecb04480aa06a9a96acaaeaf5000164575753f1da6b285e2fb661d0bd6b17cd1b377261ff7e32e7cca174ed5a528a8b69d9b489735f7d859294c4b4679f1dbff975589a8676ed1a8acf879c9484aaaa188601a03a801e5555b974e9d20d41ce40007f5e1efefc7c92efbd9729cb97e30b06897674a00f0de10c042858b992aaf7de236bde3c22df7e4b7f53d34f951c87d8850b0c9d3d4b7241018adf4f6f4f0f8903471c40dbe8e8a8150a85304cf386409190034076bb915d2e6cc3c0d67510024992482f2b23b3aa0a5355517b7a7e8a492462c5e39cdfb78f787f3f59f3e661c932674221e2f1b809b42b409d61188b1b1a1a52ae5cb982fbc736b22c6c5d1f7b4c93aba74ea1f6f6e20b06e9deb50bcfa449e42c5a84158f136d6f4752149cc9c9489284adeb98b118b6ae73fe9b6f087dfc3169a5a5e42e5ac4e5ab57f9efa95398a63904d429c071e07c737373cae9a62666a7a7230941dfa95334ae5f8fc3e5c254557a8f1dc3d234264c9dcad91d3b180e87c9acac0449a2f7d831d267ce24b5a40480bec6464ebef20ae6c80897ebea507c3ea6af59837fca14febd772fadadad00e780130a63beadb6b7b777fa9eddbbe569cf3c833310e0eae9d30c7474dcf09fb8efa9a728aaa9c1150810fae41322870f836d13282860fa9a35a4cd9881272b8b685717ffdbb307d9e36162793925cf3d47fed2a5f40f0cb07bf76e2e5fbe6c02478090c4984f5b046cc9c9c92978e78d3798e570303096251220290a29c5c504972cc1170c620c0fd3d7d8487f5313b6ae935e5e4ed6dcb9488ac2e5fa7a063b3b9180a48c0cd2eebf1f7f5e1e36b063c70ed6ad5bc7952b57ce027f056a7f3ca00fd800a80b162c1027ebeb85a969d71f4bd384b88541b12d4bd8b730a8c2b67fb6beaeae4e5456560a6004f83be0bdb95b4a80fd4ea7d37ee28927c49950e87773446d6d6d62f9f2e54251141bd80b14dd7260017f041a5c2e97bd72e54a71e2c40961261ccd6f816118a2aeae4e3cfef8e3c2e974da403d309f3bd87305580e34389d4e7bfefcf962e7ce9da2bfbfff5793f7f5f589eddbb78bb973e78e275f9ae0b823146021b01f50b3b3b3454d4d8dd8bb77af387ffefc1d6d7a3c1e17e170587cf1c517e2e9a79f169999993f6afe2f60016316f06765bf151c099dfe02fc5996e5c9d9d9d97269692915151514151591959585cfe7430881aaaaf4f4f4100a85686868a0a5a5854b972e99b66d9f0376019f31765f14779bc0f8ee989390a51ac8773a9d018fc7a378bd5edc6ef7d8e75ad7191919617474d44c4cb8307014f80af80fa0de8ee017ef6a094c4874492563167e3a9093489044992f02adc0f709bdcf30766dbf23fe0f708f107b7e1ffe120000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (34, 'MIT', 'The MIT License', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000003c64944415448c78d954b4c547714c67ff7313338033e50288332764420bcaa54a882582498b4b18d34e96bd336eebaedaa9b2ebbeaca2e9a74d1b44935b4606a1b6da2a98dad8b1651d0d80a54c40a835625508b3c8619e672bf2e18601844f856ff7f72beef7fce3de77cd76039327896ddbc403921b2807122f47085eb4488a7071b69772fe51ce610c546b6d7eb333d4082b83b13d7236ef13367e925b1b240016ff22ea5d9be9deca284ad640293dca38f3fe8672c462fc739c5bd27e48d41152d8c6dd42bfa4abd7aac59cdc3d198baf5855ed67af188af796e59e6983470c1722af599eecad59330ab883e5599cc04e7d98fb954a09a5f2da749e715d7d310d35935c87438cfee547a98939673485d2bbc9d0a571d3a28cba185d062db3e62bc4abfa454fd34ccea27558a313ec4372750c75f9bf5a5126ba24bd28c3ed72671831ab0c9a4d92c6ce200bdccb09e301e66b9cb2826213631c41821e23c48a9d8623f0d9c2ed6117aa09ace3c7da78bdaa7b08e6850d288de5758656ad5a43e50a5bed731ed54583b54a81d0aab426dfa4639e212bb4cf6122ea79a69220c70950830c2550618601c976106984c4edc287ff3180303931acaa0901a93fdf6861af27031b099e036628861ec94465bbc4d1bdff22a3e8e7292e33492cff3581ba9b3a9586797e2034cf298a68f1803c4d8c67f2955070932432e0605ec014094e2b3a31526057ef2175621877e46e9c34b51faa8e122402839f95bf11b844c023e02c9902d6ce32e77b84d2e5b93812b23131f649a1846723344163b19a5930861b2571530000c93689c6852c04b11312e3042117e56439404444dee4779b8a0598887df48508c7715ba784014ee99f44ccff62d98cc367298248b10c62a25c4b949cca1d7a43d31d1c50806426c613b104c7e422d7b7511c35cc319a7dde412437f721d8b0c3c0428c14f21d958f8b0012f1958c9023d0b67b846370c72d96282c2a93d5eb391626a292687325ea2183fa5d492472655d4b11930f053493d4160946374386ae51418347127a83639493b993795f9dba2c9cc9f133aa15cd1cf8b73d904f88468bdaeacd10d5cb56b9f98e2e3c55e9771cee3bea19b6b12e851b36c973394a40e55235d5ef7755d96f3547242ed7a4d1e970eea975abb4d335d1eb75eadfa7745faa85a543b473f8c9d3e193607394734a8a33aa3a1347b8f29a21ff48e9e1153fcc881856e2e49c3a484f778cbda1eb42aa9a6843c028828f7e9a38b1b3c74dc41da38c1adc5994aff4505d84b330d843c59eb6c3f3ec40c534c3bce38112e729acee4eead2000b08132f6514739f9048029fea19bdfe9e026e3e9c1ff030b55eb0b90e9adfb0000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); +INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (35, 'OSI', 'The Open Source Initiative ', '\x89504e470d0a1a0a0000000d4948445200000028000000240806000000fb3c781600000424694343504943432050726f66696c65000038118555df6fdb54143e896f52a4163f205847878ac5af55535bb91b1aadc6064993a5ed4a16a5e9d82a24e43a3789a91b07dbe9b6aa4f7b813706fc0140d9030f483c210d06627bd9f6c0b44953872aaa49487be8c40f2126ed0555e1bb76622753c45cf5facb39df39e73be75edb443d5f69b59a19558896abae9dcf249593a716949e4d8ad2b3d44b03d4abe94e2d91cbcd122ec115f7ceebe11d8a08cbed91eefe4ef623bf7a8bdcd189224fc06e151d7d19f80c51ccd46bb64b14bf07fbf869b706dcf31cf0d3360402ab02977d9c1278d1c7273d4e213f098ed02aeb15ad08bc063cbcd8662fb7615f0318c893e1556e1bba226691b3ad926172cfe12f8f71b731ff0f2e9b75f4ec5d8358fb9ca5b963b80f89de2bf654be893fd7b5f41cf04bb05fafb949617f05f88ffad27c02781f51f4a9927d74dee7475f5fad14de06de057bd170a70b4dfb6a75317b1c18b1d1f525eb98c82338d7756712b3a41780ef56f8b4d863e891a8c85369e061e0c14a7daa995f9a7156e684ddcbb35a99cc02238f64bfa7cde48007803fb4adbca805cdd23a3733a216f24b576b6eaea941daae9a59510bfd32993b5e8fc8296dbb95c2941fcb0eba76a119cb164ac6d1e9267fad667a6711dad805bb9e17da909fddd2ec74061879d83fbc3a2fe6061cdb5dd45262b6a3c047e84444234e162d62d5a94a3ba4509e3294c4bd46363c2532c88485c3cb6131224fd2126cdd79398fe3c7848cb217bd2da251a53bc7af70bfc9b1583f53d901fc1f62b3ec301b6713a4b037d89bec084bc13ac10e050a726d3a152ad37d28f5f3bc4f7554163a4e50f2fc407d288851ced9ef1afacd8ffe869ab04b2bf4234fd031345bed13200713687537d23ea76b6b3fec0e3cca06bbf8ceedbe6b6b74fc71f38ddd8b6dc736b06ec6b6c2f8d8afb12dfc6d52023b607a8a96a1caf076c20978231d3d5c01d3250deb6fe059d0da52dab1a3a5eaf981d02326c13fc83eccd2b9e1d0aafea2fea96ea85fa817d4df3b6a84193ba6247d2a7d2bfd287d277d2ffd4c8a7459ba22fd245d95be912e0539bbefbd9f25d87baf5f6113dd8a5d68d56b9f3527534eca7be417e594fcbcfcb23c1bb014b95f1e93a7e4bdf0ec09f6cd0cfd1dbd18740ab36a4db57b2df10418340f25069d06d7c654c584ab741659db9f93a65236c8c6d8f423a7765c9ce5968a783a9e8a274889ef8b4fc4c7e23302b79ebcf85ef826b0a603f5fe9313303a3ae06d2c4c25c833e29d3a715645f40a749bd0cd5d7e06df0ea249ab76d636ca1557d9afaaaf29097ccab8325dd5478715cd3415cfe5283677b8bdc28ba324be83228ee841defbbe4576dd0c6dee5b4487ffc23beb56685ba8137ded10f5bf1ada86f04e7ce633a28b07f5babde2e7a348e40691533ab0dffb1de94be2dd74b7d17880f755cf27443b1f371affae371a3b5f22ff16d165f33f590071786c1b2b13000000097048597300000b1300000b1301009a9c18000009ae494441545809bd586b6c14d715be33b3b3e3b5bd7eadbd181b5c1b080e71e40670c02950d92502d407aa9ada4514aaa4519b1f55faab9192082946156afab351aa4a11ea9f2a4de36daba0264da9a80c22d084d8450d260a8ff0f6738d5fbb5eefceeeccf4fbeeceac97e00527917ae19b7be7de73cffdceb9e79eb96bc5711cf1658b82021d8ae8025822824aa1facb2bf749855fe021497509b5a3a543018f0c09e5ab5184a2741eecf41d3f7fdc717a1d2b7fec73b569e4e7053ca5810e89e5e662d12220e4c27fc7584f8fca39f97d4b6dcb45966a91f45a4787e6f4f5d163f091b2b676cbcadd465d608b1ed49b145d2dc3263b76ca9a4e4f9b9793c38913e31f0cff0d646e4af94ec5e7f4496f2f75c9ac1796222dc9f540fe25c7467b79fd8ea603256b82fb8b9b8241bdc210aa5f25e3ac2adb11b6690973322512576627e29762af8df45dff3588ce2adddd9ad3dbbbe42d5f9207f3c95534847684b6d71eaedc58b3d257ee27215bee33482d1410055fa182b12354732229a63f8c0e8ebd71e3c939676e40e95640726971b93482aed5a1967077a863f99b559bc242f1a9a695b27c20471a8b165076609c0defdab669ebb74f8dce8ebd33b43b36327542e9ecc476674365d1c96ee77d4fb1e2c64d5959d9b6dabd8daf576d0639454959c98c819a5e5ad0ef39d1ed42450f6a56d2d234434b556fad2d83df2298b70ddb7dc1d3bda0e0eed63d0942114f5e067569e39ee6572b37857d60675aa6652824464292144f33daf0965cc2f6bc9a654a5978db500dcd0c3d16ae494fa57e03b95d3c30d0ad628dec3c39f9ce0723a570e9ea9263cbdaeb7f52fe48a8155b65d9694bcf9193a3c8379a6aa97ecdd6fcaa2a616856962c5893232b781bdbec53033e51de5ab533f46038abbca3e39e1c0a7ad0f59e853ab0faa987f617d5160bc7b26daca72d58849535d58607b4d45042a4a2f3297ac4a82dd68d9a22f082472d9bc73bfb1ff18ab9667163d01f7ca4f249b4238c43ce29e4c5820485ebbd606570a33f1c58af68d826d3c1138b713bf92039d352a7ce44a33303d15fce9c1d3be1085dab6a0f7fabbcadfaf98af5d52542556d6183a44357222433b6c69454b4bc780b88ad05b18bb94f24d57ea6142498f5bf10a55fad6c2b0a0738cd42a069f25030e0106fd83575fabf9373970f0f3e81854ee6e93e5bac145fd47ea1bd59d65a85230c59261eda062f3262fd5545e535adb5ad9873518061a1b2e8fec33225d21b9181abe10ba1216ea03417c8e4a7fa14c74a6498885f27397e77792adbdada742e967012bd89ebf1bf3ba62d655db7b3825d8aed2bd5855e6d3452b6303d5a759fa2f89420b737bbadae30768a092e339711e9447a90bdb1e198c253d9dfdf9f6e7b264bd28aa73f468a9107449ef285b51c555785aa6b4176455a5aa88e317057b92f41613929e78eaf0474d00b7029729bd0746d25b5ce18335217170ad60565942a86af9ef1060fd36d0b85f65a0ece8f95f23a2123e778ef5ebd2841297cb047aacc2432b7ec942d905a724bb0c5057c415d041a4af780d38a4baf5c4af11306c54adf4bf2646e08d405bead16e1e263c913e2ad09c242b5126961cd646eb1b3ebfcf99cee9c90db5894a01c7327256f24ce9a9349462092b4b7d168d8b606b7d838a92b1bbbd6feb5b67d45bbfcbec2b3cb36d7ed6cdab7ee4f65ada12066f070611d5a05cd3c5c082d5c24cca933e3e7b85604ff0a95c204dd495317a3675263f3d7a840d5142ee6ea42e24d5baa5e699835dbeb1ff52f2b7a550e28a238f095e0e19aceba07b4129fc9b422c9491fc1751a8206de37a3f3ff498b6cfcba377057ef9d55618211014b116a8e3331f7e9ec9ff179e217231b29f91b623b9a359f1156c27a9baa21308793fb2eee847c4100a293f2a8691b74a8c9d184885d988d4036dd8d8b084719bba8ef2a050962b2233ab35f8de163d77f3bf3d164148745477a497b5e445ce2880a6deeca6c7cf8d8b55e4ffbe491d137e6aec5b89d3eac8ceb18c9c17b7ecdb4e1d1d9739383e3ef0fbd42f94824bbbd723d4f415e5d902065e4c79cd722c7b936f541f4f9d827d3f4808e85335c1029c8611a498e248ee3fd637a9cf3e2227e3a3592e817199903f929642e4c63c83f3d3021a64e450f34ffb83910ee6caac59805d0cf8b967b1294338e1f97b7dfdbe7467f7ffbe4d8216c37f21796d355a6082d85ed8a5f88fd45cab66df4c91bb3e3a4e6afc68ff0460dca0a3d47c3660727c5e4e9f167a6ae4e1c890f259fd574d15cf778d3aeba9dabbe5ebf63d56e6f9bbd9a3aef4b90d66182941b3d79e3c0f8d1a117a6faa342641c038b2a891bf15b20ffae24b86ac016d188f4e2c87b37df4a5c8fc561886627337e5c565313476f3d1d1d187e8db2f83cdf542d27a6aace06e4843d8e626faadedd5c2af5f4c8a895cd82df6239ea3ec091bf43e48d63f4f4cd974b2b2a3e34bf933a54dc50bad91c9dff07c6c7948318c735deb31e7d838dddcdefcd7e34b96bee72ec9f43912b2f9a8e39e0e9f5f932a72d474f238e7b612c6e14191fb282348ebf7b3c3919bc50c6777a8984595390b54cbc79e3bae811ee511646685df847b59d0d2d729c3f45b373384fcad46d6dd85ab5baea071cff8c8cfca9e1f5e7d7ee9a72be9c231faec27cc1fc362779ef68dfa5dc23e4c92c567b862d36e6f5e5ebf674a2ce79a404ed2d003fe0f4e0726055dee4b5787f98ef28654699b1a6a4b184a7307f175a30b6ce9531f40a7d7d757335f5d1ab86dbcfbb1b77ca00ca008ef3da1570c71f443becb66522c64953cad1c9df09f5c005803794fd00929938059c019e06c8ee04d00e5096e32f43d9fbd0f153b4b9a8095c06360235c03830035c825c1fe47e86f66d6083dbcf8341c2978029600dc0bf52bc05f9b3b48ce53180823b002eb01720913dc07ae057c03c700bd80790dcb3c0bf801f022c0f03f4c83b0089166181e75053df37012fd7d1630f0057011a1e73e5f8257a02f804603c7f0390ccbd3a0141a694043a483c8ad769bcf3cf1cb4e853e018f06f80060c03d78087009643000d7d0a6800fa01167a8f84653e75db49d4f432c9d3709609806dd67f0466816cc08304e3ed77400ae06492f92e701db801d0aa4e6004380774002f00edc03618f273e8f83eda9c4fef309ee9856980db3c003c0a44811500f58e02278117818b00c9519673e8eda3d07b0575ee90ac449bd6739bf6017f003601a5104425760124510990841f0801abdd717aad0b206154d28b7b50cb83867a1df035601940877807612dda7b01ae4f9ddf03b6033af5c89401eb594bad18e0a1617c35a0eb39f79d79692179b233af40fe0b8d2f611e7f5cb849341b77f2ef7a58bb09687539331e1580278d605be645b74d7268e6123bb796329c47796f9cfd04fba5cebc79520efdde3ab9bc2b3d88815c8155396fe6b77302ffe7c6ff00610e5ffd6a8201470000000049454e44ae426082', true); + + +-- +-- Data for Name: license_label_extended_mapping; Type: TABLE DATA; Schema: public; Owner: dspace +-- + +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991138, 1, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991139, 1, 31); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991140, 2, 32); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991141, 2, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991142, 3, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991143, 3, 34); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991144, 4, 35); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991145, 4, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991146, 5, 35); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991147, 5, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991148, 6, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991149, 6, 25); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991150, 6, 27); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991151, 6, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991152, 6, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991153, 7, 33); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991154, 7, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991155, 7, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991156, 8, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991157, 8, 33); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991158, 8, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991159, 9, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991160, 9, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991161, 9, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991162, 9, 25); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991163, 10, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991164, 10, 25); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991165, 10, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991166, 10, 24); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991167, 10, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991168, 11, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991169, 11, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991170, 11, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991171, 11, 27); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991172, 12, 24); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991173, 12, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991174, 12, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991175, 12, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991176, 13, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991177, 13, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991178, 13, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991179, 14, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991180, 14, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991181, 14, 30); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991204, 22, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991206, 24, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991207, 25, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991208, 26, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991209, 27, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991210, 28, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991211, 29, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991212, 30, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991213, 31, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991214, 32, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991215, 33, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991216, 33, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991217, 34, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991218, 35, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991219, 36, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991220, 37, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991221, 37, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991222, 37, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991223, 38, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991224, 38, 24); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991225, 38, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991226, 38, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991227, 39, 27); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991228, 39, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991229, 39, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991230, 39, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991231, 40, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991232, 40, 25); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991233, 40, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991234, 40, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991235, 41, 25); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991236, 41, 29); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991237, 41, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991238, 41, 24); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991239, 41, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991240, 42, 20); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991241, 42, 27); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991242, 42, 25); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991243, 42, 23); +INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991244, 42, 29); + + +-- +-- Name: license_definition_license_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace +-- + +SELECT pg_catalog.setval('public.license_definition_license_id_seq', 85, true); + + +-- +-- Name: license_label_extended_mapping_mapping_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace +-- + +SELECT pg_catalog.setval('public.license_label_extended_mapping_mapping_id_seq', 991244, true); + + +-- +-- Name: license_label_label_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace +-- + +SELECT pg_catalog.setval('public.license_label_label_id_seq', 35, true); From a9078bb16f46b89c8280fb6ac1d2f67d3b687e34 Mon Sep 17 00:00:00 2001 From: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com> Date: Tue, 12 Nov 2024 09:47:53 +0100 Subject: [PATCH 2/8] UFAL/share submission by email (#780) * Updated table workspace with share token, created endpoint to generate share token and it is sent via email * Added method to get workspaceitem via share token. * Added an endpoint for changing the submission's owner. * Added license headers * Added test for fetching item with share Token * Added tests to check the owner is changed * Added better explanation why the BE must return Page object in the search endpoint * Validate the user in the SubmissionController, it cannot be null * Updated email - some values are fetched directly from the configuration property * Updated preAuthorization method to ADD instead of WRITE (write is used for controlling authorization for modifying the Item) and updated shareURL * Authorize the submitter which is trying to take sharing item via shareToken. * Update integration test following the feature update --- .../org/dspace/content/WorkspaceItem.java | 11 + .../content/WorkspaceItemServiceImpl.java | 5 + .../dspace/content/dao/WorkspaceItemDAO.java | 2 + .../dao/impl/WorkspaceItemDAOImpl.java | 8 + .../content/service/WorkspaceItemService.java | 10 + ...9.30__Add_share_token_to_workspaceitem.sql | 9 + ...9.30__Add_share_token_to_workspaceitem.sql | 9 + .../dspace/builder/WorkspaceItemBuilder.java | 9 + .../rest/model/ShareSubmissionLinkDTO.java | 29 +++ .../rest/repository/SubmissionController.java | 223 ++++++++++++++++++ .../WorkspaceItemRestRepository.java | 34 +++ ...paceItemRestPermissionEvaluatorPlugin.java | 14 ++ .../rest/ClarinDiscoveryRestControllerIT.java | 2 +- .../ClarinWorkflowItemRestRepositoryIT.java | 2 +- .../ClarinWorkspaceItemRestRepositoryIT.java | 24 ++ .../app/rest/SubmissionControllerIT.java | 116 +++++++++ .../config/emails/clarin_download_link_admin | 6 +- dspace/config/emails/share_submission | 21 ++ 18 files changed, 529 insertions(+), 5 deletions(-) create mode 100644 dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V7.6_2024.09.30__Add_share_token_to_workspaceitem.sql create mode 100644 dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.09.30__Add_share_token_to_workspaceitem.sql create mode 100644 dspace-server-webapp/src/main/java/org/dspace/app/rest/model/ShareSubmissionLinkDTO.java create mode 100644 dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/SubmissionController.java create mode 100644 dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionControllerIT.java create mode 100644 dspace/config/emails/share_submission diff --git a/dspace-api/src/main/java/org/dspace/content/WorkspaceItem.java b/dspace-api/src/main/java/org/dspace/content/WorkspaceItem.java index a4c880173bf7..77937e8ee76b 100644 --- a/dspace-api/src/main/java/org/dspace/content/WorkspaceItem.java +++ b/dspace-api/src/main/java/org/dspace/content/WorkspaceItem.java @@ -73,6 +73,9 @@ public class WorkspaceItem @Column(name = "page_reached") private Integer pageReached = -1; + @Column(name = "share_token") + private String shareToken = null; + /** * Protected constructor, create object using: * {@link org.dspace.content.service.WorkspaceItemService#create(Context, Collection, boolean)} @@ -131,6 +134,14 @@ public void setPageReached(int v) { pageReached = v; } + public String getShareToken() { + return shareToken; + } + + public void setShareToken(String shareToken) { + this.shareToken = shareToken; + } + /** * Decide if this WorkspaceItem is equal to another * diff --git a/dspace-api/src/main/java/org/dspace/content/WorkspaceItemServiceImpl.java b/dspace-api/src/main/java/org/dspace/content/WorkspaceItemServiceImpl.java index b6e7372af184..f39ab6ea526e 100644 --- a/dspace-api/src/main/java/org/dspace/content/WorkspaceItemServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/WorkspaceItemServiceImpl.java @@ -243,6 +243,11 @@ public WorkspaceItem findByItem(Context context, Item item) throws SQLException return workspaceItemDAO.findByItem(context, item); } + @Override + public List findByShareToken(Context context, String shareToken) throws SQLException { + return workspaceItemDAO.findByShareToken(context, shareToken); + } + @Override public List findAll(Context context) throws SQLException { return workspaceItemDAO.findAll(context); diff --git a/dspace-api/src/main/java/org/dspace/content/dao/WorkspaceItemDAO.java b/dspace-api/src/main/java/org/dspace/content/dao/WorkspaceItemDAO.java index 900858b72869..6996d6ce4010 100644 --- a/dspace-api/src/main/java/org/dspace/content/dao/WorkspaceItemDAO.java +++ b/dspace-api/src/main/java/org/dspace/content/dao/WorkspaceItemDAO.java @@ -37,6 +37,8 @@ public List findByEPerson(Context context, EPerson ep, Integer li public WorkspaceItem findByItem(Context context, Item i) throws SQLException; + public List findByShareToken(Context context, String shareToken) throws SQLException; + public List findAll(Context context) throws SQLException; public List findAll(Context context, Integer limit, Integer offset) throws SQLException; diff --git a/dspace-api/src/main/java/org/dspace/content/dao/impl/WorkspaceItemDAOImpl.java b/dspace-api/src/main/java/org/dspace/content/dao/impl/WorkspaceItemDAOImpl.java index 138451365522..43b127e7c939 100644 --- a/dspace-api/src/main/java/org/dspace/content/dao/impl/WorkspaceItemDAOImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/dao/impl/WorkspaceItemDAOImpl.java @@ -81,6 +81,14 @@ public WorkspaceItem findByItem(Context context, Item i) throws SQLException { return uniqueResult(context, criteriaQuery, false, WorkspaceItem.class); } + @Override + public List findByShareToken(Context context, String shareToken) throws SQLException { + Query query = createQuery(context, + "from WorkspaceItem ws where ws.shareToken = :shareToken"); + query.setParameter("shareToken", shareToken); + return list(query); + } + @Override public List findAll(Context context) throws SQLException { CriteriaBuilder criteriaBuilder = getCriteriaBuilder(context); diff --git a/dspace-api/src/main/java/org/dspace/content/service/WorkspaceItemService.java b/dspace-api/src/main/java/org/dspace/content/service/WorkspaceItemService.java index c8df68e43498..c4e9c54575a1 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/WorkspaceItemService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/WorkspaceItemService.java @@ -127,6 +127,16 @@ public List findByCollection(Context context, Collection collecti public WorkspaceItem findByItem(Context context, Item item) throws SQLException; + /** + * Find the workspace item by the share token. + * @param context the DSpace context object + * @param shareToken the share token + * @return the List of workspace items or null + * @throws SQLException if database error + */ + public List findByShareToken(Context context, String shareToken) + throws SQLException; + /** * Get all workspace items in the whole system * diff --git a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V7.6_2024.09.30__Add_share_token_to_workspaceitem.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V7.6_2024.09.30__Add_share_token_to_workspaceitem.sql new file mode 100644 index 000000000000..af472c74f97b --- /dev/null +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V7.6_2024.09.30__Add_share_token_to_workspaceitem.sql @@ -0,0 +1,9 @@ +-- +-- The contents of this file are subject to the license and copyright +-- detailed in the LICENSE and NOTICE files at the root of the source +-- tree and available online at +-- +-- http://www.dspace.org/license/ +-- + +ALTER TABLE workspaceitem ADD share_token varchar(32); diff --git a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.09.30__Add_share_token_to_workspaceitem.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.09.30__Add_share_token_to_workspaceitem.sql new file mode 100644 index 000000000000..af472c74f97b --- /dev/null +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.09.30__Add_share_token_to_workspaceitem.sql @@ -0,0 +1,9 @@ +-- +-- The contents of this file are subject to the license and copyright +-- detailed in the LICENSE and NOTICE files at the root of the source +-- tree and available online at +-- +-- http://www.dspace.org/license/ +-- + +ALTER TABLE workspaceitem ADD share_token varchar(32); diff --git a/dspace-api/src/test/java/org/dspace/builder/WorkspaceItemBuilder.java b/dspace-api/src/test/java/org/dspace/builder/WorkspaceItemBuilder.java index 3f2f46836819..6af9423a5f16 100644 --- a/dspace-api/src/test/java/org/dspace/builder/WorkspaceItemBuilder.java +++ b/dspace-api/src/test/java/org/dspace/builder/WorkspaceItemBuilder.java @@ -250,4 +250,13 @@ public WorkspaceItemBuilder withMetadata(final String schema, final String eleme final String value) { return addMetadataValue(schema, element, qualifier, value); } + + public WorkspaceItemBuilder withShareToken(String shareToken) { + try { + workspaceItem.setShareToken(shareToken); + } catch (Exception e) { + handleException(e); + } + return this; + } } diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/ShareSubmissionLinkDTO.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/ShareSubmissionLinkDTO.java new file mode 100644 index 000000000000..26b9d5e0679f --- /dev/null +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/ShareSubmissionLinkDTO.java @@ -0,0 +1,29 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.app.rest.model; + +/** + * This class represents a DTO that will be used to share a submission link. It will be used to return the share link + * to the user in the UI. + * + * @author Milan Majchrak (dspace at dataquest.sk) + */ +public class ShareSubmissionLinkDTO { + + private String shareLink; + + public ShareSubmissionLinkDTO() { } + + public String getShareLink() { + return shareLink; + } + + public void setShareLink(String shareLink) { + this.shareLink = shareLink; + } +} diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/SubmissionController.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/SubmissionController.java new file mode 100644 index 000000000000..fb7c06f606e8 --- /dev/null +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/SubmissionController.java @@ -0,0 +1,223 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.app.rest.repository; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.List; +import java.util.Locale; +import java.util.UUID; +import javax.mail.MessagingException; +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.BadRequestException; + +import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.Logger; +import org.dspace.app.rest.converter.ConverterService; +import org.dspace.app.rest.model.RestAddressableModel; +import org.dspace.app.rest.model.ShareSubmissionLinkDTO; +import org.dspace.app.rest.model.WorkspaceItemRest; +import org.dspace.app.rest.utils.Utils; +import org.dspace.authorize.AuthorizeException; +import org.dspace.authorize.service.AuthorizeService; +import org.dspace.content.WorkspaceItem; +import org.dspace.content.service.WorkspaceItemService; +import org.dspace.core.Constants; +import org.dspace.core.Context; +import org.dspace.core.Email; +import org.dspace.core.I18nUtil; +import org.dspace.eperson.EPerson; +import org.dspace.services.ConfigurationService; +import org.dspace.web.ContextUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * This class' purpose is to provide an API for sharing an in-progress submission. It allows the user to generate + * a share link for a workspace item and to set the owner of the workspace item to the current user. + * + * @author Milan Majchrak (dspace at dataquest.sk) + */ +@RestController +@RequestMapping("/api/" + RestAddressableModel.SUBMISSION) +public class SubmissionController { + private static Logger log = org.apache.logging.log4j.LogManager.getLogger(SubmissionController.class); + + @Autowired + WorkspaceItemService workspaceItemService; + + @Autowired + ConfigurationService configurationService; + + @Autowired + protected Utils utils; + + @Autowired + AuthorizeService authorizeService; + + @Lazy + @Autowired + protected ConverterService converter; + + @PreAuthorize("hasPermission(#wsoId, 'WORKSPACEITEM', 'WRITE')") + @RequestMapping(method = RequestMethod.GET, value = "share") + public ResponseEntity generateShareLink(@RequestParam(name = "workspaceitemid") + Integer wsoId, HttpServletRequest request) + throws SQLException, AuthorizeException { + + Context context = ContextUtil.obtainContext(request); + // Check the context is not null + this.validateContext(context); + + // Get workspace item from ID + WorkspaceItem wsi = workspaceItemService.find(context, wsoId); + // Check the wsi does exist + validateWorkspaceItem(wsi, wsoId, null); + + // Generate a share link + String shareToken = generateShareToken(); + + // Update workspace item with share link + wsi.setShareToken(shareToken); + workspaceItemService.update(context, wsi); + // Without commit the changes are not persisted into the database + context.commit(); + + // Get submitter email + EPerson currentUser = context.getCurrentUser(); + if (currentUser == null) { + String errorMessage = "The current user is not valid, it cannot be null."; + log.error(errorMessage); + throw new BadRequestException(errorMessage); + } + + // Send email to submitter with share link + String shareLink = sendShareLinkEmail(context, wsi, currentUser); + if (StringUtils.isEmpty(shareLink)) { + String errorMessage = "The share link is empty."; + log.error(errorMessage); + throw new RuntimeException(errorMessage); + } + + // Create a DTO with the share link for better processing in the FE + ShareSubmissionLinkDTO shareSubmissionLinkDTO = new ShareSubmissionLinkDTO(); + shareSubmissionLinkDTO.setShareLink(shareLink); + + // Send share link in response + return ResponseEntity.ok().body(shareSubmissionLinkDTO); + } + + @PreAuthorize("hasPermission(#wsoId, 'WORKSPACEITEM', 'WRITE')") + @RequestMapping(method = RequestMethod.GET, value = "setOwner") + public WorkspaceItemRest setOwner(@RequestParam(name = "shareToken") String shareToken, + @RequestParam(name = "workspaceitemid") Integer wsoId, + HttpServletRequest request) + throws SQLException, AuthorizeException { + + Context context = ContextUtil.obtainContext(request); + // Check the context is not null + this.validateContext(context); + + // Get workspace by share token + List wsiList = workspaceItemService.findByShareToken(context, shareToken); + // Check the wsi does exist + if (CollectionUtils.isEmpty(wsiList)) { + String errorMessage = "The workspace item with share token:" + shareToken + " does not exist."; + log.error(errorMessage); + throw new BadRequestException(errorMessage); + } + + // Get the first workspace item - the only one + WorkspaceItem wsi = wsiList.get(0); + // Check the wsi does exist + validateWorkspaceItem(wsi, null, shareToken); + + if (!authorizeService.authorizeActionBoolean(context, wsi.getItem(), Constants.READ)) { + String errorMessage = "The current user does not have rights to view the WorkflowItem"; + log.error(errorMessage); + throw new AccessDeniedException(errorMessage); + } + + // Set the owner of the workspace item to the current user + EPerson currentUser = context.getCurrentUser(); + // If the current user is null, throw an exception + if (currentUser == null) { + String errorMessage = "The current user is not valid, it cannot be null."; + log.error(errorMessage); + throw new BadRequestException(errorMessage); + } + + wsi.getItem().setSubmitter(currentUser); + workspaceItemService.update(context, wsi); + WorkspaceItemRest wsiRest = converter.toRest(wsi, utils.obtainProjection()); + + // Without commit the changes are not persisted into the database + context.commit(); + return wsiRest; + } + + private static String generateShareToken() { + // UUID generates a 36-char string with hyphens, so we can strip them to get a 32-char string + return UUID.randomUUID().toString().replace("-", "").substring(0, 32); + } + + private String sendShareLinkEmail(Context context, WorkspaceItem wsi, EPerson currentUser) { + // Get the UI URL from the configuration + String uiUrl = configurationService.getProperty("dspace.ui.url"); + // Get submitter email + String email = currentUser.getEmail(); + // Compose the url with the share token. The user will be redirected to the UI. + String shareTokenUrl = uiUrl + "/share-submission/change-submitter?share_token=" + wsi.getShareToken() + + "&workspaceitemid=" + wsi.getID(); + try { + Locale locale = context.getCurrentLocale(); + Email bean = Email.getEmail(I18nUtil.getEmailFilename(locale, "share_submission")); + bean.addArgument(shareTokenUrl); + bean.addRecipient(email); + bean.send(); + } catch (MessagingException | IOException e) { + String errorMessage = "Unable send the email because: " + e.getMessage(); + log.error(errorMessage); + throw new RuntimeException(errorMessage); + } + return shareTokenUrl; + } + + /** + * Check if the context is valid - not null. If not, throw an exception. + */ + private void validateContext(Context context) { + if (context == null) { + String errorMessage = "The current context is not valid, it cannot be null."; + log.error(errorMessage); + throw new RuntimeException(errorMessage); + } + } + + /** + * Check if the workspace item is valid - not null. If not, throw an exception. The workspace item can be found by + * ID or the share token. + */ + private void validateWorkspaceItem(WorkspaceItem wsi, Integer wsoId, String shareToken) { + if (wsi == null) { + String identifier = wsoId != null ? wsoId.toString() : shareToken; + String identifierName = wsoId != null ? "ID" : "share token"; + String errorMessage = "The workspace item with " + identifierName + ":" + identifier + " does not exist."; + log.error(errorMessage); + throw new BadRequestException(errorMessage); + } + } +} diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/WorkspaceItemRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/WorkspaceItemRestRepository.java index d3fb87b0e501..e6ff59f2a729 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/WorkspaceItemRestRepository.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/WorkspaceItemRestRepository.java @@ -22,6 +22,7 @@ import java.util.Objects; import java.util.UUID; import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.BadRequestException; import com.fasterxml.jackson.databind.JsonNode; import org.apache.commons.io.FileUtils; @@ -84,6 +85,7 @@ import org.springframework.security.access.AccessDeniedException; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; import org.springframework.util.ObjectUtils; import org.springframework.web.multipart.MultipartFile; @@ -100,6 +102,8 @@ public class WorkspaceItemRestRepository extends DSpaceRestRepository findByShareToken(@Parameter(value = SHARE_TOKEN, required = true) String shareToken, + Pageable pageable) { + try { + Context context = obtainContext(); + List witems = workspaceItemService.findByShareToken(context, shareToken); + if (CollectionUtils.isEmpty(witems)) { + String errorMessage = "The workspace item with share token:" + shareToken + " does not exist."; + log.error(errorMessage); + throw new BadRequestException(errorMessage); + } + if (!authorizeService.authorizeActionBoolean(context, witems.get(0).getItem(), Constants.READ)) { + String errorMessage = "The current user does not have rights to view the WorkflowItem"; + log.error(errorMessage); + throw new AccessDeniedException(errorMessage); + } + // It must return a Page because the FE cannot parse single result from the search endpoint because + // the FE service always expects a Page object. + return converter.toRestPage(witems, pageable, utils.obtainProjection()); + } catch (SQLException e) { + String errorMessage = "Cannot retrieve a workspace item with the share token: " + shareToken + + " because: " + e.getMessage(); + log.error(errorMessage, e); + throw new RuntimeException(errorMessage, e); + } + } + /** * Detach the clarin license from the bitstreams and if the clarin license is not null attach the * new clarin license to the bitstream. diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/WorkspaceItemRestPermissionEvaluatorPlugin.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/WorkspaceItemRestPermissionEvaluatorPlugin.java index c0efbd60f204..4f92b0f650a6 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/WorkspaceItemRestPermissionEvaluatorPlugin.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/WorkspaceItemRestPermissionEvaluatorPlugin.java @@ -7,8 +7,12 @@ */ package org.dspace.app.rest.security; +import static org.dspace.app.rest.repository.WorkspaceItemRestRepository.SHARE_TOKEN; + import java.io.Serializable; import java.sql.SQLException; +import java.util.Objects; +import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.dspace.app.rest.model.WorkspaceItemRest; @@ -91,6 +95,16 @@ public boolean hasDSpacePermission(Authentication authentication, Serializable t } } + // Check the request has shareToken the same as the workspace item + if (witem.getShareToken() != null) { + HttpServletRequest req = request.getHttpServletRequest(); + if (Objects.nonNull(req)) { + if (witem.getShareToken().equals(req.getParameter(SHARE_TOKEN))) { + return true; + } + } + } + if (witem.getItem() != null) { if (supervisionOrderService.isSupervisor(context, ePerson, witem.getItem())) { return authorizeService.authorizeActionBoolean(context, ePerson, witem.getItem(), diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java index d8aca96b37b3..e1361a023b0c 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java @@ -74,7 +74,7 @@ * This class is modified version of the DiscoveryRestControllerIT. Because for CLARIN customization * the facets/filters was updated and the tests were failing. So the test class had must be updated. * - * @author Milan Majchrak (milan.majchrak at dataquest.sk) + * @author Milan Majchrak (dspace at dataquest.sk) */ public class ClarinDiscoveryRestControllerIT extends AbstractControllerIntegrationTest { @Autowired diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkflowItemRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkflowItemRestRepositoryIT.java index 5815533b44c5..b96788b2083f 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkflowItemRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkflowItemRestRepositoryIT.java @@ -54,7 +54,7 @@ /** * For testing the ClarinVersionedHandleIdentifierProvider * - * @author Milan Majchrak (milan.majchrak at dataquest.sk) + * @author Milan Majchrak (dspace at dataquest.sk) */ public class ClarinWorkflowItemRestRepositoryIT extends AbstractControllerIntegrationTest { diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkspaceItemRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkspaceItemRestRepositoryIT.java index 1b55cc44288a..8decdcb4d143 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkspaceItemRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkspaceItemRestRepositoryIT.java @@ -967,6 +967,30 @@ public void createItemWhenSpecificHandleHasNoSubprefix() throws Exception { context.restoreAuthSystemState(); } + @Test + public void testWsiWithShareToken() throws Exception { + String shareToken = "1234567890"; + context.turnOffAuthorisationSystem(); + parentCommunity = CommunityBuilder.createCommunity(context) + .withName("Parent Community") + .build(); + Collection col = CollectionBuilder.createCollection(context, parentCommunity) + .withName("Collection").build(); + WorkspaceItem wItem = WorkspaceItemBuilder.createWorkspaceItem(context, col) + .withTitle("Item with custom handle") + .withIssueDate("2017-10-17") + .withShareToken(shareToken) + .build(); + context.restoreAuthSystemState(); + + String adminToken = getAuthToken(admin.getEmail(), password); + getClient(adminToken).perform(get("/api/submission/workspaceitems/search/shareToken") + .param("shareToken", shareToken) + .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) + .andExpect(status().isOk()) + .andExpect(jsonPath("$._embedded.workspaceitems[0].id", is(wItem.getID()))); + } + /** * Create Clarin License Label object for testing purposes. */ diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionControllerIT.java new file mode 100644 index 000000000000..957f275220e1 --- /dev/null +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionControllerIT.java @@ -0,0 +1,116 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.app.rest; + +import static com.jayway.jsonpath.JsonPath.read; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +import java.util.concurrent.atomic.AtomicReference; +import javax.ws.rs.core.MediaType; + +import org.dspace.app.rest.test.AbstractControllerIntegrationTest; +import org.dspace.builder.CollectionBuilder; +import org.dspace.builder.CommunityBuilder; +import org.dspace.builder.EPersonBuilder; +import org.dspace.builder.WorkspaceItemBuilder; +import org.dspace.content.Collection; +import org.dspace.content.WorkspaceItem; +import org.dspace.content.service.WorkspaceItemService; +import org.dspace.eperson.EPerson; +import org.dspace.eperson.service.EPersonService; +import org.junit.Before; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * Integration test for the SubmissionController + * + * @author Milan Majchrak (dspace at dataquest.sk) + */ +public class SubmissionControllerIT extends AbstractControllerIntegrationTest { + + private static final String SUBMITTER_EMAIL = "submitter@example.com"; + @Autowired + private WorkspaceItemService workspaceItemService; + @Autowired + private EPersonService ePersonService; + + WorkspaceItem wsi; + + @Before + @Override + public void setUp() throws Exception { + super.setUp(); + context.turnOffAuthorisationSystem(); + //** GIVEN ** + //1. A community with one collection. + parentCommunity = CommunityBuilder.createCommunity(context) + .withName("Parent Community") + .build(); + + //2. create a normal user to use as submitter + EPerson submitter = EPersonBuilder.createEPerson(context) + .withEmail(SUBMITTER_EMAIL) + .withPassword("dspace") + .build(); + + // Submitter group - allow deposit a new item without workflow + Collection col = CollectionBuilder.createCollection(context, parentCommunity) + .withName("Collection") + .withSubmitterGroup(submitter) + .build(); + + wsi = WorkspaceItemBuilder.createWorkspaceItem(context, col) + .withTitle("Item with custom handle") + .withIssueDate("2017-10-17") + .withSubmitter(submitter) + .build(); + context.restoreAuthSystemState(); + } + + @Test + public void generateShareTokenAndSetOwnerTest() throws Exception { + AtomicReference shareLink = new AtomicReference<>(); + EPerson currentUser = context.getCurrentUser(); + + String adminToken = getAuthToken(admin.getEmail(), password); + getClient(adminToken).perform(get("/api/submission/share") + .param("workspaceitemid", wsi.getID().toString()) + .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) + .andExpect(status().isOk()) + .andExpect(jsonPath("$.shareLink", is(notNullValue()))) + .andDo(result -> shareLink.set(read(result.getResponse().getContentAsString(), "$.shareLink"))); + + // Check that the share token was set on the WorkspaceItem and persisted into the database + WorkspaceItem updatedWsi = workspaceItemService.find(context, wsi.getID()); + assertThat(wsi.getID(), is(updatedWsi.getID())); + assertThat(updatedWsi.getSubmitter().getEmail(), is(SUBMITTER_EMAIL)); + assertThat(updatedWsi.getSubmitter().getEmail(), not(currentUser.getEmail())); + + EPerson adminUser = ePersonService.findByEmail(context, admin.getEmail()); + context.setCurrentUser(adminUser); + // Set workspace item owner to the current user + getClient(adminToken).perform(get("/api/submission/setOwner") + .param("shareToken", updatedWsi.getShareToken()) + .param("workspaceitemid", updatedWsi.getID().toString()) + .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) + .andExpect(status().isOk()); + + // Check that the owner of the WorkspaceItem was set to the current user + // Check the wsi was persisted into the database + updatedWsi = workspaceItemService.find(context, wsi.getID()); + assertThat(updatedWsi.getSubmitter().getEmail(), is(adminUser.getEmail())); + assertThat(updatedWsi.getSubmitter().getEmail(), not(SUBMITTER_EMAIL)); + } +} diff --git a/dspace/config/emails/clarin_download_link_admin b/dspace/config/emails/clarin_download_link_admin index ecb909bf5d31..3119ee134fa1 100644 --- a/dspace/config/emails/clarin_download_link_admin +++ b/dspace/config/emails/clarin_download_link_admin @@ -30,6 +30,6 @@ ${config.get('dspace.name.short')} Team _____________________________________ ${config.get('dspace.name')}, -WWW: ${config.get('dspace.url')} -Email: ${config.get('help.mail')} -Tel.: ${config.get('help.phone')} +WWW: ${config.get('dspace.ui.url')} +Email: ${config.get('lr.help.mail')} +Tel.: ${config.get('lr.help.phone')} diff --git a/dspace/config/emails/share_submission b/dspace/config/emails/share_submission new file mode 100644 index 000000000000..884d183726d1 --- /dev/null +++ b/dspace/config/emails/share_submission @@ -0,0 +1,21 @@ +## E-mail with a download link +## +## Parameters: {0} is expanded to submission link +## +## See org.dspace.core.Email for information on the format of this file. +## +#set($subject = 'Submission share link') +To pass your submission to another user give them the following link: + ${params[0]} + +If you have trouble please contact +${config.get('lr.help.mail')} or call us at ${config.get('lr.help.phone')} + + +${config.get('dspace.name.short')} Team + +_____________________________________ +${config.get('dspace.name')}, +WWW: ${config.get('dspace.ui.url')} +Email: ${config.get('lr.help.mail')} +Tel.: ${config.get('lr.help.phone')} From 2ff228635120d684672ca9f8c81f18b0fe0e342a Mon Sep 17 00:00:00 2001 From: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:56:11 +0100 Subject: [PATCH 3/8] Import default licenses only if the license tables are empty. (#808) --- ....6_2024.10.25__insert_default_licenses.sql | 351 +++++++++--------- 1 file changed, 185 insertions(+), 166 deletions(-) diff --git a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.10.25__insert_default_licenses.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.10.25__insert_default_licenses.sql index e74c5d3edf25..301cdecf88af 100644 --- a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.10.25__insert_default_licenses.sql +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.10.25__insert_default_licenses.sql @@ -15,169 +15,188 @@ -- Data for Name: license_definition; Type: TABLE DATA; Schema: public; Owner: dspace -- -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (1, 'GNU General Public Licence, version 3', 'http://opensource.org/licenses/GPL-3.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (2, 'GNU General Public License, version 2', 'http://www.gnu.org/licenses/gpl-2.0.html', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (3, 'The MIT License (MIT)', 'http://opensource.org/licenses/mit-license.php', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (4, 'Artistic License 2.0', 'http://opensource.org/licenses/Artistic-2.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (5, 'Artistic License (Perl) 1.0', 'http://opensource.org/licenses/Artistic-Perl-1.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (6, 'Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0)', 'http://creativecommons.org/licenses/by-nc-nd/3.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (7, 'BSD 2-Clause "Simplified" or "FreeBSD" license', 'http://opensource.org/licenses/BSD-2-Clause', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (8, 'BSD 3-Clause "New" or "Revised" license', 'http://opensource.org/licenses/BSD-3-Clause', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (9, 'Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0)', 'http://creativecommons.org/licenses/by-nc/3.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (10, 'Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)', 'http://creativecommons.org/licenses/by-nc-sa/3.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (11, 'Attribution-NoDerivs 3.0 Unported (CC BY-ND 3.0)', 'http://creativecommons.org/licenses/by-nd/3.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (12, 'Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)', 'http://creativecommons.org/licenses/by-sa/3.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (13, 'Creative Commons - Attribution 3.0 Unported (CC BY 3.0)', 'http://creativecommons.org/licenses/by/3.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (14, 'Public Domain Dedication (CC Zero)', 'http://creativecommons.org/publicdomain/zero/1.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (22, 'Apache License 2.0', 'http://opensource.org/licenses/Apache-2.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (24, 'Affero General Public License 1 (AGPL-1.0)', 'http://www.affero.org/oagpl.html', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (25, 'Affero General Public License 3 (AGPL-3.0)', 'http://opensource.org/licenses/AGPL-3.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (26, 'Common Development and Distribution License (CDDL-1.0)', 'http://opensource.org/licenses/CDDL-1.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (27, 'Eclipse Public License 1.0 (EPL-1.0)', 'http://opensource.org/licenses/EPL-1.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (28, 'GNU General Public License 2 or later (GPL-2.0)', 'http://opensource.org/licenses/GPL-2.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (29, 'GNU Library or "Lesser" General Public License 2.1 (LGPL-2.1)', 'http://opensource.org/licenses/LGPL-2.1', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (30, 'GNU Library or "Lesser" General Public License 2.1 or later (LGPL-2.1)', 'http://opensource.org/licenses/LGPL-2.1', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (31, 'GNU Library or "Lesser" General Public License 3.0 (LGPL-3.0)', 'http://opensource.org/licenses/LGPL-3.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (32, 'Mozilla Public License 2.0', 'http://opensource.org/licenses/MPL-2.0', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (33, 'Open Data Commons Attribution License (ODC-By)', 'http://opendatacommons.org/licenses/by/summary/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (34, 'Open Data Commons Open Database License (ODbL)', 'http://opendatacommons.org/licenses/odbl/summary/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (35, 'Open Data Commons Public Domain Dedication and License (PDDL)', 'http://opendatacommons.org/licenses/pddl/summary/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (36, 'Public Domain Mark (PD)', 'http://creativecommons.org/publicdomain/mark/1.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (37, 'Creative Commons - Attribution 4.0 International (CC BY 4.0)', 'http://creativecommons.org/licenses/by/4.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (38, 'Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)', 'http://creativecommons.org/licenses/by-sa/4.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (39, 'Creative Commons - Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)', 'http://creativecommons.org/licenses/by-nd/4.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (40, 'Creative Commons - Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)', 'http://creativecommons.org/licenses/by-nc/4.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (41, 'Creative Commons - Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)', 'http://creativecommons.org/licenses/by-nc-sa/4.0/', NULL, NULL, NULL, 0, NULL); -INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (42, 'Creative Commons - Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)', 'http://creativecommons.org/licenses/by-nc-nd/4.0/', NULL, NULL, NULL, 0, NULL); - --- --- Data for Name: license_label; Type: TABLE DATA; Schema: public; Owner: dspace --- - -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (20, 'PUB', 'Publicly Available', NULL, false); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (21, 'ACA', 'Academic Use', '\x89504e470d0a1a0a0000000d494844520000003500000016080600000060ded4e8000000097048597300000b1300000b1301009a9c1800000e256943435050686f746f73686f70204943432070726f66696c65000078dad5976750135c97c74f0a49e848ef448a204d7a514120201d218054a524a199841002084a13055190a28822a0f4a248095d407a551101b1a0d81ebb8f05441031fbc17df77d6676f6c3ceec97fd7dfacf9973e79c39e7cedcfb0710ec0c6230a84821001a9dc524da5ae1bd7d7cf1d847c00302200e1ab02d8814cdb074757582ff91d5fb80000098d50a6230a8f0bf43804c89260120340120921c4da201208a01c09ac460b20010cf00e06e1c8bc1024036018028d3dbc71700390c00a2a17ff40300100dfea33f028028d383480040010008c4924259002821008c309d1c4e07e05606c09893c282c800826400d0a4d122c90082b900a016fc8fb3a1ffd07ffa040000314224359289772258e30941d4f06066108b4286ff6368d4987fd54300001f85eee90e006a00200b0488042a440213f0e00404b0063c102008a8100ec1c08420600105c82cca61160000219211cf0c0f0d63e12d190c2a45136f4f27696be2f5747475e0ff13de3ebef83f6a851f10008008fff5ef987f3c80411800fac8bf630c5e806b5f00a4ff91a7ee06205f0bc06e27c53063ff3563c46d803f77e53f412100900020053ed0899045e4226590eda840b402fa19572fa6015b822be6aee7b9c9fb806f4560aba0a7d0f12d23c23f444dc458e26d12eb5286d20c9956d955791d85087cf5d6792511650b95a06df9aa5d6a6fd44103af49d0f2d60edf71442747b742ef8a7eb941a361b35191f179933cd3c49de45d4ebbf5cca4ccc1fce59edb167d96b556058434eb4336ae7b0d6de5ecc0ee8dfdbc43a7e379a72467928bf53e255784eb73b71e62917b9c879be7764fcefe59af1aef241f575f65df6f7ec3fe670e781d5439f877407be0b1208760c1e07ba47cb23b4594f220e47ca8679848d854f8c9089b43e8437d54164d8bf6825e11e9cb10620c47c5330da221fa05eb564c53ecb938c66162bc5e825cc2fa914747d989f949b1c9c4148d545ceaeb63fd69178e479e704c974fff9171e7645126f594f96981d34fb2dab253cf38e588e72ce5d6e431f3cdcf22cf8e9dcb29f0382f797eb1b0e4c2818bf2179f16155ef22b162fbe579253ea7299f7f2f8958c3242d9eff2a60a5aa56ae55f55c5d50ed59f6a926b856acbeaf4eafaea9dea97ae1ebaba762dbd41b8a1ecfa8eebbd8d4e8d8f9b429a569bd35b445baeb0b5d983adfb5a9fb645b5437b4e8742474b27a173be2ba28bd37df686ea8dde1e9f9e95de937dca7d8337836ffeeebf326033f07e306768cfd0dbe1c211a751d4e8cdb1b471e284f2247272796aedb6e49da8e9040010001d2041157c47b820d8485d642fca1bcd831ee72ac4c46129b8406e12cf11de5cbeebfc0f049142c65b42850b44a6c470e2161234c9cb5213d2ebb29a72eef2690a2df8fb5b7f2a892a6ba9386fa3aa26aae56caf52efd118d27ca2f546fbf98e4f3a3f75d7f556f4970dbe1bae1abd327e6572df747467c7aedadd4566d9e647f7845bb85a1a58491250844fd673361d7b2fd9a6d985da5b3b6c73e473fce034ea5ceb92becfdfd5c84dc8ed3d71dcbdd423dad369bffcfe2f5e23de053e145f633facdfacff9503f483bb02b8031e06d6063182f790b849b3e4524a68884ec846e870d8e970cf08c5885787d8d42334029d877e37f202831c65c294894647bf654dc4d4c69e8ca31df688374a9048583e327fb42fb134e94872400a2155e518fad8cbb4a9e3d527b2d21919ee270d33c533574fdd3fdd91559a9d7ce6608e592e3e0f97f7317ffa6ccbb97305acf33e859617142f222ffe553479a9a5b8b824a1d4ffb2c315d532c1b2f5f2c58abecacaaaeceaf81a4aad439d563db6fef6d5d3d7ec1bd00d5dd7631ab51bdf375535fbb708b64cb2d35a4d5a3fb655b47b77f0740c74c674a9773dedceba6171e3474f632fa54fb26ff6667abf59ffca40fd60e090ccd083e1f323c451fed1a9b133e36e1312137393c553945b5ab7566f0fddc99b0ebe6b3cc333f3f45eebec99b943f3f6f79517300bef1ecc3cbcf048efbff65f03eb0877441752035987d2438da0c95cfc5cc39864ac258e07f79cbb87a78837858fce4f16f017dc2fe4b98528ec2d724034482c423c5e2243324faa44ba45664076546e41febdc257fc9a2242895719a722bc4d50954f4d7a3bb73a5a03a1b1acf9516b517b6247bb4e896e8a1e459f60a06d88337c61d46f5c6672dc94bcd36a97ccaeefbbe7cddacdcfeda15bd8596a5821ac16093dd6c536717b5d6cb5ec78ed5edbf73b5c746438ed7596755e7599da77c5f5b09b035199b8ea3ee151ea19b5dfca4bd8eb9537db27c5d7dd4fceef8d7feb81d4836e010a016f039b82e2836d4882a487e40a0a354437e47b68575872b84b8448c4c2a1126a384d9df685de1999c4708a128e7ac4ac8aa6b3cc63b863e662cbe3e8874de2d1f1330925476847cd12f9131793ae2627a410531553578e8da7151f8f3d619b2e9bbe9271eb647966fc29e269f52c64d6a36cf699829cc85cbb3c7cde7afefdb39de70a0a98e71d0a552fa02f2c5dec2d2abd1453ec5562582a7a19ae20cbf8ca852b442b25aa64aa156a146a65ea24ebc5ae8a5e136910bd2ed628d924d32cd322c696685568536bd7ead0ea34e8b2ea76bb11d413dd9bde577273ac7f6960634879d8612461b479ecdd84f264e054f9adb53beed34d3342f7e26697e73317441eb01f452dea3fd95cda78817e65fbfaeabb9d1f777ece5eee5c6fe47000fefc1900003046001702007ce400dc6c01b276036c1b0490e00170e507f03005a4b62820be0f02c22ae71fefc74ef085a3500203f0128146a8219c100cc4394417620989416a233d9189c82ae45de43a4a09e5864a44d5a31ea27168137418ba087d870bc565c245e3aae07a8c11c3b8624e63c6b038ac2df604760cc78fdb8f2bc2bde4d6e266710ff388f19079d8bc58de00de4e3e613e1adf38bf0aff69fe65012f816e4115c112213ea123425fb6d0b77c12a6097f116189ac8ba689f189e58a4b88574a684b744b3a4a2e49c54af34857ca58ca3c9465c889c875c9fbc8ff52a8c4efc3ffde5aaf7840495869443951c544e5c7b62ed564b5bddb79b73f54afd488d774d052d3e6d25eda31a253ab7b4a2f4e9f62e06fe86eb4cfd8c664afa9fd4e975d81bbc3cde2cc8fed29b3e8b25cb4fadb5ad8c6746fa86dbe5dbd7d9543ae63aa538233c325765f946b941b8548778ff448f6ccda9fed55e87ddd67d077c6efb53fe7a07c8059a057d0b1e072d2040515a21b4a0e2b0a9f3d04542bda49fa5d864c5438b32dfa774c606cfb61fe787ac2dda3868915c95b5292523969d4e39fd269191f33c34e7dce6264afe51ccf53cb6f39e758305f9874d1f6924709f5f289b28e8ae96a74ad497dd4b5aaeb2f9ba5d8216da51d6fba77f744f74d0ff00f058d748c23267d6e5dbef361c66c3673fec603e1476e8ba94f879f7d7b29f197dd1be2bbd80f499f123fc77cf55d565879bd7a714d73bd6683fb1771f3e0ef140e0700742104cec3087c45c823ec112cc465c424621589473a21139035c839140aa5870a42e5a34650eb682d7420fa3cfa361796cb8a2b91ab87eb27c614138fe9c502d61a9b89bd8793c585e13ab9b9b97db9af72ffe6f1e269e6e5e5a5f00ef0a9f0a5f2bde077e4ef16c00b6408ac0a860b3e1172131ad9b2734bafb0a1709bc82e9101513bd119313fb1d7e231125889524913c9fb520c695ee97a19679915d9223973b90ff2a50a8e0a6bf8a6ad118a0a8a8f95ca94835554553e6e6b524d51dbb75d6efb0ff53b1ad59a27b542b46d77e8e848eb627457f45eeadf331832ec376a35669bb04d5b7676edeadb3d6a3667fe6ccf7b4bb4950041d5dadcc67f6f826da15d837d8b43bde355a746e72e97b17d33ae0b6e4bc4af1e084ff9fd5a5e26de9e3e2cdf4cbf72ff9b079e076002e5831c832348d964366531141b66141e1271f1d020f51b5d3d92c42889ba1d0dac5d31b1b1cd71dfe24d12a28e341cfd91b427393d65ea187f9acbf1b213df32b44f9eca5c382d9fc5cc9ecac1e746e70d9e153c175c3058b8f5425191c5a50f25459703cac4ca672bb3aa9d6b95ebde5c6d6cc86a0c6c3666cbb6aeb42f767675b7f694f4a5f69307fd86778f1a8ce327456ef1df5e9b5e9a19996d9faf5d38fd90fad8e189f992f8b36f2fe65e35bc3ef676ff7bf90f1f3eddf89cf1d57959606572b560cdf927ff46cf269dc30100538883365841e823a2102d8815a421f230b2178544d9a2b251f7d10a682aba930bc3e5c555c7b58171c1546138586f6c134e08178dbbc76dc05dc283e561f22cf17af00ef399f175f26bf2b3050c043a0409825342078596b79c12d614be25122b2a293a299628ae23fe5ca2509228252ab5205d20e323ab24fb4dae5b3e4f8184d7dfcabbf5a3e2a852a572864ae4363f552735f3eddaea1a1a8a9a4a5af2da6a3bb4748c75edf4fcf4230d720c6b8ca68d7f982aecb4dd15bdbbc1ecf51e790b7fcb4b564bd69a36c97be7eca4ed590eb34e2ace675c3eba12ddaeb94b79247abef5b2f7eef255f4cb3f803b9810b01c1412fc88ec4e990e7509bb19617da88f66416f675844f547ef618dc5bac4cdc60724bc3f1a9fb8969c912a73ace5b8ed89e90cd2c9f553c5597ad97339cc3cbefcee73c482cdc2e28bc245b1971e97b8960e5c312aabab90af2cafde56535fa75dcfbe66dcd0d368d134d262cf7edec66c5fed4ce8dabc71b657a5afb65f7de0da90f670e3a8ced8b50981c9ac5bbcb799775ede759b699a1598a3ce4f2ca83c487978ffb1e4a2f7930b4f179e893d27bec87879fdd5d05f8f5f73de8abd537aaff861eb47854f727f4bfdbdf9f9e997beaf25dfc296759797579abfd356f1abf33f62d6f8d62ad70dd66ffe74fc39b961ba51fb4be2d7d15fe39b629bc19bd737377edbfecefdfd90a3c4a172da391c80e8107dbd3f0e434a0e80e70b87f36e1f8000016093c4e1ac9971381b2f0130750067c3fff85000008c1040712600c05073ed7ff341ff017c3ece4feba5845a000000206348524d0000592b0000595f0000deb900008399000070e20000c0e400002f4b00001978d02b64290000042c4944415478dad498594c5c5518c77ff7323bcb40ca32436929ed80d2c5071393425994362969215553496c6dd3343e92b8251a1f348d892f7d50138dc697be9214ab95124b09d0326030b46a84a235b294916518d619665866e6dee3c3c4a1bcc89c312afe93efe5de73fff7ffffbe73cff9ee518410c431d5e1c2ebaec2ebae26f47b01db1da9bb26705475e3a872937f6cf8cfcb4adcd48da79a3105d3c82daac55909f6d26def09ff2f30dd03beb136c26941eaefbeb061aaf3b90fc9010a2b5e657d00d60721eaddfea60c0e301f02f31330defb11b3c0d1af5e4bb9f4d2be2a166fd4b337ff3cfe26088f821604c1f60f2d18d3bbd20759aec3cc3c9843a44f2aa2bdee630ad31ba13bf10c897fb11a8acce06a185ffec44060d8852117c2124f0b79570b0195cc3481aa4a3eab48e8324d42c0e732a0874dac79404f2e7da7dfcee6e1b4814b2ffba9ab58dd346a3da2f0d9b534ae77db08ae2a988c507b789537ce2c936addfcc2bfe24918ba0774d5a402108d82ae241e1aa0c1d0b09187d30654155afa7782b5207e0f0ddebf62a7a9dd464db985cbefeca1fe780e2d3d563eb8b61b8431311e195dd1686cfd88994a6ea2b7f6da301be1d993b95cfddac784bf80022601f0cc18f8a6cf426d958577df2a85e014358fcde1cc4ca5b8d4099919303bb8254f3288554a261bba023a44c270abdf4cf993664e1dcf420868b91385141be830369502c0c1833910f2826f00825e2e548c72649f17966712e291d6163715950c4da1e7272b81159563cfe451e20851e810b4b6cfa35b0b405358f0c74cd96c29b0ba049ab211f3a3b03c9b108fb4b6f8f4138ae40709ad7d1600aedf5aa4ad2dc4ea9a8e6f29c2772376caed2a0e7b6c21989b8f40448b09047e183651bc3342ba35b60a6ec58322929c7e8f663181585852f8f6672316b3c2c8d82a43630a51618c755b1dcb60cda6c419c56880ce9e45a2584083f92595c64fed9cb99c8d1086847864b56d544a97cb44db3d2b9aaef0deeb851c7f3a13740d80b38dbfd1dde72770c1c90edb1ca78f4468ea5ee1f9378dd41e4aa36bc044380aa74e3a515c0768fbbc7f4b9e0c7d2ec94a45e4a2f59e05b3112acb32c1330483b761f03627f6cf130eebdcbc9b02aa91576afd9cafb3b214d0b9d2610583898b0d3bb878361fe62712e391d4166b68afeeed244baf914a8500f69781d5063fde89671880bc3db0ab043c0fc0e7014541e417b3647192956586b5102ccec0d448ac33d98ae7fb76b9322daa5d8af8e2f19ba4aed722ed2a09188d1089fc93cd1f84cc6d06325cc3847f0555935afd9282169517a94a8cd75320c335ac52d4d04c980ea9bd407ab3fe1b21a32b4c07450dcd065ce7dc8c7f791fff808a4a0dff57e874613f701fd739f723bff3654daccde6a2881aa976ffbf861020942e2c393eeafb5edc7c460130d5e962a6a702afbb9ae0f8ee6d6f28add083a3aa9bbcca5ef28fc60f5efe180026b7b96a2d80c8d60000000049454e44ae426082', false); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (22, 'RES', 'Restricted Use', NULL, false); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (23, 'BY', 'Attribution Required', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004374944415478daec5bd171e23010154cfe4d07d081e9c0a402e800ae024a800e4c07d001e9c04e05261598abc05001a7e7d1ddf88824af644931096f66c70cd842fbb45aed4aeb17e617632e332e532113213a9c85e48deb6ff64088b9a45c4a2e3747528a36e33e2bbee45238545a2585f8af5e295e06505c66155f4a04e677f6058acb2c22f8d458f740f17bd9d8283230bc3fe272e0b2203f10456c369bb1e9745a5f2793492d52f77f3ed7723a9d589ee7b55caf5793fee5a26f571fa31e9938b9e572793b1e8fb7ae401b688b1369e21b9c4f093458513ab0d96c6e6559de5ca3aaaaba6d2211954b1248cacfe7732f8acb8880458422216a5be230222e4cdd14599651aca11309ad733e8ee35b5114c69ddfeff7b5c52449520b3ee33b1b6b401f083e21b22160dfa63c3a600a9df9e2371b10a6446613dd39571ed6d236776d2c8a48c2c624c2ab5c2b0fc08b5356115b1048f8e40f861202765c465266c6e33a38198d46bdccc60e8703e303a4bda58d804417e5bdbdbdf556f97fa1201f20449f0a4cef13a87b02b6aa27d334adc3d92ea090d795603c8f81d240a963a29a3b58aa5c0531bab51bbfd9fa17437f204da38fae3db32ab69791e03aa06a21bb90797ea76b332592e3d3aaf6faf8ec032dab4e4ccaef43c4f73ef3060d01699380c2c7dcc7d4314863a5d3a2ebf4d3f882b219f34b6fb289cf9b408cdf75a7076d74f5399af6c743b16f2fc562b1e8b4245d2e97ceeb7ad736a083262e980d4570f0794d4c92de073d54602b4e8189d202340f3d1c34015c6d01a3ef4e409b0548e951eddc3e2234ba4c86160f7d2702d890fd703c097812f024e049801438a4fc2ed0e902024e3f9880f30bf20dd5e662d76870b7dbfd97ccbcbebe929ecbb2ccd91e2180e3761d01b92c1f00011e6370dbd0d53501271448ccb948b751793aedb4238301ad1ec3f5ffc28a148516aba1b0002970d0f0e8c0e86baa4c7210705539c296fdf58700fc906afeb3460166904d5146dc060bb4359e36e300e5506fb7db871e7d8df97f9adfde0f46425a40cbe8973246bc1f8d852460bd5e1b1f8dd53108f3706e1f9a009c34317dc98c1209f350bd119280b6035846a82f56d606a1e12eab826f0208455305c579e214c14b898c6f026c4a645498330f4552be0820164f1a1753a76d24984e071f04106b059565726dd9096203e50121cedc102e53b337ea7dd44c1471fe6ab5621f1f1fdadb44b66b55414eaa1077b1449a02c515be4b658d488019faaaf4b8af394060c602578c93df15c079becb9aa2bf80bf2156897b7b8d26d2e50bb2f01905165daabef02cda208e7853797271f4c082082c27462922aa37e10021d89d513943383fec21fe7d65e6fdfdddb46fc8f07e85c83413467c832490542276098aa82d5608244766f93e802bc4ec6bde1fcc8425f606898993ec38e2bd52fc1e63b1c7e8f23de242b43976ddd941003f01973f15d7115394e4dc85ae17b15d7f12d7abaf0efe1160005144fe5e042ce31f0000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (24, 'SA', 'Share Alike', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004ab4944415478dadc5b8d75a24010461bc00eb403ed403bd00e4c075e07da81d781d7014905980af02a402b502be0f6e3418ee4606766990572f3de2426c2b2f3b333dfcc2ea3c02f4d0d2f0a5e199e156ca38be187e173f1197c0bbe1141e8a3e1c470a6c44931e67cc8826f0dc78a42db94b11d92e04bc36907827fe5b46f454c3bb238c5711f4b039abf0f40f82aef5d041909af0f0dff34fcc2be210c83d56a152c168bfcf76c36cbb98eaed76bce97cb25389fcf393f9f4fc9fc903936869f3eac1e4a22fb76bbcda228cada12c6c0584691922039f7b1de13aee0699a66da74bfdfb3fd7ecf55c45d53092167bd2f974b2f82d729024aee4a09a4dbc322a7d329eb9ae238e678436b2558859f4ea7599224595f046f98cfe79c9810ba087fb40d8c0763027d137349c452e1d7df41f82a3194b057097a43145ea004563c38d9029eabf0c810c7e3315bafd7b5eb16ffc3774875ae71851113c8a5b0b469d0656288d6489152688b00eb925da004223b580ba8c6e20696914e64b7dbb5c6f850049428553a5145caac0fb7f2909e442c3500110f6abd206aba4162011fc25761b6d25248eab07eeb878210c87c96bd124fc0b5dc8cb06bba5082ef11b4baa8fdb91e4978c19184bc88de1242c0a2268f09d5a53afccdadf6f01c6e3ab6c482b40a7c6a2f92a4218ef5b13ca8897363087729a09f6019676a85bd12d043ad7d098264e4f2fc7b2e59c6cab3c15ec3fd298b49bb431c8fe28e6931cebe11fc48a22dd6af96b52431859ba100c19ba0f1d8fc98d481023430293a1c0ef9752f2f748f14d76d361b51494a5d8fa62987d0906da0bc3beb9cfe24a0075e20ad258800c68e5390c53246fd179ac8cf457806a61761026f0aa094e02a3c37b80e42014d4a682b3c4701dc60dd74ff58ab773e994cf2a06494f0b12384bf2d016830a4e201554f0086d0ea16531e8014378825e083287ca111031a97003629fb26ad39d8c61917677006a9000ed0e100368b2cd7717120c91965958870341a3532679275f4fafa6afdbe0cb81461bbdda680b3f0a67ff1e46ce63a01abf56fb75b6beb13c6bc58cb6149cf5f2b5895c481d8dc4c4395c3a146094b556e927e0067fb9b5bae1399646a6d89a18ee692a5e4fca4045b9125d8fb677b14a725a6d214e57471aa753c1406214ac6260aa7a728318ca429aad216e77881c64e11772949dae2d68d1109ac75d907e4b2a4b822ac9f8ab6c624fd415f3b43d2ca92d897dc8a3747b94547b520d2129e0a9e5a9ba3eadbe3509ae07c5fe3264a97dbe3ea0724caf37ddc085f063adce3f22c62f9259ca3b20046d7a66e31f037a0251a20522a8fc096c761abcd14344e00a9cbe3b42e842ef2dbdb9bb5416cf8f77f77488a09a0c487a98f9a81a9e7b38271e0481115a4a4458e76c788217cea7a50927d425c1aa935889961ba392f5c2e892ebc015667620cf513e309b750f1717e18f1865b296a0b5f5542c4cde5b012b6b8db640bdc8b3184a832a9d6f9daafcc94e7090e921b801d90dfc1c8f94dad2c6084c7e3f18117dedfdfa573fb65f887af5766be42e621bd34752f7a1a9d524861858e3892b8bc2f6fe8e3fdc1b878f660682909922d2d3e28c1eb4e9dee02fd97a7773e5c7dd4419c58057f5f9f9f149fad4563f0f9f5f9b3cfa8fe478001008252cd9d372775a60000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (25, 'NC', 'Noncommercial', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000005024944415478dad45b3d76da401016760a77a24c876f20a5730737801b403a3a8e00398192130027c0a53bf009049d3be113002750f6535679b2bcff3f923cefcdc37991969dd1ce37df8c865ee0570644474463aa8f544572a67aa87cbe075f4822a209d18c68ee4833ba66d465c3a744538746f334a5dfd529c3b3060c679d8a561d81f8deb76038eb441887c6bde17d0ba22f0a80c695300c83a7a7a7e0f1f1df12b7dbcd74a9ef44e7f4ef57dd9b7bbafb26ba213ad13174329904711c173a1a8d84d71f0e87e07c3e179fd0f777ad0470a459e7e6e3c887aa20478ccea7d3699ea6696e2b5863b158146b2a86c4c547b688e8c252c397cb657eb95c72d78235b1b6a2239c3a41c9f8f178ecc570962370229a7242284b717822bbdd2e6f5af6fb7d3e180cbc3a411af35114e55996e56d094ec37038547142689205d64467dcb888a202a5fbfdbe91774b942f65369bfd4f89ba827bb7dbad2c3bfcd06577c2276f1bef00b4ea9a38d23682ac2339094b96a1771c86f7dbd793f7259bcd26204e105db262e101cb01309e691d019d4e1a5f7502c104e12532070c792c0f8ceef9f9b9b3c697823de2417124ae1750f70c0f3191683e9f17606323a0b8d820144fabcaffafd76bf0f6f6565c03279b3afae1e1a1a0dc02508413feb0fe6328231700bff57a6d4467419474aa3cd3ef2a4542969860b153dd1c08882ae5851136e52ebecb2443606f02da9cb2905f7b7365d1c32343b6c657d58470d5536d4da37a7d6fb54138a2faa4b06157c69b8682e41424550738ebe5819a62c30ac4c4abf10a0429ab727e2e10f9686321ae61581543707aea753f36efa29f20d84b912fc7bcf82e8f3236a2d190b08ae7b2dc85ba12c1de8b6cb0e4d5f7ac868442092ad5a6459082933bda43fbcc16e2f8c3bf414c56ab554154c8f115b12da9606d10a1a644d0878cb900a8927b718d423d2ec4822449bc7792b04f11105ae7dd12274c1d811845ccfb6aae4852b2bb38d56c5c72f9848b6e725d1a71409d05da002642cb65afb17107b8c4893a67f8520ea8e384697894ef1c4c71a27507b48d139d71405b38a1ed8026fbfdc009dd86890e4ec8d2a031116a90b058e1848c0831871cb0501be2aa02ade204d826e7ba3db718427cb98a739d1729ae4b70d82148c309b71c764586aac753d6dc9085800d4e88cae1d0473786d70f2c0ba02ac6e0a8ca5223ee735177b01a225c20acf7046c8db7d13a2639e01399525354371d4a5a50460a5cf0c02712a5b6b8495f4e80ba46a94d95f569d61d91f28b1193f21427c7a608b219c0c03d12c0ccb45e8dd9a444139657323b1b3179351688263f5d10233803eb40eba703a186d071d10c91a4d34c361196bb0c85a6264414df067d7afaf5f98093683a04dd557485bb2a78c58e3d0ac66e312bb4954d88609484692516c6d82bbea8abc69f4e27e13c95ca88cc4d341d862fc01775c9098ac6afe809ff20df3817bfd21b56222760d2c374b4adfeb2c2741d45e3318ff7cb64fdb58ca4b4d137a8b24e0506988a06259d4c88b7d13b50649bcee685a54e301d65f1d866773a31aefc5b016cce872370dc35cae02cf0f40bb3b50e8fc731b569ae82d480126bd6145a31df3370c292971d44e3b5406a203d5e8de3b38efa2058a51e8fc762225582ecbc49d09f4da4de61d0ce4fe544f13e6e9a7f84b4a9d0b6f13b9b34e742a2a09ddf0feee949ec8c0c75a64d2d9f78a70c674d9d2e02b7bf234ee99a03d79bed358013233a8c84cf7e3998241094ac57cadf8ff4f3e66b837f051800dd4b1284b44b8df00000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (26, 'ReD', 'Redeposit Modified', NULL, true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (27, 'ND', 'No Derivative Works', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000003bd4944415478daec5be191b230100dcefdc70eb003b502ec403bd00eb403ed403bd00e382b002b800ef0ab00ad802f8f89339e9784040910bc37b3a33348645f369bcdeee210b3f0a84c98cca88c98c89050b95189d877c83f6211a0f49e4a4c25af496236e6b8cb8a2fa984352a2d2363d925c57d2a69038abf4ada36115e43335e26611b4b03cc671d50fe59b6551471347fef5239505929dfe0ba64369b91c964527c8e46a34278b85eaf85244942a2282ae47ebfeb3c1f768e0595bb895977753cfb72b9cc8320c8df05c6c05894481d273936b1de6355c5d334cdeb469665f976bb552522ab93045765bdfbbe6f44711e1120b929124acd1e33723c1ef3a61186a18a35bc4d825479cff3f2388ef3b6006b188fc72a3ec1ada2fc5e3630fe180fd036149744a8abfcdc06e59fa140c2b616a7d745e5354850f2074799c3ebaaf28a3ea17429f83206db74783a2494ec0ed20394f0708320c416608b2c3945eacd3eccca3694f803ae1504a21bc0a86d28590a312fd617c6f6b602cb567547588b7ed8447cdf921520d023034600f77c4f0f38c2b3bb0d180e8764b158882e2f1e04b82c6dfd0babd58ad80e09019859cf6161ef37ef17d4840a1675806cce66b331a6d0e17028b24bba9620c82cadbe44b30ff3d7551eb8dd6ee472b9182300e3eb02a9b8f3f9ccb58201abd8706fea0b24bacc40c0b0ef0448964c6101dcab367b7f0d5d46830a37f58980a22e90f32ed03882f4098ec32f810cc887e38f804f27e0abee0151db3b9d4ec61e18e179dd0ebad653604936e66da9929b802ea2f1b00412d14cf605125dae20801b5ca334dd17e080262320d2bcc93a482633112e01c1e9a97704382c21c25d064110c8120ac2e3aa49ebc1c146e7988e67994ea7b2a448016e15783e9fe7b643921eff511ff8f8a4e8b7c84676bb9db56b1fe9334993d5af684d5818b1a126a839fbdcf298b03486fe1fdbb05eaf2b154885c5d1fd7edffbe2a8d40ac88794c7813e3748c42aced3da1619c42da4861619c0aa2629c54e31ed66ead236b92e04498abd8261d5582220255da26d364fc0292b289f928a8d920f7f50da24dd46ff10b6e5265a659549c04c34610d98750466a4858e71a57679786213f102fc8d629778edca3f9310a8262f314be8227f67b7c0bd184371c69ff77a4fb9625481086c275a4744ba3c8a6a3304c90c51e519999b474205df2bf419e08487ee0c23afccbc86cc5d7a692a63398d46e196c50a0d49a063f2a6aca18df70743f6df9d81afe324df9cf14e29fe0a8fadc7ba5f9e5e9b3075a7013f0197ff787d7e48042d39cf996cf2f3f5f9c8a457ff2fc0009a2c4cd8368e16c80000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (28, 'Inf', 'Inform Before Use', NULL, true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (29, 'CC', 'Distributed under Creative Commons', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004404944415478daec5b8b919b3010c5d700d701ee00776077e074e074e04905a403d2814ba004ec0a7007beabc07605448f810bc348bb2b217ee7eccc4eee2e42b0ff9fb40a868548e14ee1a6c6758d145c153e149eeb9f819fc1822056982abc292c3d6151ef19cd99f083c2dc23d126cceb77cd06f69ea52dc5dbd48c884692b84423e229d4fd3e03e2db98b810b2b25c1f2afca3f0a7f881300c76bb5db0d96caa7fd7eb75853af8f8f8a8f07abd06e7f3b9c2e7f369f37d881c3f143e87907a587b6391440e8743996559d917b007f6b2f40df124c42b6997499294f7fbbdf40dd8137be31d0226dc7d324144fc7ebf2f6fb75b39348011428df0c204967848c487aadb429ee7126de8cd0432ccc5713c8ad4296dc037087c42e8427cca113f84adbb80c0247297ec6e11c45b3021b1b1fbfb9288b76042dc4bf5a3289a2df10d303e81358588e2605114e5dc010262a2c3c1c9eb2309590a20443251c14efa50aba501e30fb45a70323d008e2e0d909f10a690eb3cbf76f176bb2d970a305b420ba26e7dff6da4dfd6028201c73603b2beb60fef9ba669a531baf08962495a3380e9b0613ca7d34848569a8213bea0683340bbe8743a895e8275c232b562aa299c82893a06f6894c603ab14755236c4d0b24498f65b3e2ab82ec3201bf4b99d86dbc70403c8f94bfca919d9c1f54deb58707621b3506a375ea2ec5e3f1487e27cc8faa0f3217f5621c4cf552ec818f3349166b005843a5dfd807489907e51388685085436dc383735826d5d7a977b76e6fb7ce8036ea0d7fd3d5542e5211996111b8e6fd26a99a1c67a3e6dd9e6197a0b6e429894a08176aabfe3f2800735c9eb3d124f8179f60fade379756d1e3f1d0fe5d49c57a2fcc01748039c218f016cc14dedfdf5f9b01262d7b19068c056f3ed5f372b99092d3d9bb692fcc055d7c870b780d83540285d085f0d60e95a66c92ea3f36711d114452147161d07b22a48bcfdd6c0c04e21dd4c7e912215dcd807554ddc2254283a6c240539edfe4f054418567b10efb504ca73481a85972633124e905301d17b62c6ea4c6b4af58e4ca7682c1c924e5b06eb8e25a0e4b7a16c4be7b2f0d11a898f4e3297b0513a40d119886a416a0d2f6765f70f09698d463732d31f816a9606c5a62dfb229ca4c89d2ff6df1ef3c1861a45f98cef85a3727e60a549b8d1a90bef47094d482a59882a0c3cc9e2f4e6dfaf90b3b2051fc3f222384ed2b1f926a20719df18d6df382f439776d9664dc786b4ac70801080e4a16ae0725c5e7841173c73609e15c729cf3c2ed0ecf18315e20f5694e8c37b5c3108c00e116670706bb3390491b15cd1cb0cf616a3c0b55b71c9d5bd9fcca8111880ebfad6e5745d1d7b519205ae1ddd157fbba4c7365e6f3d3fabe24aef3fc1a639eb00da6b92a47d9fb7eeca14ac81da91f09d33e61ce074436bec12366c1ccaed2465453c5a3aa9f8299df210eeb9233f32cedc310aabe1ac961ee827fd7e7b9930f988a62c27aad7fbe0cf9717f051800f651ef6054e44bf60000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (30, 'ZERO', 'No Copyright', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004704944415478daec5b8d71ea300c362c001b840dc206b0016f03d880be09e04d001bd04e001b0426081b00130426c8f39726776d706cc9719cf44777baf6dac489e44f3f96949e689602c953c9e39c4739ebe82cf92ef998ff0ebe892f44a1e48de48be4d411c7f99a4197059fe72f9a36cc71feacced0ccf16e53f9d2b62200c7a805c1cb1ce566e7959692930e08ff91573682f498d70f246f252fc8370c06623a9d663c1e8fc56834ca5845f7fb5d9ccfe78c8fc763c68fc783f37e881c7f243f9ad8f501c7c9cde7f374bfdfa775298ee36c2da9488e6f085b111e2fb95aadd2244952d78435b1365111894b2590849fcd66e9e572499b26280288f0a504a3f0d8111750e75214451434d4568236cc8561e865d77568984c2614250c6c84df98846fc2d66d88601231370c22bb3b5426fb619885a8e170c8d66a11e6aed7eba7bf2334224c826d68b15888b7b737dd256bc9ffa8769fb8dcf9c283074160745eb8c63692109010d6823e5e8efb62705614c155cfc2bd5c32f884887294ad5c0049098776bb5ded14176b70d166880e732baf0f58fa16de5609408e2153e4ed3eec9e43088d8cd435a56498dc706bf0074a14ecaa6ee0da222136b3196b3a348548e5f92b535c87f0fbb4ab100a4c450b772360b69af5827239cbc9432979fa66b3b1f217589b6b8ad4fac1de15ecb8c27351c30dc39a0df9941d3af1be38149962bb2d6a0ae61ebc0cef949d1126551770b5bd5c2ed9e1cc00d327c633b8a4f131b37edeb87822097f76ae8f1c5f47288b95e9e5e5c5e933a8cfcd695c69ffdcc407c4853fd5f6cbcc254d3488fa55ad2a8dd62a0b9a3a521542d7ebf573ad3d0832f4d57916439661bf8001e5855dc2ff703888d3e9f474ddebebabf148cc35038d2ce3bec54d4e4865fbd87928caa6ce60a900d16fa3a5845dbedd6ecabffb26ef0a80fdaa765f86b7c651d709056cb7dba76e0fba472a87f8ed1480dd8702544a716df79d5400a05fde7d145851d06c8bfa2e332e53e852556d55886802793a8a5d1c3a2827416aadc15450b129cc569d088180ab0b04706d188eaf6af7cb3d83bacfd2c872870294ff45e3834ba614b6ec0f54610fc2ab72049b67101470ece743054f8434959b7353bb3ac8f7ab4e8126c5db748e346b9eb5f540d70511cabaa6260ad737a19741a90bee5d94c3a98eb08a502e33dddb5449cc6b515455dca408cf2d8a1a4ae31b52599c5b18fdaa65f19fd61889bf7d6bcc50a09dff36476ddae35c53f88aed71ed800416e6ce08f81e9080b90a8b59a11f3b22f33b2465630a0512b8e6d0d4aca001f6a4d9207654102d4e897eccf30966150bcb41c9c21f18e78411737d0f4d1ab23cbff3c285f3f28106440602e4db99182f52d6261401c119297663df0c449c388e135e9d616adc8b35987904cbe67b168a40746035f551012a3e9901237c96c31d4263f993195d69acaaef22f9af8f72fa4474eba3a924cf5dbcd2c0942b78e24d9d30e78242d1cef7833bd1b14f6927baa28a43a8774e7095692c1da3629f1f639d43bde7411953f13e86839f43513192f3b18c2fde3f9f3fe7bf9f9a7cc1ff020c00b8b38128c9ee68580000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (31, 'GPLv3', 'GNU General Public License, version 3.0', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000004e54944415448c77dd5d96fd4e715c6f1cffc663cf6d8c62bdb00b62103b6716d106002c62d04255237acd2566aa4a4adaaaa7f01bd6f2e2ab554b9897a59a98bbaa4a9aa4895825a2ab2101a08e0408bcd6a8cc0061b30d878b03d335edf5ec47128697bee5ee93ccf7b2ecef93e319fad948c1d766b55af0c53065d74da3937e49f6e8e3df54edae280176c2ca95a96ac88a550900d9333f971fdde76448f99ff6dd0e045df4936ae4feeb04ba3554a91735f9fb33e726b66a6cfeffcc9c07f995b64bbd763d94c38144e848761213c59f3e16138110e854c8865fdd176d167e5fbbc9b9a3b108e85a9104208e3e166980e21845008f7c26c082184c9702c7485d49c77edfbc422be68b0cd4fcaf67e3b7e48ad01b7dcf077d76d95c4a85f199675cd800acf125dab9fdda0c7dd4f0d1abc92facacbf1970cba6741d68831ad9a4448b8e5b23c4a64ddd72219f5d5cf56f948f66383623f88beffa5d4cbee6ab6d99871092d3a9480847a299139799b640c5a2b1fdda80fe3bacdc7b1c38f36d6fdd0a45669c7957ad656eb8cba8f94bcac5a2d9a95f8a7159adcd2e272f168da194309a5ba8a377d5ddab08dde93b65791111f98526456ad017129e53ab549e8f6452b257ccdcf374d77b918d9e8f90dc903a6a4e58c6b5364c43155ba1cd4e18cb7e475a8f08e7119a5ee5b6ece01cf243d6f5364672cb3539359c50a22298f9d50a3d5843beea8d065c40519291f9a9534a3d88c26ed6219ed091da9aa5d6a149b9211f30f13c6f03783266c96f5c88c537a341bf15793b67a28526d9737ab721d91b665c94609351e48f902a62da8b5c6944885981171b3e28262cbecb4ca5d958a34aa48da12a9abb20a0d726eaab75ba443a7325f96f607539ed3ac47c16e9126ad068d6a14b35a257509e5a54a516dab0f4d7bac588b22cbcd98d4eff3f61b326f5cad3addeeb96a9b954829a53c211613434cab22175cf1821279efd9e0255b3ca34a95ef7acb294dceb8e29b368bf0b12e21972fcf2f9e458b6a8fad5570ce80061b3478c7512dda5df0a62679ab6416f73f2f4f2e61687ce5c8e245cdeb35eb9ae386bc68a531311fe8356ebd2e77641db47671c17920cb50c2a5c76dfd89fd62c8b9ec913b7698b14ea54bc61cb05ed6468d6af46b5e9207fdb2732ec5a5e73b57a69e5382b80ddae4b47b24618d65ae88f9aa6675fa1cb5c7ba25843df66bdde3e1b791b30b37bb5d5fbcbbb4b4245af51853a6dd4dbd265cd5a7a0ec0902f63b6be196eec835ef5f9f3ba2b044d56a431a553969da1abb5df5be1b46d4492fc90b8eb83ee7b8ab7133a6e7f68dd6ec54b748d9b80b1ad4396dcc6aab4dbbeca14a1dd62f1974fb99e19b5ed517c703d5a3edb9a27655609951d7345af08631ad92068df886e625920efaa9e3b9f04b6f988d63d670681cd81462db9522b2ca0391352eeab55acca0727b942eca47bde6f55078dbabee7ec2c45143d36d97d2d3b1269548aa57adcc8471a79d7756a7560970db6b7e11b2e7bce2fc93541e325c68ea4d0fc7d659212e2e6e415cb911ff92b4dc7a95669c77d8ef43f6bc1f7bd7c27f2643c27e47e3b96de170e809938b81321d2e87a3a127dc0e63a1271c0edb4222efa8fd8be33c156d9166dff3adf2bacdd11ebb64ac508c8231fd4e3be5cac2e46d7ff61b573efdfde9702db7c7417be375e5e53551ad32e48c1a5b98989cbfed84bf3865f2ffa533546bd3a9d3e7ac5682827b2e39e9a45e8f9e6efe379cddf27e00b2b0830000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (32, 'GPLv2', 'GNU General Public License, version 2.0', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000003fc4944415448c795955b6c936518c77f5ffbf1ad5f5b4ab7216c7127d846066c333bb1c112173c5c6036b30b41259198188877265c301363d44412d42c9a70a131124d8c12e38d0968c8300b07290293c8d898e28cb08aa056a05bd76e6bfbfdbdd8a97420f37ff5bec9f3ffbfcff3bccfc160216cca69a0856a4af001e38c30c0f7fcc0af24b28d8dacbb452ded3c468527b8d40a1836304154b1a9c46d86f996c3f433756f81529ee6396b4d99d540336b58891788f32797394b1f57a6a62ef3295f70f52e7ee3a29ecf8d68b976eb84224a2b1369457442bb552e23ca41ea712da4b7d16ba7dad5a398ee85987ad42e3b452f6dd912f5f4fa523b352447ff054743da295f8a5eeaef8cfda09ddaa5b01683b076c94e7190d2597a0e5dae68bb86164597a42175c815e56572a605363050a1a392d29ad0c47d8298c651558801368089978e9cca4e9af9895e463058c5a3acc6e11c3f22c060394d94f2373d8c524f236e36d2c9fecac90e06a09650954eeaa41e91572eb9e4d3365dd6a45e915fb63cf22857cfe8aace6b9d7c7a559392a4ef5425423ce4a2c9286f229ffd1c23cd2a0a18e710874892244e9a62f2b8cd371cc76182384904c05a9a30ca6974b1d10eb630cc310c9ee233dea3854a441a8002dee16d0a89f133498c8cc20dd28c1d64a3494dc05acd056e91cfb3345343094b28c102600945801fcdbd3c5f796b0858f15a93e220b9fc41927ccab8ce216240218f03708b8f8810268722ccace22d6019378a4dfc5e3c248125588cf016bf63d04c13060637f91007833a5a21cb071b2ff84d0c03132f0609e2f8584b8a3053081036d5047990add47261a67d67f3307d3289c7fd694ab08870894edee563bae75e59c1ebd4e263d95cef4c328a05e490200171936bb757dca48142aef03e13388448ce0998145294313c1c8e700d03832dac6414ae990c8ed6fc626e650b0738493f0e637858871f0787344e46d40e70894b002ca792688a4193d38927cee46de32552f410c5621d1dbc401eb994513cf39dd3d3ae684ece8d451f89514e1b34f2416dc3011af98b8bdcc0a2942a0238fc46180feb593a431a63706ea6bab9ce5e2e9ee745584ab79d7c4d894537b3244dea0dd949baa7d5db18ae56e87f0984542d86699bf6c7cb9beef1edbab268fa556d977b9cbd7867f353c5e180b3479145d123daa380c3d754656e8736ce059d2e8ddc973ea22e051dced176e74e31e9a02fe0ecd0d9998171f7d49dd50e051cfa7872416f61b29923ee789df6a9ff2ebb21a67eed539dcc0447d83c4fcf74c34515cfb3cd5fbcd6b58966ca79801c609208c39c21c490130bf3259f30345fa0d9cbd5cf263a79d85decf7e7b9f2f10171fee1a633164b8739c15784886512b2050072a9a19556d653800798e006839ce21417b9956dfc2f6ec53a03c4e284690000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (33, 'BSD', 'BSD', '\x89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af400000006624b4744000000000000f943bb7f000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000008c34944415458c3ad976b6c54651ac77f67ce9999ceadf442e96d5aa8564a0b95562a140a5b16f012244182bb62a29b266b4cc06c4282f1839744dd88624cc028f10388ae06814d40651502ac5c1a2d852d5b7a675aea3230b45c5a3a6da7a773aeef7ee8880501d1f84fce87c9799ff7ffbccf7f9ee7fc5f89bb4312300528036603d3817c2090783f04848136e024703af15bfba58da55f78ef4a902d0596005325494a73b95c2eb7dbed703a9d00188681a669b6aeeb9a10e21ad0091c02f601ed80f15b12c803fe043c0314a7a5a5b90b0b0b99397326454545e4e6e6e2f7fb0188c56244221142a1104d4d4d747575118d46e309f24f81dd40e42eab8d049403db81684a4a8a78ecb1c7c4b66ddb447b7bbb181c1c149665899b619aa68846a3a2b5b5556cd9b2453cfae8a32239395900d7807f00f7df45c57100d5c0b7b22c9ba5a5a5e2830f3e10172e5c10b66d8bbb856559221c0e8b4d9b3689929212e170380ce0205095e0b82d2a8023b22c9b8b172f16070f1e149aa6dd35f1cd88c7e362dfbe7da2baba5a381c0e339144d9edc80b807fcab26c2e59b244343434fcaa53df0eb66d8bfafa7ab170e14221cbb2999036ff66f224e06560a8bcbc5c1c3e7cf877211f2fc9810307446969a900a2c08b807b7c02f3808ef4f474b175eb56a11b86d08787457f73b3e8adad15d1ce4e61e9fa0d9b6ad1a818ecea12b1484458e364b24d538c5ebd2a62918888f7f509db34c7d66b9af8f0c30f456a6aaa005a80070164c00f3ce77038962e5bb64c5ebb762d6e4da3f5fdf7697ceb2dce7efe39bdb5b5b8fc7e92efbb0f87a230d0d141d33befd0b67933170f1d428b46094c9e8ce2f5d273f428a713713d478ea00d0ce0cdcec6939a4a4e4e0e6d6d6d8442a114a00f382127dae36f99999979eb5e78818ab232ba3efb8cc6b7dfc6d675dca9a944cf9c61a0ad8d8c59b370280aa75e7f9dce4f3f451f1e66f8dc397a8f1dc39391417261218d6fbec9b92fbfc4181961b0bb9bc8a143a8910869a5a5a4e7e763db36b5b5b5b2aaaa2ee0b80cac0056cc9933c7bb7af56a92749da677dfc588c598bd7e3d25ab57234912178f1c21909f8fa569b46ddeccc4b23266bdfa2a5955554892c4c4f2723c93267166eb567cc120951b3690f7f0c318b118170e1c0020abb2125f6a2ac78f1f271c0ebb81330a50a528ca848a071f243b3b9b584707b17098896565041f7984a4f474262f5bc6d99d3b19eaee0649c25455a6ac58c1bdab56212c8bc2279f44f1f918b978115bd7f1e7e793fd873fe00c04489f3993132fbec80f7bf6107ce82172abaa78e08107f8eebbef522ccb9ae70066783c1ea5a4b818b7cb85353a8a6518b8d2d2509292003055156159385c2e1c4e274208b4fe7e2c4d439265dce9e9c889b54863c34ed83600130a0b995a53831d8fd373f4282e59a6b8a404b7dbad00331420cfebf59293939398850e2460b8bb9bf0d75f234912ddbb7661eb3aa9d3a7935a5282272383b33b76907ccf3d4c59b10267e29b70ebc12e91316b16818202fa9b9ab0464608e6e6e2f57a255555f315c0e776bbf1f97c37c4f57eff3dfd2d2d0821d0a351148f07637898d4e2620a57ada279e3464ebefc32c3e130453535f882c1dbe6e09a30015f5e1e433ffc80118be1f7fb71bbdd007e05902449424a940e21c626535a1a29d3a681c381adeb0c767612dab68d8cd9b32979fe792459a6e3a38f38bd610303eded94bff4d275c97e56048703d9ed469826c2b2aecb04480aa06a9a96acaaeaf5000164575753f1da6b285e2fb661d0bd6b17cd1b377261ff7e32e7cca174ed5a528a8b69d9b489735f7d859294c4b4679f1dbff975589a8676ed1a8acf879c9484aaaa188601a03a801e5555b974e9d20d41ce40007f5e1efefc7c92efbd9729cb97e30b06897674a00f0de10c042858b992aaf7de236bde3c22df7e4b7f53d34f951c87d8850b0c9d3d4b7241018adf4f6f4f0f8903471c40dbe8e8a8150a85304cf386409190034076bb915d2e6cc3c0d67510024992482f2b23b3aa0a5355517b7a7e8a492462c5e39cdfb78f787f3f59f3e661c932674221e2f1b809b42b409d61188b1b1a1a52ae5cb982fbc736b22c6c5d1f7b4c93aba74ea1f6f6e20b06e9deb50bcfa449e42c5a84158f136d6f4752149cc9c9489284adeb98b118b6ae73fe9b6f087dfc3169a5a5e42e5ac4e5ab57f9efa95398a63904d429c071e07c737373cae9a62666a7a7230941dfa95334ae5f8fc3e5c254557a8f1dc3d234264c9dcad91d3b180e87c9acac0449a2f7d831d267ce24b5a40480bec6464ebef20ae6c80897ebea507c3ea6af59837fca14febd772fadadad00e780130a63beadb6b7b777fa9eddbbe569cf3c833310e0eae9d30c7474dcf09fb8efa9a728aaa9c1150810fae41322870f836d13282860fa9a35a4cd9881272b8b685717ffdbb307d9e36162793925cf3d47fed2a5f40f0cb07bf76e2e5fbe6c02478090c4984f5b046cc9c9c92978e78d3798e570303096251220290a29c5c504972cc1170c620c0fd3d7d8487f5313b6ae935e5e4ed6dcb9488ac2e5fa7a063b3b9180a48c0cd2eebf1f7f5e1e36b063c70ed6ad5bc7952b57ce027f056a7f3ca00fd800a80b162c1027ebeb85a969d71f4bd384b88541b12d4bd8b730a8c2b67fb6beaeae4e5456560a6004f83be0bdb95b4a80fd4ea7d37ee28927c49950e87773446d6d6d62f9f2e54251141bd80b14dd7260017f041a5c2e97bd72e54a71e2c40961261ccd6f816118a2aeae4e3cfef8e3c2e974da403d309f3bd87305580e34389d4e7bfefcf962e7ce9da2bfbfff5793f7f5f589eddbb78bb973e78e275f9ae0b823146021b01f50b3b3b3454d4d8dd8bb77af387ffefc1d6d7a3c1e17e170587cf1c517e2e9a79f169999993f6afe2f60016316f06765bf151c099dfe02fc5996e5c9d9d9d97269692915151514151591959585cfe7430881aaaaf4f4f4100a85686868a0a5a5854b972e99b66d9f0376019f31765f14779bc0f8ee989390a51ac8773a9d018fc7a378bd5edc6ef7d8e75ad7191919617474d44c4cb8307014f80af80fa0de8ee017ef6a094c4874492563167e3a9093489044992f02adc0f709bdcf30766dbf23fe0f708f107b7e1ffe120000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (34, 'MIT', 'The MIT License', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000003c64944415448c78d954b4c547714c67ff7313338033e50288332764420bcaa54a882582498b4b18d34e96bd336eebaedaa9b2ebbeaca2e9a74d1b44935b4606a1b6da2a98dad8b1651d0d80a54c40a835625508b3c8619e672bf2e18601844f856ff7f72beef7fce3de77cd76039327896ddbc403921b2807122f47085eb4488a7071b69772fe51ce610c546b6d7eb333d4082b83b13d7236ef13367e925b1b240016ff22ea5d9be9deca284ad640293dca38f3fe8672c462fc739c5bd27e48d41152d8c6dd42bfa4abd7aac59cdc3d198baf5855ed67af188af796e59e6983470c1722af599eecad59330ab883e5599cc04e7d98fb954a09a5f2da749e715d7d310d35935c87438cfee547a98939673485d2bbc9d0a571d3a28cba185d062db3e62bc4abfa454fd34ccea27558a313ec4372750c75f9bf5a5126ba24bd28c3ed72671831ab0c9a4d92c6ce200bdccb09e301e66b9cb2826213631c41821e23c48a9d8623f0d9c2ed6117aa09ace3c7da78bdaa7b08e6850d288de5758656ad5a43e50a5bed731ed54583b54a81d0aab426dfa4639e212bb4cf6122ea79a69220c70950830c2550618601c976106984c4edc287ff3180303931acaa0901a93fdf6861af27031b099e036628861ec94465bbc4d1bdff22a3e8e7292e33492cff3581ba9b3a9586797e2034cf298a68f1803c4d8c67f2955070932432e0605ec014094e2b3a31526057ef2175621877e46e9c34b51faa8e122402839f95bf11b844c023e02c9902d6ce32e77b84d2e5b93812b23131f649a1846723344163b19a5930861b2571530000c93689c6852c04b11312e3042117e56439404444dee4779b8a0598887df48508c7715ba784014ee99f44ccff62d98cc367298248b10c62a25c4b949cca1d7a43d31d1c50806426c613b104c7e422d7b7511c35cc319a7dde412437f721d8b0c3c0428c14f21d958f8b0012f1958c9023d0b67b846370c72d96282c2a93d5eb391626a292687325ea2183fa5d492472655d4b11930f053493d4160946374386ae51418347127a83639493b993795f9dba2c9cc9f133aa15cd1cf8b73d904f88468bdaeacd10d5cb56b9f98e2e3c55e9771cee3bea19b6b12e851b36c973394a40e55235d5ef7755d96f3547242ed7a4d1e970eea975abb4d335d1eb75eadfa7745faa85a543b473f8c9d3e193607394734a8a33aa3a1347b8f29a21ff48e9e1153fcc881856e2e49c3a484f778cbda1eb42aa9a6843c028828f7e9a38b1b3c74dc41da38c1adc5994aff4505d84b330d843c59eb6c3f3ec40c534c3bce38112e729acee4eead2000b08132f6514739f9048029fea19bdfe9e026e3e9c1ff030b55eb0b90e9adfb0000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); -INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (35, 'OSI', 'The Open Source Initiative ', '\x89504e470d0a1a0a0000000d4948445200000028000000240806000000fb3c781600000424694343504943432050726f66696c65000038118555df6fdb54143e896f52a4163f205847878ac5af55535bb91b1aadc6064993a5ed4a16a5e9d82a24e43a3789a91b07dbe9b6aa4f7b813706fc0140d9030f483c210d06627bd9f6c0b44953872aaa49487be8c40f2126ed0555e1bb76622753c45cf5facb39df39e73be75edb443d5f69b59a19558896abae9dcf249593a716949e4d8ad2b3d44b03d4abe94e2d91cbcd122ec115f7ceebe11d8a08cbed91eefe4ef623bf7a8bdcd189224fc06e151d7d19f80c51ccd46bb64b14bf07fbf869b706dcf31cf0d3360402ab02977d9c1278d1c7273d4e213f098ed02aeb15ad08bc063cbcd8662fb7615f0318c893e1556e1bba226691b3ad926172cfe12f8f71b731ff0f2e9b75f4ec5d8358fb9ca5b963b80f89de2bf654be893fd7b5f41cf04bb05fafb949617f05f88ffad27c02781f51f4a9927d74dee7475f5fad14de06de057bd170a70b4dfb6a75317b1c18b1d1f525eb98c82338d7756712b3a41780ef56f8b4d863e891a8c85369e061e0c14a7daa995f9a7156e684ddcbb35a99cc02238f64bfa7cde48007803fb4adbca805cdd23a3733a216f24b576b6eaea941daae9a59510bfd32993b5e8fc8296dbb95c2941fcb0eba76a119cb164ac6d1e9267fad667a6711dad805bb9e17da909fddd2ec74061879d83fbc3a2fe6061cdb5dd45262b6a3c047e84444234e162d62d5a94a3ba4509e3294c4bd46363c2532c88485c3cb6131224fd2126cdd79398fe3c7848cb217bd2da251a53bc7af70bfc9b1583f53d901fc1f62b3ec301b6713a4b037d89bec084bc13ac10e050a726d3a152ad37d28f5f3bc4f7554163a4e50f2fc407d288851ced9ef1afacd8ffe869ab04b2bf4234fd031345bed13200713687537d23ea76b6b3fec0e3cca06bbf8ceedbe6b6b74fc71f38ddd8b6dc736b06ec6b6c2f8d8afb12dfc6d52023b607a8a96a1caf076c20978231d3d5c01d3250deb6fe059d0da52dab1a3a5eaf981d02326c13fc83eccd2b9e1d0aafea2fea96ea85fa817d4df3b6a84193ba6247d2a7d2bfd287d277d2ffd4c8a7459ba22fd245d95be912e0539bbefbd9f25d87baf5f6113dd8a5d68d56b9f3527534eca7be417e594fcbcfcb23c1bb014b95f1e93a7e4bdf0ec09f6cd0cfd1dbd18740ab36a4db57b2df10418340f25069d06d7c654c584ab741659db9f93a65236c8c6d8f423a7765c9ce5968a783a9e8a274889ef8b4fc4c7e23302b79ebcf85ef826b0a603f5fe9313303a3ae06d2c4c25c833e29d3a715645f40a749bd0cd5d7e06df0ea249ab76d636ca1557d9afaaaf29097ccab8325dd5478715cd3415cfe5283677b8bdc28ba324be83228ee841defbbe4576dd0c6dee5b4487ffc23beb56685ba8137ded10f5bf1ada86f04e7ce633a28b07f5babde2e7a348e40691533ab0dffb1de94be2dd74b7d17880f755cf27443b1f371affae371a3b5f22ff16d165f33f590071786c1b2b13000000097048597300000b1300000b1301009a9c18000009ae494441545809bd586b6c14d715be33b3b3e3b5bd7eadbd181b5c1b080e71e40670c02950d92502d407aa9ada4514aaa4519b1f55faab9192082946156afab351aa4a11ea9f2a4de36daba0264da9a80c22d084d8450d260a8ff0f6738d5fbb5eefceeeccf4fbeeceac97e00527917ae19b7be7de73cffdceb9e79eb96bc5711cf1658b82021d8ae8025822824aa1facb2bf749855fe021497509b5a3a543018f0c09e5ab5184a2741eecf41d3f7fdc717a1d2b7fec73b569e4e7053ca5810e89e5e662d12220e4c27fc7584f8fca39f97d4b6dcb45966a91f45a4787e6f4f5d163f091b2b676cbcadd465d608b1ed49b145d2dc3263b76ca9a4e4f9b9793c38913e31f0cff0d646e4af94ec5e7f4496f2f75c9ac1796222dc9f540fe25c7467b79fd8ea603256b82fb8b9b8241bdc210aa5f25e3ac2adb11b6690973322512576627e29762af8df45dff3588ce2adddd9ad3dbbbe42d5f9207f3c95534847684b6d71eaedc58b3d257ee27215bee33482d1410055fa182b12354732229a63f8c0e8ebd71e3c939676e40e95640726971b93482aed5a1967077a863f99b559bc242f1a9a695b27c20471a8b165076609c0defdab669ebb74f8dce8ebd33b43b36327542e9ecc476674365d1c96ee77d4fb1e2c64d5959d9b6dabd8daf576d0639454959c98c819a5e5ad0ef39d1ed42450f6a56d2d234434b556fad2d83df2298b70ddb7dc1d3bda0e0eed63d0942114f5e067569e39ee6572b37857d60675aa6652824464292144f33daf0965cc2f6bc9a654a5978db500dcd0c3d16ae494fa57e03b95d3c30d0ad628dec3c39f9ce0723a570e9ea9263cbdaeb7f52fe48a8155b65d9694bcf9193a3c8379a6aa97ecdd6fcaa2a616856962c5893232b781bdbec53033e51de5ab533f46038abbca3e39e1c0a7ad0f59e853ab0faa987f617d5160bc7b26daca72d58849535d58607b4d45042a4a2f3297ac4a82dd68d9a22f082472d9bc73bfb1ff18ab9667163d01f7ca4f249b4238c43ce29e4c5820485ebbd606570a33f1c58af68d826d3c1138b713bf92039d352a7ce44a33303d15fce9c1d3be1085dab6a0f7fabbcadfaf98af5d52542556d6183a44357222433b6c69454b4bc780b88ad05b18bb94f24d57ea6142498f5bf10a55fad6c2b0a0738cd42a069f25030e0106fd83575fabf9373970f0f3e81854ee6e93e5bac145fd47ea1bd59d65a85230c59261eda062f3262fd5545e535adb5ad9873518061a1b2e8fec33225d21b9181abe10ba1216ea03417c8e4a7fa14c74a6498885f27397e77792adbdada742e967012bd89ebf1bf3ba62d655db7b3825d8aed2bd5855e6d3452b6303d5a759fa2f89420b737bbadae30768a092e339711e9447a90bdb1e198c253d9dfdf9f6e7b264bd28aa73f468a9107449ef285b51c555785aa6b4176455a5aa88e317057b92f41613929e78eaf0474d00b7029729bd0746d25b5ce18335217170ad60565942a86af9ef1060fd36d0b85f65a0ece8f95f23a2123e778ef5ebd2841297cb047aacc2432b7ec942d905a724bb0c5057c415d041a4af780d38a4baf5c4af11306c54adf4bf2646e08d405bead16e1e263c913e2ad09c242b5126961cd646eb1b3ebfcf99cee9c90db5894a01c7327256f24ce9a9349462092b4b7d168d8b606b7d838a92b1bbbd6feb5b67d45bbfcbec2b3cb36d7ed6cdab7ee4f65ada12066f070611d5a05cd3c5c082d5c24cca933e3e7b85604ff0a95c204dd495317a3675263f3d7a840d5142ee6ea42e24d5baa5e699835dbeb1ff52f2b7a550e28a238f095e0e19aceba07b4129fc9b422c9491fc1751a8206de37a3f3ff498b6cfcba377057ef9d55618211014b116a8e3331f7e9ec9ff179e217231b29f91b623b9a359f1156c27a9baa21308793fb2eee847c4100a293f2a8691b74a8c9d184885d988d4036dd8d8b084719bba8ef2a050962b2233ab35f8de163d77f3bf3d164148745477a497b5e445ce2880a6deeca6c7cf8d8b55e4ffbe491d137e6aec5b89d3eac8ceb18c9c17b7ecdb4e1d1d9739383e3ef0fbd42f94824bbbd723d4f415e5d902065e4c79cd722c7b936f541f4f9d827d3f4808e85335c1029c8611a498e248ee3fd637a9cf3e2227e3a3592e817199903f929642e4c63c83f3d3021a64e450f34ffb83910ee6caac59805d0cf8b967b1294338e1f97b7dfdbe7467f7ffbe4d8216c37f21796d355a6082d85ed8a5f88fd45cab66df4c91bb3e3a4e6afc68ff0460dca0a3d47c3660727c5e4e9f167a6ae4e1c890f259fd574d15cf778d3aeba9dabbe5ebf63d56e6f9bbd9a3aef4b90d66182941b3d79e3c0f8d1a117a6faa342641c038b2a891bf15b20ffae24b86ac016d188f4e2c87b37df4a5c8fc561886627337e5c565313476f3d1d1d187e8db2f83cdf542d27a6aace06e4843d8e626faadedd5c2af5f4c8a895cd82df6239ea3ec091bf43e48d63f4f4cd974b2b2a3e34bf933a54dc50bad91c9dff07c6c7948318c735deb31e7d838dddcdefcd7e34b96bee72ec9f43912b2f9a8e39e0e9f5f932a72d474f238e7b612c6e14191fb282348ebf7b3c3919bc50c6777a8984595390b54cbc79e3bae811ee511646685df847b59d0d2d729c3f45b373384fcad46d6dd85ab5baea071cff8c8cfca9e1f5e7d7ee9a72be9c231faec27cc1fc362779ef68dfa5dc23e4c92c567b862d36e6f5e5ebf674a2ce79a404ed2d003fe0f4e0726055dee4b5787f98ef28654699b1a6a4b184a7307f175a30b6ce9531f40a7d7d757335f5d1ab86dbcfbb1b77ca00ca008ef3da1570c71f443becb66522c64953cad1c9df09f5c005803794fd00929938059c019e06c8ee04d00e5096e32f43d9fbd0f153b4b9a8095c06360235c03830035c825c1fe47e86f66d6083dbcf8341c2978029600dc0bf52bc05f9b3b48ce53180823b002eb01720913dc07ae057c03c700bd80790dcb3c0bf801f022c0f03f4c83b0089166181e75053df37012fd7d1630f0057011a1e73e5f8257a02f804603c7f0390ccbd3a0141a694043a483c8ad769bcf3cf1cb4e853e018f06f80060c03d78087009643000d7d0a6800fa01167a8f84653e75db49d4f432c9d3709609806dd67f0466816cc08304e3ed77400ae06492f92e701db801d0aa4e6004380774002f00edc03618f273e8f83eda9c4fef309ee9856980db3c003c0a44811500f58e02278117818b00c9519673e8eda3d07b0575ee90ac449bd6739bf6017f003601a5104425760124510990841f0801abdd717aad0b206154d28b7b50cb83867a1df035601940877807612dda7b01ae4f9ddf03b6033af5c89401eb594bad18e0a1617c35a0eb39f79d79692179b233af40fe0b8d2f611e7f5cb849341b77f2ef7a58bb09687539331e1580278d605be645b74d7268e6123bb796329c47796f9cfd04fba5cebc79520efdde3ab9bc2b3d88815c8155396fe6b77302ffe7c6ff00610e5ffd6a8201470000000049454e44ae426082', true); - - --- --- Data for Name: license_label_extended_mapping; Type: TABLE DATA; Schema: public; Owner: dspace --- - -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991138, 1, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991139, 1, 31); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991140, 2, 32); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991141, 2, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991142, 3, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991143, 3, 34); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991144, 4, 35); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991145, 4, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991146, 5, 35); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991147, 5, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991148, 6, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991149, 6, 25); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991150, 6, 27); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991151, 6, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991152, 6, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991153, 7, 33); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991154, 7, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991155, 7, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991156, 8, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991157, 8, 33); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991158, 8, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991159, 9, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991160, 9, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991161, 9, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991162, 9, 25); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991163, 10, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991164, 10, 25); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991165, 10, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991166, 10, 24); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991167, 10, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991168, 11, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991169, 11, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991170, 11, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991171, 11, 27); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991172, 12, 24); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991173, 12, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991174, 12, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991175, 12, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991176, 13, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991177, 13, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991178, 13, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991179, 14, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991180, 14, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991181, 14, 30); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991204, 22, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991206, 24, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991207, 25, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991208, 26, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991209, 27, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991210, 28, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991211, 29, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991212, 30, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991213, 31, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991214, 32, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991215, 33, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991216, 33, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991217, 34, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991218, 35, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991219, 36, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991220, 37, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991221, 37, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991222, 37, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991223, 38, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991224, 38, 24); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991225, 38, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991226, 38, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991227, 39, 27); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991228, 39, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991229, 39, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991230, 39, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991231, 40, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991232, 40, 25); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991233, 40, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991234, 40, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991235, 41, 25); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991236, 41, 29); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991237, 41, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991238, 41, 24); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991239, 41, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991240, 42, 20); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991241, 42, 27); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991242, 42, 25); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991243, 42, 23); -INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991244, 42, 29); - - --- --- Name: license_definition_license_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace --- - -SELECT pg_catalog.setval('public.license_definition_license_id_seq', 85, true); - - --- --- Name: license_label_extended_mapping_mapping_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace --- - -SELECT pg_catalog.setval('public.license_label_extended_mapping_mapping_id_seq', 991244, true); - - --- --- Name: license_label_label_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace --- - -SELECT pg_catalog.setval('public.license_label_label_id_seq', 35, true); +-- Insert data into tables only if the tables (license_definition, license_label, license_label_extended_mapping) +-- are empty +DO $$ +BEGIN + -- Check if the 'license_definition' table is empty + PERFORM 1 FROM public.license_definition LIMIT 1; + IF NOT FOUND THEN + -- Check if the 'license_label' table is empty + PERFORM 1 FROM public.license_label LIMIT 1; + IF NOT FOUND THEN + -- Check if the 'license_label_extended_mapping' table is empty + PERFORM 1 FROM public.license_label_extended_mapping LIMIT 1; + IF NOT FOUND THEN + -- All three tables are empty, so insert data + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (1, 'GNU General Public Licence, version 3', 'http://opensource.org/licenses/GPL-3.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (2, 'GNU General Public License, version 2', 'http://www.gnu.org/licenses/gpl-2.0.html', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (3, 'The MIT License (MIT)', 'http://opensource.org/licenses/mit-license.php', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (4, 'Artistic License 2.0', 'http://opensource.org/licenses/Artistic-2.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (5, 'Artistic License (Perl) 1.0', 'http://opensource.org/licenses/Artistic-Perl-1.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (6, 'Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0)', 'http://creativecommons.org/licenses/by-nc-nd/3.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (7, 'BSD 2-Clause "Simplified" or "FreeBSD" license', 'http://opensource.org/licenses/BSD-2-Clause', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (8, 'BSD 3-Clause "New" or "Revised" license', 'http://opensource.org/licenses/BSD-3-Clause', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (9, 'Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0)', 'http://creativecommons.org/licenses/by-nc/3.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (10, 'Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)', 'http://creativecommons.org/licenses/by-nc-sa/3.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (11, 'Attribution-NoDerivs 3.0 Unported (CC BY-ND 3.0)', 'http://creativecommons.org/licenses/by-nd/3.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (12, 'Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)', 'http://creativecommons.org/licenses/by-sa/3.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (13, 'Creative Commons - Attribution 3.0 Unported (CC BY 3.0)', 'http://creativecommons.org/licenses/by/3.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (14, 'Public Domain Dedication (CC Zero)', 'http://creativecommons.org/publicdomain/zero/1.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (22, 'Apache License 2.0', 'http://opensource.org/licenses/Apache-2.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (24, 'Affero General Public License 1 (AGPL-1.0)', 'http://www.affero.org/oagpl.html', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (25, 'Affero General Public License 3 (AGPL-3.0)', 'http://opensource.org/licenses/AGPL-3.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (26, 'Common Development and Distribution License (CDDL-1.0)', 'http://opensource.org/licenses/CDDL-1.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (27, 'Eclipse Public License 1.0 (EPL-1.0)', 'http://opensource.org/licenses/EPL-1.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (28, 'GNU General Public License 2 or later (GPL-2.0)', 'http://opensource.org/licenses/GPL-2.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (29, 'GNU Library or "Lesser" General Public License 2.1 (LGPL-2.1)', 'http://opensource.org/licenses/LGPL-2.1', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (30, 'GNU Library or "Lesser" General Public License 2.1 or later (LGPL-2.1)', 'http://opensource.org/licenses/LGPL-2.1', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (31, 'GNU Library or "Lesser" General Public License 3.0 (LGPL-3.0)', 'http://opensource.org/licenses/LGPL-3.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (32, 'Mozilla Public License 2.0', 'http://opensource.org/licenses/MPL-2.0', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (33, 'Open Data Commons Attribution License (ODC-By)', 'http://opendatacommons.org/licenses/by/summary/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (34, 'Open Data Commons Open Database License (ODbL)', 'http://opendatacommons.org/licenses/odbl/summary/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (35, 'Open Data Commons Public Domain Dedication and License (PDDL)', 'http://opendatacommons.org/licenses/pddl/summary/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (36, 'Public Domain Mark (PD)', 'http://creativecommons.org/publicdomain/mark/1.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (37, 'Creative Commons - Attribution 4.0 International (CC BY 4.0)', 'http://creativecommons.org/licenses/by/4.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (38, 'Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)', 'http://creativecommons.org/licenses/by-sa/4.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (39, 'Creative Commons - Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)', 'http://creativecommons.org/licenses/by-nd/4.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (40, 'Creative Commons - Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)', 'http://creativecommons.org/licenses/by-nc/4.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (41, 'Creative Commons - Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)', 'http://creativecommons.org/licenses/by-nc-sa/4.0/', NULL, NULL, NULL, 0, NULL); + INSERT INTO public.license_definition (license_id, name, definition, user_registration_id, label_id, created_on, confirmation, required_info) VALUES (42, 'Creative Commons - Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)', 'http://creativecommons.org/licenses/by-nc-nd/4.0/', NULL, NULL, NULL, 0, NULL); + + -- + -- Data for Name: license_label; Type: TABLE DATA; Schema: public; Owner: dspace + -- + + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (20, 'PUB', 'Publicly Available', NULL, false); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (21, 'ACA', 'Academic Use', '\x89504e470d0a1a0a0000000d494844520000003500000016080600000060ded4e8000000097048597300000b1300000b1301009a9c1800000e256943435050686f746f73686f70204943432070726f66696c65000078dad5976750135c97c74f0a49e848ef448a204d7a514120201d218054a524a199841002084a13055190a28822a0f4a248095d407a551101b1a0d81ebb8f05441031fbc17df77d6676f6c3ceec97fd7dfacf9973e79c39e7cedcfb0710ec0c6230a84821001a9dc524da5ae1bd7d7cf1d847c00302200e1ab02d8814cdb074757582ff91d5fb80000098d50a6230a8f0bf43804c89260120340120921c4da201208a01c09ac460b20010cf00e06e1c8bc1024036018028d3dbc71700390c00a2a17ff40300100dfea33f028028d383480040010008c4924259002821008c309d1c4e07e05606c09893c282c800826400d0a4d122c90082b900a016fc8fb3a1ffd07ffa040000314224359289772258e30941d4f06066108b4286ff6368d4987fd54300001f85eee90e006a00200b0488042a440213f0e00404b0063c102008a8100ec1c08420600105c82cca61160000219211cf0c0f0d63e12d190c2a45136f4f27696be2f5747475e0ff13de3ebef83f6a851f10008008fff5ef987f3c80411800fac8bf630c5e806b5f00a4ff91a7ee06205f0bc06e27c53063ff3563c46d803f77e53f412100900020053ed0899045e4226590eda840b402fa19572fa6015b822be6aee7b9c9fb806f4560aba0a7d0f12d23c23f444dc458e26d12eb5286d20c9956d955791d85087cf5d6792511650b95a06df9aa5d6a6fd44103af49d0f2d60edf71442747b742ef8a7eb941a361b35191f179933cd3c49de45d4ebbf5cca4ccc1fce59edb167d96b556058434eb4336ae7b0d6de5ecc0ee8dfdbc43a7e379a72467928bf53e255784eb73b71e62917b9c879be7764fcefe59af1aef241f575f65df6f7ec3fe670e781d5439f877407be0b1208760c1e07ba47cb23b4594f220e47ca8679848d854f8c9089b43e8437d54164d8bf6825e11e9cb10620c47c5330da221fa05eb564c53ecb938c66162bc5e825cc2fa914747d989f949b1c9c4148d545ceaeb63fd69178e479e704c974fff9171e7645126f594f96981d34fb2dab253cf38e588e72ce5d6e431f3cdcf22cf8e9dcb29f0382f797eb1b0e4c2818bf2179f16155ef22b162fbe579253ea7299f7f2f8958c3242d9eff2a60a5aa56ae55f55c5d50ed59f6a926b856acbeaf4eafaea9dea97ae1ebaba762dbd41b8a1ecfa8eebbd8d4e8d8f9b429a569bd35b445baeb0b5d983adfb5a9fb645b5437b4e8742474b27a173be2ba28bd37df686ea8dde1e9f9e95de937dca7d8337836ffeeebf326033f07e306768cfd0dbe1c211a751d4e8cdb1b471e284f2247272796aedb6e49da8e9040010001d2041157c47b820d8485d642fca1bcd831ee72ac4c46129b8406e12cf11de5cbeebfc0f049142c65b42850b44a6c470e2161234c9cb5213d2ebb29a72eef2690a2df8fb5b7f2a892a6ba9386fa3aa26aae56caf52efd118d27ca2f546fbf98e4f3a3f75d7f556f4970dbe1bae1abd327e6572df747467c7aedadd4566d9e647f7845bb85a1a58491250844fd673361d7b2fd9a6d985da5b3b6c73e473fce034ea5ceb92becfdfd5c84dc8ed3d71dcbdd423dad369bffcfe2f5e23de053e145f633facdfacff9503f483bb02b8031e06d6063182f790b849b3e4524a68884ec846e870d8e970cf08c5885787d8d42334029d877e37f202831c65c294894647bf654dc4d4c69e8ca31df688374a9048583e327fb42fb134e94872400a2155e518fad8cbb4a9e3d527b2d21919ee270d33c533574fdd3fdd91559a9d7ce6608e592e3e0f97f7317ffa6ccbb97305acf33e859617142f222ffe553479a9a5b8b824a1d4ffb2c315d532c1b2f5f2c58abecacaaaeceaf81a4aad439d563db6fef6d5d3d7ec1bd00d5dd7631ab51bdf375535fbb708b64cb2d35a4d5a3fb655b47b77f0740c74c674a9773dedceba6171e3474f632fa54fb26ff6667abf59ffca40fd60e090ccd083e1f323c451fed1a9b133e36e1312137393c553945b5ab7566f0fddc99b0ebe6b3cc333f3f45eebec99b943f3f6f79517300bef1ecc3cbcf048efbff65f03eb0877441752035987d2438da0c95cfc5cc39864ac258e07f79cbb87a78837858fce4f16f017dc2fe4b98528ec2d724034482c423c5e2243324faa44ba45664076546e41febdc257fc9a2242895719a722bc4d50954f4d7a3bb73a5a03a1b1acf9516b517b6247bb4e896e8a1e459f60a06d88337c61d46f5c6672dc94bcd36a97ccaeefbbe7cddacdcfeda15bd8596a5821ac16093dd6c536717b5d6cb5ec78ed5edbf73b5c746438ed7596755e7599da77c5f5b09b035199b8ea3ee151ea19b5dfca4bd8eb9537db27c5d7dd4fceef8d7feb81d4836e010a016f039b82e2836d4882a487e40a0a354437e47b68575872b84b8448c4c2a1126a384d9df685de1999c4708a128e7ac4ac8aa6b3cc63b863e662cbe3e8874de2d1f1330925476847cd12f9131793ae2627a410531553578e8da7151f8f3d619b2e9bbe9271eb647966fc29e269f52c64d6a36cf699829cc85cbb3c7cde7afefdb39de70a0a98e71d0a552fa02f2c5dec2d2abd1453ec5562582a7a19ae20cbf8ca852b442b25aa64aa156a146a65ea24ebc5ae8a5e136910bd2ed628d924d32cd322c696685568536bd7ead0ea34e8b2ea76bb11d413dd9bde577273ac7f6960634879d8612461b479ecdd84f264e054f9adb53beed34d3342f7e26697e73317441eb01f452dea3fd95cda78817e65fbfaeabb9d1f777ece5eee5c6fe47000fefc1900003046001702007ce400dc6c01b276036c1b0490e00170e507f03005a4b62820be0f02c22ae71fefc74ef085a3500203f0128146a8219c100cc4394417620989416a233d9189c82ae45de43a4a09e5864a44d5a31ea27168137418ba087d870bc565c245e3aae07a8c11c3b8624e63c6b038ac2df604760cc78fdb8f2bc2bde4d6e266710ff388f19079d8bc58de00de4e3e613e1adf38bf0aff69fe65012f816e4115c112213ea123425fb6d0b77c12a6097f116189ac8ba689f189e58a4b88574a684b744b3a4a2e49c54af34857ca58ca3c9465c889c875c9fbc8ff52a8c4efc3ffde5aaf7840495869443951c544e5c7b62ed564b5bddb79b73f54afd488d774d052d3e6d25eda31a253ab7b4a2f4e9f62e06fe86eb4cfd8c664afa9fd4e975d81bbc3cde2cc8fed29b3e8b25cb4fadb5ad8c6746fa86dbe5dbd7d9543ae63aa538233c325765f946b941b8548778ff448f6ccda9fed55e87ddd67d077c6efb53fe7a07c8059a057d0b1e072d2040515a21b4a0e2b0a9f3d04542bda49fa5d864c5438b32dfa774c606cfb61fe787ac2dda3868915c95b5292523969d4e39fd269191f33c34e7dce6264afe51ccf53cb6f39e758305f9874d1f6924709f5f289b28e8ae96a74ad497dd4b5aaeb2f9ba5d8216da51d6fba77f744f74d0ff00f058d748c23267d6e5dbef361c66c3673fec603e1476e8ba94f879f7d7b29f197dd1be2bbd80f499f123fc77cf55d565879bd7a714d73bd6683fb1771f3e0ef140e0700742104cec3087c45c823ec112cc465c424621589473a21139035c839140aa5870a42e5a34650eb682d7420fa3cfa361796cb8a2b91ab87eb27c614138fe9c502d61a9b89bd8793c585e13ab9b9b97db9af72ffe6f1e269e6e5e5a5f00ef0a9f0a5f2bde077e4ef16c00b6408ac0a860b3e1172131ad9b2734bafb0a1709bc82e9101513bd119313fb1d7e231125889524913c9fb520c695ee97a19679915d9223973b90ff2a50a8e0a6bf8a6ad118a0a8a8f95ca94835554553e6e6b524d51dbb75d6efb0ff53b1ad59a27b542b46d77e8e848eb627457f45eeadf331832ec376a35669bb04d5b7676edeadb3d6a3667fe6ccf7b4bb4950041d5dadcc67f6f826da15d837d8b43bde355a746e72e97b17d33ae0b6e4bc4af1e084ff9fd5a5e26de9e3e2cdf4cbf72ff9b079e076002e5831c832348d964366531141b66141e1271f1d020f51b5d3d92c42889ba1d0dac5d31b1b1cd71dfe24d12a28e341cfd91b427393d65ea187f9acbf1b213df32b44f9eca5c382d9fc5cc9ecac1e746e70d9e153c175c3058b8f5425191c5a50f25459703cac4ca672bb3aa9d6b95ebde5c6d6cc86a0c6c3666cbb6aeb42f767675b7f694f4a5f69307fd86778f1a8ce327456ef1df5e9b5e9a19996d9faf5d38fd90fad8e189f992f8b36f2fe65e35bc3ef676ff7bf90f1f3eddf89cf1d57959606572b560cdf927ff46cf269dc30100538883365841e823a2102d8815a421f230b2178544d9a2b251f7d10a682aba930bc3e5c555c7b58171c1546138586f6c134e08178dbbc76dc05dc283e561f22cf17af00ef399f175f26bf2b3050c043a0409825342078596b79c12d614be25122b2a293a299628ae23fe5ca2509228252ab5205d20e323ab24fb4dae5b3e4f8184d7dfcabbf5a3e2a852a572864ae4363f552735f3eddaea1a1a8a9a4a5af2da6a3bb4748c75edf4fcf4230d720c6b8ca68d7f982aecb4dd15bdbbc1ecf51e790b7fcb4b564bd69a36c97be7eca4ed590eb34e2ace675c3eba12ddaeb94b79247abef5b2f7eef255f4cb3f803b9810b01c1412fc88ec4e990e7509bb19617da88f66416f675844f547ef618dc5bac4cdc60724bc3f1a9fb8969c912a73ace5b8ed89e90cd2c9f553c5597ad97339cc3cbefcee73c482cdc2e28bc245b1971e97b8960e5c312aabab90af2cafde56535fa75dcfbe66dcd0d368d134d262cf7edec66c5fed4ce8dabc71b657a5afb65f7de0da90f670e3a8ced8b50981c9ac5bbcb799775ede759b699a1598a3ce4f2ca83c487978ffb1e4a2f7930b4f179e893d27bec87879fdd5d05f8f5f73de8abd537aaff861eb47854f727f4bfdbdf9f9e997beaf25dfc296759797579abfd356f1abf33f62d6f8d62ad70dd66ffe74fc39b961ba51fb4be2d7d15fe39b629bc19bd737377edbfecefdfd90a3c4a172da391c80e8107dbd3f0e434a0e80e70b87f36e1f8000016093c4e1ac9971381b2f0130750067c3fff85000008c1040712600c05073ed7ff341ff017c3ece4feba5845a000000206348524d0000592b0000595f0000deb900008399000070e20000c0e400002f4b00001978d02b64290000042c4944415478dad498594c5c5518c77ff7323bcb40ca32436929ed80d2c5071393425994362969215553496c6dd3343e92b8251a1f348d892f7d50138dc697be9214ab95124b09d0326030b46a84a235b294916518d619665866e6dee3c3c4a1bcc89c312afe93efe5de73fff7ffffbe73cff9ee518410c431d5e1c2ebaec2ebae26f47b01db1da9bb26705475e3a872937f6cf8cfcb4adcd48da79a3105d3c82daac55909f6d26def09ff2f30dd03beb136c26941eaefbeb061aaf3b90fc9010a2b5e657d00d60721eaddfea60c0e301f02f31330defb11b3c0d1af5e4bb9f4d2be2a166fd4b337ff3cfe26088f821604c1f60f2d18d3bbd20759aec3cc3c9843a44f2aa2bdee630ad31ba13bf10c897fb11a8acce06a185ffec44060d8852117c2124f0b79570b0195cc3481aa4a3eab48e8324d42c0e732a0874dac79404f2e7da7dfcee6e1b4814b2ffba9ab58dd346a3da2f0d9b534ae77db08ae2a988c507b789537ce2c936addfcc2bfe24918ba0774d5a402108d82ae241e1aa0c1d0b09187d30654155afa7782b5207e0f0ddebf62a7a9dd464db985cbefeca1fe780e2d3d563eb8b61b8431311e195dd1686cfd88994a6ea2b7f6da301be1d993b95cfddac784bf80022601f0cc18f8a6cf426d958577df2a85e014358fcde1cc4ca5b8d4099919303bb8254f3288554a261bba023a44c270abdf4cf993664e1dcf420868b91385141be830369502c0c1833910f2826f00825e2e548c72649f17966712e291d6163715950c4da1e7272b81159563cfe451e20851e810b4b6cfa35b0b405358f0c74cd96c29b0ba049ab211f3a3b03c9b108fb4b6f8f4138ae40709ad7d1600aedf5aa4ad2dc4ea9a8e6f29c2772376caed2a0e7b6c21989b8f40448b09047e183651bc3342ba35b60a6ec58322929c7e8f663181585852f8f6672316b3c2c8d82a43630a51618c755b1dcb60cda6c419c56880ce9e45a2584083f92595c64fed9cb99c8d1086847864b56d544a97cb44db3d2b9aaef0deeb851c7f3a13740d80b38dbfd1dde72770c1c90edb1ca78f4468ea5ee1f9378dd41e4aa36bc044380aa74e3a515c0768fbbc7f4b9e0c7d2ec94a45e4a2f59e05b3112acb32c1330483b761f03627f6cf130eebdcbc9b02aa91576afd9cafb3b214d0b9d2610583898b0d3bb878361fe62712e391d4166b68afeeed244baf914a8500f69781d5063fde89671880bc3db0ab043c0fc0e7014541e417b3647192956586b5102ccec0d448ac33d98ae7fb76b9322daa5d8af8e2f19ba4aed722ed2a09188d1089fc93cd1f84cc6d06325cc3847f0555935afd9282169517a94a8cd75320c335ac52d4d04c980ea9bd407ab3fe1b21a32b4c07450dcd065ce7dc8c7f791fff808a4a0dff57e874613f701fd739f723bff3654daccde6a2881aa976ffbf861020942e2c393eeafb5edc7c460130d5e962a6a702afbb9ae0f8ee6d6f28add083a3aa9bbcca5ef28fc60f5efe180026b7b96a2d80c8d60000000049454e44ae426082', false); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (22, 'RES', 'Restricted Use', NULL, false); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (23, 'BY', 'Attribution Required', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004374944415478daec5bd171e23010154cfe4d07d081e9c0a402e800ae024a800e4c07d001e9c04e05261598abc05001a7e7d1ddf88824af644931096f66c70cd842fbb45aed4aeb17e617632e332e532113213a9c85e48deb6ff64088b9a45c4a2e3747528a36e33e2bbee45238545a2585f8af5e295e06505c66155f4a04e677f6058acb2c22f8d458f740f17bd9d8283230bc3fe272e0b2203f10456c369bb1e9745a5f2793492d52f77f3ed7723a9d589ee7b55caf5793fee5a26f571fa31e9938b9e572793b1e8fb7ae401b688b1369e21b9c4f093458513ab0d96c6e6559de5ca3aaaaba6d2211954b1248cacfe7732f8acb8880458422216a5be230222e4cdd14599651aca11309ad733e8ee35b5114c69ddfeff7b5c52449520b3ee33b1b6b401f083e21b22160dfa63c3a600a9df9e2371b10a6446613dd39571ed6d236776d2c8a48c2c624c2ab5c2b0fc08b5356115b1048f8e40f861202765c465266c6e33a38198d46bdccc60e8703e303a4bda58d804417e5bdbdbdf556f97fa1201f20449f0a4cef13a87b02b6aa27d334adc3d92ea090d795603c8f81d240a963a29a3b58aa5c0531bab51bbfd9fa17437f204da38fae3db32ab69791e03aa06a21bb90797ea76b332592e3d3aaf6faf8ec032dab4e4ccaef43c4f73ef3060d01699380c2c7dcc7d4314863a5d3a2ebf4d3f882b219f34b6fb289cf9b408cdf75a7076d74f5399af6c743b16f2fc562b1e8b4245d2e97ceeb7ad736a083262e980d4570f0794d4c92de073d54602b4e8189d202340f3d1c34015c6d01a3ef4e409b0548e951eddc3e2234ba4c86160f7d2702d890fd703c097812f024e049801438a4fc2ed0e902024e3f9880f30bf20dd5e662d76870b7dbfd97ccbcbebe929ecbb2ccd91e2180e3761d01b92c1f00011e6370dbd0d53501271448ccb948b751793aedb4238301ad1ec3f5ffc28a148516aba1b0002970d0f0e8c0e86baa4c7210705539c296fdf58700fc906afeb3460166904d5146dc060bb4359e36e300e5506fb7db871e7d8df97f9adfde0f46425a40cbe8973246bc1f8d852460bd5e1b1f8dd53108f3706e1f9a009c34317dc98c1209f350bd119280b6035846a82f56d606a1e12eab826f0208455305c579e214c14b898c6f026c4a645498330f4552be0820164f1a1753a76d24984e071f04106b059565726dd9096203e50121cedc102e53b337ea7dd44c1471fe6ab5621f1f1fdadb44b66b55414eaa1077b1449a02c515be4b658d488019faaaf4b8af394060c602578c93df15c079becb9aa2bf80bf2156897b7b8d26d2e50bb2f01905165daabef02cda208e7853797271f4c082082c27462922aa37e10021d89d513943383fec21fe7d65e6fdfdddb46fc8f07e85c83413467c832490542276098aa82d5608244766f93e802bc4ec6bde1fcc8425f606898993ec38e2bd52fc1e63b1c7e8f23de242b43976ddd941003f01973f15d7115394e4dc85ae17b15d7f12d7abaf0efe1160005144fe5e042ce31f0000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (24, 'SA', 'Share Alike', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004ab4944415478dadc5b8d75a24010461bc00eb403ed403bd00e4c075e07da81d781d7014905980af02a402b502be0f6e3418ee4606766990572f3de2426c2b2f3b333dfcc2ea3c02f4d0d2f0a5e199e156ca38be187e173f1197c0bbe1141e8a3e1c470a6c44931e67cc8826f0dc78a42db94b11d92e04bc36907827fe5b46f454c3bb238c5711f4b039abf0f40f82aef5d041909af0f0dff34fcc2be210c83d56a152c168bfcf76c36cbb98eaed76bce97cb25389fcf393f9f4fc9fc903936869f3eac1e4a22fb76bbcda228cada12c6c0584691922039f7b1de13aee0699a66da74bfdfb3fd7ecf55c45d53092167bd2f974b2f82d729024aee4a09a4dbc322a7d329eb9ae238e678436b2558859f4ea7599224595f046f98cfe79c9810ba087fb40d8c0763027d137349c452e1d7df41f82a3194b057097a43145ea004563c38d9029eabf0c810c7e3315bafd7b5eb16ffc3774875ae71851113c8a5b0b469d0656288d6489152688b00eb925da004223b580ba8c6e20696914e64b7dbb5c6f850049428553a5145caac0fb7f2909e442c3500110f6abd206aba4162011fc25761b6d25248eab07eeb878210c87c96bd124fc0b5dc8cb06bba5082ef11b4baa8fdb91e4978c19184bc88de1242c0a2268f09d5a53afccdadf6f01c6e3ab6c482b40a7c6a2f92a4218ef5b13ca8897363087729a09f6019676a85bd12d043ad7d098264e4f2fc7b2e59c6cab3c15ec3fd298b49bb431c8fe28e6931cebe11fc48a22dd6af96b52431859ba100c19ba0f1d8fc98d481023430293a1c0ef9752f2f748f14d76d361b51494a5d8fa62987d0906da0bc3beb9cfe24a0075e20ad258800c68e5390c53246fd179ac8cf457806a61761026f0aa094e02a3c37b80e42014d4a682b3c4701dc60dd74ff58ab773e994cf2a06494f0b12384bf2d016830a4e201554f0086d0ea16531e8014378825e083287ca111031a97003629fb26ad39d8c61917677006a9000ed0e100368b2cd7717120c91965958870341a3532679275f4fafa6afdbe0cb81461bbdda680b3f0a67ff1e46ce63a01abf56fb75b6beb13c6bc58cb6149cf5f2b5895c481d8dc4c4395c3a146094b556e927e0067fb9b5bae1399646a6d89a18ee692a5e4fca4045b9125d8fb677b14a725a6d214e57471aa753c1406214ac6260aa7a728318ca429aad216e77881c64e11772949dae2d68d1109ac75d907e4b2a4b822ac9f8ab6c624fd415f3b43d2ca92d897dc8a3747b94547b520d2129e0a9e5a9ba3eadbe3509ae07c5fe3264a97dbe3ea0724caf37ddc085f063adce3f22c62f9259ca3b20046d7a66e31f037a0251a20522a8fc096c761abcd14344e00a9cbe3b42e842ef2dbdb9bb5416cf8f77f77488a09a0c487a98f9a81a9e7b38271e0481115a4a4458e76c788217cea7a50927d425c1aa935889961ba392f5c2e892ebc015667620cf513e309b750f1717e18f1865b296a0b5f5542c4cde5b012b6b8db640bdc8b3184a832a9d6f9daafcc94e7090e921b801d90dfc1c8f94dad2c6084c7e3f18117dedfdfa573fb65f887af5766be42e621bd34752f7a1a9d524861858e3892b8bc2f6fe8e3fdc1b878f660682909922d2d3e28c1eb4e9dee02fd97a7773e5c7dd4419c58057f5f9f9f149fad4563f0f9f5f9b3cfa8fe478001008252cd9d372775a60000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (25, 'NC', 'Noncommercial', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000005024944415478dad45b3d76da401016760a77a24c876f20a5730737801b403a3a8e00398192130027c0a53bf009049d3be113002750f6535679b2bcff3f923cefcdc37991969dd1ce37df8c865ee0570644474463aa8f544572a67aa87cbe075f4822a209d18c68ee4833ba66d465c3a744538746f334a5dfd529c3b3060c679d8a561d81f8deb76038eb441887c6bde17d0ba22f0a80c695300c83a7a7a7e0f1f1df12b7dbcd74a9ef44e7f4ef57dd9b7bbafb26ba213ad13174329904711c173a1a8d84d71f0e87e07c3e179fd0f777ad0470a459e7e6e3c887aa20478ccea7d3699ea6696e2b5863b158146b2a86c4c547b688e8c252c397cb657eb95c72d78235b1b6a2239c3a41c9f8f178ecc570962370229a7242284b717822bbdd2e6f5af6fb7d3e180cbc3a411af35114e55996e56d094ec37038547142689205d64467dcb888a202a5fbfdbe91774b942f65369bfd4f89ba827bb7dbad2c3bfcd06577c2276f1bef00b4ea9a38d23682ac2339094b96a1771c86f7dbd793f7259bcd26204e105db262e101cb01309e691d019d4e1a5f7502c104e12532070c792c0f8ceef9f9b9b3c697823de2417124ae1750f70c0f3191683e9f17606323a0b8d820144fabcaffafd76bf0f6f6565c03279b3afae1e1a1a0dc02508413feb0fe6328231700bff57a6d4467419474aa3cd3ef2a4542969860b153dd1c08882ae5851136e52ebecb2443606f02da9cb2905f7b7365d1c32343b6c657d58470d5536d4da37a7d6fb54138a2faa4b06157c69b8682e41424550738ebe5819a62c30ac4c4abf10a0429ab727e2e10f9686321ae61581543707aea753f36efa29f20d84b912fc7bcf82e8f3236a2d190b08ae7b2dc85ba12c1de8b6cb0e4d5f7ac868442092ad5a6459082933bda43fbcc16e2f8c3bf414c56ab554154c8f115b12da9606d10a1a644d0878cb900a8927b718d423d2ec4822449bc7792b04f11105ae7dd12274c1d811845ccfb6aae4852b2bb38d56c5c72f9848b6e725d1a71409d05da002642cb65afb17107b8c4893a67f8520ea8e384697894ef1c4c71a27507b48d139d71405b38a1ed8026fbfdc009dd86890e4ec8d2a031116a90b058e1848c0831871cb0501be2aa02ade204d826e7ba3db718427cb98a739d1729ae4b70d82148c309b71c764586aac753d6dc9085800d4e88cae1d0473786d70f2c0ba02ac6e0a8ca5223ee735177b01a225c20acf7046c8db7d13a2639e01399525354371d4a5a50460a5cf0c02712a5b6b8495f4e80ba46a94d95f569d61d91f28b1193f21427c7a608b219c0c03d12c0ccb45e8dd9a444139657323b1b3179351688263f5d10233803eb40eba703a186d071d10c91a4d34c361196bb0c85a6264414df067d7afaf5f98093683a04dd557485bb2a78c58e3d0ac66e312bb4954d88609484692516c6d82bbea8abc69f4e27e13c95ca88cc4d341d862fc01775c9098ac6afe809ff20df3817bfd21b56222760d2c374b4adfeb2c2741d45e3318ff7cb64fdb58ca4b4d137a8b24e0506988a06259d4c88b7d13b50649bcee685a54e301d65f1d866773a31aefc5b016cce872370dc35cae02cf0f40bb3b50e8fc731b569ae82d480126bd6145a31df3370c292971d44e3b5406a203d5e8de3b38efa2058a51e8fc762225582ecbc49d09f4da4de61d0ce4fe544f13e6e9a7f84b4a9d0b6f13b9b34e742a2a09ddf0feee949ec8c0c75a64d2d9f78a70c674d9d2e02b7bf234ee99a03d79bed358013233a8c84cf7e3998241094ac57cadf8ff4f3e66b837f051800dd4b1284b44b8df00000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (26, 'ReD', 'Redeposit Modified', NULL, true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (27, 'ND', 'No Derivative Works', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000003bd4944415478daec5be191b230100dcefdc70eb003b502ec403bd00eb403ed403bd00e382b002b800ef0ab00ad802f8f89339e9784040910bc37b3a33348645f369bcdeee210b3f0a84c98cca88c98c89050b95189d877c83f6211a0f49e4a4c25af496236e6b8cb8a2fa984352a2d2363d925c57d2a69038abf4ada36115e43335e26611b4b03cc671d50fe59b6551471347fef5239505929dfe0ba64369b91c964527c8e46a34278b85eaf85244942a2282ae47ebfeb3c1f768e0595bb895977753cfb72b9cc8320c8df05c6c05894481d273936b1de6355c5d334cdeb469665f976bb552522ab93045765bdfbbe6f44711e1120b929124acd1e33723c1ef3a61186a18a35bc4d825479cff3f2388ef3b6006b188fc72a3ec1ada2fc5e3630fe180fd036149744a8abfcdc06e59fa140c2b616a7d745e5354850f2074799c3ebaaf28a3ea17429f83206db74783a2494ec0ed20394f0708320c416608b2c3945eacd3eccca3694f803ae1504a21bc0a86d28590a312fd617c6f6b602cb567547588b7ed8447cdf921520d023034600f77c4f0f38c2b3bb0d180e8764b158882e2f1e04b82c6dfd0babd58ad80e09019859cf6161ef37ef17d4840a1675806cce66b331a6d0e17028b24bba9620c82cadbe44b30ff3d7551eb8dd6ee472b9182300e3eb02a9b8f3f9ccb58201abd8706fea0b24bacc40c0b0ef0448964c6101dcab367b7f0d5d46830a37f58980a22e90f32ed03882f4098ec32f810cc887e38f804f27e0abee0151db3b9d4ec61e18e179dd0ebad653604936e66da9929b802ea2f1b00412d14cf605125dae20801b5ca334dd17e080262320d2bcc93a482633112e01c1e9a97704382c21c25d064110c8120ac2e3aa49ebc1c146e7988e67994ea7b2a448016e15783e9fe7b643921eff511ff8f8a4e8b7c84676bb9db56b1fe9334993d5af684d5818b1a126a839fbdcf298b03486fe1fdbb05eaf2b154885c5d1fd7edffbe2a8d40ac88794c7813e3748c42aced3da1619c42da4861619c0aa2629c54e31ed66ead236b92e04498abd8261d5582220255da26d364fc0292b289f928a8d920f7f50da24dd46ff10b6e5265a659549c04c34610d98750466a4858e71a57679786213f102fc8d629778edca3f9310a8262f314be8227f67b7c0bd184371c69ff77a4fb9625481086c275a4744ba3c8a6a3304c90c51e519999b474205df2bf419e08487ee0c23afccbc86cc5d7a692a63398d46e196c50a0d49a063f2a6aca18df70743f6df9d81afe324df9cf14e29fe0a8fadc7ba5f9e5e9b3075a7013f0197ff787d7e48042d39cf996cf2f3f5f9c8a457ff2fc0009a2c4cd8368e16c80000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (28, 'Inf', 'Inform Before Use', NULL, true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (29, 'CC', 'Distributed under Creative Commons', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004404944415478daec5b8b919b3010c5d700d701ee00776077e074e074e04905a403d2814ba004ec0a7007beabc07605448f810bc348bb2b217ee7eccc4eee2e42b0ff9fb40a868548e14ee1a6c6758d145c153e149eeb9f819fc1822056982abc292c3d6151ef19cd99f083c2dc23d126cceb77cd06f69ea52dc5dbd48c884692b84423e229d4fd3e03e2db98b810b2b25c1f2afca3f0a7f881300c76bb5db0d96caa7fd7eb75853af8f8f8a8f07abd06e7f3b9c2e7f369f37d881c3f143e87907a587b6391440e8743996559d917b007f6b2f40df124c42b6997499294f7fbbdf40dd8137be31d0226dc7d324144fc7ebf2f6fb75b39348011428df0c204967848c487aadb429ee7126de8cd0432ccc5713c8ad4296dc037087c42e8427cca113f84adbb80c0247297ec6e11c45b3021b1b1fbfb9288b76042dc4bf5a3289a2df10d303e81358588e2605114e5dc010262a2c3c1c9eb2309590a20443251c14efa50aba501e30fb45a70323d008e2e0d909f10a690eb3cbf76f176bb2d970a305b420ba26e7dff6da4dfd6028201c73603b2beb60fef9ba669a531baf08962495a3380e9b0613ca7d34848569a8213bea0683340bbe8743a895e8275c232b562aa299c82893a06f6894c603ab14755236c4d0b24498f65b3e2ab82ec3201bf4b99d86dbc70403c8f94bfca919d9c1f54deb58707621b3506a375ea2ec5e3f1487e27cc8faa0f3217f5621c4cf552ec818f3349166b005843a5dfd807489907e51388685085436dc383735826d5d7a977b76e6fb7ce8036ea0d7fd3d5542e5211996111b8e6fd26a99a1c67a3e6dd9e6197a0b6e429894a08176aabfe3f2800735c9eb3d124f8179f60fade379756d1e3f1d0fe5d49c57a2fcc01748039c218f016cc14dedfdf5f9b01262d7b19068c056f3ed5f372b99092d3d9bb692fcc055d7c870b780d83540285d085f0d60e95a66c92ea3f36711d114452147161d07b22a48bcfdd6c0c04e21dd4c7e912215dcd807554ddc2254283a6c240539edfe4f054418567b10efb504ca73481a85972633124e905301d17b62c6ea4c6b4af58e4ca7682c1c924e5b06eb8e25a0e4b7a16c4be7b2f0d11a898f4e3297b0513a40d119886a416a0d2f6765f70f09698d463732d31f816a9606c5a62dfb229ca4c89d2ff6df1ef3c1861a45f98cef85a3727e60a549b8d1a90bef47094d482a59882a0c3cc9e2f4e6dfaf90b3b2051fc3f222384ed2b1f926a20719df18d6df382f439776d9664dc786b4ac70801080e4a16ae0725c5e7841173c73609e15c729cf3c2ed0ecf18315e20f5694e8c37b5c3108c00e116670706bb3390491b15cd1cb0cf616a3c0b55b71c9d5bd9fcca8111880ebfad6e5745d1d7b519205ae1ddd157fbba4c7365e6f3d3fabe24aef3fc1a639eb00da6b92a47d9fb7eeca14ac81da91f09d33e61ce074436bec12366c1ccaed2465453c5a3aa9f8299df210eeb9233f32cedc310aabe1ac961ee827fd7e7b9930f988a62c27aad7fbe0cf9717f051800f651ef6054e44bf60000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (30, 'ZERO', 'No Copyright', '\x89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004704944415478daec5b8d71ea300c362c001b840dc206b0016f03d880be09e04d001bd04e001b0426081b00130426c8f39726776d706cc9719cf44777baf6dac489e44f3f96949e689602c953c9e39c4739ebe82cf92ef998ff0ebe892f44a1e48de48be4d411c7f99a4197059fe72f9a36cc71feacced0ccf16e53f9d2b62200c7a805c1cb1ce566e7959692930e08ff91573682f498d70f246f252fc8370c06623a9d663c1e8fc56834ca5845f7fb5d9ccfe78c8fc763c68fc783f37e881c7f243f9ad8f501c7c9cde7f374bfdfa775298ee36c2da9488e6f085b111e2fb95aadd2244952d78435b1365111894b2590849fcd66e9e572499b26280288f0a504a3f0d8111750e75214451434d4568236cc8561e865d77568984c2614250c6c84df98846fc2d66d88601231370c22bb3b5426fb619885a8e170c8d66a11e6aed7eba7bf2334224c826d68b15888b7b737dd256bc9ffa8769fb8dcf9c283074160745eb8c63692109010d6823e5e8efb62705614c155cfc2bd5c32f884887294ad5c0049098776bb5ded14176b70d166880e732baf0f58fa16de5609408e2153e4ed3eec9e43088d8cd435a56498dc706bf0074a14ecaa6ee0da222136b3196b3a348548e5f92b535c87f0fbb4ab100a4c450b772360b69af5827239cbc9432979fa66b3b1f217589b6b8ad4fac1de15ecb8c27351c30dc39a0df9941d3af1be38149962bb2d6a0ae61ebc0cef949d1126551770b5bd5c2ed9e1cc00d327c633b8a4f131b37edeb87822097f76ae8f1c5f47288b95e9e5e5c5e933a8cfcd695c69ffdcc407c4853fd5f6cbcc254d3488fa55ad2a8dd62a0b9a3a521542d7ebf573ad3d0832f4d57916439661bf8001e5855dc2ff703888d3e9f474ddebebabf148cc35038d2ce3bec54d4e4865fbd87928caa6ce60a900d16fa3a5845dbedd6ecabffb26ef0a80fdaa765f86b7c651d709056cb7dba76e0fba472a87f8ed1480dd8702544a716df79d5400a05fde7d145851d06c8bfa2e332e53e852556d55886802793a8a5d1c3a2827416aadc15450b129cc569d088180ab0b04706d188eaf6af7cb3d83bacfd2c872870294ff45e3834ba614b6ec0f54610fc2ab72049b67101470ece743054f8434959b7353bb3ac8f7ab4e8126c5db748e346b9eb5f540d70511cabaa6260ad737a19741a90bee5d94c3a98eb08a502e33dddb5449cc6b515455dca408cf2d8a1a4ae31b52599c5b18fdaa65f19fd61889bf7d6bcc50a09dff36476ddae35c53f88aed71ed800416e6ce08f81e9080b90a8b59a11f3b22f33b2465630a0512b8e6d0d4aca001f6a4d9207654102d4e897eccf30966150bcb41c9c21f18e78411737d0f4d1ab23cbff3c285f3f28106440602e4db99182f52d6261401c119297663df0c449c388e135e9d616adc8b35987904cbe67b168a40746035f551012a3e9901237c96c31d4263f993195d69acaaef22f9af8f72fa4474eba3a924cf5dbcd2c0942b78e24d9d30e78242d1cef7833bd1b14f6927baa28a43a8774e7095692c1da3629f1f639d43bde7411953f13e86839f43513192f3b18c2fde3f9f3fe7bf9f9a7cc1ff020c00b8b38128c9ee68580000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (31, 'GPLv3', 'GNU General Public License, version 3.0', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000004e54944415448c77dd5d96fd4e715c6f1cffc663cf6d8c62bdb00b62103b6716d106002c62d04255237acd2566aa4a4adaaaa7f01bd6f2e2ab554b9897a59a98bbaa4a9aa4895825a2ab2101a08e0408bcd6a8cc0061b30d878b03d335edf5ec47128697bee5ee93ccf7b2ecef93e319fad948c1d766b55af0c53065d74da3937e49f6e8e3df54edae280176c2ca95a96ac88a550900d9333f971fdde76448f99ff6dd0e045df4936ae4feeb04ba3554a91735f9fb33e726b66a6cfeffcc9c07f995b64bbd763d94c38144e848761213c59f3e16138110e854c8865fdd176d167e5fbbc9b9a3b108e85a9104208e3e166980e21845008f7c26c082184c9702c7485d49c77edfbc422be68b0cd4fcaf67e3b7e48ad01b7dcf077d76d95c4a85f199675cd800acf125dab9fdda0c7dd4f0d1abc92facacbf1970cba6741d68831ad9a4448b8e5b23c4a64ddd72219f5d5cf56f948f66383623f88beffa5d4cbee6ab6d99871092d3a9480847a299139799b640c5a2b1fdda80fe3bacdc7b1c38f36d6fdd0a45669c7957ad656eb8cba8f94bcac5a2d9a95f8a7159adcd2e272f168da194309a5ba8a377d5ddab08dde93b65791111f98526456ad017129e53ab549e8f6452b257ccdcf374d77b918d9e8f90dc903a6a4e58c6b5364c43155ba1cd4e18cb7e475a8f08e7119a5ee5b6ece01cf243d6f5364672cb3539359c50a22298f9d50a3d5843beea8d065c40519291f9a9534a3d88c26ed6219ed091da9aa5d6a149b9211f30f13c6f03783266c96f5c88c537a341bf15793b67a28526d9737ab721d91b665c94609351e48f902a62da8b5c6944885981171b3e28262cbecb4ca5d958a34aa48da12a9abb20a0d726eaab75ba443a7325f96f607539ed3ac47c16e9126ad068d6a14b35a257509e5a54a516dab0f4d7bac588b22cbcd98d4eff3f61b326f5cad3addeeb96a9b954829a53c211613434cab22175cf1821279efd9e0255b3ca34a95ef7acb294dceb8e29b368bf0b12e21972fcf2f9e458b6a8fad5570ce80061b3478c7512dda5df0a62679ab6416f73f2f4f2e61687ce5c8e245cdeb35eb9ae386bc68a531311fe8356ebd2e77641db47671c17920cb50c2a5c76dfd89fd62c8b9ec913b7698b14ea54bc61cb05ed6468d6af46b5e9207fdb2732ec5a5e73b57a69e5382b80ddae4b47b24618d65ae88f9aa6675fa1cb5c7ba25843df66bdde3e1b791b30b37bb5d5fbcbbb4b4245af51853a6dd4dbd265cd5a7a0ec0902f63b6be196eec835ef5f9f3ba2b044d56a431a553969da1abb5df5be1b46d4492fc90b8eb83ee7b8ab7133a6e7f68dd6ec54b748d9b80b1ad4396dcc6aab4dbbeca14a1dd62f1974fb99e19b5ed517c703d5a3edb9a27655609951d7345af08631ad92068df886e625920efaa9e3b9f04b6f988d63d670681cd81462db9522b2ca0391352eeab55acca0727b942eca47bde6f55078dbabee7ec2c45143d36d97d2d3b1269548aa57adcc8471a79d7756a7560970db6b7e11b2e7bce2fc93541e325c68ea4d0fc7d659212e2e6e415cb911ff92b4dc7a95669c77d8ef43f6bc1f7bd7c27f2643c27e47e3b96de170e809938b81321d2e87a3a127dc0e63a1271c0edb4222efa8fd8be33c156d9166dff3adf2bacdd11ebb64ac508c8231fd4e3be5cac2e46d7ff61b573efdfde9702db7c7417be375e5e53551ad32e48c1a5b98989cbfed84bf3865f2ffa533546bd3a9d3e7ac5682827b2e39e9a45e8f9e6efe379cddf27e00b2b0830000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (32, 'GPLv2', 'GNU General Public License, version 2.0', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000003fc4944415448c795955b6c936518c77f5ffbf1ad5f5b4ab7216c7127d846066c333bb1c112173c5c6036b30b41259198188877265c301363d44412d42c9a70a131124d8c12e38d0968c8300b07290293c8d898e28cb08aa056a05bd76e6bfbfdbdd8a97420f37ff5bec9f3ffbfcff3bccfc160216cca69a0856a4af001e38c30c0f7fcc0af24b28d8dacbb452ded3c468527b8d40a1836304154b1a9c46d86f996c3f433756f81529ee6396b4d99d540336b58891788f32797394b1f57a6a62ef3295f70f52e7ee3a29ecf8d68b976eb84224a2b1369457442bb552e23ca41ea712da4b7d16ba7dad5a398ee85987ad42e3b452f6dd912f5f4fa523b352447ff054743da295f8a5eeaef8cfda09ddaa5b01683b076c94e7190d2597a0e5dae68bb86164597a42175c815e56572a605363050a1a392d29ad0c47d8298c651558801368089978e9cca4e9af9895e463058c5a3acc6e11c3f22c060394d94f2373d8c524f236e36d2c9fecac90e06a09650954eeaa41e91572eb9e4d3365dd6a45e915fb63cf22857cfe8aace6b9d7c7a559392a4ef5425423ce4a2c9286f229ffd1c23cd2a0a18e710874892244e9a62f2b8cd371cc76182384904c05a9a30ca6974b1d10eb630cc310c9ee233dea3854a441a8002dee16d0a89f133498c8cc20dd28c1d64a3494dc05acd056e91cfb3345343094b28c102600945801fcdbd3c5f796b0858f15a93e220b9fc41927ccab8ce216240218f03708b8f8810268722ccace22d6019378a4dfc5e3c248125588cf016bf63d04c13060637f91007833a5a21cb071b2ff84d0c03132f0609e2f8584b8a3053081036d5047990add47261a67d67f3307d3289c7fd694ab08870894edee563bae75e59c1ebd4e263d95cef4c328a05e490200171936bb757dca48142aef03e13388448ce0998145294313c1c8e700d03832dac6414ae990c8ed6fc626e650b0738493f0e637858871f0787344e46d40e70894b002ca792688a4193d38927cee46de32552f410c5621d1dbc401eb994513cf39dd3d3ae684ece8d451f89514e1b34f2416dc3011af98b8bdcc0a2942a0238fc46180feb593a431a63706ea6bab9ce5e2e9ee745584ab79d7c4d894537b3244dea0dd949baa7d5db18ae56e87f0984542d86699bf6c7cb9beef1edbab268fa556d977b9cbd7867f353c5e180b3479145d123daa380c3d754656e8736ce059d2e8ddc973ea22e051dced176e74e31e9a02fe0ecd0d9998171f7d49dd50e051cfa7872416f61b29923ee789df6a9ff2ebb21a67eed539dcc0447d83c4fcf74c34515cfb3cd5fbcd6b58966ca79801c609208c39c21c490130bf3259f30345fa0d9cbd5cf263a79d85decf7e7b9f2f10171fee1a633164b8739c15784886512b2050072a9a19556d653800798e006839ce21417b9956dfc2f6ec53a03c4e284690000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (33, 'BSD', 'BSD', '\x89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af400000006624b4744000000000000f943bb7f000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000008c34944415458c3ad976b6c54651ac77f67ce9999ceadf442e96d5aa8564a0b95562a140a5b16f012244182bb62a29b266b4cc06c4282f1839744dd88624cc028f10388ae06814d40651502ac5c1a2d852d5b7a675aea3230b45c5a3a6da7a773aeef7ee8880501d1f84fce87c9799ff7ffbccf7f9ee7fc5f89bb4312300528036603d3817c2090783f04848136e024703af15bfba58da55f78ef4a902d0596005325494a73b95c2eb7dbed703a9d00188681a669b6aeeb9a10e21ad0091c02f601ed80f15b12c803fe043c0314a7a5a5b90b0b0b99397326454545e4e6e6e2f7fb0188c56244221142a1104d4d4d747575118d46e309f24f81dd40e42eab8d049403db81684a4a8a78ecb1c7c4b66ddb447b7bbb181c1c149665899b619aa68846a3a2b5b5556cd9b2453cfae8a32239395900d7807f00f7df45c57100d5c0b7b22c9ba5a5a5e2830f3e10172e5c10b66d8bbb856559221c0e8b4d9b3689929212e170380ce0205095e0b82d2a8023b22c9b8b172f16070f1e149aa6dd35f1cd88c7e362dfbe7da2baba5a381c0e339144d9edc80b807fcab26c2e59b244343434fcaa53df0eb66d8bfafa7ab170e14221cbb2999036ff66f224e06560a8bcbc5c1c3e7cf877211f2fc9810307446969a900a2c08b807b7c02f3808ef4f474b175eb56a11b86d08787457f73b3e8adad15d1ce4e61e9fa0d9b6ad1a818ecea12b1484458e364b24d538c5ebd2a62918888f7f509db34c7d66b9af8f0c30f456a6aaa005a80070164c00f3ce77038962e5bb64c5ebb762d6e4da3f5fdf7697ceb2dce7efe39bdb5b5b8fc7e92efbb0f87a230d0d141d33befd0b67933170f1d428b46094c9e8ce2f5d273f428a713713d478ea00d0ce0cdcec6939a4a4e4e0e6d6d6d8442a114a00f382127dae36f99999979eb5e78818ab232ba3efb8cc6b7dfc6d675dca9a944cf9c61a0ad8d8c59b370280aa75e7f9dce4f3f451f1e66f8dc397a8f1dc39391417261218d6fbec9b92fbfc4181961b0bb9bc8a143a8910869a5a5a4e7e763db36b5b5b5b2aaaa2ee0b80cac0056cc9933c7bb7af56a92749da677dfc588c598bd7e3d25ab57234912178f1c21909f8fa569b46ddeccc4b23266bdfa2a5955554892c4c4f2723c93267166eb567cc120951b3690f7f0c318b118170e1c0020abb2125f6a2ac78f1f271c0ebb81330a50a528ca848a071f243b3b9b584707b17098896565041f7984a4f474262f5bc6d99d3b19eaee0649c25455a6ac58c1bdab56212c8bc2279f44f1f918b978115bd7f1e7e793fd873fe00c04489f3993132fbec80f7bf6107ce82172abaa78e08107f8eebbef522ccb9ae70066783c1ea5a4b818b7cb85353a8a6518b8d2d2509292003055156159385c2e1c4e274208b4fe7e2c4d439265dce9e9c889b54863c34ed83600130a0b995a53831d8fd373f4282e59a6b8a404b7dbad00331420cfebf59293939398850e2460b8bb9bf0d75f234912ddbb7661eb3aa9d3a7935a5282272383b33b76907ccf3d4c59b10267e29b70ebc12e91316b16818202fa9b9ab0464608e6e6e2f57a255555f315c0e776bbf1f97c37c4f57eff3dfd2d2d0821d0a351148f07637898d4e2620a57ada279e3464ebefc32c3e130453535f882c1dbe6e09a30015f5e1e433ffc80118be1f7fb71bbdd007e05902449424a940e21c626535a1a29d3a681c381adeb0c767612dab68d8cd9b32979fe792459a6e3a38f38bd610303eded94bff4d275c97e56048703d9ed469826c2b2aecb04480aa06a9a96acaaeaf5000164575753f1da6b285e2fb661d0bd6b17cd1b377261ff7e32e7cca174ed5a528a8b69d9b489735f7d859294c4b4679f1dbff975589a8676ed1a8acf879c9484aaaa188601a03a801e5555b974e9d20d41ce40007f5e1efefc7c92efbd9729cb97e30b06897674a00f0de10c042858b992aaf7de236bde3c22df7e4b7f53d34f951c87d8850b0c9d3d4b7241018adf4f6f4f0f8903471c40dbe8e8a8150a85304cf386409190034076bb915d2e6cc3c0d67510024992482f2b23b3aa0a5355517b7a7e8a492462c5e39cdfb78f787f3f59f3e661c932674221e2f1b809b42b409d61188b1b1a1a52ae5cb982fbc736b22c6c5d1f7b4c93aba74ea1f6f6e20b06e9deb50bcfa449e42c5a84158f136d6f4752149cc9c9489284adeb98b118b6ae73fe9b6f087dfc3169a5a5e42e5ac4e5ab57f9efa95398a63904d429c071e07c737373cae9a62666a7a7230941dfa95334ae5f8fc3e5c254557a8f1dc3d234264c9dcad91d3b180e87c9acac0449a2f7d831d267ce24b5a40480bec6464ebef20ae6c80897ebea507c3ea6af59837fca14febd772fadadad00e780130a63beadb6b7b777fa9eddbbe569cf3c833310e0eae9d30c7474dcf09fb8efa9a728aaa9c1150810fae41322870f836d13282860fa9a35a4cd9881272b8b685717ffdbb307d9e36162793925cf3d47fed2a5f40f0cb07bf76e2e5fbe6c02478090c4984f5b046cc9c9c92978e78d3798e570303096251220290a29c5c504972cc1170c620c0fd3d7d8487f5313b6ae935e5e4ed6dcb9488ac2e5fa7a063b3b9180a48c0cd2eebf1f7f5e1e36b063c70ed6ad5bc7952b57ce027f056a7f3ca00fd800a80b162c1027ebeb85a969d71f4bd384b88541b12d4bd8b730a8c2b67fb6beaeae4e5456560a6004f83be0bdb95b4a80fd4ea7d37ee28927c49950e87773446d6d6d62f9f2e54251141bd80b14dd7260017f041a5c2e97bd72e54a71e2c40961261ccd6f816118a2aeae4e3cfef8e3c2e974da403d309f3bd87305580e34389d4e7bfefcf962e7ce9da2bfbfff5793f7f5f589eddbb78bb973e78e275f9ae0b823146021b01f50b3b3b3454d4d8dd8bb77af387ffefc1d6d7a3c1e17e170587cf1c517e2e9a79f169999993f6afe2f60016316f06765bf151c099dfe02fc5996e5c9d9d9d97269692915151514151591959585cfe7430881aaaaf4f4f4100a85686868a0a5a5854b972e99b66d9f0376019f31765f14779bc0f8ee989390a51ac8773a9d018fc7a378bd5edc6ef7d8e75ad7191919617474d44c4cb8307014f80af80fa0de8ee017ef6a094c4874492563167e3a9093489044992f02adc0f709bdcf30766dbf23fe0f708f107b7e1ffe120000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (34, 'MIT', 'The MIT License', '\x89504e470d0a1a0a0000000d4948445200000020000000200804000000d973b27f00000002624b47440000aa8d2332000000097048597300000dd700000dd70142289b78000000097670416700000020000000200087fa9c9d000003c64944415448c78d954b4c547714c67ff7313338033e50288332764420bcaa54a882582498b4b18d34e96bd336eebaedaa9b2ebbeaca2e9a74d1b44935b4606a1b6da2a98dad8b1651d0d80a54c40a835625508b3c8619e672bf2e18601844f856ff7f72beef7fce3de77cd76039327896ddbc403921b2807122f47085eb4488a7071b69772fe51ce610c546b6d7eb333d4082b83b13d7236ef13367e925b1b240016ff22ea5d9be9deca284ad640293dca38f3fe8672c462fc739c5bd27e48d41152d8c6dd42bfa4abd7aac59cdc3d198baf5855ed67af188af796e59e6983470c1722af599eecad59330ab883e5599cc04e7d98fb954a09a5f2da749e715d7d310d35935c87438cfee547a98939673485d2bbc9d0a571d3a28cba185d062db3e62bc4abfa454fd34ccea27558a313ec4372750c75f9bf5a5126ba24bd28c3ed72671831ab0c9a4d92c6ce200bdccb09e301e66b9cb2826213631c41821e23c48a9d8623f0d9c2ed6117aa09ace3c7da78bdaa7b08e6850d288de5758656ad5a43e50a5bed731ed54583b54a81d0aab426dfa4639e212bb4cf6122ea79a69220c70950830c2550618601c976106984c4edc287ff3180303931acaa0901a93fdf6861af27031b099e036628861ec94465bbc4d1bdff22a3e8e7292e33492cff3581ba9b3a9586797e2034cf298a68f1803c4d8c67f2955070932432e0605ec014094e2b3a31526057ef2175621877e46e9c34b51faa8e122402839f95bf11b844c023e02c9902d6ce32e77b84d2e5b93812b23131f649a1846723344163b19a5930861b2571530000c93689c6852c04b11312e3042117e56439404444dee4779b8a0598887df48508c7715ba784014ee99f44ccff62d98cc367298248b10c62a25c4b949cca1d7a43d31d1c50806426c613b104c7e422d7b7511c35cc319a7dde412437f721d8b0c3c0428c14f21d958f8b0012f1958c9023d0b67b846370c72d96282c2a93d5eb391626a292687325ea2183fa5d492472655d4b11930f053493d4160946374386ae51418347127a83639493b993795f9dba2c9cc9f133aa15cd1cf8b73d904f88468bdaeacd10d5cb56b9f98e2e3c55e9771cee3bea19b6b12e851b36c973394a40e55235d5ef7755d96f3547242ed7a4d1e970eea975abb4d335d1eb75eadfa7745faa85a543b473f8c9d3e193607394734a8a33aa3a1347b8f29a21ff48e9e1153fcc881856e2e49c3a484f778cbda1eb42aa9a6843c028828f7e9a38b1b3c74dc41da38c1adc5994aff4505d84b330d843c59eb6c3f3ec40c534c3bce38112e729acee4eead2000b08132f6514739f9048029fea19bdfe9e026e3e9c1ff030b55eb0b90e9adfb0000002574455874646174653a63726561746500323031302d30312d31395432313a33353a34372d30373a3030be1641b70000002574455874646174653a6d6f6469667900323031302d30312d31395432313a33353a34372d30373a3030cf4bf90b0000001974455874536f667477617265007777772e696e6b73636170652e6f72679bee3c1a0000000049454e44ae426082', true); + INSERT INTO public.license_label (label_id, label, title, icon, is_extended) VALUES (35, 'OSI', 'The Open Source Initiative ', '\x89504e470d0a1a0a0000000d4948445200000028000000240806000000fb3c781600000424694343504943432050726f66696c65000038118555df6fdb54143e896f52a4163f205847878ac5af55535bb91b1aadc6064993a5ed4a16a5e9d82a24e43a3789a91b07dbe9b6aa4f7b813706fc0140d9030f483c210d06627bd9f6c0b44953872aaa49487be8c40f2126ed0555e1bb76622753c45cf5facb39df39e73be75edb443d5f69b59a19558896abae9dcf249593a716949e4d8ad2b3d44b03d4abe94e2d91cbcd122ec115f7ceebe11d8a08cbed91eefe4ef623bf7a8bdcd189224fc06e151d7d19f80c51ccd46bb64b14bf07fbf869b706dcf31cf0d3360402ab02977d9c1278d1c7273d4e213f098ed02aeb15ad08bc063cbcd8662fb7615f0318c893e1556e1bba226691b3ad926172cfe12f8f71b731ff0f2e9b75f4ec5d8358fb9ca5b963b80f89de2bf654be893fd7b5f41cf04bb05fafb949617f05f88ffad27c02781f51f4a9927d74dee7475f5fad14de06de057bd170a70b4dfb6a75317b1c18b1d1f525eb98c82338d7756712b3a41780ef56f8b4d863e891a8c85369e061e0c14a7daa995f9a7156e684ddcbb35a99cc02238f64bfa7cde48007803fb4adbca805cdd23a3733a216f24b576b6eaea941daae9a59510bfd32993b5e8fc8296dbb95c2941fcb0eba76a119cb164ac6d1e9267fad667a6711dad805bb9e17da909fddd2ec74061879d83fbc3a2fe6061cdb5dd45262b6a3c047e84444234e162d62d5a94a3ba4509e3294c4bd46363c2532c88485c3cb6131224fd2126cdd79398fe3c7848cb217bd2da251a53bc7af70bfc9b1583f53d901fc1f62b3ec301b6713a4b037d89bec084bc13ac10e050a726d3a152ad37d28f5f3bc4f7554163a4e50f2fc407d288851ced9ef1afacd8ffe869ab04b2bf4234fd031345bed13200713687537d23ea76b6b3fec0e3cca06bbf8ceedbe6b6b74fc71f38ddd8b6dc736b06ec6b6c2f8d8afb12dfc6d52023b607a8a96a1caf076c20978231d3d5c01d3250deb6fe059d0da52dab1a3a5eaf981d02326c13fc83eccd2b9e1d0aafea2fea96ea85fa817d4df3b6a84193ba6247d2a7d2bfd287d277d2ffd4c8a7459ba22fd245d95be912e0539bbefbd9f25d87baf5f6113dd8a5d68d56b9f3527534eca7be417e594fcbcfcb23c1bb014b95f1e93a7e4bdf0ec09f6cd0cfd1dbd18740ab36a4db57b2df10418340f25069d06d7c654c584ab741659db9f93a65236c8c6d8f423a7765c9ce5968a783a9e8a274889ef8b4fc4c7e23302b79ebcf85ef826b0a603f5fe9313303a3ae06d2c4c25c833e29d3a715645f40a749bd0cd5d7e06df0ea249ab76d636ca1557d9afaaaf29097ccab8325dd5478715cd3415cfe5283677b8bdc28ba324be83228ee841defbbe4576dd0c6dee5b4487ffc23beb56685ba8137ded10f5bf1ada86f04e7ce633a28b07f5babde2e7a348e40691533ab0dffb1de94be2dd74b7d17880f755cf27443b1f371affae371a3b5f22ff16d165f33f590071786c1b2b13000000097048597300000b1300000b1301009a9c18000009ae494441545809bd586b6c14d715be33b3b3e3b5bd7eadbd181b5c1b080e71e40670c02950d92502d407aa9ada4514aaa4519b1f55faab9192082946156afab351aa4a11ea9f2a4de36daba0264da9a80c22d084d8450d260a8ff0f6738d5fbb5eefceeeccf4fbeeceac97e00527917ae19b7be7de73cffdceb9e79eb96bc5711cf1658b82021d8ae8025822824aa1facb2bf749855fe021497509b5a3a543018f0c09e5ab5184a2741eecf41d3f7fdc717a1d2b7fec73b569e4e7053ca5810e89e5e662d12220e4c27fc7584f8fca39f97d4b6dcb45966a91f45a4787e6f4f5d163f091b2b676cbcadd465d608b1ed49b145d2dc3263b76ca9a4e4f9b9793c38913e31f0cff0d646e4af94ec5e7f4496f2f75c9ac1796222dc9f540fe25c7467b79fd8ea603256b82fb8b9b8241bdc210aa5f25e3ac2adb11b6690973322512576627e29762af8df45dff3588ce2adddd9ad3dbbbe42d5f9207f3c95534847684b6d71eaedc58b3d257ee27215bee33482d1410055fa182b12354732229a63f8c0e8ebd71e3c939676e40e95640726971b93482aed5a1967077a863f99b559bc242f1a9a695b27c20471a8b165076609c0defdab669ebb74f8dce8ebd33b43b36327542e9ecc476674365d1c96ee77d4fb1e2c64d5959d9b6dabd8daf576d0639454959c98c819a5e5ad0ef39d1ed42450f6a56d2d234434b556fad2d83df2298b70ddb7dc1d3bda0e0eed63d0942114f5e067569e39ee6572b37857d60675aa6652824464292144f33daf0965cc2f6bc9a654a5978db500dcd0c3d16ae494fa57e03b95d3c30d0ad628dec3c39f9ce0723a570e9ea9263cbdaeb7f52fe48a8155b65d9694bcf9193a3c8379a6aa97ecdd6fcaa2a616856962c5893232b781bdbec53033e51de5ab533f46038abbca3e39e1c0a7ad0f59e853ab0faa987f617d5160bc7b26daca72d58849535d58607b4d45042a4a2f3297ac4a82dd68d9a22f082472d9bc73bfb1ff18ab9667163d01f7ca4f249b4238c43ce29e4c5820485ebbd606570a33f1c58af68d826d3c1138b713bf92039d352a7ce44a33303d15fce9c1d3be1085dab6a0f7fabbcadfaf98af5d52542556d6183a44357222433b6c69454b4bc780b88ad05b18bb94f24d57ea6142498f5bf10a55fad6c2b0a0738cd42a069f25030e0106fd83575fabf9373970f0f3e81854ee6e93e5bac145fd47ea1bd59d65a85230c59261eda062f3262fd5545e535adb5ad9873518061a1b2e8fec33225d21b9181abe10ba1216ea03417c8e4a7fa14c74a6498885f27397e77792adbdada742e967012bd89ebf1bf3ba62d655db7b3825d8aed2bd5855e6d3452b6303d5a759fa2f89420b737bbadae30768a092e339711e9447a90bdb1e198c253d9dfdf9f6e7b264bd28aa73f468a9107449ef285b51c555785aa6b4176455a5aa88e317057b92f41613929e78eaf0474d00b7029729bd0746d25b5ce18335217170ad60565942a86af9ef1060fd36d0b85f65a0ece8f95f23a2123e778ef5ebd2841297cb047aacc2432b7ec942d905a724bb0c5057c415d041a4af780d38a4baf5c4af11306c54adf4bf2646e08d405bead16e1e263c913e2ad09c242b5126961cd646eb1b3ebfcf99cee9c90db5894a01c7327256f24ce9a9349462092b4b7d168d8b606b7d838a92b1bbbd6feb5b67d45bbfcbec2b3cb36d7ed6cdab7ee4f65ada12066f070611d5a05cd3c5c082d5c24cca933e3e7b85604ff0a95c204dd495317a3675263f3d7a840d5142ee6ea42e24d5baa5e699835dbeb1ff52f2b7a550e28a238f095e0e19aceba07b4129fc9b422c9491fc1751a8206de37a3f3ff498b6cfcba377057ef9d55618211014b116a8e3331f7e9ec9ff179e217231b29f91b623b9a359f1156c27a9baa21308793fb2eee847c4100a293f2a8691b74a8c9d184885d988d4036dd8d8b084719bba8ef2a050962b2233ab35f8de163d77f3bf3d164148745477a497b5e445ce2880a6deeca6c7cf8d8b55e4ffbe491d137e6aec5b89d3eac8ceb18c9c17b7ecdb4e1d1d9739383e3ef0fbd42f94824bbbd723d4f415e5d902065e4c79cd722c7b936f541f4f9d827d3f4808e85335c1029c8611a498e248ee3fd637a9cf3e2227e3a3592e817199903f929642e4c63c83f3d3021a64e450f34ffb83910ee6caac59805d0cf8b967b1294338e1f97b7dfdbe7467f7ffbe4d8216c37f21796d355a6082d85ed8a5f88fd45cab66df4c91bb3e3a4e6afc68ff0460dca0a3d47c3660727c5e4e9f167a6ae4e1c890f259fd574d15cf778d3aeba9dabbe5ebf63d56e6f9bbd9a3aef4b90d66182941b3d79e3c0f8d1a117a6faa342641c038b2a891bf15b20ffae24b86ac016d188f4e2c87b37df4a5c8fc561886627337e5c565313476f3d1d1d187e8db2f83cdf542d27a6aace06e4843d8e626faadedd5c2af5f4c8a895cd82df6239ea3ec091bf43e48d63f4f4cd974b2b2a3e34bf933a54dc50bad91c9dff07c6c7948318c735deb31e7d838dddcdefcd7e34b96bee72ec9f43912b2f9a8e39e0e9f5f932a72d474f238e7b612c6e14191fb282348ebf7b3c3919bc50c6777a8984595390b54cbc79e3bae811ee511646685df847b59d0d2d729c3f45b373384fcad46d6dd85ab5baea071cff8c8cfca9e1f5e7d7ee9a72be9c231faec27cc1fc362779ef68dfa5dc23e4c92c567b862d36e6f5e5ebf674a2ce79a404ed2d003fe0f4e0726055dee4b5787f98ef28654699b1a6a4b184a7307f175a30b6ce9531f40a7d7d757335f5d1ab86dbcfbb1b77ca00ca008ef3da1570c71f443becb66522c64953cad1c9df09f5c005803794fd00929938059c019e06c8ee04d00e5096e32f43d9fbd0f153b4b9a8095c06360235c03830035c825c1fe47e86f66d6083dbcf8341c2978029600dc0bf52bc05f9b3b48ce53180823b002eb01720913dc07ae057c03c700bd80790dcb3c0bf801f022c0f03f4c83b0089166181e75053df37012fd7d1630f0057011a1e73e5f8257a02f804603c7f0390ccbd3a0141a694043a483c8ad769bcf3cf1cb4e853e018f06f80060c03d78087009643000d7d0a6800fa01167a8f84653e75db49d4f432c9d3709609806dd67f0466816cc08304e3ed77400ae06492f92e701db801d0aa4e6004380774002f00edc03618f273e8f83eda9c4fef309ee9856980db3c003c0a44811500f58e02278117818b00c9519673e8eda3d07b0575ee90ac449bd6739bf6017f003601a5104425760124510990841f0801abdd717aad0b206154d28b7b50cb83867a1df035601940877807612dda7b01ae4f9ddf03b6033af5c89401eb594bad18e0a1617c35a0eb39f79d79692179b233af40fe0b8d2f611e7f5cb849341b77f2ef7a58bb09687539331e1580278d605be645b74d7268e6123bb796329c47796f9cfd04fba5cebc79520efdde3ab9bc2b3d88815c8155396fe6b77302ffe7c6ff00610e5ffd6a8201470000000049454e44ae426082', true); + + + -- + -- Data for Name: license_label_extended_mapping; Type: TABLE DATA; Schema: public; Owner: dspace + -- + + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991138, 1, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991139, 1, 31); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991140, 2, 32); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991141, 2, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991142, 3, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991143, 3, 34); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991144, 4, 35); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991145, 4, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991146, 5, 35); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991147, 5, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991148, 6, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991149, 6, 25); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991150, 6, 27); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991151, 6, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991152, 6, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991153, 7, 33); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991154, 7, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991155, 7, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991156, 8, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991157, 8, 33); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991158, 8, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991159, 9, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991160, 9, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991161, 9, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991162, 9, 25); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991163, 10, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991164, 10, 25); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991165, 10, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991166, 10, 24); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991167, 10, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991168, 11, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991169, 11, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991170, 11, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991171, 11, 27); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991172, 12, 24); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991173, 12, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991174, 12, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991175, 12, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991176, 13, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991177, 13, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991178, 13, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991179, 14, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991180, 14, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991181, 14, 30); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991204, 22, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991206, 24, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991207, 25, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991208, 26, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991209, 27, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991210, 28, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991211, 29, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991212, 30, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991213, 31, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991214, 32, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991215, 33, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991216, 33, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991217, 34, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991218, 35, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991219, 36, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991220, 37, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991221, 37, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991222, 37, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991223, 38, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991224, 38, 24); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991225, 38, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991226, 38, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991227, 39, 27); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991228, 39, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991229, 39, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991230, 39, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991231, 40, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991232, 40, 25); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991233, 40, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991234, 40, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991235, 41, 25); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991236, 41, 29); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991237, 41, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991238, 41, 24); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991239, 41, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991240, 42, 20); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991241, 42, 27); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991242, 42, 25); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991243, 42, 23); + INSERT INTO public.license_label_extended_mapping (mapping_id, license_id, label_id) VALUES (991244, 42, 29); + + + -- + -- Name: license_definition_license_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace + -- + + PERFORM pg_catalog.setval('public.license_definition_license_id_seq', 85, true); + + + -- + -- Name: license_label_extended_mapping_mapping_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace + -- + + PERFORM pg_catalog.setval('public.license_label_extended_mapping_mapping_id_seq', 991244, true); + + + -- + -- Name: license_label_label_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dspace + -- + + PERFORM pg_catalog.setval('public.license_label_label_id_seq', 35, true); + + END IF; -- End of license_label_extended_mapping check + END IF; -- End of license_label check + END IF; -- End of license_definition check +END $$; \ No newline at end of file From bc75418f1d4f241b444c785a8974db274e6800cd Mon Sep 17 00:00:00 2001 From: Paurikova2 <107862249+Paurikova2@users.noreply.github.com> Date: Fri, 15 Nov 2024 12:27:33 +0100 Subject: [PATCH 4/8] Oai elg crosswalk (#798) * problem with language code * fix amount and sizeUnitOther rest-tests errors * added language coding * new language and funding project mishmash array position * added isoCodes --- .../crosswalks/oai/metadataFormats/elg.xsl | 205 +++++++++++++++++- 1 file changed, 196 insertions(+), 9 deletions(-) diff --git a/dspace/config/crosswalks/oai/metadataFormats/elg.xsl b/dspace/config/crosswalks/oai/metadataFormats/elg.xsl index b822d6e2fad5..33b91afa1ca0 100644 --- a/dspace/config/crosswalks/oai/metadataFormats/elg.xsl +++ b/dspace/config/crosswalks/oai/metadataFormats/elg.xsl @@ -193,13 +193,13 @@ - + - + @@ -216,16 +216,16 @@ - http://w3id.org/meta-share/meta-share/other + http://w3id.org/meta-share/meta-share/other - + Organization - + @@ -381,11 +381,198 @@ elg.xml:62: element typeOfVideoContent: Schemas validity error : Element '{http: + + + en + cs + lt + ur + se + ko + ug + vi + be + tr + sa + sk + uk + ru + ar + fa + de + it + hi + so + el + pl + pt + fr + af + bg + ca + cu + cy + da + et + eu + fo + fa + fi + ga + he + hr + hu + hy + id + is + it + ja + la + lv + mr + mt + nl + nn + nb + ro + sl + sr + ta + te + wo + zh + no + gv + gd + sv + gl + kk + am + br + th + bn + gu + kn + ml + mk + ne + sq + sw + jv + tt + fy + es + sh + tl + pa + ab + ak + an + as + av + ay + az + ba + bm + bi + bo + ch + ce + cv + kw + cr + dv + dz + ep + ee + fj + ff + ht + ha + hz + ho + ig + iu + ie + ia + ik + kl + ks + ka + kr + km + ki + ky + kv + kg + ku + lo + ln + lb + lg + mh + mg + mn + mi + ms + my + na + nv + ng + ny + oc + or + om + os + pi + ps + qu + rm + rn + sg + si + sm + sn + sd + st + sc + ss + su + ty + tg + ti + to + tn + ts + tk + tw + uz + ve + vo + wa + xh + yi + yo + za + zu + bs + co + eo + gn + zu + io + li + mn + bs + rw + + + - + - + @@ -607,7 +794,7 @@ elg.xml:62: element typeOfVideoContent: Schemas validity error : Element '{http: test="doc:metadata/doc:element[@name='local']/doc:element[@name='size']/doc:element[@name='info']/doc:element/doc:field[@name='value']"> - + @@ -616,7 +803,7 @@ elg.xml:62: element typeOfVideoContent: Schemas validity error : Element '{http: - + From dad2ea26a3ff96930b16344f4d05ebb72e378935 Mon Sep 17 00:00:00 2001 From: Paurikova2 <107862249+Paurikova2@users.noreply.github.com> Date: Fri, 15 Nov 2024 12:31:57 +0100 Subject: [PATCH 5/8] removed handle from item submission (#812) --- dspace/config/item-submission.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/dspace/config/item-submission.xml b/dspace/config/item-submission.xml index cd6d3b66f346..5726135a99a0 100644 --- a/dspace/config/item-submission.xml +++ b/dspace/config/item-submission.xml @@ -19,7 +19,6 @@ - true - twobox + autocomplete Enter appropriate subject keywords or phrases. srsc diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/SubmissionFormConverter.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/SubmissionFormConverter.java index 855a80c4a3af..8021e4e0d771 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/SubmissionFormConverter.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/SubmissionFormConverter.java @@ -164,6 +164,7 @@ private SubmissionFormFieldRest getField(DCInput dcinput, String formName) { inputField.setSelectableMetadata(selectableMetadata); inputField.setTypeBind(dcinput.getTypeBindList()); inputField.setComplexDefinition(dcinput.getComplexDefinitionJSONString()); + inputField.setAutocompleteCustom(dcinput.getAutocompleteCustom()); } if (dcinput.isRelationshipField()) { selectableRelationship = getSelectableRelationships(dcinput); diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/SubmissionFormFieldRest.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/SubmissionFormFieldRest.java index 28a67730ea64..efafa5927e8a 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/SubmissionFormFieldRest.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/SubmissionFormFieldRest.java @@ -92,6 +92,13 @@ public class SubmissionFormFieldRest { * ComplexDefinition transformed to the JSON string */ private String complexDefinition; + + /** + * Autocomplete custom field. Give suggestions from this specific autocomplete solr index/file. + */ + private String autocompleteCustom; + + /** * Getter for {@link #selectableMetadata} * @@ -298,4 +305,12 @@ public void setComplexDefinition(String complexDefinition) { public String getComplexDefinition() { return this.complexDefinition; } + + public String getAutocompleteCustom() { + return autocompleteCustom; + } + + public void setAutocompleteCustom(String autocompleteCustom) { + this.autocompleteCustom = autocompleteCustom; + } } diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/MetadataValueRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/MetadataValueRestRepository.java index 7174dae9f12f..d192abb7b6c7 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/MetadataValueRestRepository.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/MetadataValueRestRepository.java @@ -10,16 +10,7 @@ import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedList; import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; @@ -29,6 +20,7 @@ import org.dspace.app.rest.exception.DSpaceBadRequestException; import org.dspace.app.rest.model.MetadataValueWrapper; import org.dspace.app.rest.model.MetadataValueWrapperRest; +import org.dspace.app.rest.utils.Utils; import org.dspace.content.MetadataField; import org.dspace.content.MetadataValue; import org.dspace.content.service.ItemService; @@ -51,7 +43,7 @@ /** * This is the repository responsible to manage MetadataValueWrapper Rest object. * - * @author Milan Majchrak (milan.majchrak at dataquest.sk) + * @author Milan Majchrak (dspace at dataquest.sk) */ @Component(MetadataValueWrapperRest.CATEGORY + "." + MetadataValueWrapperRest.NAME) public class MetadataValueRestRepository extends DSpaceRestRepository { @@ -122,31 +114,17 @@ public Page findByValue(@Parameter(value = "schema", r // Find matches in Solr Search core DiscoverQuery discoverQuery = - this.createDiscoverQuery(metadataField, searchValue, pageable); + this.createDiscoverQuery(metadataField, searchValue); if (ObjectUtils.isEmpty(discoverQuery)) { throw new IllegalArgumentException("Cannot create a DiscoverQuery from the arguments."); } - // regex if searchValue consist of numbers and characters - // \d - digit - String regexNumber = "(.)*(\\d)(.)*"; - // \D - non digit - String regexString = "(.)*(\\D)(.)*"; - Pattern patternNumber = Pattern.compile(regexNumber); - Pattern patternString = Pattern.compile(regexString); - // if the searchValue is mixed with numbers and characters the Solr ignore numbers by default - // divide the characters and numbers from searchValue to the separate queries and from separate queries - // create one complex query - if (patternNumber.matcher(searchValue).matches() && patternString.matcher(searchValue).matches()) { - List characterList = this.extractCharacterListFromString(searchValue); - List numberList = this.extractNumberListFromString(searchValue); - - String newQuery = this.composeQueryWithNumbersAndChars(metadataField, characterList, numberList); - discoverQuery.setQuery(newQuery); + String normalizedQuery = Utils.normalizeDiscoverQuery(searchValue, metadataField); + if (StringUtils.isNotBlank(normalizedQuery)) { + discoverQuery.setQuery(normalizedQuery); } - List metadataValueWrappers = new ArrayList<>(); try { DiscoverResult searchResult = searchService.search(context, discoverQuery); @@ -183,40 +161,6 @@ public Page findByValue(@Parameter(value = "schema", r return converter.toRestPage(metadataValueWrappers, pageable, utils.obtainProjection()); } - /** - * From searchValue get all String values which are separated by the number to the List of Strings. - * @param searchValue e.g. 'my1Search2' - * @return e.g. [my, Search] - */ - private List extractCharacterListFromString(String searchValue) { - List characterList = null; - // get characters from searchValue as List - searchValue = searchValue.replaceAll("[0-9]", " "); - characterList = new LinkedList<>(Arrays.asList(searchValue.split(" "))); - // remove empty characters from the characterList - characterList.removeIf(characters -> characters == null || "".equals(characters)); - - return characterList; - } - - /** - * From searchValue get all number values which are separated by the number to the List of Strings. - * @param searchValue e.g. 'my1Search2' - * @return e.g. [1, 2] - */ - private List extractNumberListFromString(String searchValue) { - List numberList = new ArrayList<>(); - - // get numbers from searchValue as List - Pattern numberRegex = Pattern.compile("-?\\d+"); - Matcher numberMatcher = numberRegex.matcher(searchValue); - while (numberMatcher.find()) { - numberList.add(numberMatcher.group()); - } - - return numberList; - } - public List filterEUSponsors(List metadataWrappers) { return metadataWrappers.stream().filter(m -> !m.getMetadataValue().getValue().contains("info:eu-repo")) .collect(Collectors.toList()); @@ -224,51 +168,14 @@ public List filterEUSponsors(List me public List distinctMetadataValues(List metadataWrappers) { return metadataWrappers.stream().filter( - distinctByKey(metadataValueWrapper -> metadataValueWrapper.getMetadataValue().getValue()) ) + Utils.distinctByKey(metadataValueWrapper -> metadataValueWrapper.getMetadataValue().getValue()) ) .collect( Collectors.toList() ); } - /** - * From list of String and list of Numbers create a query for the SolrQuery. - * @param metadataField e.g. `dc.contributor.author` - * @param characterList e.g. [my, Search] - * @param numberList e.g. [1, 2] - * @return "dc.contributor.author:*my* AND dc.contributor.author:*Search* AND dc.contributor.author:*1* AND ..." - */ - private String composeQueryWithNumbersAndChars(String metadataField, List characterList, - List numberList) { - this.addQueryTemplateToList(metadataField, characterList); - this.addQueryTemplateToList(metadataField, numberList); - - String joinedChars = String.join(" AND ", characterList); - String joinedNumbers = String.join(" AND ", numberList); - return joinedChars + " AND " + joinedNumbers; - - } - - /** - * Add SolrQuery template to the every item of the List - * @param metadataField e.g. `dc.contributor.author` - * @param stringList could be List of String or List of Numbers which are in the String format because of Solr - * e.g. [my, Search] - * @return [dc.contributor.author:*my*, dc.contributor.author:*Search*] - */ - private List addQueryTemplateToList(String metadataField, List stringList) { - String template = metadataField + ":" + "*" + " " + "*"; - - AtomicInteger index = new AtomicInteger(); - stringList.forEach(characters -> { - String queryString = template.replaceAll(" ", characters); - stringList.set(index.getAndIncrement(), queryString); - }); - return stringList; - } - - private DiscoverQuery createDiscoverQuery(String metadataField, String searchValue, Pageable pageable) { + private DiscoverQuery createDiscoverQuery(String metadataField, String searchValue) { DiscoverQuery discoverQuery = new DiscoverQuery(); discoverQuery.setQuery(metadataField + ":" + "*" + searchValue + "*"); - discoverQuery.setStart(Math.toIntExact(pageable.getOffset())); - discoverQuery.setMaxResults(pageable.getPageSize()); + discoverQuery.setMaxResults(500); // return only metadata field values discoverQuery.addSearchField(metadataField); discoverQuery.addFilterQueries("search.resourcetype:" + IndexableItem.TYPE); @@ -286,14 +193,6 @@ private List convertMetadataValuesToWrappers(List Predicate distinctByKey(Function keyExtractor) { - Map map = new ConcurrentHashMap<>(); - return t -> map.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null; - } @Override @PreAuthorize("permitAll()") diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/SuggestionRestController.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/SuggestionRestController.java new file mode 100644 index 000000000000..b0f5c051979d --- /dev/null +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/SuggestionRestController.java @@ -0,0 +1,400 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.app.rest.repository; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; +import javax.annotation.Nullable; +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.BadRequestException; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.Logger; +import org.dspace.app.rest.model.VocabularyEntryRest; +import org.dspace.app.rest.model.hateoas.VocabularyEntryResource; +import org.dspace.app.rest.utils.Utils; +import org.dspace.core.Context; +import org.dspace.discovery.DiscoverQuery; +import org.dspace.discovery.DiscoverResult; +import org.dspace.discovery.SearchService; +import org.dspace.discovery.SearchServiceException; +import org.dspace.discovery.indexobject.IndexableItem; +import org.dspace.services.ConfigurationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.data.web.PagedResourcesAssembler; +import org.springframework.hateoas.PagedModel; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * Returns VocabularyEntries that contain searchValue. The search is performed on the specific index that is defined by + * the `autocompleteCustom` parameter in the `submission-forms.xml`. + * + * @author Milan Majchrak (dspace at dataquest.sk) + */ +@RestController +@RequestMapping("/api/suggestions") +public class SuggestionRestController extends AbstractDSpaceRestRepository { + + private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(SuggestionRestController.class); + + + /** + * Prefix for the configuration that defines the separator for the autocompleteCustom parameter. + */ + private static final String AUTOCOMPLETE_CUSTOM_CFG_FORMAT_PREFIX = "autocomplete.custom.separator."; + + /** + * Solr prefix for the autocompleteCustom parameter that define the source of the suggestions. + */ + private static final String AUTOCOMPLETE_CUSTOM_SOLR_PREFIX = "solr-"; + + /** + * Json file prefix for the autocompleteCustom parameter that define the source of the suggestions. + */ + private static final String AUTOCOMPLETE_CUSTOM_JSON_PREFIX = "json_static-"; + + /** + * Query parameter from the autocompleteCustom parameter that define specific query for the Solr search. + */ + private static final String AUTOCOMPLETE_CUSTOM_SOLR_QUERY_PARAM = "query="; + + /** + * Limit of suggestions that will be returned from the JSON file. The limit is used to prevent + * the loading of a large amount of data from the JSON file. + */ + private static final int JSON_SUGGESTIONS_LIMIT = 8; + + @Autowired + private SearchService searchService; + + @Autowired + private ConfigurationService configurationService; + + /** + * Map that contains loaded JSON suggestions. The key is the autocompleteCustom parameter and the value is the + * loaded JSON data. The JSON data is loaded only once and stored in the map for further use. + */ + Map jsonSuggestions = new HashMap<>(); + + /** + * Returns a list of VocabularyEntryRest objects that contain values that contain searchValue. + * The search is performed on the specific index or a specific json file that is defined + * by the autocompleteCustom parameter. + */ + @PreAuthorize("hasAuthority('AUTHENTICATED')") + @RequestMapping(method = RequestMethod.GET) + public PagedModel filter(@Nullable HttpServletRequest request, + @Nullable Pageable optionalPageable, + @RequestParam(name = "autocompleteCustom", required = false) + String autocompleteCustom, + @RequestParam(name = "searchValue", required = false) + String searchValue, + PagedResourcesAssembler assembler) throws SearchServiceException { + // If the searching for the autocompleteCustom parameter is not allowed, return an error + if (!isAllowedSearching(autocompleteCustom)) { + String errorMessage = "Searching for autocompleteCustom: " + autocompleteCustom + " is not allowed"; + log.warn(errorMessage); + throw new BadRequestException(errorMessage); + } + + Pageable pageable = utils.getPageable(optionalPageable); + List results; + // Load suggestions from the specific source (Solr or JSON) + if (autocompleteCustom.startsWith(AUTOCOMPLETE_CUSTOM_JSON_PREFIX)) { + results = getSuggestions(autocompleteCustom, searchValue, AUTOCOMPLETE_CUSTOM_JSON_PREFIX); + } else if (autocompleteCustom.startsWith(AUTOCOMPLETE_CUSTOM_SOLR_PREFIX)) { + results = getSuggestions(autocompleteCustom, searchValue, AUTOCOMPLETE_CUSTOM_SOLR_PREFIX); + } else { + log.warn("Cannot fetch suggestions for autocompleteCustom: {} with searching value: {}", + autocompleteCustom, searchValue); + // Return empty list + results = new ArrayList<>(0); + } + + // If no results are found, return null + if (CollectionUtils.isEmpty(results)) { + log.info("No suggestions found for autocompleteCustom: {} with searching value: {}", + autocompleteCustom, searchValue); + } + + // Remove duplicates from the results + List finalResults = results.stream() + .filter(Utils.distinctByKey(VocabularyEntryRest::getValue)) + .collect(Collectors.toList()); + + // Remove `?query` from the autocompleteCustom parameter if it contains this specific query parameter + String autocompleteCustomWithoutQuery = updateAutocompleteAndQuery(autocompleteCustom, null); + // Format the values according to the configuration + finalResults = finalResults.stream() + .map(ver -> formatValue(ver, autocompleteCustomWithoutQuery)) + .collect(Collectors.toList()); + + // Create a page with the final results. The page is needed for the better processing in the frontend. + Page resultsPage = new PageImpl<>(finalResults, pageable, finalResults.size()); + PagedModel response = assembler.toModel(resultsPage); + return response; + } + + /** + * Returns a list of VocabularyEntryRest objects which contain values with searching value. + * The search is performed on the specific index or json file that is defined by the autocompleteCustom parameter. + */ + private List getSuggestions(String autocompleteCustom, String searchValue, String prefix) + throws SearchServiceException { + // Remove the prefix from the autocompleteCustom parameter + String normalizedAutocompleteCustom = removeAutocompleteCustomPrefix(prefix, autocompleteCustom); + // Normalize the search value - remove leading and trailing whitespaces + String normalizedSearchValue = searchValue.trim(); + // Create a list of VocabularyEntryRest objects that will be filtered from duplicate values and returned + // as a response. + List results = new ArrayList<>(); + + if (prefix.equals(AUTOCOMPLETE_CUSTOM_SOLR_PREFIX)) { + // Load suggestions from Solr + results = loadSuggestionsFromSolr(normalizedAutocompleteCustom, normalizedSearchValue, results); + } else if (prefix.equals(AUTOCOMPLETE_CUSTOM_JSON_PREFIX)) { + // Load suggestions from JSON + results = loadSuggestionsFromJson(normalizedAutocompleteCustom, normalizedSearchValue, results); + } + + return results; + + } + + /** + * Load suggestions from the JSON file. The JSON file is loaded only once and stored in the map for further use. + * The search is performed on the specific key in the JSON file. The key is the autocompleteCustom parameter. + */ + private List loadSuggestionsFromJson(String autocompleteCustom, String searchValue, + List results) { + try { + // Load the JSON data from the file. + JsonNode jsonData; + if (!jsonSuggestions.containsKey(autocompleteCustom)) { + // Load the JSON data from the file and store it in the map for further use. + JsonNode loadedJsonSuggestions = loadJsonFromFile(autocompleteCustom); + jsonData = loadedJsonSuggestions; + jsonSuggestions.put(autocompleteCustom, loadedJsonSuggestions); + } else { + // Get the JSON data from the map + jsonData = jsonSuggestions.get(autocompleteCustom); + } + + if (jsonData == null) { + log.warn("Cannot load JSON suggestions from file: {}", autocompleteCustom); + return results; + } + + // Search for a specific key + results = searchByKey(jsonData, searchValue, results); + + } catch (IOException e) { + log.error("Error while loading JSON suggestions from file: {} because: {}", autocompleteCustom, + e.getMessage()); + } + return results; + } + + /** + * Load suggestions from Solr. The search is performed on the specific index that is defined by the + * autocompleteCustom parameter. + */ + private List loadSuggestionsFromSolr(String autocompleteCustom, String searchValue, + List results) + throws SearchServiceException { + Context context = obtainContext(); + // Create a DiscoverQuery object that will be used to search for the results. + DiscoverQuery discoverQuery = new DiscoverQuery(); + // Process the custom query if it contains the specific query parameter `?query=` + autocompleteCustom = updateAutocompleteAndQuery(autocompleteCustom, discoverQuery); + // TODO - search facets and process facet results instead of indexable objects + discoverQuery.setMaxResults(500); + // return only metadata field values + discoverQuery.addSearchField(autocompleteCustom); + + String normalizedQuery = Utils.normalizeDiscoverQuery(searchValue, autocompleteCustom); + if (StringUtils.isNotBlank(normalizedQuery)) { + discoverQuery.setQuery(normalizedQuery); + } + + // Search for the results + DiscoverResult searchResult = searchService.search(context, discoverQuery); + + // Iterate over all indexable objects in the search result. We need indexable object to get search documents. + // Each search document contains values from the specific index. + processSolrSearchResults(searchResult, autocompleteCustom, searchValue, results); + + return results; + } + + /** + * Process the search results from Solr. The search results are processed and filtered according to the searchValue. + */ + private void processSolrSearchResults(DiscoverResult searchResult, String autocompleteCustom, String searchValue, + List results) { + searchResult.getIndexableObjects().forEach(object -> { + if (!(object instanceof IndexableItem)) { + return; + } + IndexableItem item = (IndexableItem) object; + // Get all search documents for the item. + searchResult.getSearchDocument(item).forEach((searchDocument) -> { + VocabularyEntryRest vocabularyEntryRest = new VocabularyEntryRest(); + // All values from Item's specific index - it could contain values we are not looking for. + // The must be filtered out. + List docValues = searchDocument.getSearchFieldValues(autocompleteCustom); + + // Filter values that contain searchValue + List filteredValues = docValues.stream() + .filter(value -> value.contains(searchValue)) + .collect(Collectors.toList()); + + // Add filtered values to the results. It contains only values that contain searchValue. + filteredValues.forEach(value -> { + vocabularyEntryRest.setDisplay(value); + vocabularyEntryRest.setValue(value); + results.add(vocabularyEntryRest); + }); + }); + }); + } + + /** + * Process the custom query if it contains the specific query parameter `?query=`. + * The query is processed and set to the DiscoverQuery object. + * The method returns the part before the query parameter as the new autocompleteCustom parameter. + * @param discoverQuery could be null + */ + private String updateAutocompleteAndQuery(String autocompleteCustom, DiscoverQuery discoverQuery) { + if (!autocompleteCustom.contains(AUTOCOMPLETE_CUSTOM_SOLR_QUERY_PARAM)) { + return autocompleteCustom; + } + + // Query parameter starts with `?` + String[] parts = autocompleteCustom.split("\\?" + AUTOCOMPLETE_CUSTOM_SOLR_QUERY_PARAM); + // 2 parts are expected - the part before the query parameter and after the query parameter + if (parts.length == 2) { + if (discoverQuery != null) { + discoverQuery.setQuery(parts[1]); + } + return parts[0]; // Return the part before "?query=" + } + + return autocompleteCustom; + } + + /** + * Load JSON data from the file. The JSON data is loaded from the resources' folder. + */ + public JsonNode loadJsonFromFile(String filePath) throws IOException { + // Load the file from the resources folder + ClassPathResource resource = new ClassPathResource(filePath); + + // Use Jackson ObjectMapper to read the JSON file + ObjectMapper objectMapper = new ObjectMapper(); + return objectMapper.readTree(resource.getInputStream()); + } + + /** + * Search for the specific key in the JSON object. The search is performed on the specific key in the JSON object. + * The key is the autocompleteCustom parameter. + */ + public List searchByKey(JsonNode jsonNode, String searchKey, + List results) { + // Iterate over all fields (keys) in the JSON object + Iterator fieldNames = jsonNode.fieldNames(); + while (fieldNames.hasNext() && results.size() < JSON_SUGGESTIONS_LIMIT) { + String key = fieldNames.next(); + + // If the key matches or contains the search term (case-insensitive) + if (key.toLowerCase().contains(searchKey.toLowerCase())) { + // Add key-value pair to the result + VocabularyEntryRest vocabularyEntryRest = new VocabularyEntryRest(); + vocabularyEntryRest.setDisplay(key); + vocabularyEntryRest.setValue(jsonNode.get(key).asText()); + results.add(vocabularyEntryRest); + } + } + return results; + } + + /** + * Format the value according to the configuration. + * The result value could consist of multiple parts separated by a separator. Keep the correct part separated by + * the separator loaded from the configuration. + */ + private VocabularyEntryRest formatValue(VocabularyEntryRest ver, String autocompleteCustom) { + if (StringUtils.isEmpty(ver.getValue()) || StringUtils.isEmpty(autocompleteCustom)) { + return ver; + } + + // Load separator from the configuration `autocomplete.custom.separator. + String separator = configurationService.getProperty(AUTOCOMPLETE_CUSTOM_CFG_FORMAT_PREFIX + autocompleteCustom); + if (StringUtils.isEmpty(separator)) { + return ver; + } + + // Split the value by the separator and keep the correct - second part + String[] parts = ver.getValue().split(separator); + // Check the length of the parts - the correct value is the second part + if (parts.length > 1) { + String formattedValue = parts[1].trim(); // The correct value is the second part + ver.setValue(formattedValue); + ver.setDisplay(formattedValue); + } + + return ver; + } + + /** + * Remove the prefix from the autocompleteCustom parameter. E.g. remove "solr-" or "json_static-". + */ + private String removeAutocompleteCustomPrefix(String prefix, String autocompleteCustom) { + return autocompleteCustom.replace(prefix, ""); + } + + /** + * Check if the autocompleteCustom parameter is allowed to be searched. + * To allow searching, the `autocomplete.custom.allowed` property must be defined in the configuration. + */ + private boolean isAllowedSearching(String autocompleteCustom) { + // Check if the autocompleteCustom parameter is allowed to be searched + String[] allowedAutocompleteCustom = configurationService.getArrayProperty("autocomplete.custom.allowed", + new String[0]); + + // Remove `?query` from the autocompleteCustom parameter if it contains this specific query parameter + String normalizedAutocompleteCustom = updateAutocompleteAndQuery(autocompleteCustom, null); + + // If the allowedAutocompleteCustom parameter is not defined, return false + if (Objects.isNull(allowedAutocompleteCustom)) { + return false; + } + + // Convert the allowedAutocompleteCustom array to a list + List allowedAutocompleteCustomList = Arrays.asList(allowedAutocompleteCustom); + return allowedAutocompleteCustomList.contains(normalizedAutocompleteCustom); + } +} diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/utils/Utils.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/utils/Utils.java index 347a23b86de5..4d47e6484b64 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/utils/Utils.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/utils/Utils.java @@ -48,6 +48,12 @@ import java.util.Set; import java.util.TreeSet; import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.annotation.Nullable; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; @@ -1133,4 +1139,109 @@ public static String encodeNonAsciiCharacters(String input) { } return result.toString(); } + + /** + * Update the solr DiscoverQuery because in some cases it won't search properly numbers and characters together. + * @param searchValue searching value + * @param searchField it could be special solr index or metadata field + * @return updated DiscoverQuery + */ + public static String normalizeDiscoverQuery(String searchValue, + String searchField) { + // regex if searchValue consist of numbers and characters + // \d - digit + String regexNumber = "(.)*(\\d)(.)*"; + // \D - non digit + String regexString = "(.)*(\\D)(.)*"; + Pattern patternNumber = Pattern.compile(regexNumber); + Pattern patternString = Pattern.compile(regexString); + // if the searchValue is mixed with numbers and characters the Solr ignore numbers by default + // divide the characters and numbers from searchValue to the separate queries and from separate queries + // create one complex query + if (patternNumber.matcher(searchValue).matches() && patternString.matcher(searchValue).matches()) { + List characterList = extractCharacterListFromString(searchValue); + List numberList = extractNumberListFromString(searchValue); + return composeQueryWithNumbersAndChars(searchField, characterList, numberList); + } + return null; + } + + /** + * From searchValue get all number values which are separated by the number to the List of Strings. + * @param searchValue e.g. 'my1Search2' + * @return e.g. [1, 2] + */ + private static List extractNumberListFromString(String searchValue) { + List numberList = new ArrayList<>(); + + // get numbers from searchValue as List + Pattern numberRegex = Pattern.compile("-?\\d+"); + Matcher numberMatcher = numberRegex.matcher(searchValue); + while (numberMatcher.find()) { + numberList.add(numberMatcher.group()); + } + + return numberList; + } + + /** + * From searchValue get all String values which are separated by the number to the List of Strings. + * @param searchValue e.g. 'my1Search2' + * @return e.g. [my, Search] + */ + private static List extractCharacterListFromString(String searchValue) { + List characterList = null; + // get characters from searchValue as List + searchValue = searchValue.replaceAll("[0-9]", " "); + characterList = new LinkedList<>(Arrays.asList(searchValue.split(" "))); + // remove empty characters from the characterList + characterList.removeIf(characters -> characters == null || "".equals(characters)); + + return characterList; + } + + /** + * From list of String and list of Numbers create a query for the SolrQuery. + * @param metadataField e.g. `dc.contributor.author` + * @param characterList e.g. [my, Search] + * @param numberList e.g. [1, 2] + * @return "dc.contributor.author:*my* AND dc.contributor.author:*Search* AND dc.contributor.author:*1* AND ..." + */ + private static String composeQueryWithNumbersAndChars(String metadataField, List characterList, + List numberList) { + addQueryTemplateToList(metadataField, characterList); + addQueryTemplateToList(metadataField, numberList); + + String joinedChars = String.join(" AND ", characterList); + String joinedNumbers = String.join(" AND ", numberList); + return joinedChars + " AND " + joinedNumbers; + + } + + /** + * Add SolrQuery template to the every item of the List + * @param metadataField e.g. `dc.contributor.author` + * @param stringList could be List of String or List of Numbers which are in the String format because of Solr + * e.g. [my, Search] + * @return [dc.contributor.author:*my*, dc.contributor.author:*Search*] + */ + private static List addQueryTemplateToList(String metadataField, List stringList) { + String template = metadataField + ":" + "*" + " " + "*"; + + AtomicInteger index = new AtomicInteger(); + stringList.forEach(characters -> { + String queryString = template.replaceAll(" ", characters); + stringList.set(index.getAndIncrement(), queryString); + }); + return stringList; + } + + /** + * Filter unique values from the list and return list with unique values + * @return List with unique values + */ + public static Predicate distinctByKey(Function keyExtractor) { + Map map = new ConcurrentHashMap<>(); + return t -> map.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null; + } } diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/BrowsesResourceControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/BrowsesResourceControllerIT.java index 57a8dbb3c2b7..e1f9788a517e 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/BrowsesResourceControllerIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/BrowsesResourceControllerIT.java @@ -1422,7 +1422,7 @@ public void testBrowseByEntriesStartsWith() throws Exception { //Verify that the index filters to the "Universe" entries and Counts 2 Items. .andExpect(jsonPath("$._embedded.entries", - contains(BrowseEntryResourceMatcher.matchBrowseEntry("Universe", 2) + contains(BrowseEntryResourceMatcher.matchBrowseEntry("Universe".toLowerCase(), 2) ))) //Verify startsWith parameter is included in the links .andExpect(jsonPath("$._links.self.href", containsString("?startsWith=U"))); @@ -1446,7 +1446,8 @@ public void testBrowseByEntriesStartsWith() throws Exception { //Verify that the index filters to the "Turing, Alan'" items. .andExpect(jsonPath("$._embedded.entries", - contains(BrowseEntryResourceMatcher.matchBrowseEntry("Turing, Alan Mathison", 1) + contains(BrowseEntryResourceMatcher.matchBrowseEntry( + "Turing, Alan Mathison".toLowerCase(), 1) ))) //Verify that the startsWith paramater is included in the links .andExpect(jsonPath("$._links.self.href", containsString("?startsWith=T"))); @@ -1469,7 +1470,8 @@ public void testBrowseByEntriesStartsWith() throws Exception { //Verify that the index filters to the "Computing'" items. .andExpect(jsonPath("$._embedded.entries", - contains(BrowseEntryResourceMatcher.matchBrowseEntry("Computing", 3) + contains(BrowseEntryResourceMatcher.matchBrowseEntry( + "Computing".toLowerCase(), 3) ))) //Verify that the startsWith paramater is included in the links .andExpect(jsonPath("$._links.self.href", containsString("?startsWith=C"))); @@ -1544,9 +1546,12 @@ public void testBrowseByEntriesStartsWithAndDiacritics() throws Exception { //Verify that the index filters to the "Alonso, Nombre", "Álvarez, Nombre" and "Azuaga, Nombre" // and diacritics are ignored in sorting .andExpect(jsonPath("$._embedded.entries", - contains(BrowseEntryResourceMatcher.matchBrowseEntry("Alonso, Nombre", 1), - BrowseEntryResourceMatcher.matchBrowseEntry("Álvarez, Nombre", 1), - BrowseEntryResourceMatcher.matchBrowseEntry("Azuaga, Nombre", 1) + contains(BrowseEntryResourceMatcher.matchBrowseEntry( + "Alonso, Nombre".toLowerCase(), 1), + BrowseEntryResourceMatcher.matchBrowseEntry( + "Álvarez, Nombre".toLowerCase(), 1), + BrowseEntryResourceMatcher.matchBrowseEntry( + "Azuaga, Nombre".toLowerCase(), 1) ))) //Verify startsWith parameter is included in the links @@ -1570,8 +1575,10 @@ public void testBrowseByEntriesStartsWithAndDiacritics() throws Exception { //Verify that the index filters to the "Ögren, Name"" and "Ortiz, Nombre" .andExpect(jsonPath("$._embedded.entries", - contains(BrowseEntryResourceMatcher.matchBrowseEntry("Ögren, Name", 1), - BrowseEntryResourceMatcher.matchBrowseEntry("Ortiz, Nombre", 1) + contains(BrowseEntryResourceMatcher.matchBrowseEntry( + "Ögren, Name".toLowerCase(), 1), + BrowseEntryResourceMatcher.matchBrowseEntry( + "Ortiz, Nombre".toLowerCase(), 1) ))) //Verify that the startsWith paramater is included in the links .andExpect(jsonPath("$._links.self.href", containsString("?startsWith=Ó"))); @@ -1596,9 +1603,12 @@ public void testBrowseByEntriesStartsWithAndDiacritics() throws Exception { //Verify that the index filters to the "Telecomunicaciones', "Teléfono" and "Televisor" and // it is sorted ignoring diacritics .andExpect(jsonPath("$._embedded.entries", - contains(BrowseEntryResourceMatcher.matchBrowseEntry("Telecomunicaciones", 1), - BrowseEntryResourceMatcher.matchBrowseEntry("Teléfono", 1), - BrowseEntryResourceMatcher.matchBrowseEntry("Televisor", 1) + contains(BrowseEntryResourceMatcher.matchBrowseEntry( + "Telecomunicaciones".toLowerCase(), 1), + BrowseEntryResourceMatcher.matchBrowseEntry( + "Teléfono".toLowerCase(), 1), + BrowseEntryResourceMatcher.matchBrowseEntry( + "Televisor".toLowerCase(), 1) ))) //Verify that the startsWith paramater is included in the links .andExpect(jsonPath("$._links.self.href", containsString("?startsWith=Tele"))); @@ -1621,7 +1631,7 @@ public void testBrowseByEntriesStartsWithAndDiacritics() throws Exception { //Verify that the index filters to the "Guion" .andExpect(jsonPath("$._embedded.entries", - contains(BrowseEntryResourceMatcher.matchBrowseEntry("Guion", 1) + contains(BrowseEntryResourceMatcher.matchBrowseEntry("Guion".toLowerCase(), 1) ))) //Verify that the startsWith paramater is included in the links .andExpect(jsonPath("$._links.self.href", containsString("?startsWith=Guión"))); diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java index e1361a023b0c..cd2829dc626a 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java @@ -358,8 +358,8 @@ public void discoverFacetsAuthorTestWithPrefix() throws Exception { // up in different items //These authors are order according to count. Only two show up because of the prefix. .andExpect(jsonPath("$._embedded.values", containsInAnyOrder( - FacetValueMatcher.entryAuthor("Smith, Maria"), - FacetValueMatcher.entryAuthor("Smith, Donald") + FacetValueMatcher.entryAuthor("Smith, Maria".toLowerCase()), + FacetValueMatcher.entryAuthor("Smith, Donald".toLowerCase()) ))) ; } @@ -1003,7 +1003,8 @@ public void discoverSearchTest() throws Exception { SearchFilterMatcher.clarinItemsCommunityFilter(), SearchFilterMatcher.clarinItemsTypeFilter(), SearchFilterMatcher.clarinSubjectFirstValueFilter(), - SearchFilterMatcher.clarinDataProviderFacet() + SearchFilterMatcher.clarinDataProviderFacet(), + SearchFilterMatcher.dcTypeFilter() ))) //These sortOptions need to be present as it's the default in the configuration .andExpect(jsonPath("$.sortOptions", contains( diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/SuggestionRestControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SuggestionRestControllerIT.java new file mode 100644 index 000000000000..a449bfd29bc5 --- /dev/null +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SuggestionRestControllerIT.java @@ -0,0 +1,176 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.app.rest; + +import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasJsonPath; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.is; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +import org.dspace.app.rest.test.AbstractControllerIntegrationTest; +import org.dspace.builder.CollectionBuilder; +import org.dspace.builder.CommunityBuilder; +import org.dspace.builder.ItemBuilder; +import org.dspace.content.Collection; +import org.dspace.content.Item; +import org.hamcrest.Matchers; +import org.junit.Before; +import org.junit.Test; + +/** + * Integration test for the {@link org.dspace.app.rest.repository.SuggestionRestController} + * + * @author Milan Majchrak (dspace at dataquest.sk) + */ +public class SuggestionRestControllerIT extends AbstractControllerIntegrationTest { + + private Item publicItem; + private Collection col; + private final String SUBJECT_SEARCH_VALUE = "test subject"; + private final String LANGUAGE_SEARCH_VALUE_KEY = "Alumu-Tesu"; + private final String LANGUAGE_SEARCH_VALUE_VALUE = "aab"; + private final String ITEM_TITLE = "Item title"; + + @Before + public void setup() throws Exception { + context.turnOffAuthorisationSystem(); + // 1. A community-collection structure with one parent community and one collection + parentCommunity = CommunityBuilder.createCommunity(context) + .withName("Parent Community") + .build(); + + col = CollectionBuilder.createCollection(context, parentCommunity).withName("Collection").build(); + + // 2. Create item and add it to the collection + publicItem = ItemBuilder.createItem(context, col) + .withTitle(ITEM_TITLE) + .withMetadata("dc", "subject", null, SUBJECT_SEARCH_VALUE ) + .build(); + + context.restoreAuthSystemState(); + } + + /** + * Should return formatted suggestions in the VocabularyEntryRest objects + */ + @Test + public void testSearchBySubjectAcSolrIndex() throws Exception { + String userToken = getAuthToken(eperson.getEmail(), password); + // substring = find only by the `test` value + getClient(userToken).perform(get("/api/suggestions?autocompleteCustom=solr-subject_ac&searchValue=" + + SUBJECT_SEARCH_VALUE.substring(0, 4))) + .andExpect(status().isOk()) + .andExpect(content().contentType(contentType)) + .andExpect(jsonPath("$._embedded.vocabularyEntryRests", Matchers.hasItem( + allOf( + hasJsonPath("$.display", is(SUBJECT_SEARCH_VALUE)), + hasJsonPath("$.value", is(SUBJECT_SEARCH_VALUE)), + hasJsonPath("$.type", is("vocabularyEntry")) + )))); + } + + /** + * Should return no suggestions + */ + @Test + public void testSearchBySubjectAcSolrIndex_noResults() throws Exception { + String userToken = getAuthToken(eperson.getEmail(), password); + // substring = find only by the `test` value + getClient(userToken).perform(get("/api/suggestions?autocompleteCustom=solr-subject_ac&searchValue=" + + "no such subject")) + .andExpect(status().isOk()) + .andExpect(content().contentType(contentType)) + .andExpect(jsonPath("$.page.totalElements", is(0))) + .andExpect(jsonPath("$._embedded.vocabularyEntryRests").doesNotExist()); + } + + /** + * Should return suggestions from the JSON file + */ + @Test + public void testSearchByLanguageFromJson() throws Exception { + String userToken = getAuthToken(eperson.getEmail(), password); + getClient(userToken).perform( + get("/api/suggestions?autocompleteCustom=json_static-iso_langs.json&searchValue=" + + LANGUAGE_SEARCH_VALUE_KEY)) + .andExpect(status().isOk()) + .andExpect(content().contentType(contentType)) + .andExpect(jsonPath("$.page.totalElements", is(1))) + .andExpect(jsonPath("$._embedded.vocabularyEntryRests", Matchers.hasItem( + allOf( + hasJsonPath("$.display", is(LANGUAGE_SEARCH_VALUE_KEY)), + hasJsonPath("$.value", is(LANGUAGE_SEARCH_VALUE_VALUE)), + hasJsonPath("$.type", is("vocabularyEntry")) + )))); + } + + /** + * Should return no suggestions from the JSON file + */ + @Test + public void testSearchByLanguageFromJson_noResults() throws Exception { + String userToken = getAuthToken(eperson.getEmail(), password); + getClient(userToken).perform( + get("/api/suggestions?autocompleteCustom=json_static-iso_langs.json&searchValue=" + + "no such language")) + .andExpect(status().isOk()) + .andExpect(content().contentType(contentType)) + .andExpect(jsonPath("$.page.totalElements", is(0))) + .andExpect(jsonPath("$._embedded.vocabularyEntryRests").doesNotExist()); + } + + /** + * Should return suggestions from the solr `title_ac` index. + * Compose specific query from the definition and the search value. + */ + @Test + public void testSearchBySpecificQueryFromSolr() throws Exception { + String userToken = getAuthToken(eperson.getEmail(), password); + getClient(userToken).perform( + get("/api/suggestions?autocompleteCustom=solr-title_ac?query=title_ac:**&searchValue=" + + ITEM_TITLE.substring(0, 4))) + .andExpect(status().isOk()) + .andExpect(content().contentType(contentType)) + .andExpect(jsonPath("$.page.totalElements", is(1))) + .andExpect(jsonPath("$._embedded.vocabularyEntryRests", Matchers.hasItem( + allOf( + hasJsonPath("$.display", is(ITEM_TITLE)), + hasJsonPath("$.value", is(ITEM_TITLE)), + hasJsonPath("$.type", is("vocabularyEntry")) + )))); + } + + /** + * Should return suggestions from the solr `title_ac` index. + * Compose specific query from the definition and the search value. + */ + @Test + public void testSearchBySpecificQueryFromSolr_noresults() throws Exception { + String userToken = getAuthToken(eperson.getEmail(), password); + getClient(userToken).perform( + get("/api/suggestions?autocompleteCustom=solr-title_ac?query=title_ac:**&searchValue=" + + "no such title")) + .andExpect(status().isOk()) + .andExpect(content().contentType(contentType)) + .andExpect(jsonPath("$.page.totalElements", is(0))) + .andExpect(jsonPath("$._embedded.vocabularyEntryRests").doesNotExist()); + } + + /** + * Should return 401 Forbidden + */ + @Test + public void testShouldNotAuthorized() throws Exception { + getClient().perform(get("/api/suggestions?autocompleteCustom=solr-title_ac?query=title_ac:**&searchValue=" + + "no such title")) + .andExpect(status().isUnauthorized()); + } +} diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/FacetEntryMatcher.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/FacetEntryMatcher.java index 23d66754dcc6..939873b5c4ba 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/FacetEntryMatcher.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/FacetEntryMatcher.java @@ -131,6 +131,16 @@ public static Matcher clarinLicenseRightsFacet(boolean hasNext) ); } + public static Matcher dcTypeFacet(boolean hasNext) { + return allOf( + hasJsonPath("$.name", is("dctype")), + hasJsonPath("$.facetType", is("text")), + hasJsonPath("$.facetLimit", any(Integer.class)), + hasJsonPath("$._links.self.href", containsString("api/discover/facets/dctype")), + hasJsonPath("$._links", matchNextLink(hasNext, "api/discover/facets/dctype")) + ); + } + public static Matcher clarinItemsLanguageFacet(boolean hasNext) { return allOf( hasJsonPath("$.name", is("language")), @@ -162,11 +172,11 @@ public static Matcher clarinItemsCommunityFacet(boolean hasNext) */ public static Matcher typeFacet(boolean b) { return allOf( - hasJsonPath("$.name", is("itemtype")), + hasJsonPath("$.name", is("type")), hasJsonPath("$.facetType", is("text")), hasJsonPath("$.facetLimit", any(Integer.class)), - hasJsonPath("$._links.self.href", containsString("api/discover/facets/itemtype")), - hasJsonPath("$._links", matchNextLink(b, "api/discover/facets/itemtype")) + hasJsonPath("$._links.self.href", containsString("api/discover/facets/type")), + hasJsonPath("$._links", matchNextLink(b, "api/discover/facets/type")) ); } diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/SearchFilterMatcher.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/SearchFilterMatcher.java index b5533a955505..c708ca96b98c 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/SearchFilterMatcher.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/SearchFilterMatcher.java @@ -188,7 +188,7 @@ public static Matcher clarinItemsCommunityFilter() { public static Matcher clarinItemsTypeFilter() { return allOf( - hasJsonPath("$.filter", is("itemtype")), + hasJsonPath("$.filter", is("type")), hasJsonPath("$.hasFacets", is(true)), hasJsonPath("$.type", is("text")), hasJsonPath("$.openByDefault", is(false)), @@ -226,4 +226,14 @@ public static Matcher clarinDataProviderFacet() { checkOperators() ); } + + public static Matcher dcTypeFilter() { + return allOf( + hasJsonPath("$.filter", is("dctype")), + hasJsonPath("$.hasFacets", is(false)), + hasJsonPath("$.type", is("text")), + hasJsonPath("$.openByDefault", is(false)), + checkOperators() + ); + } } diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/utils/UtilsTest.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/utils/UtilsTest.java new file mode 100644 index 000000000000..68c521bfaf06 --- /dev/null +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/utils/UtilsTest.java @@ -0,0 +1,61 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.app.rest.utils; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import org.dspace.AbstractUnitTest; +import org.junit.Test; + +/** + * Unit tests for {@link Utils} + * + * @author Milan Majchrak (dspace at dataquest.sk) + */ +public class UtilsTest extends AbstractUnitTest { + + @Test + public void testNormalizeDiscoverQueryWithMixedCharactersAndNumbers() { + String searchValue = "my1Search2"; + String searchField = "dc.contributor.author"; + + String expected = "dc.contributor.author:*my* AND dc.contributor.author:*Search* AND " + + "dc.contributor.author:*1* AND dc.contributor.author:*2*"; + + String result = Utils.normalizeDiscoverQuery(searchValue, searchField); + assertEquals(expected, result); + } + + @Test + public void testNormalizeDiscoverQueryWithOnlyCharacters() { + String searchValue = "mySearch"; + String searchField = "dc.contributor.author"; + + String result = Utils.normalizeDiscoverQuery(searchValue, searchField); + assertNull(result); + } + + @Test + public void testNormalizeDiscoverQueryWithOnlyNumbers() { + String searchValue = "12345"; + String searchField = "dc.contributor.author"; + + String result = Utils.normalizeDiscoverQuery(searchValue, searchField); + assertNull(result); + } + + @Test + public void testNormalizeDiscoverQueryWithEmptyString() { + String searchValue = ""; + String searchField = "dc.contributor.author"; + + String result = Utils.normalizeDiscoverQuery(searchValue, searchField); + assertNull(result); + } +} diff --git a/dspace/config/clarin-dspace.cfg b/dspace/config/clarin-dspace.cfg index 6c00f45b5a1e..708e5c9b1c9b 100644 --- a/dspace/config/clarin-dspace.cfg +++ b/dspace/config/clarin-dspace.cfg @@ -288,3 +288,14 @@ elg.download-location.exposed = 0 # left here for reference #download.email.cc = ${info.recipient} download.email.cc = ${mail.admin} + +#### Submission forms #### +# `autocomplete.custom.separator.*` is a special separator used to distinguish values +# in the results from the current Solr index. For example, `solr-subject_ac` is a special index for subjects, +# and its values look like this: `value1 ||| VALUE1`. The correct value is the second one. +# `//` is because of special character +autocomplete.custom.separator.solr-subject_ac = \\|\\|\\| +autocomplete.custom.separator.solr-publisher_ac = \\|\\|\\| +autocomplete.custom.separator.solr-dataProvider_ac = \\|\\|\\| +autocomplete.custom.separator.solr-dctype_ac = \\|\\|\\| +autocomplete.custom.allowed = solr-author_ac,solr-publisher_ac,solr-dataProvider_ac,solr-dctype_ac,solr-subject_ac,solr-handle_title_ac,json_static-iso_langs.json diff --git a/dspace/config/spring/api/discovery.xml b/dspace/config/spring/api/discovery.xml index a5cce1ffd2b9..c83e3b011aff 100644 --- a/dspace/config/spring/api/discovery.xml +++ b/dspace/config/spring/api/discovery.xml @@ -200,6 +200,7 @@ + @@ -2545,7 +2546,7 @@ - + dc.type @@ -2557,6 +2558,17 @@ + + + + + dc.type + + + + + + diff --git a/dspace/config/submission-forms.dtd b/dspace/config/submission-forms.dtd index 932494dc7728..01bb8ea60d9f 100644 --- a/dspace/config/submission-forms.dtd +++ b/dspace/config/submission-forms.dtd @@ -81,6 +81,7 @@ + diff --git a/dspace/config/submission-forms.xml b/dspace/config/submission-forms.xml index 1a63054ec9d2..e00cf2fb5936 100644 --- a/dspace/config/submission-forms.xml +++ b/dspace/config/submission-forms.xml @@ -85,7 +85,7 @@ author true - clarin-name + autocomplete Enter the author's name (Family name, Given names). true - tag + autocomplete Enter appropriate subject keyword or phrase and press the Add button. You can repeat it for multiple keywords or use separators i.e., Enter and comma, which will split it accordingly. Start typing the keyword and use autocomplete form that will appear. End your input by pressing @@ -1703,7 +1703,7 @@ true - autocomplete + autocomplete The name of the publisher of the original analog or born digital object. Use your home institution if this is a born digital object being published now. Start typing the publisher and use autocomplete form that will appear if applicable. End your input by pressing ESC if you @@ -1719,9 +1719,9 @@ false - autocomplete + autocomplete This concerns the digital object (not the analog - original). An institution from which the data come. Used eg. to give proper attribution. Generally + original). An institution from which the data come. Used e.g. to give proper attribution. Generally different from publisher. @@ -1757,7 +1757,7 @@ false - autocomplete + autocomplete The type should be different from what you have entered in the first step. Examples: photo or painting for IMAGE, book or letter for TEXT, etc. Type is required @@ -1787,7 +1787,7 @@ true TEXT - autocomplete + autocomplete Select the language of the main content of the item. Multiple languages are possible. Start typing the language and use autocomplete form that will appear if applicable. Better to list all the languages then to use the 'mul' iso code (if there are too many, contact support). @@ -1802,7 +1802,7 @@ true VIDEO,IMAGE,SOUND,3D - autocomplete + autocomplete Optionally, select the language of the main content of the item. Multiple languages are possible. Start typing the language and use autocomplete form that will appear if applicable. Better to list all the languages then to use the 'mul' iso code (if there are too many, contact support). @@ -1818,7 +1818,7 @@ true - tag + autocomplete Enter appropriate subject keyword or phrase and press the Add button. Use keywords to specify also people, places and times (period, era, date range etc) the resource is about. You can use hierarchical subjects, separate the hierarchy levels with two colons (::). Eg. @@ -1985,7 +1985,7 @@ true - autocomplete + autocomplete The name of the publisher of the original analog or born digital object. Use your home institution if this is a born digital object being published now. Start typing the publisher and use autocomplete form that will appear if applicable. End your input by pressing ESC if you @@ -2052,7 +2052,7 @@ iso true - autocomplete + autocomplete Select the language of the main content of the item. Multiple languages are possible. Start typing the language and use autocomplete form that will appear if applicable. Better to list all the languages then to use the 'mul' iso code (if there are too many, contact support). @@ -2067,7 +2067,7 @@ true - autocomplete + autocomplete Enter appropriate subject keyword or phrase and press the Add button. You can repeat it for multiple keywords or use separators i.e., comma and semicolon, which will split it accordingly. Start typing the keyword and use autocomplete form that will appear. End your input by pressing @@ -2116,7 +2116,7 @@ replaces true - onebox + autocomplete URL to a related resource that is supplanted, displaced, or superseded by the described resource. If the replaced resource is in this repository start typing its name or handle and select the resource from the autocomplete popup. @@ -2130,7 +2130,7 @@ isreplacedby true - onebox + autocomplete A related resource that supplants, displaces, or supersedes the described resource. @@ -3225,7 +3225,7 @@ - + diff --git a/dspace/config/submission-forms_cs.xml b/dspace/config/submission-forms_cs.xml index bd06c7fdeac4..227508071cb2 100644 --- a/dspace/config/submission-forms_cs.xml +++ b/dspace/config/submission-forms_cs.xml @@ -85,7 +85,7 @@ author true - clarin-name + autocomplete Enter the author's name (Family name, Given names). true - tag + autocomplete Enter appropriate subject keyword or phrase and press the Add button. You can repeat it for multiple keywords or use separators i.e., Enter and comma, which will split it accordingly. Start typing the keyword and use autocomplete form that will appear. End your input by pressing @@ -1703,7 +1703,7 @@ true - autocomplete + autocomplete The name of the publisher of the original analog or born digital object. Use your home institution if this is a born digital object being published now. Start typing the publisher and use autocomplete form that will appear if applicable. End your input by pressing ESC if you @@ -1719,9 +1719,9 @@ false - autocomplete + autocomplete This concerns the digital object (not the analog - original). An institution from which the data come. Used eg. to give proper attribution. Generally + original). An institution from which the data come. Used e.g. to give proper attribution. Generally different from publisher. @@ -1757,7 +1757,7 @@ false - autocomplete + autocomplete The type should be different from what you have entered in the first step. Examples: photo or painting for IMAGE, book or letter for TEXT, etc. Type is required @@ -1771,7 +1771,6 @@ false - aaa textarea Enter a description of the submitted data. Please give us a description @@ -1785,7 +1784,7 @@ true TEXT - autocomplete + autocomplete Select the language of the main content of the item. Multiple languages are possible. Start typing the language and use autocomplete form that will appear if applicable. Better to list all the languages then to use the 'mul' iso code (if there are too many, contact support). @@ -1800,7 +1799,7 @@ true VIDEO,IMAGE,SOUND,3D - autocomplete + autocomplete Optionally, select the language of the main content of the item. Multiple languages are possible. Start typing the language and use autocomplete form that will appear if applicable. Better to list all the languages then to use the 'mul' iso code (if there are too many, contact support). @@ -1816,7 +1815,7 @@ true - tag + autocomplete Enter appropriate subject keyword or phrase and press the Add button. Use keywords to specify also people, places and times (period, era, date range etc) the resource is about. You can use hierarchical subjects, separate the hierarchy levels with two colons (::). Eg. @@ -1983,7 +1982,7 @@ true - autocomplete + autocomplete The name of the publisher of the original analog or born digital object. Use your home institution if this is a born digital object being published now. Start typing the publisher and use autocomplete form that will appear if applicable. End your input by pressing ESC if you @@ -2050,7 +2049,7 @@ iso true - autocomplete + autocomplete Select the language of the main content of the item. Multiple languages are possible. Start typing the language and use autocomplete form that will appear if applicable. Better to list all the languages then to use the 'mul' iso code (if there are too many, contact support). @@ -2065,7 +2064,7 @@ true - autocomplete + autocomplete Enter appropriate subject keyword or phrase and press the Add button. You can repeat it for multiple keywords or use separators i.e., comma and semicolon, which will split it accordingly. Start typing the keyword and use autocomplete form that will appear. End your input by pressing @@ -2106,7 +2105,7 @@ - + dc @@ -2114,7 +2113,7 @@ replaces true - onebox + autocomplete URL příbuzného záznamu, který je tímto záznamem nahrazen. Pokud je příbuzný záznam v tomto repozitáři, začněte psát jeho název, nebo handle a vyberte záznam z nabídky. @@ -2128,7 +2127,7 @@ isreplacedby true - onebox + autocomplete Příbuzný záznam, který nahrazuje tento. @@ -3223,7 +3222,7 @@ - + diff --git a/dspace/solr/search/conf/schema.xml b/dspace/solr/search/conf/schema.xml index a80cfdedfd34..3a6125c1f9ac 100644 --- a/dspace/solr/search/conf/schema.xml +++ b/dspace/solr/search/conf/schema.xml @@ -126,6 +126,7 @@ + @@ -140,6 +141,7 @@ + - + @@ -194,11 +197,17 @@ - + + + + + + + - + - + @@ -361,5 +370,21 @@ + + + + + + + + + + + + + + + + From c25374e0b2ff6e9f8aba429c8372a466affbcad5 Mon Sep 17 00:00:00 2001 From: jurinecko <95219754+jr-rk@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:52:25 +0100 Subject: [PATCH 8/8] UFAL/Changed position of rows in submission-forms.xml following v5 (#802) * Changed position of rows in submission-forms.xml following v5 * Fixed the alignment of some text * Removed rows which are not in the v5 * Removed license selector from the `teaching` and `clariah-data` collections * Updated input differences in the submission-forms.xml following the v5. --------- Co-authored-by: Juraj Roka Co-authored-by: milanmajchrak --- dspace/config/item-submission.xml | 2 - dspace/config/submission-forms.xml | 366 ++++++++++++++--------------- 2 files changed, 176 insertions(+), 192 deletions(-) diff --git a/dspace/config/item-submission.xml b/dspace/config/item-submission.xml index 5726135a99a0..09a4fe3b4176 100644 --- a/dspace/config/item-submission.xml +++ b/dspace/config/item-submission.xml @@ -463,7 +463,6 @@ - @@ -475,7 +474,6 @@ - diff --git a/dspace/config/submission-forms.xml b/dspace/config/submission-forms.xml index e00cf2fb5936..f6079e4b8262 100644 --- a/dspace/config/submission-forms.xml +++ b/dspace/config/submission-forms.xml @@ -53,60 +53,30 @@
- - - local - contact - person - true - - - complex - This is contact person - - - - - - local - sponsor - true - - - complex - This is funding - - - dc - contributor - author + type + true - - autocomplete - Enter the author's name (Family name, Given names). + + dropdown + Select the type of content of the item. + - - - dc - title - - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - + + dc + title + + false + + onebox + Enter the main title of the item in English. + You must enter a main title for this item. + @@ -153,78 +123,119 @@ date issued false - + date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't applicable. + Please give the date when the submission data were issued if any e.g., 2014-01-21 or at least + the year. - You must enter at least the year. + You must enter the date or at least the year in a valid format. dc publisher - false + true autocomplete - Enter the name of the publisher of the previously issued instance of this item. - + Enter the name of the publisher of the previously issued instance of this item, or your home + institution. Start typing the publisher and use autocomplete form that will appear if + applicable. End your input by pressing ESC if you don't want to use the preselected value. + You must enter the name of the publisher. - dc - identifier - citation - false - - onebox - Enter the standard citation for the previously issued instance of this item. - + local + hidden + + true + + + list + Indicate whether you want to hide this item from browse and search. Combine with "Upload cmdi" + for weblicht submissions. + + + policy=deny,action=read,grantee-type=user,grantee-id=* + - dc - relation - ispartofseries + local + hasCMDI true - - Technical Report - series - Enter the series and number assigned to this item by your community. + + list + Indicate whether you will upload cmdi file in the next step. Combine with "hide" for weblicht + submissions. + + policy=deny,action=read,grantee-type=user,grantee-id=* + dc - identifier - - + contributor + author true - - qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. - + + autocomplete + Enter the names of the authors of this item. Start typing the author's last name and use + autocomplete form that will appear if applicable. End your input by pressing ESC if you don't + want to use the preselected value.. + Please add author(s) + + + + + + local + contact + person + true + + + complex + Person to contact in case of any issues with this submission. + Please fill all the fields for the contact person. + + + + + local + sponsor + true + + + complex + Acknowledge sponsors and funding that supported work described by this submission. +
+ +
dc - type + description - true - - dropdown - Select the type of content of the item. - - + false + + textarea + Enter a description of the submitted data. + Please give us a description @@ -256,6 +267,24 @@ + + + dc + subject + + + true + + tag + Enter appropriate subject keyword or phrase and press the Add button. You can repeat it for + multiple keywords or use separators i.e., comma and semicolon, which will split it accordingly. + Start typing the keyword and use autocomplete form that will appear. End your input by pressing + ESC if you don't want to use the preselected value. + + Please enter at least one subject related to your submission + srsc + + local @@ -265,9 +294,11 @@ corpus,languageDescription,lexicalConceptualResource complex - You can state the extent of the submitted data, eg. the number of tokens. + You can state the extent of the submitted data, e.g., the number of tokens. + + metashare @@ -298,8 +329,6 @@ Media type is required - - metashare @@ -354,49 +383,20 @@ Please indicate whether the tool is language dependent - - - local - hasCMDI - true - - list - Are you going to upload cmdi file? - - - policy=deny,action=read,grantee-type=user,grantee-id=* - - - - - - local - hidden - - true - - - list - Should item be harvestable thru OAI-PMH but behave like private? - - - policy=deny,action=read,grantee-type=user,grantee-id=* - - - local bitstream redirectToURL false - + onebox - The actual maximum upload size of the file is 4GB. To upload a file bigger than the - maximum upload size, enter the URL of that large file. The admin must know the URL - of that bitstream file. Then, click on the 'Save' button, and the file will start - to upload. The file path must be an absolute path. + Please enter the full path of the file, either from the local server or an HTTP location. + The maximum upload size for a file is 4GB. To upload a file larger than this limit, provide the + URL of the file. Ensure the admin is aware of the URL of the bitstream file. + Once the file path or URL is entered, click the 'Save' button to begin the upload. + Note: The file path must be an absolute path. @@ -408,62 +408,6 @@ - - - - dc - subject - - - true - - autocomplete - Enter appropriate subject keyword or phrase and press the Add button. You can repeat it for - multiple keywords or use separators i.e., Enter and comma, which will split it accordingly. - Start typing the keyword and use autocomplete form that will appear. End your input by pressing - ESC if you don't want to use the preselected value. - - Please enter at least one subject related to your submission - srsc - - - - - dc - description - abstract - false - - textarea - Enter the abstract of the item. - - - - - - dc - description - sponsorship - false - - textarea - Enter the names of any sponsors and/or funding codes in the box. - - - - - - dc - description - - false - - textarea - Enter any other description or comments in this box. - - - - Indicate whether you will upload cmdi file in the next step. Combine with "hide" for weblicht @@ -1721,7 +1665,7 @@ autocomplete This concerns the digital object (not the analog - original). An institution from which the data come. Used e.g. to give proper attribution. Generally + original). An institution from which the data come. Used e.g., to give proper attribution. Generally different from publisher. @@ -1857,6 +1801,27 @@ You can state the extent of the submitted data, eg. the number of tokens.
+ + + local + bitstream + redirectToURL + false + + onebox + + Please enter the full path of the file, either from the local server or an HTTP location. + The maximum upload size for a file is 4GB. To upload a file larger than this limit, provide the + URL of the file. Ensure the admin is aware of the URL of the bitstream file. + Once the file path or URL is entered, click the 'Save' button to begin the upload. + Note: The file path must be an absolute path. + + + + policy=deny,action=read,grantee-type=user,grantee-id=* + + +
@@ -1925,7 +1890,7 @@ hidden false - + list Indicate whether you want to hide this item from browse and search. Combine with "Upload cmdi" for weblicht submissions. @@ -1942,7 +1907,7 @@ hasMetadata false - + list Indicate whether you will upload cmdi file in the next step. Combine with "hide" for weblicht @@ -2092,6 +2057,27 @@ + + + local + bitstream + redirectToURL + false + + onebox + + Please enter the full path of the file, either from the local server or an HTTP location. + The maximum upload size for a file is 4GB. To upload a file larger than this limit, provide the + URL of the file. Ensure the admin is aware of the URL of the bitstream file. + Once the file path or URL is entered, click the 'Save' button to begin the upload. + Note: The file path must be an absolute path. + + + + policy=deny,action=read,grantee-type=user,grantee-id=* + + +
@@ -2129,7 +2115,7 @@ relation isreplacedby true - + autocomplete A related resource that supplants, displaces, or supersedes the described resource. @@ -3204,7 +3190,7 @@ - Hidden + Yes hidden @@ -3222,15 +3208,15 @@ Uncomment the example row of the complex input type definition to see this input in the submission UI. --> - - - - + + + + - + @@ -3247,4 +3233,4 @@ required="true"/> - + \ No newline at end of file