Coverage for oc_meta/constants.py: 100%
5 statements
« prev ^ index » next coverage.py v6.5.0, created at 2025-07-14 14:06 +0000
« prev ^ index » next coverage.py v6.5.0, created at 2025-07-14 14:06 +0000
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3# Copyright (c) 2022 Arcangelo Massari <arcangelo.massari@unibo.it>
4#
5# Permission to use, copy, modify, and/or distribute this software for any purpose
6# with or without fee is hereby granted, provided that the above copyright notice
7# and this permission notice appear in all copies.
8#
9# THE SOFTWARE IS PROVIDED 'AS IS' AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11# FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
12# OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
13# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
14# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
15# SOFTWARE.
17from oc_ocdm.graph.graph_entity import GraphEntity
20FORBIDDEN_IDS = {'issn:0000-0000'}
21VENUES = {'archival-document', 'book', 'book-part', 'book-section', 'book-series', 'book-set', 'edited-book', 'journal', 'journal-volume', 'journal-issue', 'monograph', 'proceedings-series', 'proceedings', 'reference-book', 'report-series', 'standard-series'}
22CONTAINER_EDITOR_TYPES = {'book chapter', 'book part', 'book section', 'book track', 'component', 'proceedings article', 'reference entry'}
24# Constants for bibliographic resources that cannot contain other resources
25ROOT_CONTAINER_TYPES = {
26 GraphEntity.iri_journal_article, # fabio:JournalArticle
27 GraphEntity.iri_book_chapter, # fabio:BookChapter
28 GraphEntity.iri_proceedings_paper, # fabio:ProceedingsPaper
29 GraphEntity.iri_journal_editorial, # fabio:JournalEditorial
30 GraphEntity.iri_newspaper_article, # fabio:NewspaperArticle
31 GraphEntity.iri_newspaper_editorial, # fabio:NewspaperEditorial
32 GraphEntity.iri_reference_entry, # fabio:ReferenceEntry
33 GraphEntity.iri_retraction_notice, # fabio:RetractionNotice
34 GraphEntity.iri_peer_review, # fabio:PeerReview
35 GraphEntity.iri_data_file, # fabio:DataFile
36 GraphEntity.iri_computer_program, # fabio:ComputerProgram
37 GraphEntity.iri_presentation, # fabio:Presentation
38 GraphEntity.iri_web_content, # fabio:WebContent
39 GraphEntity.iri_data_management_plan, # fabio:DataManagementPlan
40 GraphEntity.iri_abstract, # fabio:Abstract
41 GraphEntity.iri_editorial, # fabio:Editorial
42 GraphEntity.iri_preprint, # fabio:Preprint
43}