invenio-vocabularies 9.1.2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- invenio_vocabularies/__init__.py +16 -0
- invenio_vocabularies/administration/__init__.py +10 -0
- invenio_vocabularies/administration/views/__init__.py +10 -0
- invenio_vocabularies/administration/views/vocabularies.py +43 -0
- invenio_vocabularies/alembic/17c703ce1eb7_create_names_table.py +54 -0
- invenio_vocabularies/alembic/3ba812d80559_add_internal_name_id.py +36 -0
- invenio_vocabularies/alembic/4a9a4fd235f8_create_vocabulary_schemes.py +37 -0
- invenio_vocabularies/alembic/4f365fced43f_create_vocabularies_tables.py +92 -0
- invenio_vocabularies/alembic/55a700f897b6_add_names_and_afiliations_pid_column.py +96 -0
- invenio_vocabularies/alembic/6312f33645c1_create_affiliations_table.py +54 -0
- invenio_vocabularies/alembic/676dd587542d_create_funders_vocabulary_table.py +58 -0
- invenio_vocabularies/alembic/8ff82dfb0be8_create_vocabularies_branch.py +28 -0
- invenio_vocabularies/alembic/__init__.py +9 -0
- invenio_vocabularies/alembic/af2457652217_drop_unique_constraint_from_internal_id.py +37 -0
- invenio_vocabularies/alembic/e1146238edd3_create_awards_table.py +56 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/.eslintrc.yml +11 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/.prettierrc +1 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/package.json +25 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/AwardResults.js +95 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/CustomAwardForm.js +139 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FunderDropdown.js +87 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.js +244 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.test.js +1 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingFieldItem.js +152 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingModal.js +246 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/NoAwardResults.js +37 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/index.js +8 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/i18next.js +36 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/_generatedTranslations.js +66 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/bg/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/bg/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ca/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ca/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/cs/messages.po +97 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/cs/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/da/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/da/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/de/messages.po +98 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/de/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/el/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/el/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/en/messages.po +88 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/en/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/es/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/es/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/et/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/et/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fa/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fa/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fr/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hr/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hu/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hu/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/index.js +24 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/it/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/it/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ja/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ja/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ka/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ka/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ko/messages.po +90 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ko/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/lt/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/lt/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/no/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/no/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pl/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pl/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pt/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pt/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ro/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ro/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ru/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ru/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sk/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sk/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sv/messages.po +98 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sv/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/tr/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/tr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/uk/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/uk/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_CN/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_CN/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_TW/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_TW/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/package.json +19 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/translations.pot +88 -0
- invenio_vocabularies/cli.py +175 -0
- invenio_vocabularies/config.py +231 -0
- invenio_vocabularies/contrib/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/__init__.py +20 -0
- invenio_vocabularies/contrib/affiliations/affiliations.py +61 -0
- invenio_vocabularies/contrib/affiliations/api.py +13 -0
- invenio_vocabularies/contrib/affiliations/config.py +79 -0
- invenio_vocabularies/contrib/affiliations/datastreams.py +301 -0
- invenio_vocabularies/contrib/affiliations/facets.py +36 -0
- invenio_vocabularies/contrib/affiliations/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/jsonschemas/affiliations/affiliation-v1.0.0.json +63 -0
- invenio_vocabularies/contrib/affiliations/mappings/__init__.py +10 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/affiliations/affiliation-v2.0.0.json +171 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/affiliations/affiliation-v2.0.0.json +171 -0
- invenio_vocabularies/contrib/affiliations/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/v7/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/models.py +13 -0
- invenio_vocabularies/contrib/affiliations/resources.py +16 -0
- invenio_vocabularies/contrib/affiliations/schema.py +71 -0
- invenio_vocabularies/contrib/affiliations/services.py +15 -0
- invenio_vocabularies/contrib/awards/__init__.py +19 -0
- invenio_vocabularies/contrib/awards/api.py +13 -0
- invenio_vocabularies/contrib/awards/awards.py +96 -0
- invenio_vocabularies/contrib/awards/config.py +59 -0
- invenio_vocabularies/contrib/awards/datastreams.py +372 -0
- invenio_vocabularies/contrib/awards/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/jsonschemas/awards/award-v1.0.0.json +91 -0
- invenio_vocabularies/contrib/awards/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v1/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v2/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/v7/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/models.py +13 -0
- invenio_vocabularies/contrib/awards/resources.py +16 -0
- invenio_vocabularies/contrib/awards/schema.py +119 -0
- invenio_vocabularies/contrib/awards/serializer.py +47 -0
- invenio_vocabularies/contrib/awards/services.py +15 -0
- invenio_vocabularies/contrib/common/__init__.py +9 -0
- invenio_vocabularies/contrib/common/openaire/__init__.py +9 -0
- invenio_vocabularies/contrib/common/openaire/datastreams.py +84 -0
- invenio_vocabularies/contrib/common/ror/__init__.py +9 -0
- invenio_vocabularies/contrib/common/ror/datastreams.py +230 -0
- invenio_vocabularies/contrib/funders/__init__.py +19 -0
- invenio_vocabularies/contrib/funders/api.py +13 -0
- invenio_vocabularies/contrib/funders/config.py +78 -0
- invenio_vocabularies/contrib/funders/datastreams.py +97 -0
- invenio_vocabularies/contrib/funders/facets.py +36 -0
- invenio_vocabularies/contrib/funders/funders.py +72 -0
- invenio_vocabularies/contrib/funders/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/jsonschemas/funders/funder-v1.0.0.json +65 -0
- invenio_vocabularies/contrib/funders/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v2.0.0.json +156 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v2.0.0.json +156 -0
- invenio_vocabularies/contrib/funders/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/v7/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/models.py +13 -0
- invenio_vocabularies/contrib/funders/resources.py +16 -0
- invenio_vocabularies/contrib/funders/schema.py +88 -0
- invenio_vocabularies/contrib/funders/serializer.py +33 -0
- invenio_vocabularies/contrib/funders/services.py +15 -0
- invenio_vocabularies/contrib/names/__init__.py +19 -0
- invenio_vocabularies/contrib/names/api.py +13 -0
- invenio_vocabularies/contrib/names/components.py +24 -0
- invenio_vocabularies/contrib/names/config.py +75 -0
- invenio_vocabularies/contrib/names/datastreams.py +483 -0
- invenio_vocabularies/contrib/names/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/names/jsonschemas/names/name-v1.0.0.json +68 -0
- invenio_vocabularies/contrib/names/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/names/name-v2.0.0.json +165 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/names/name-v2.0.0.json +165 -0
- invenio_vocabularies/contrib/names/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/v7/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/models.py +13 -0
- invenio_vocabularies/contrib/names/names.py +80 -0
- invenio_vocabularies/contrib/names/permissions.py +30 -0
- invenio_vocabularies/contrib/names/resources.py +54 -0
- invenio_vocabularies/contrib/names/s3client.py +50 -0
- invenio_vocabularies/contrib/names/schema.py +121 -0
- invenio_vocabularies/contrib/names/services.py +64 -0
- invenio_vocabularies/contrib/subjects/__init__.py +22 -0
- invenio_vocabularies/contrib/subjects/api.py +14 -0
- invenio_vocabularies/contrib/subjects/config.py +90 -0
- invenio_vocabularies/contrib/subjects/datastreams.py +63 -0
- invenio_vocabularies/contrib/subjects/euroscivoc/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/euroscivoc/datastreams.py +101 -0
- invenio_vocabularies/contrib/subjects/facets.py +23 -0
- invenio_vocabularies/contrib/subjects/gemet/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/gemet/datastreams.py +140 -0
- invenio_vocabularies/contrib/subjects/jsonschemas/__init__.py +10 -0
- invenio_vocabularies/contrib/subjects/jsonschemas/subjects/subject-v1.0.0.json +69 -0
- invenio_vocabularies/contrib/subjects/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v1/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v2/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/v7/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mesh/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mesh/datastreams.py +48 -0
- invenio_vocabularies/contrib/subjects/models.py +14 -0
- invenio_vocabularies/contrib/subjects/nvs/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/nvs/datastreams.py +114 -0
- invenio_vocabularies/contrib/subjects/resources.py +17 -0
- invenio_vocabularies/contrib/subjects/schema.py +101 -0
- invenio_vocabularies/contrib/subjects/services.py +30 -0
- invenio_vocabularies/contrib/subjects/subjects.py +55 -0
- invenio_vocabularies/datastreams/__init__.py +18 -0
- invenio_vocabularies/datastreams/datastreams.py +239 -0
- invenio_vocabularies/datastreams/errors.py +29 -0
- invenio_vocabularies/datastreams/factories.py +86 -0
- invenio_vocabularies/datastreams/readers.py +448 -0
- invenio_vocabularies/datastreams/tasks.py +115 -0
- invenio_vocabularies/datastreams/transformers.py +130 -0
- invenio_vocabularies/datastreams/writers.py +222 -0
- invenio_vocabularies/datastreams/xml.py +34 -0
- invenio_vocabularies/ext.py +179 -0
- invenio_vocabularies/factories.py +193 -0
- invenio_vocabularies/fixtures.py +52 -0
- invenio_vocabularies/jobs.py +207 -0
- invenio_vocabularies/proxies.py +27 -0
- invenio_vocabularies/records/__init__.py +9 -0
- invenio_vocabularies/records/api.py +53 -0
- invenio_vocabularies/records/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/records/jsonschemas/vocabularies/definitions-v1.0.0.json +30 -0
- invenio_vocabularies/records/jsonschemas/vocabularies/vocabulary-v1.0.0.json +55 -0
- invenio_vocabularies/records/mappings/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v1/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v2/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/records/mappings/v7/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/models.py +90 -0
- invenio_vocabularies/records/pidprovider.py +118 -0
- invenio_vocabularies/records/systemfields/__init__.py +16 -0
- invenio_vocabularies/records/systemfields/pid.py +125 -0
- invenio_vocabularies/records/systemfields/relations.py +51 -0
- invenio_vocabularies/resources/__init__.py +23 -0
- invenio_vocabularies/resources/config.py +105 -0
- invenio_vocabularies/resources/resource.py +156 -0
- invenio_vocabularies/resources/schema.py +21 -0
- invenio_vocabularies/resources/serializer.py +39 -0
- invenio_vocabularies/services/__init__.py +19 -0
- invenio_vocabularies/services/components.py +58 -0
- invenio_vocabularies/services/config.py +173 -0
- invenio_vocabularies/services/custom_fields/__init__.py +17 -0
- invenio_vocabularies/services/custom_fields/subject.py +82 -0
- invenio_vocabularies/services/custom_fields/vocabulary.py +96 -0
- invenio_vocabularies/services/facets.py +114 -0
- invenio_vocabularies/services/generators.py +38 -0
- invenio_vocabularies/services/permissions.py +30 -0
- invenio_vocabularies/services/querystr.py +57 -0
- invenio_vocabularies/services/results.py +110 -0
- invenio_vocabularies/services/schema.py +163 -0
- invenio_vocabularies/services/service.py +189 -0
- invenio_vocabularies/services/tasks.py +38 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/subjects.html +23 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/vocabularies-list.html +12 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/vocabulary-details.html +71 -0
- invenio_vocabularies/translations/ar/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ar/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/bg/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/bg/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ca/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ca/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/cs/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/cs/LC_MESSAGES/messages.po +281 -0
- invenio_vocabularies/translations/da/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/da/LC_MESSAGES/messages.po +271 -0
- invenio_vocabularies/translations/de/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/de/LC_MESSAGES/messages.po +293 -0
- invenio_vocabularies/translations/el/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/el/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/es/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/es/LC_MESSAGES/messages.po +281 -0
- invenio_vocabularies/translations/et/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/et/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/fa/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/fa/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/fr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/fr/LC_MESSAGES/messages.po +279 -0
- invenio_vocabularies/translations/hr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/hr/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/hu/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/hu/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/it/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/it/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/ja/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ja/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ka/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ka/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ko/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ko/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/lt/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/lt/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/messages.pot +270 -0
- invenio_vocabularies/translations/no/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/no/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/pl/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/pl/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/pt/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/pt/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ro/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ro/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/ru/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ru/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/sk/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/sk/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/sv/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/sv/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/tr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/tr/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/uk/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/uk/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/views.py +53 -0
- invenio_vocabularies/webpack.py +51 -0
- invenio_vocabularies-9.1.2.dist-info/METADATA +517 -0
- invenio_vocabularies-9.1.2.dist-info/RECORD +337 -0
- invenio_vocabularies-9.1.2.dist-info/WHEEL +6 -0
- invenio_vocabularies-9.1.2.dist-info/entry_points.txt +73 -0
- invenio_vocabularies-9.1.2.dist-info/licenses/AUTHORS.rst +13 -0
- invenio_vocabularies-9.1.2.dist-info/licenses/LICENSE +21 -0
- invenio_vocabularies-9.1.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2022-2024 CERN.
|
|
4
|
+
# Copyright (C) 2024 California Institute of Technology.
|
|
5
|
+
#
|
|
6
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
8
|
+
# details.
|
|
9
|
+
|
|
10
|
+
"""Affiliations datastreams, transformers, writers and readers."""
|
|
11
|
+
|
|
12
|
+
from copy import deepcopy
|
|
13
|
+
|
|
14
|
+
import pycountry
|
|
15
|
+
from flask import current_app
|
|
16
|
+
|
|
17
|
+
from ...datastreams import StreamEntry
|
|
18
|
+
from ...datastreams.errors import TransformerError
|
|
19
|
+
from ...datastreams.transformers import BaseTransformer
|
|
20
|
+
from ...datastreams.writers import ServiceWriter
|
|
21
|
+
from ..affiliations.config import affiliation_edmo_country_mappings
|
|
22
|
+
from ..common.ror.datastreams import RORTransformer
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class AffiliationsServiceWriter(ServiceWriter):
|
|
26
|
+
"""Affiliations service writer."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, *args, **kwargs):
|
|
29
|
+
"""Constructor."""
|
|
30
|
+
service_or_name = kwargs.pop("service_or_name", "affiliations")
|
|
31
|
+
super().__init__(service_or_name=service_or_name, *args, **kwargs)
|
|
32
|
+
|
|
33
|
+
def _entry_id(self, entry):
|
|
34
|
+
"""Get the id from an entry."""
|
|
35
|
+
return entry["id"]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class AffiliationsRORTransformer(RORTransformer):
|
|
39
|
+
"""Affiliations ROR Transformer."""
|
|
40
|
+
|
|
41
|
+
def __init__(
|
|
42
|
+
self, *args, vocab_schemes=None, funder_fundref_doi_prefix=None, **kwargs
|
|
43
|
+
):
|
|
44
|
+
"""Constructor."""
|
|
45
|
+
if vocab_schemes is None:
|
|
46
|
+
vocab_schemes = current_app.config.get("VOCABULARIES_AFFILIATION_SCHEMES")
|
|
47
|
+
super().__init__(
|
|
48
|
+
*args,
|
|
49
|
+
vocab_schemes=vocab_schemes,
|
|
50
|
+
funder_fundref_doi_prefix=funder_fundref_doi_prefix,
|
|
51
|
+
**kwargs,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class OpenAIREOrganizationTransformer(BaseTransformer):
|
|
56
|
+
"""OpenAIRE Organization Transformer."""
|
|
57
|
+
|
|
58
|
+
def apply(self, stream_entry, **kwargs):
|
|
59
|
+
"""Applies the transformation to the stream entry."""
|
|
60
|
+
record = stream_entry.entry
|
|
61
|
+
|
|
62
|
+
if "id" not in record:
|
|
63
|
+
raise TransformerError([f"No id for: {record}"])
|
|
64
|
+
|
|
65
|
+
if not record["id"].startswith("openorgs____::"):
|
|
66
|
+
raise TransformerError([f"Not valid OpenAIRE OpenOrgs id for: {record}"])
|
|
67
|
+
|
|
68
|
+
if "pid" not in record:
|
|
69
|
+
raise TransformerError([f"No alternative identifiers for: {record}"])
|
|
70
|
+
|
|
71
|
+
organization = {}
|
|
72
|
+
|
|
73
|
+
for pid in record["pid"]:
|
|
74
|
+
if pid["scheme"] == "ROR":
|
|
75
|
+
organization["id"] = pid["value"].removeprefix("https://ror.org/")
|
|
76
|
+
elif pid["scheme"] == "PIC":
|
|
77
|
+
organization["identifiers"] = [
|
|
78
|
+
{
|
|
79
|
+
"scheme": "pic",
|
|
80
|
+
"identifier": pid["value"],
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
stream_entry.entry = organization
|
|
85
|
+
return stream_entry
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class OpenAIREAffiliationsServiceWriter(ServiceWriter):
|
|
89
|
+
"""OpenAIRE Affiliations service writer."""
|
|
90
|
+
|
|
91
|
+
def __init__(self, *args, **kwargs):
|
|
92
|
+
"""Constructor."""
|
|
93
|
+
service_or_name = kwargs.pop("service_or_name", "affiliations")
|
|
94
|
+
# Here we only update and we do not insert, since OpenAIRE data is used to augment existing affiliations
|
|
95
|
+
# (with PIC identifiers) and is not used to create new affiliations.
|
|
96
|
+
super().__init__(
|
|
97
|
+
service_or_name=service_or_name, insert=False, update=True, *args, **kwargs
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def _entry_id(self, entry):
|
|
101
|
+
"""Get the id from an entry."""
|
|
102
|
+
return entry["id"]
|
|
103
|
+
|
|
104
|
+
def _do_update(self, entry):
|
|
105
|
+
vocab_id = self._entry_id(entry)
|
|
106
|
+
current = self._resolve(vocab_id)
|
|
107
|
+
updated = deepcopy(current.to_dict())
|
|
108
|
+
|
|
109
|
+
if "identifiers" in entry:
|
|
110
|
+
# For each new identifier
|
|
111
|
+
for new_identifier in entry["identifiers"]:
|
|
112
|
+
# Either find an existing identifier with the same scheme and update the "identifier" value
|
|
113
|
+
for existing_identifier in updated["identifiers"]:
|
|
114
|
+
if existing_identifier["scheme"] == new_identifier["scheme"]:
|
|
115
|
+
existing_identifier["identifier"] = new_identifier["identifier"]
|
|
116
|
+
break
|
|
117
|
+
# Or add the new identifier to the list of identifiers
|
|
118
|
+
else:
|
|
119
|
+
updated["identifiers"].append(new_identifier)
|
|
120
|
+
|
|
121
|
+
return StreamEntry(self._service.update(self._identity, vocab_id, updated))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class EDMOOrganizationTransformer(BaseTransformer):
|
|
125
|
+
"""Transformer class to convert EDMO RDF data to a dictionary format."""
|
|
126
|
+
|
|
127
|
+
def apply(self, stream_entry, **kwargs):
|
|
128
|
+
"""Applies the transformation to the stream entry."""
|
|
129
|
+
record = stream_entry.entry
|
|
130
|
+
edmo_uri = record["org"]["value"]
|
|
131
|
+
id_ = "edmo:" + edmo_uri.split("/")[-1]
|
|
132
|
+
name = record["name"]["value"]
|
|
133
|
+
alt_name = record.get("altName", {}).get("value")
|
|
134
|
+
country_name = record.get("countryName", {}).get("value")
|
|
135
|
+
locality = record.get("locality", {}).get("value")
|
|
136
|
+
deprecated = record["deprecated"]["value"]
|
|
137
|
+
|
|
138
|
+
# Fix organizations with the old country name "Cape Verde".
|
|
139
|
+
# "Cabo Verde" is the new official name also used by ROR, e.g. https://api.ror.org/v2/organizations/001fphc23
|
|
140
|
+
if country_name in affiliation_edmo_country_mappings:
|
|
141
|
+
country_name = affiliation_edmo_country_mappings[country_name]
|
|
142
|
+
|
|
143
|
+
# Logic to convert a country name to a 2 letters country code.
|
|
144
|
+
country = None
|
|
145
|
+
if country_name:
|
|
146
|
+
country_dict = pycountry.countries.get(name=country_name)
|
|
147
|
+
if country_dict:
|
|
148
|
+
country = country_dict.alpha_2
|
|
149
|
+
else:
|
|
150
|
+
raise TransformerError([f"No alpha_2 country found for: {record}"])
|
|
151
|
+
|
|
152
|
+
# Mandatory fields
|
|
153
|
+
organization = {
|
|
154
|
+
"id": id_,
|
|
155
|
+
"identifiers": [
|
|
156
|
+
{
|
|
157
|
+
"scheme": "edmo",
|
|
158
|
+
"identifier": edmo_uri,
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"name": name,
|
|
162
|
+
"title": {
|
|
163
|
+
"en": name,
|
|
164
|
+
},
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
# Optional fields
|
|
168
|
+
if alt_name:
|
|
169
|
+
organization["acronym"] = alt_name
|
|
170
|
+
|
|
171
|
+
if country_name:
|
|
172
|
+
organization["country_name"] = country_name
|
|
173
|
+
|
|
174
|
+
if country:
|
|
175
|
+
organization["country"] = country
|
|
176
|
+
|
|
177
|
+
if locality:
|
|
178
|
+
organization["location_name"] = locality
|
|
179
|
+
|
|
180
|
+
stream_entry.entry = organization
|
|
181
|
+
return stream_entry
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
VOCABULARIES_DATASTREAM_READERS = {}
|
|
185
|
+
"""Affiliations datastream readers."""
|
|
186
|
+
|
|
187
|
+
VOCABULARIES_DATASTREAM_WRITERS = {
|
|
188
|
+
"affiliations-service": AffiliationsServiceWriter,
|
|
189
|
+
"openaire-affiliations-service": OpenAIREAffiliationsServiceWriter,
|
|
190
|
+
}
|
|
191
|
+
"""Affiliations datastream writers."""
|
|
192
|
+
|
|
193
|
+
VOCABULARIES_DATASTREAM_TRANSFORMERS = {
|
|
194
|
+
"ror-affiliations": AffiliationsRORTransformer,
|
|
195
|
+
"openaire-organization": OpenAIREOrganizationTransformer,
|
|
196
|
+
"edmo-organization": EDMOOrganizationTransformer,
|
|
197
|
+
}
|
|
198
|
+
"""Affiliations datastream transformers."""
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
DATASTREAM_CONFIG = {
|
|
202
|
+
"readers": [
|
|
203
|
+
{"type": "ror-http"},
|
|
204
|
+
{
|
|
205
|
+
"type": "zip",
|
|
206
|
+
"args": {
|
|
207
|
+
"regex": "-ror-data\\.json$",
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
{"type": "json"},
|
|
211
|
+
],
|
|
212
|
+
"transformers": [
|
|
213
|
+
{
|
|
214
|
+
"type": "ror-affiliations",
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
"writers": [
|
|
218
|
+
{
|
|
219
|
+
"type": "async",
|
|
220
|
+
"args": {
|
|
221
|
+
"writer": {
|
|
222
|
+
"type": "affiliations-service",
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
}
|
|
228
|
+
"""Data Stream configuration.
|
|
229
|
+
|
|
230
|
+
An origin is required for the reader.
|
|
231
|
+
"""
|
|
232
|
+
|
|
233
|
+
DATASTREAM_CONFIG_OPENAIRE = {
|
|
234
|
+
"readers": [
|
|
235
|
+
{"type": "openaire-http", "args": {"tar_href": "/organization.tar"}},
|
|
236
|
+
{
|
|
237
|
+
"type": "tar",
|
|
238
|
+
"args": {
|
|
239
|
+
"regex": "\\.json.gz$",
|
|
240
|
+
"mode": "r",
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
{"type": "gzip"},
|
|
244
|
+
{"type": "jsonl"},
|
|
245
|
+
],
|
|
246
|
+
"transformers": [
|
|
247
|
+
{
|
|
248
|
+
"type": "openaire-organization",
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
"writers": [
|
|
252
|
+
{
|
|
253
|
+
"type": "async",
|
|
254
|
+
"args": {
|
|
255
|
+
"writer": {
|
|
256
|
+
"type": "openaire-affiliations-service",
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
}
|
|
262
|
+
"""Alternative Data Stream configuration for OpenAIRE Affiliations."""
|
|
263
|
+
|
|
264
|
+
DATASTREAM_CONFIG_EDMO = {
|
|
265
|
+
"readers": [
|
|
266
|
+
{
|
|
267
|
+
"type": "sparql",
|
|
268
|
+
"args": {
|
|
269
|
+
"origin": "https://edmo.seadatanet.org/sparql/sparql",
|
|
270
|
+
"query": """
|
|
271
|
+
SELECT ?org ?name ?altName ?countryName ?locality ?deprecated
|
|
272
|
+
WHERE {
|
|
273
|
+
?org a <http://www.w3.org/ns/org#Organization> .
|
|
274
|
+
?org <http://www.w3.org/ns/org#name> ?name .
|
|
275
|
+
OPTIONAL { ?org <http://www.w3.org/2004/02/skos/core#altName> ?altName } .
|
|
276
|
+
OPTIONAL { ?org <http://www.w3.org/2006/vcard/ns#country-name> ?countryName } .
|
|
277
|
+
OPTIONAL { ?org <http://www.w3.org/2006/vcard/ns#locality> ?locality } .
|
|
278
|
+
OPTIONAL { ?org <http://www.w3.org/2002/07/owl#deprecated> ?deprecated } .
|
|
279
|
+
FILTER (!?deprecated)
|
|
280
|
+
}
|
|
281
|
+
""",
|
|
282
|
+
},
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"transformers": [
|
|
286
|
+
{
|
|
287
|
+
"type": "edmo-organization",
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
"writers": [
|
|
291
|
+
{
|
|
292
|
+
"type": "async",
|
|
293
|
+
"args": {
|
|
294
|
+
"writer": {
|
|
295
|
+
"type": "affiliations-service",
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
}
|
|
301
|
+
"""Alternative Data Stream configuration for EDMO Affiliations."""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2022 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
6
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
7
|
+
# details.
|
|
8
|
+
|
|
9
|
+
"""Vocabulary affiliations facets and labels."""
|
|
10
|
+
|
|
11
|
+
from ...services.facets import VocabularyLabels, lazy_get_label
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AffiliationsLabels(VocabularyLabels):
|
|
15
|
+
"""Fetching of vocabulary labels for facets."""
|
|
16
|
+
|
|
17
|
+
def __init__(self, vocabulary, cache=True, cache_ttl=3600, service_id=None):
|
|
18
|
+
"""Initialize the labels.
|
|
19
|
+
|
|
20
|
+
:param vocabulary: the name of the vocabulary type.
|
|
21
|
+
:param cache: use simple process in-memory cache when True.
|
|
22
|
+
:param cache_ttl: cache expiration in seconds.
|
|
23
|
+
:param service_id: the id of the registered service to be used
|
|
24
|
+
when fetching values for the vocabulary.
|
|
25
|
+
"""
|
|
26
|
+
super().__init__(
|
|
27
|
+
vocabulary,
|
|
28
|
+
cache=cache,
|
|
29
|
+
cache_ttl=cache_ttl,
|
|
30
|
+
service_id="affiliations",
|
|
31
|
+
)
|
|
32
|
+
self.fields = ("id", "title") # not configurable
|
|
33
|
+
|
|
34
|
+
def _vocab_to_label(self, vocab):
|
|
35
|
+
"""Returns the label string for a vocabulary entry."""
|
|
36
|
+
return f"{lazy_get_label(vocab['title'])}"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2021 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
6
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
7
|
+
# details.
|
|
8
|
+
|
|
9
|
+
"""Affiliations JSONSchemas module."""
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "local://affiliations/affiliation-v1.0.0.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"$ref": "local://definitions-v1.0.0.json#/$schema"
|
|
9
|
+
},
|
|
10
|
+
"tags": {
|
|
11
|
+
"$ref": "local://vocabularies/definitions-v1.0.0.json#/tags"
|
|
12
|
+
},
|
|
13
|
+
"country": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Represents a affiliation's country as a country code."
|
|
16
|
+
},
|
|
17
|
+
"country_name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Represents a affiliation's country as a full name."
|
|
20
|
+
},
|
|
21
|
+
"location_name": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Represents a affiliation's location name (usually a city)."
|
|
24
|
+
},
|
|
25
|
+
"acronym": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"identifiers": {
|
|
29
|
+
"description": "Alternate identifiers for the record.",
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"$ref": "local://definitions-v1.0.0.json#/identifiers_with_scheme"
|
|
33
|
+
},
|
|
34
|
+
"uniqueItems": true
|
|
35
|
+
},
|
|
36
|
+
"status": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Status of the affiliation organization."
|
|
39
|
+
},
|
|
40
|
+
"aliases": {
|
|
41
|
+
"description": "Alternate names for the affiliation.",
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"uniqueItems": true
|
|
47
|
+
},
|
|
48
|
+
"types": {
|
|
49
|
+
"description": "Types of affiliation organization.",
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
"uniqueItems": true
|
|
55
|
+
},
|
|
56
|
+
"name": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"title": {
|
|
60
|
+
"$ref": "local://vocabularies/definitions-v1.0.0.json#/title"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2022 CERN.
|
|
4
|
+
# Copyright (C) 2022 Northwestern University.
|
|
5
|
+
#
|
|
6
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
8
|
+
# details.
|
|
9
|
+
|
|
10
|
+
"""Affiliations search mappings."""
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2022 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
6
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
7
|
+
# details.
|
|
8
|
+
|
|
9
|
+
"""Affiliations OpenSearch v1 mappings."""
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": {
|
|
3
|
+
"dynamic_templates": [
|
|
4
|
+
{
|
|
5
|
+
"i18n_title": {
|
|
6
|
+
"path_match": "title.*",
|
|
7
|
+
"match_mapping_type": "string",
|
|
8
|
+
"mapping": {
|
|
9
|
+
"type": "search_as_you_type"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"dynamic": "strict",
|
|
15
|
+
"properties": {
|
|
16
|
+
"$schema": {
|
|
17
|
+
"type": "keyword",
|
|
18
|
+
"index": "false"
|
|
19
|
+
},
|
|
20
|
+
"created": {
|
|
21
|
+
"type": "date"
|
|
22
|
+
},
|
|
23
|
+
"updated": {
|
|
24
|
+
"type": "date"
|
|
25
|
+
},
|
|
26
|
+
"indexed_at": {
|
|
27
|
+
"type": "date"
|
|
28
|
+
},
|
|
29
|
+
"uuid": {
|
|
30
|
+
"type": "keyword"
|
|
31
|
+
},
|
|
32
|
+
"version_id": {
|
|
33
|
+
"type": "integer"
|
|
34
|
+
},
|
|
35
|
+
"id": {
|
|
36
|
+
"type": "keyword"
|
|
37
|
+
},
|
|
38
|
+
"name_sort": {
|
|
39
|
+
"type": "keyword"
|
|
40
|
+
},
|
|
41
|
+
"name": {
|
|
42
|
+
"type": "text",
|
|
43
|
+
"copy_to": "name_sort",
|
|
44
|
+
"fields": {
|
|
45
|
+
"suggest": {
|
|
46
|
+
"type": "search_as_you_type"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"acronym": {
|
|
51
|
+
"type": "text",
|
|
52
|
+
"fields": {
|
|
53
|
+
"suggest": {
|
|
54
|
+
"type": "search_as_you_type"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"identifiers": {
|
|
59
|
+
"properties": {
|
|
60
|
+
"identifier": {
|
|
61
|
+
"type": "keyword"
|
|
62
|
+
},
|
|
63
|
+
"scheme": {
|
|
64
|
+
"type": "keyword"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"pid": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"properties": {
|
|
71
|
+
"pk": {
|
|
72
|
+
"type": "integer"
|
|
73
|
+
},
|
|
74
|
+
"pid_type": {
|
|
75
|
+
"type": "keyword"
|
|
76
|
+
},
|
|
77
|
+
"obj_type": {
|
|
78
|
+
"type": "keyword"
|
|
79
|
+
},
|
|
80
|
+
"status": {
|
|
81
|
+
"type": "keyword"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"title": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"dynamic": "true"
|
|
88
|
+
},
|
|
89
|
+
"tags": {
|
|
90
|
+
"type": "keyword"
|
|
91
|
+
},
|
|
92
|
+
"country": {
|
|
93
|
+
"type": "text"
|
|
94
|
+
},
|
|
95
|
+
"country_name": {
|
|
96
|
+
"type": "text"
|
|
97
|
+
},
|
|
98
|
+
"location_name": {
|
|
99
|
+
"type": "text"
|
|
100
|
+
},
|
|
101
|
+
"status": {
|
|
102
|
+
"type": "keyword"
|
|
103
|
+
},
|
|
104
|
+
"aliases": {
|
|
105
|
+
"type": "text"
|
|
106
|
+
},
|
|
107
|
+
"types": {
|
|
108
|
+
"type": "keyword"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|