Coverage for oc_ocdm / graph / entities / bibliographic / bibliographic_resource.py: 83%
273 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-28 18:52 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-28 18:52 +0000
1#!/usr/bin/python
3# SPDX-FileCopyrightText: 2020-2022 Simone Persiani <iosonopersia@gmail.com>
4# SPDX-FileCopyrightText: 2022-2024 Arcangelo Massari <arcangelo.massari@unibo.it>
5#
6# SPDX-License-Identifier: ISC
8# -*- coding: utf-8 -*-
9from __future__ import annotations
11from typing import TYPE_CHECKING
13from oc_ocdm.decorators import accepts_only
14from oc_ocdm.support.support import get_datatype_from_iso_8601
16if TYPE_CHECKING:
17 from typing import Optional, List
18 from rdflib import URIRef
19 from oc_ocdm.graph.entities.bibliographic.bibliographic_reference import BibliographicReference
20 from oc_ocdm.graph.entities.bibliographic.agent_role import AgentRole
21 from oc_ocdm.graph.entities.bibliographic.discourse_element import DiscourseElement
22 from oc_ocdm.graph.entities.bibliographic.resource_embodiment import ResourceEmbodiment
23from oc_ocdm.graph.graph_entity import GraphEntity
24from oc_ocdm.graph.entities.bibliographic_entity import BibliographicEntity
27class BibliographicResource(BibliographicEntity):
28 """Bibliographic resource (short: br): a published bibliographic resource that cites/is
29 cited by another published bibliographic resource."""
31 def _merge_properties(self, other: GraphEntity, prefer_self: bool) -> None:
32 """
33 The merge operation allows combining two `BibliographicResource` entities into a single one,
34 by marking the second entity as to be deleted while also copying its data into the current
35 `BibliographicResource`. Moreover, every triple from the containing `GraphSet` referring to the second
36 entity gets "redirected" to the current entity: **every other reference contained inside a
37 different source (e.g. a triplestore) must be manually handled by the user!**
39 In case of functional properties, values from the current entity get overwritten
40 by those coming from the second entity while, in all other cases, values from the
41 second entity are simply appended to those of the current entity. In this context,
42 `rdfs:label` is considered as a functional property, while `rdf:type` is not.
44 :param other: The entity which will be marked as to be deleted and whose properties will
45 be merged into the current entity.
46 :type other: BibliographicResource
47 :param prefer_self: If True, prefer values from the current entity for non-functional properties
48 :type prefer_self: bool
49 :raises TypeError: if the parameter is of the wrong type
50 :return: None
51 """
52 super()._merge_properties(other, prefer_self)
53 assert isinstance(other, BibliographicResource)
55 title: Optional[str] = other.get_title()
56 if title is not None:
57 self.has_title(title)
59 subtitle: Optional[str] = other.get_subtitle()
60 if subtitle is not None:
61 self.has_subtitle(subtitle)
63 container: Optional[BibliographicResource] = other.get_is_part_of()
64 if container is not None:
65 self.is_part_of(container)
67 citations_list: List[BibliographicResource] = other.get_citations()
68 if not (prefer_self and self.get_citations()):
69 for cur_citation in citations_list:
70 self.has_citation(cur_citation)
72 pub_date: Optional[str] = other.get_pub_date()
73 if pub_date is not None:
74 self.has_pub_date(pub_date)
76 re_list: List[ResourceEmbodiment] = other.get_formats()
77 if not (prefer_self and self.get_formats()):
78 for cur_format in re_list:
79 self.has_format(cur_format)
81 number: Optional[str] = other.get_number()
82 if number is not None:
83 self.has_number(number)
85 edition: Optional[str] = other.get_edition()
86 if edition is not None:
87 self.has_edition(edition)
89 be_list: List[BibliographicReference] = other.get_contained_in_reference_lists()
90 if not (prefer_self and self.get_contained_in_reference_lists()):
91 for reference in be_list:
92 self.contains_in_reference_list(reference)
94 de_list: List[DiscourseElement] = other.get_contained_discourse_elements()
95 if not (prefer_self and self.get_contained_discourse_elements()):
96 for discourse_element in de_list:
97 self.contains_discourse_element(discourse_element)
99 ar_list: List[AgentRole] = other.get_contributors()
100 if not (prefer_self and self.get_contributors()):
101 for agent_role in ar_list:
102 self.has_contributor(agent_role)
104 related_doc_list: List[URIRef] = other.get_related_documents()
105 if not (prefer_self and self.get_related_documents()):
106 for doc in related_doc_list:
107 self.has_related_document(doc)
109 # HAS TITLE
110 def get_title(self) -> Optional[str]:
111 """
112 Getter method corresponding to the ``dcterms:title`` RDF predicate.
114 :return: The requested value if found, None otherwise
115 """
116 return self._get_literal(GraphEntity.iri_title)
118 @accepts_only('literal')
119 def has_title(self, string: str) -> None:
120 """
121 Setter method corresponding to the ``dcterms:title`` RDF predicate.
123 **WARNING: this is a functional property, hence any existing value will be overwritten!**
125 `The title of the bibliographic resource.`
127 :param string: The value that will be set as the object of the property related to this method
128 :type string: str
129 :raises TypeError: if the parameter is of the wrong type
130 :return: None
131 """
132 self.remove_title()
133 self._create_literal(GraphEntity.iri_title, string)
135 def remove_title(self) -> None:
136 """
137 Remover method corresponding to the ``dcterms:title`` RDF predicate.
139 :return: None
140 """
141 self.g.remove((self.res, GraphEntity.iri_title, None))
143 # HAS SUBTITLE
144 def get_subtitle(self) -> Optional[str]:
145 """
146 Getter method corresponding to the ``fabio:hasSubtitle`` RDF predicate.
148 :return: The requested value if found, None otherwise
149 """
150 return self._get_literal(GraphEntity.iri_has_subtitle)
152 @accepts_only('literal')
153 def has_subtitle(self, string: str) -> None:
154 """
155 Setter method corresponding to the ``fabio:hasSubtitle`` RDF predicate.
157 **WARNING: this is a functional property, hence any existing value will be overwritten!**
159 `The subtitle of the bibliographic resource.`
161 :param string: The value that will be set as the object of the property related to this method
162 :type string: str
163 :raises TypeError: if the parameter is of the wrong type
164 :return: None
165 """
166 self.remove_subtitle()
167 self._create_literal(GraphEntity.iri_has_subtitle, string)
169 def remove_subtitle(self) -> None:
170 """
171 Remover method corresponding to the ``fabio:hasSubtitle`` RDF predicate.
173 :return: None
174 """
175 self.g.remove((self.res, GraphEntity.iri_has_subtitle, None))
177 # IS PART OF (BibliographicResource)
178 def get_is_part_of(self) -> Optional[BibliographicResource]:
179 """
180 Getter method corresponding to the ``frbr:partOf`` RDF predicate.
182 :return: The requested value if found, None otherwise
183 """
184 uri: Optional[URIRef] = self._get_uri_reference(GraphEntity.iri_part_of, 'br')
185 if uri is not None:
186 return self.g_set.add_br(self.resp_agent, self.source, uri)
188 @accepts_only('br')
189 def is_part_of(self, br_res: BibliographicResource) -> None:
190 """
191 Setter method corresponding to the ``frbr:partOf`` RDF predicate.
193 **WARNING: this is a functional property, hence any existing value will be overwritten!**
195 `The corpus identifier of the bibliographic resource (e.g. issue, volume, journal,
196 conference proceedings) that contains the subject bibliographic resource.`
198 :param br_res: The value that will be set as the object of the property related to this method
199 :type br_res: BibliographicResource
200 :raises TypeError: if the parameter is of the wrong type
201 :return: None
202 """
203 self.remove_is_part_of()
204 self.g.add((self.res, GraphEntity.iri_part_of, br_res.res))
206 def remove_is_part_of(self) -> None:
207 """
208 Remover method corresponding to the ``frbr:partOf`` RDF predicate.
210 :return: None
211 """
212 self.g.remove((self.res, GraphEntity.iri_part_of, None))
214 # CITES (BibliographicResource)
215 def get_citations(self) -> List[BibliographicResource]:
216 """
217 Getter method corresponding to the ``cito:cites`` RDF predicate.
219 :return: A list containing the requested values if found, None otherwise
220 """
221 uri_list: List[URIRef] = self._get_multiple_uri_references(GraphEntity.iri_cites, 'br')
222 result: List[BibliographicResource] = []
223 for uri in uri_list:
224 result.append(self.g_set.add_br(self.resp_agent, self.source, uri))
225 return result
227 @accepts_only('br')
228 def has_citation(self, br_res: BibliographicResource) -> None:
229 """
230 Setter method corresponding to the ``cito:cites`` RDF predicate.
232 `The corpus identifier of the bibliographic resource cited by the subject bibliographic
233 resource.`
235 :param br_res: The value that will be set as the object of the property related to this method
236 :type br_res: BibliographicResource
237 :raises TypeError: if the parameter is of the wrong type
238 :return: None
239 """
240 self.g.add((self.res, GraphEntity.iri_cites, br_res.res))
242 @accepts_only('br')
243 def remove_citation(self, br_res: BibliographicResource | None = None) -> None:
244 """
245 Remover method corresponding to the ``cito:cites`` RDF predicate.
247 **WARNING: this is a non-functional property, hence, if the parameter
248 is None, any existing value will be removed!**
250 :param br_res: If not None, the specific object value that will be removed from the property
251 related to this method (defaults to None)
252 :type br_res: BibliographicResource
253 :raises TypeError: if the parameter is of the wrong type
254 :return: None
255 """
256 if br_res is not None:
257 self.g.remove((self.res, GraphEntity.iri_cites, br_res.res))
258 else:
259 self.g.remove((self.res, GraphEntity.iri_cites, None))
261 # HAS PUBLICATION DATE
262 def get_pub_date(self) -> Optional[str]:
263 """
264 Getter method corresponding to the ``prism:publicationDate`` RDF predicate.
266 :return: The requested value if found, None otherwise
267 """
268 return self._get_literal(GraphEntity.iri_has_publication_date)
270 @accepts_only('literal')
271 def has_pub_date(self, string: str) -> None:
272 """
273 Setter method corresponding to the ``prism:publicationDate`` RDF predicate.
275 **WARNING: this is a functional property, hence any existing value will be overwritten!**
277 `The date of publication of the bibliographic resource.`
279 :param string: The value that will be set as the object of the property related to this method. **It must
280 be a string compliant with the** ``ISO 8601`` **standard.**
281 :type string: str
282 :raises TypeError: if the parameter is of the wrong type
283 :return: None
284 """
285 cur_type, string = get_datatype_from_iso_8601(string)
286 if cur_type is not None and string is not None:
287 self.remove_pub_date()
288 self._create_literal(GraphEntity.iri_has_publication_date, string, cur_type, False)
290 def remove_pub_date(self) -> None:
291 """
292 Remover method corresponding to the ``prism:publicationDate`` RDF predicate.
294 :return: None
295 """
296 self.g.remove((self.res, GraphEntity.iri_has_publication_date, None))
298 # IS EMBODIED AS (ResourceEmbodiment)
299 def get_formats(self) -> List[ResourceEmbodiment]:
300 """
301 Getter method corresponding to the ``frbr:embodiment`` RDF predicate.
303 :return: A list containing the requested values if found, None otherwise
304 """
305 uri_list: List[URIRef] = self._get_multiple_uri_references(GraphEntity.iri_embodiment, 're')
306 result: List[ResourceEmbodiment] = []
307 for uri in uri_list:
308 result.append(self.g_set.add_re(self.resp_agent, self.source, uri))
309 return result
311 @accepts_only('re')
312 def has_format(self, re_res: ResourceEmbodiment) -> None:
313 """
314 Setter method corresponding to the ``frbr:embodiment`` RDF predicate.
316 `The corpus identifier of the resource embodiment defining the format in which the
317 bibliographic resource has been embodied, which can be either print or digital.`
319 :param re_res: The value that will be set as the object of the property related to this method
320 :type re_res: ResourceEmbodiment
321 :raises TypeError: if the parameter is of the wrong type
322 :return: None
323 """
324 self.g.add((self.res, GraphEntity.iri_embodiment, re_res.res))
326 @accepts_only('re')
327 def remove_format(self, re_res: ResourceEmbodiment | None = None) -> None:
328 """
329 Remover method corresponding to the ``frbr:embodiment`` RDF predicate.
331 **WARNING: this is a non-functional property, hence, if the parameter
332 is None, any existing value will be removed!**
334 :param re_res: If not None, the specific object value that will be removed from the property
335 related to this method (defaults to None)
336 :type re_res: ResourceEmbodiment
337 :raises TypeError: if the parameter is of the wrong type
338 :return: None
339 """
340 if re_res is not None:
341 self.g.remove((self.res, GraphEntity.iri_embodiment, re_res.res))
342 else:
343 self.g.remove((self.res, GraphEntity.iri_embodiment, None))
345 # HAS NUMBER
346 def get_number(self) -> Optional[str]:
347 """
348 Getter method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
350 :return: The requested value if found, None otherwise
351 """
352 return self._get_literal(GraphEntity.iri_has_sequence_identifier)
354 @accepts_only('literal')
355 def has_number(self, string: str) -> None:
356 """
357 Setter method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
359 **WARNING: this is a functional property, hence any existing value will be overwritten!**
361 `A literal (for example a number or a letter) that identifies the sequence position of the
362 bibliographic resource as a particular item within a larger collection (e.g. an article
363 number within a journal issue, a volume number of a journal, a chapter number within
364 a book).`
366 :param string: The value that will be set as the object of the property related to this method
367 :type string: str
368 :raises TypeError: if the parameter is of the wrong type
369 :return: None
370 """
371 self.remove_number()
372 self._create_literal(GraphEntity.iri_has_sequence_identifier, string)
374 def remove_number(self) -> None:
375 """
376 Remover method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
378 :return: None
379 """
380 self.g.remove((self.res, GraphEntity.iri_has_sequence_identifier, None))
382 # HAS EDITION
383 def get_edition(self) -> Optional[str]:
384 """
385 Getter method corresponding to the ``prism:edition`` RDF predicate.
387 :return: The requested value if found, None otherwise
388 """
389 return self._get_literal(GraphEntity.iri_has_edition)
391 @accepts_only('literal')
392 def has_edition(self, string: str) -> None:
393 """
394 Setter method corresponding to the ``prism:edition`` RDF predicate.
396 **WARNING: this is a functional property, hence any existing value will be overwritten!**
398 `An identifier for one of several alternative editions of a particular bibliographic
399 resource.`
401 :param string: The value that will be set as the object of the property related to this method
402 :type string: str
403 :raises TypeError: if the parameter is of the wrong type
404 :return: None
405 """
406 self.remove_edition()
407 self._create_literal(GraphEntity.iri_has_edition, string)
409 def remove_edition(self) -> None:
410 """
411 Remover method corresponding to the ``prism:edition`` RDF predicate.
413 :return: None
414 """
415 self.g.remove((self.res, GraphEntity.iri_has_edition, None))
417 # HAS PART (BibliographicReference)
418 def get_contained_in_reference_lists(self) -> List[BibliographicReference]:
419 """
420 Getter method corresponding to the ``frbr:part`` RDF predicate.
422 :return: A list containing the requested values if found, None otherwise
423 """
424 uri_list: List[URIRef] = self._get_multiple_uri_references(GraphEntity.iri_contains_reference, 'be')
425 result: List[BibliographicReference] = []
426 for uri in uri_list:
427 result.append(self.g_set.add_be(self.resp_agent, self.source, uri))
428 return result
430 @accepts_only('be')
431 def contains_in_reference_list(self, be_res: BibliographicReference) -> None:
432 """
433 Setter method corresponding to the ``frbr:part`` RDF predicate.
435 `A bibliographic reference within the bibliographic resource, or a discourse element
436 wherein the text of the bibliographic resources can be organized.`
438 :param be_res: The value that will be set as the object of the property related to this method
439 :type be_res: BibliographicReference
440 :raises TypeError: if the parameter is of the wrong type
441 :return: None
442 """
443 self.g.add((self.res, GraphEntity.iri_contains_reference, be_res.res))
445 @accepts_only('be')
446 def remove_contained_in_reference_list(self, be_res: BibliographicReference | None = None) -> None:
447 """
448 Remover method corresponding to the ``frbr:part`` RDF predicate.
450 **WARNING: this is a non-functional property, hence, if the parameter
451 is None, any existing value will be removed!**
453 :param be_res: If not None, the specific object value that will be removed from the property
454 related to this method (defaults to None)
455 :type be_res: BibliographicReference
456 :raises TypeError: if the parameter is of the wrong type
457 :return: None
458 """
459 if be_res is not None:
460 self.g.remove((self.res, GraphEntity.iri_contains_reference, be_res.res))
461 else:
462 self.g.remove((self.res, GraphEntity.iri_contains_reference, None))
464 # HAS PART (DiscourseElement)
465 def get_contained_discourse_elements(self) -> List[DiscourseElement]:
466 """
467 Getter method corresponding to the ``frbr:part`` RDF predicate.
469 :return: A list containing the requested values if found, None otherwise
470 """
471 uri_list: List[URIRef] = self._get_multiple_uri_references(GraphEntity.iri_contains_de, 'de')
472 result: List[DiscourseElement] = []
473 for uri in uri_list:
474 result.append(self.g_set.add_de(self.resp_agent, self.source, uri))
475 return result
477 @accepts_only('de')
478 def contains_discourse_element(self, de_res: DiscourseElement) -> None:
479 """
480 Setter method corresponding to the ``frbr:part`` RDF predicate.
482 `A bibliographic reference within the bibliographic resource, or a discourse element
483 wherein the text of the bibliographic resources can be organized.`
485 :param de_res: The value that will be set as the object of the property related to this method
486 :type de_res: DiscourseElement
487 :raises TypeError: if the parameter is of the wrong type
488 :return: None
489 """
490 self.g.add((self.res, GraphEntity.iri_contains_de, de_res.res))
492 @accepts_only('de')
493 def remove_contained_discourse_element(self, de_res: DiscourseElement | None = None) -> None:
494 """
495 Remover method corresponding to the ``frbr:part`` RDF predicate.
497 **WARNING: this is a non-functional property, hence, if the parameter
498 is None, any existing value will be removed!**
500 :param de_res: If not None, the specific object value that will be removed from the property
501 related to this method (defaults to None)
502 :type de_res: DiscourseElement
503 :raises TypeError: if the parameter is of the wrong type
504 :return: None
505 """
506 if de_res is not None:
507 self.g.remove((self.res, GraphEntity.iri_contains_de, de_res.res))
508 else:
509 self.g.remove((self.res, GraphEntity.iri_contains_de, None))
511 # HAS CONTRIBUTOR (AgentRole)
512 def get_contributors(self) -> List[AgentRole]:
513 """
514 Getter method corresponding to the ``pro:isDocumentContextFor`` RDF predicate.
516 :return: A list containing the requested values if found, None otherwise
517 """
518 uri_list: List[URIRef] = self._get_multiple_uri_references(GraphEntity.iri_is_document_context_for, 'ar')
519 result: List[AgentRole] = []
520 for uri in uri_list:
521 result.append(self.g_set.add_ar(self.resp_agent, self.source, uri))
522 return result
524 @accepts_only('ar')
525 def has_contributor(self, ar_res: AgentRole):
526 """
527 Setter method corresponding to the ``pro:isDocumentContextFor`` RDF predicate.
529 :param ar_res: The value that will be set as the object of the property related to this method
530 :type ar_res: AgentRole
531 :raises TypeError: if the parameter is of the wrong type
532 :return: None
533 """
534 self.g.add((self.res, GraphEntity.iri_is_document_context_for, ar_res.res))
536 @accepts_only('ar')
537 def remove_contributor(self, ar_res: AgentRole | None = None):
538 """
539 Remover method corresponding to the ``frbr:part`` RDF predicate.
541 **WARNING: this is a non-functional property, hence, if the parameter
542 is None, any existing value will be removed!**
544 :param ar_res: If not None, the specific object value that will be removed from the property
545 related to this method (defaults to None)
546 :type ar_res: AgentRole
547 :raises TypeError: if the parameter is of the wrong type
548 :return: None
549 """
550 if ar_res is not None:
551 self.g.remove((self.res, GraphEntity.iri_is_document_context_for, ar_res.res))
552 else:
553 self.g.remove((self.res, GraphEntity.iri_is_document_context_for, None))
555 # HAS RELATED DOCUMENT
556 def get_related_documents(self) -> List[URIRef]:
557 """
558 Getter method corresponding to the ``dcterms:relation`` RDF predicate.
560 :return: A list containing the requested values if found, None otherwise
561 """
562 uri_list: List[URIRef] = self._get_multiple_uri_references(GraphEntity.iri_relation)
563 return uri_list
565 @accepts_only('thing')
566 def has_related_document(self, thing_res: URIRef) -> None:
567 """
568 Setter method corresponding to the ``dcterms:relation`` RDF predicate.
570 `A document external to the Corpus, that is related to the bibliographic resource (such
571 as a version of the bibliographic resource – for example a preprint – recorded in an
572 external database).`
574 :param thing_res: The value that will be set as the object of the property related to this method
575 :type thing_res: URIRef
576 :raises TypeError: if the parameter is of the wrong type
577 :return: None
578 """
579 self.g.add((self.res, GraphEntity.iri_relation, thing_res))
581 @accepts_only('thing')
582 def remove_related_document(self, thing_res: URIRef | None = None) -> None:
583 """
584 Remover method corresponding to the ``dcterms:relation`` RDF predicate.
586 **WARNING: this is a non-functional property, hence, if the parameter
587 is None, any existing value will be removed!**
589 :param thing_res: If not None, the specific object value that will be removed from the property
590 related to this method (defaults to None)
591 :type thing_res: URIRef
592 :raises TypeError: if the parameter is of the wrong type
593 :return: None
594 """
595 if thing_res is not None:
596 self.g.remove((self.res, GraphEntity.iri_relation, thing_res))
597 else:
598 self.g.remove((self.res, GraphEntity.iri_relation, None))
600 def create_abstract(self) -> None:
601 """
602 Setter method corresponding to the ``rdf:type`` RDF predicate.
603 It implicitly sets the object value ``doco:Abstract``.
605 **WARNING: the OCDM specification admits at most two types for an entity.
606 The main type cannot be edited or removed. Any existing secondary type
607 will be overwritten!**
609 `The type of the bibliographic resource`
611 :return: None
612 """
613 self._create_type(GraphEntity.iri_abstract)
615 # HAS TYPE
616 def create_archival_document(self) -> None:
617 """
618 Setter method corresponding to the ``rdf:type`` RDF predicate.
619 It implicitly sets the object value ``fabio:ArchivalDocument``.
621 **WARNING: the OCDM specification admits at most two types for an entity.
622 The main type cannot be edited or removed. Any existing secondary type
623 will be overwritten!**
625 `The type of the bibliographic resource`
627 :return: None
628 """
629 self._create_type(GraphEntity.iri_archival_document)
631 def create_audio_document(self) -> None:
632 """
633 Setter method corresponding to the ``rdf:type`` RDF predicate.
634 It implicitly sets the object value ``fabio:AudioDocument``.
636 **WARNING: the OCDM specification admits at most two types for an entity.
637 The main type cannot be edited or removed. Any existing secondary type
638 will be overwritten!**
640 `The type of the bibliographic resource`
642 :return: None
643 """
644 self._create_type(GraphEntity.iri_audio_document)
646 def create_book(self) -> None:
647 """
648 Setter method corresponding to the ``rdf:type`` RDF predicate.
649 It implicitly sets the object value ``fabio:Book``.
651 **WARNING: the OCDM specification admits at most two types for an entity.
652 The main type cannot be edited or removed. Any existing secondary type
653 will be overwritten!**
655 `The type of the bibliographic resource`
657 :return: None
658 """
659 self._create_type(GraphEntity.iri_book)
661 def create_book_chapter(self) -> None:
662 """
663 Setter method corresponding to the ``rdf:type`` RDF predicate.
664 It implicitly sets the object value ``fabio:BookChapter``.
666 **WARNING: the OCDM specification admits at most two types for an entity.
667 The main type cannot be edited or removed. Any existing secondary type
668 will be overwritten!**
670 `The type of the bibliographic resource`
672 :return: None
673 """
674 self._create_type(GraphEntity.iri_book_chapter)
676 def create_book_part(self) -> None:
677 """
678 Setter method corresponding to the ``rdf:type`` RDF predicate.
679 It implicitly sets the object value ``doco:Part``.
681 **WARNING: the OCDM specification admits at most two types for an entity.
682 The main type cannot be edited or removed. Any existing secondary type
683 will be overwritten!**
685 `The type of the bibliographic resource`
687 :return: None
688 """
689 self._create_type(GraphEntity.iri_part)
691 def create_book_section(self) -> None:
692 """
693 Setter method corresponding to the ``rdf:type`` RDF predicate.
694 It implicitly sets the object value ``fabio:ExpressionCollection``.
696 **WARNING: the OCDM specification admits at most two types for an entity.
697 The main type cannot be edited or removed. Any existing secondary type
698 will be overwritten!**
700 `The type of the bibliographic resource`
702 :return: None
703 """
704 self._create_type(GraphEntity.iri_expression_collection)
706 def create_book_series(self) -> None:
707 """
708 Setter method corresponding to the ``rdf:type`` RDF predicate.
709 It implicitly sets the object value ``fabio:BookSeries``.
711 **WARNING: the OCDM specification admits at most two types for an entity.
712 The main type cannot be edited or removed. Any existing secondary type
713 will be overwritten!**
715 `The type of the bibliographic resource`
717 :return: None
718 """
719 self._create_type(GraphEntity.iri_book_series)
721 def create_book_set(self) -> None:
722 """
723 Setter method corresponding to the ``rdf:type`` RDF predicate.
724 It implicitly sets the object value ``fabio:BookSet``.
726 **WARNING: the OCDM specification admits at most two types for an entity.
727 The main type cannot be edited or removed. Any existing secondary type
728 will be overwritten!**
730 `The type of the bibliographic resource`
732 :return: None
733 """
734 self._create_type(GraphEntity.iri_book_set)
736 def create_book_track(self) -> None:
737 """
738 Setter method corresponding to the ``rdf:type`` RDF predicate.
739 It implicitly sets the object value ``fabio:Expression``.
741 **WARNING: the OCDM specification admits at most two types for an entity.
742 The main type cannot be edited or removed. Any existing secondary type
743 will be overwritten!**
745 `The type of the bibliographic resource`
747 :return: None
748 """
749 self._create_type(GraphEntity.iri_expression)
751 def create_component(self) -> None:
752 """
753 Setter method corresponding to the ``rdf:type`` RDF predicate.
754 It implicitly sets the object value ``fabio:Expression``.
756 **WARNING: the OCDM specification admits at most two types for an entity.
757 The main type cannot be edited or removed. Any existing secondary type
758 will be overwritten!**
760 `The type of the bibliographic resource`
762 :return: None
763 """
764 self._create_type(GraphEntity.iri_expression)
766 def create_computer_program(self) -> None:
767 """
768 Setter method corresponding to the ``rdf:type`` RDF predicate.
769 It implicitly sets the object value ``fabio:ComputerProgram``.
771 **WARNING: the OCDM specification admits at most two types for an entity.
772 The main type cannot be edited or removed. Any existing secondary type
773 will be overwritten!**
775 `The type of the bibliographic resource`
777 :return: None
778 """
779 self._create_type(GraphEntity.iri_computer_program)
781 def create_data_management_plan(self) -> None:
782 """
783 Setter method corresponding to the ``rdf:type`` RDF predicate.
784 It implicitly sets the object value ``fabio:DataManagementPlan``.
786 **WARNING: the OCDM specification admits at most two types for an entity.
787 The main type cannot be edited or removed. Any existing secondary type
788 will be overwritten!**
790 `The type of the bibliographic resource`
792 :return: None
793 """
794 self._create_type(GraphEntity.iri_data_management_plan)
796 def create_dataset(self) -> None:
797 """
798 Setter method corresponding to the ``rdf:type`` RDF predicate.
799 It implicitly sets the object value ``fabio:DataFile``.
801 **WARNING: the OCDM specification admits at most two types for an entity.
802 The main type cannot be edited or removed. Any existing secondary type
803 will be overwritten!**
805 `The type of the bibliographic resource`
807 :return: None
808 """
809 self._create_type(GraphEntity.iri_data_file)
811 def create_dissertation(self) -> None:
812 """
813 Setter method corresponding to the ``rdf:type`` RDF predicate.
814 It implicitly sets the object value ``fabio:Thesis``.
816 **WARNING: the OCDM specification admits at most two types for an entity.
817 The main type cannot be edited or removed. Any existing secondary type
818 will be overwritten!**
820 `The type of the bibliographic resource`
822 :return: None
823 """
824 self._create_type(GraphEntity.iri_thesis)
826 def create_edited_book(self) -> None:
827 """
828 Setter method corresponding to the ``rdf:type`` RDF predicate.
829 It implicitly sets the object value ``fabio:Book``.
831 **WARNING: the OCDM specification admits at most two types for an entity.
832 The main type cannot be edited or removed. Any existing secondary type
833 will be overwritten!**
835 `The type of the bibliographic resource`
837 :return: None
838 """
839 self._create_type(GraphEntity.iri_book)
841 def create_editorial(self) -> None:
842 """
843 Setter method corresponding to the ``rdf:type`` RDF predicate.
844 It implicitly sets the object value ``fabio:Editorial``.
846 **WARNING: the OCDM specification admits at most two types for an entity.
847 The main type cannot be edited or removed. Any existing secondary type
848 will be overwritten!**
850 `The type of the bibliographic resource`
852 :return: None
853 """
854 self._create_type(GraphEntity.iri_editorial)
856 def create_journal_article(self) -> None:
857 """
858 Setter method corresponding to the ``rdf:type`` RDF predicate.
859 It implicitly sets the object value ``fabio:JournalArticle``.
861 **WARNING: the OCDM specification admits at most two types for an entity.
862 The main type cannot be edited or removed. Any existing secondary type
863 will be overwritten!**
865 `The type of the bibliographic resource`
867 :return: None
868 """
869 self._create_type(GraphEntity.iri_journal_article)
871 def create_journal_editorial(self) -> None:
872 """
873 Setter method corresponding to the ``rdf:type`` RDF predicate.
874 It implicitly sets the object value ``fabio:JournalEditorial``.
876 **WARNING: the OCDM specification admits at most two types for an entity.
877 The main type cannot be edited or removed. Any existing secondary type
878 will be overwritten!**
880 `The type of the bibliographic resource`
882 :return: None
883 """
884 self._create_type(GraphEntity.iri_journal_editorial)
886 def create_issue(self) -> None:
887 """
888 Setter method corresponding to the ``rdf:type`` RDF predicate.
889 It implicitly sets the object value ``fabio:JournalIssue``.
891 **WARNING: the OCDM specification admits at most two types for an entity.
892 The main type cannot be edited or removed. Any existing secondary type
893 will be overwritten!**
895 `The type of the bibliographic resource`
897 :return: None
898 """
899 self._create_type(GraphEntity.iri_journal_issue)
901 def create_volume(self) -> None:
902 """
903 Setter method corresponding to the ``rdf:type`` RDF predicate.
904 It implicitly sets the object value ``fabio:JournalVolume``.
906 **WARNING: the OCDM specification admits at most two types for an entity.
907 The main type cannot be edited or removed. Any existing secondary type
908 will be overwritten!**
910 `The type of the bibliographic resource`
912 :return: None
913 """
914 self._create_type(GraphEntity.iri_journal_volume)
916 def create_journal(self) -> None:
917 """
918 Setter method corresponding to the ``rdf:type`` RDF predicate.
919 It implicitly sets the object value ``fabio:Journal``.
921 **WARNING: the OCDM specification admits at most two types for an entity.
922 The main type cannot be edited or removed. Any existing secondary type
923 will be overwritten!**
925 `The type of the bibliographic resource`
927 :return: None
928 """
929 self._create_type(GraphEntity.iri_journal)
931 def create_monograph(self) -> None:
932 """
933 Setter method corresponding to the ``rdf:type`` RDF predicate.
934 It implicitly sets the object value ``fabio:Book``.
936 **WARNING: the OCDM specification admits at most two types for an entity.
937 The main type cannot be edited or removed. Any existing secondary type
938 will be overwritten!**
940 `The type of the bibliographic resource`
942 :return: None
943 """
944 self._create_type(GraphEntity.iri_book)
946 def create_newspaper(self) -> None:
947 """
948 Setter method corresponding to the ``rdf:type`` RDF predicate.
949 It implicitly sets the object value ``fabio:Newspaper``.
951 **WARNING: the OCDM specification admits at most two types for an entity.
952 The main type cannot be edited or removed. Any existing secondary type
953 will be overwritten!**
955 `The type of the bibliographic resource`
957 :return: None
958 """
959 self._create_type(GraphEntity.iri_newspaper)
961 def create_newspaper_article(self) -> None:
962 """
963 Setter method corresponding to the ``rdf:type`` RDF predicate.
964 It implicitly sets the object value ``fabio:NewspaperArticle``.
966 **WARNING: the OCDM specification admits at most two types for an entity.
967 The main type cannot be edited or removed. Any existing secondary type
968 will be overwritten!**
970 `The type of the bibliographic resource`
972 :return: None
973 """
974 self._create_type(GraphEntity.iri_newspaper_article)
976 def create_newspaper_editorial(self) -> None:
977 """
978 Setter method corresponding to the ``rdf:type`` RDF predicate.
979 It implicitly sets the object value ``fabio:NewspaperEditorial``.
981 **WARNING: the OCDM specification admits at most two types for an entity.
982 The main type cannot be edited or removed. Any existing secondary type
983 will be overwritten!**
985 `The type of the bibliographic resource`
987 :return: None
988 """
989 self._create_type(GraphEntity.iri_newspaper_editorial)
991 def create_newspaper_issue(self) -> None:
992 """
993 Setter method corresponding to the ``rdf:type`` RDF predicate.
994 It implicitly sets the object value ``fabio:NewspaperIssue``.
996 **WARNING: the OCDM specification admits at most two types for an entity.
997 The main type cannot be edited or removed. Any existing secondary type
998 will be overwritten!**
1000 `The type of the bibliographic resource`
1002 :return: None
1003 """
1004 self._create_type(GraphEntity.iri_newspaper_issue)
1006 def create_peer_review(self) -> None:
1007 """
1008 Setter method corresponding to the ``rdf:type`` RDF predicate.
1009 It implicitly sets the object value ``fr:ReviewVersion``.
1011 **WARNING: the OCDM specification admits at most two types for an entity.
1012 The main type cannot be edited or removed. Any existing secondary type
1013 will be overwritten!**
1015 `The type of the bibliographic resource`
1017 :return: None
1018 """
1019 self._create_type(GraphEntity.iri_peer_review)
1021 def create_preprint(self) -> None:
1022 """
1023 Setter method corresponding to the ``rdf:type`` RDF predicate.
1024 It implicitly sets the object value ``fabio:Preprint``.
1026 **WARNING: the OCDM specification admits at most two types for an entity.
1027 The main type cannot be edited or removed. Any existing secondary type
1028 will be overwritten!**
1030 `The type of the bibliographic resource`
1032 :return: None
1033 """
1034 self._create_type(GraphEntity.iri_preprint)
1036 def create_presentation(self) -> None:
1037 """
1038 Setter method corresponding to the ``rdf:type`` RDF predicate.
1039 It implicitly sets the object value ``fabio:Presentation``.
1041 **WARNING: the OCDM specification admits at most two types for an entity.
1042 The main type cannot be edited or removed. Any existing secondary type
1043 will be overwritten!**
1045 `The type of the bibliographic resource`
1047 :return: None
1048 """
1049 self._create_type(GraphEntity.iri_presentation)
1051 def create_proceedings_article(self) -> None:
1052 """
1053 Setter method corresponding to the ``rdf:type`` RDF predicate.
1054 It implicitly sets the object value ``fabio:ProceedingsPaper``.
1056 **WARNING: the OCDM specification admits at most two types for an entity.
1057 The main type cannot be edited or removed. Any existing secondary type
1058 will be overwritten!**
1060 `The type of the bibliographic resource`
1062 :return: None
1063 """
1064 self._create_type(GraphEntity.iri_proceedings_paper)
1066 def create_proceedings(self) -> None:
1067 """
1068 Setter method corresponding to the ``rdf:type`` RDF predicate.
1069 It implicitly sets the object value ``fabio:AcademicProceedings``.
1071 **WARNING: the OCDM specification admits at most two types for an entity.
1072 The main type cannot be edited or removed. Any existing secondary type
1073 will be overwritten!**
1075 `The type of the bibliographic resource`
1077 :return: None
1078 """
1079 self._create_type(GraphEntity.iri_academic_proceedings)
1081 def create_proceedings_series(self) -> None:
1082 """
1083 Setter method corresponding to the ``rdf:type`` RDF predicate.
1084 It implicitly sets the object value ``fabio:Series``.
1086 **WARNING: the OCDM specification admits at most two types for an entity.
1087 The main type cannot be edited or removed. Any existing secondary type
1088 will be overwritten!**
1090 `The type of the bibliographic resource`
1092 :return: None
1093 """
1094 self._create_type(GraphEntity.iri_proceedings_series)
1096 def create_reference_book(self) -> None:
1097 """
1098 Setter method corresponding to the ``rdf:type`` RDF predicate.
1099 It implicitly sets the object value ``fabio:ReferenceBook``.
1101 **WARNING: the OCDM specification admits at most two types for an entity.
1102 The main type cannot be edited or removed. Any existing secondary type
1103 will be overwritten!**
1105 `The type of the bibliographic resource`
1107 :return: None
1108 """
1109 self._create_type(GraphEntity.iri_reference_book)
1111 def create_reference_entry(self) -> None:
1112 """
1113 Setter method corresponding to the ``rdf:type`` RDF predicate.
1114 It implicitly sets the object value ``fabio:ReferenceEntry``.
1116 **WARNING: the OCDM specification admits at most two types for an entity.
1117 The main type cannot be edited or removed. Any existing secondary type
1118 will be overwritten!**
1120 `The type of the bibliographic resource`
1122 :return: None
1123 """
1124 self._create_type(GraphEntity.iri_reference_entry)
1126 def create_report_series(self) -> None:
1127 """
1128 Setter method corresponding to the ``rdf:type`` RDF predicate.
1129 It implicitly sets the object value ``fabio:Series``.
1131 **WARNING: the OCDM specification admits at most two types for an entity.
1132 The main type cannot be edited or removed. Any existing secondary type
1133 will be overwritten!**
1135 `The type of the bibliographic resource`
1137 :return: None
1138 """
1139 self._create_type(GraphEntity.iri_series)
1141 def create_report(self) -> None:
1142 """
1143 Setter method corresponding to the ``rdf:type`` RDF predicate.
1144 It implicitly sets the object value ``fabio:ReportDocument``.
1146 **WARNING: the OCDM specification admits at most two types for an entity.
1147 The main type cannot be edited or removed. Any existing secondary type
1148 will be overwritten!**
1150 `The type of the bibliographic resource`
1152 :return: None
1153 """
1154 self._create_type(GraphEntity.iri_report_document)
1156 def create_retraction_notice(self) -> None:
1157 """
1158 Setter method corresponding to the ``rdf:type`` RDF predicate.
1159 It implicitly sets the object value ``fabio:RetractionNotice``.
1161 **WARNING: the OCDM specification admits at most two types for an entity.
1162 The main type cannot be edited or removed. Any existing secondary type
1163 will be overwritten!**
1165 `The type of the bibliographic resource`
1167 :return: None
1168 """
1169 self._create_type(GraphEntity.iri_retraction_notice)
1171 def create_standard_series(self) -> None:
1172 """
1173 Setter method corresponding to the ``rdf:type`` RDF predicate.
1174 It implicitly sets the object value ``fabio:Series``.
1176 **WARNING: the OCDM specification admits at most two types for an entity.
1177 The main type cannot be edited or removed. Any existing secondary type
1178 will be overwritten!**
1180 `The type of the bibliographic resource`
1182 :return: None
1183 """
1184 self._create_type(GraphEntity.iri_series)
1186 def create_standard(self) -> None:
1187 """
1188 Setter method corresponding to the ``rdf:type`` RDF predicate.
1189 It implicitly sets the object value ``fabio:SpecificationDocument``.
1191 **WARNING: the OCDM specification admits at most two types for an entity.
1192 The main type cannot be edited or removed. Any existing secondary type
1193 will be overwritten!**
1195 `The type of the bibliographic resource`
1197 :return: None
1198 """
1199 self._create_type(GraphEntity.iri_specification_document)
1201 def create_series(self) -> None:
1202 """
1203 Setter method corresponding to the ``rdf:type`` RDF predicate.
1204 It implicitly sets the object value ``fabio:Series``.
1206 **WARNING: the OCDM specification admits at most two types for an entity.
1207 The main type cannot be edited or removed. Any existing secondary type
1208 will be overwritten!**
1210 `The type of the bibliographic resource`
1212 :return: None
1213 """
1214 self._create_type(GraphEntity.iri_series)
1216 def create_expression_collection(self) -> None:
1217 """
1218 Setter method corresponding to the ``rdf:type`` RDF predicate.
1219 It implicitly sets the object value ``fabio:ExpressionCollection``.
1221 **WARNING: the OCDM specification admits at most two types for an entity.
1222 The main type cannot be edited or removed. Any existing secondary type
1223 will be overwritten!**
1225 `The type of the bibliographic resource`
1227 :return: None
1228 """
1229 self._create_type(GraphEntity.iri_expression_collection)
1231 def create_web_content(self) -> None:
1232 """
1233 Setter method corresponding to the ``rdf:type`` RDF predicate.
1234 It implicitly sets the object value ``fabio:WebContent``.
1236 **WARNING: the OCDM specification admits at most two types for an entity.
1237 The main type cannot be edited or removed. Any existing secondary type
1238 will be overwritten!**
1240 `The type of the bibliographic resource`
1242 :return: None
1243 """
1244 self._create_type(GraphEntity.iri_web_content)
1246 def create_other(self) -> None:
1247 """
1248 Setter method corresponding to the ``rdf:type`` RDF predicate.
1249 It implicitly sets the object value ``fabio:Expression``.
1251 **WARNING: the OCDM specification admits at most two types for an entity.
1252 The main type cannot be edited or removed. Any existing secondary type
1253 will be overwritten!**
1255 `The type of the bibliographic resource`
1257 :return: None
1258 """
1259 self._create_type(GraphEntity.iri_expression)