Coverage for oc_ocdm / graph / entities / bibliographic / bibliographic_resource.py: 83%
260 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-07-06 20:05 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-07-06 20:05 +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 triplelite import RDFTerm
15from oc_ocdm.decorators import accepts_only
16from oc_ocdm.support.support import get_datatype_from_iso_8601
18if TYPE_CHECKING:
19 from typing import List, Optional
21 from oc_ocdm.graph.entities.bibliographic.agent_role import AgentRole
22 from oc_ocdm.graph.entities.bibliographic.bibliographic_reference import BibliographicReference
23 from oc_ocdm.graph.entities.bibliographic.discourse_element import DiscourseElement
24 from oc_ocdm.graph.entities.bibliographic.resource_embodiment import ResourceEmbodiment
25from oc_ocdm.graph.entities.bibliographic_entity import BibliographicEntity
26from oc_ocdm.graph.graph_entity import GraphEntity
29class BibliographicResource(BibliographicEntity):
30 """Bibliographic resource (short: br): a published bibliographic resource that cites/is
31 cited by another published bibliographic resource."""
33 def _merge_properties(self, other: GraphEntity, prefer_self: bool) -> None:
34 """
35 The merge operation allows combining two `BibliographicResource` entities into a single one,
36 by marking the second entity as to be deleted while also copying its data into the current
37 `BibliographicResource`. Moreover, every triple from the containing `GraphSet` referring to the second
38 entity gets "redirected" to the current entity: **every other reference contained inside a
39 different source (e.g. a triplestore) must be manually handled by the user!**
41 By default, functional values from the current entity get overwritten by values
42 from the second entity. When ``prefer_self`` is True, existing functional values
43 from the current entity are kept. Non-functional values from the second entity
44 are appended to those of the current entity. In this context,
45 `rdfs:label` is considered as a functional property, while `rdf:type` is not.
47 :param other: The entity which will be marked as to be deleted and whose properties will
48 be merged into the current entity.
49 :type other: BibliographicResource
50 :param prefer_self: If True, keep existing functional values from the current entity
51 :type prefer_self: bool
52 :raises TypeError: if the parameter is of the wrong type
53 :return: None
54 """
55 super()._merge_properties(other, prefer_self)
56 assert isinstance(other, BibliographicResource)
58 title: Optional[str] = other.get_title()
59 if title is not None and self._should_merge_functional_property(self.get_title(), prefer_self):
60 self.has_title(title)
62 subtitle: Optional[str] = other.get_subtitle()
63 if subtitle is not None and self._should_merge_functional_property(self.get_subtitle(), prefer_self):
64 self.has_subtitle(subtitle)
66 container: Optional[BibliographicResource] = other.get_is_part_of()
67 if container is not None and self._should_merge_functional_property(self.get_is_part_of(), prefer_self):
68 self.is_part_of(container)
70 citations_list: List[BibliographicResource] = other.get_citations()
71 for cur_citation in citations_list:
72 self.has_citation(cur_citation)
74 pub_date: Optional[str] = other.get_pub_date()
75 if pub_date is not None and self._should_merge_functional_property(self.get_pub_date(), prefer_self):
76 self.has_pub_date(pub_date)
78 re_list: List[ResourceEmbodiment] = other.get_formats()
79 for cur_format in re_list:
80 self.has_format(cur_format)
82 number: Optional[str] = other.get_number()
83 if number is not None and self._should_merge_functional_property(self.get_number(), prefer_self):
84 self.has_number(number)
86 edition: Optional[str] = other.get_edition()
87 if edition is not None and self._should_merge_functional_property(self.get_edition(), prefer_self):
88 self.has_edition(edition)
90 be_list: List[BibliographicReference] = other.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 for discourse_element in de_list:
96 self.contains_discourse_element(discourse_element)
98 ar_list: List[AgentRole] = other.get_contributors()
99 for agent_role in ar_list:
100 self.has_contributor(agent_role)
102 related_doc_list: List[str] = other.get_related_documents()
103 for doc in related_doc_list:
104 self.has_related_document(doc)
106 # HAS TITLE
107 def get_title(self) -> Optional[str]:
108 """
109 Getter method corresponding to the ``dcterms:title`` RDF predicate.
111 :return: The requested value if found, None otherwise
112 """
113 return self._get_literal(GraphEntity.iri_title)
115 def has_title(self, string: str) -> None:
116 """
117 Setter method corresponding to the ``dcterms:title`` RDF predicate.
119 **WARNING: this is a functional property, hence any existing value will be overwritten!**
121 `The title of the bibliographic resource.`
123 :param string: The value that will be set as the object of the property related to this method
124 :type string: str
125 :raises TypeError: if the parameter is of the wrong type
126 :return: None
127 """
128 self.remove_title()
129 self._create_literal(GraphEntity.iri_title, string)
131 def remove_title(self) -> None:
132 """
133 Remover method corresponding to the ``dcterms:title`` RDF predicate.
135 :return: None
136 """
137 self.g.remove((self.res, GraphEntity.iri_title, None))
139 # HAS SUBTITLE
140 def get_subtitle(self) -> Optional[str]:
141 """
142 Getter method corresponding to the ``fabio:hasSubtitle`` RDF predicate.
144 :return: The requested value if found, None otherwise
145 """
146 return self._get_literal(GraphEntity.iri_has_subtitle)
148 def has_subtitle(self, string: str) -> None:
149 """
150 Setter method corresponding to the ``fabio:hasSubtitle`` RDF predicate.
152 **WARNING: this is a functional property, hence any existing value will be overwritten!**
154 `The subtitle of the bibliographic resource.`
156 :param string: The value that will be set as the object of the property related to this method
157 :type string: str
158 :raises TypeError: if the parameter is of the wrong type
159 :return: None
160 """
161 self.remove_subtitle()
162 self._create_literal(GraphEntity.iri_has_subtitle, string)
164 def remove_subtitle(self) -> None:
165 """
166 Remover method corresponding to the ``fabio:hasSubtitle`` RDF predicate.
168 :return: None
169 """
170 self.g.remove((self.res, GraphEntity.iri_has_subtitle, None))
172 # IS PART OF (BibliographicResource)
173 def get_is_part_of(self) -> Optional[BibliographicResource]:
174 """
175 Getter method corresponding to the ``frbr:partOf`` RDF predicate.
177 :return: The requested value if found, None otherwise
178 """
179 uri: Optional[str] = self._get_uri_reference(GraphEntity.iri_part_of, "br")
180 if uri is not None:
181 return self.g_set.add_br(self.resp_agent, self.source, uri)
183 @accepts_only("br")
184 def is_part_of(self, br_res: BibliographicResource) -> None:
185 """
186 Setter method corresponding to the ``frbr:partOf`` RDF predicate.
188 **WARNING: this is a functional property, hence any existing value will be overwritten!**
190 `The corpus identifier of the bibliographic resource (e.g. issue, volume, journal,
191 conference proceedings) that contains the subject bibliographic resource.`
193 :param br_res: The value that will be set as the object of the property related to this method
194 :type br_res: BibliographicResource
195 :raises TypeError: if the parameter is of the wrong type
196 :return: None
197 """
198 self.remove_is_part_of()
199 self.g.add((self.res, GraphEntity.iri_part_of, RDFTerm("uri", str(br_res.res))))
201 def remove_is_part_of(self) -> None:
202 """
203 Remover method corresponding to the ``frbr:partOf`` RDF predicate.
205 :return: None
206 """
207 self.g.remove((self.res, GraphEntity.iri_part_of, None))
209 # CITES (BibliographicResource)
210 def get_citations(self) -> List[BibliographicResource]:
211 """
212 Getter method corresponding to the ``cito:cites`` RDF predicate.
214 :return: A list containing the requested values if found, None otherwise
215 """
216 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_cites, "br")
217 result: List[BibliographicResource] = []
218 for uri in uri_list:
219 result.append(self.g_set.add_br(self.resp_agent, self.source, uri))
220 return result
222 @accepts_only("br")
223 def has_citation(self, br_res: BibliographicResource) -> None:
224 """
225 Setter method corresponding to the ``cito:cites`` RDF predicate.
227 `The corpus identifier of the bibliographic resource cited by the subject bibliographic
228 resource.`
230 :param br_res: The value that will be set as the object of the property related to this method
231 :type br_res: BibliographicResource
232 :raises TypeError: if the parameter is of the wrong type
233 :return: None
234 """
235 self.g.add((self.res, GraphEntity.iri_cites, RDFTerm("uri", str(br_res.res))))
237 @accepts_only("br")
238 def remove_citation(self, br_res: BibliographicResource | None = None) -> None:
239 """
240 Remover method corresponding to the ``cito:cites`` RDF predicate.
242 **WARNING: this is a non-functional property, hence, if the parameter
243 is None, any existing value will be removed!**
245 :param br_res: If not None, the specific object value that will be removed from the property
246 related to this method (defaults to None)
247 :type br_res: BibliographicResource
248 :raises TypeError: if the parameter is of the wrong type
249 :return: None
250 """
251 if br_res is not None:
252 self.g.remove((self.res, GraphEntity.iri_cites, RDFTerm("uri", str(br_res.res))))
253 else:
254 self.g.remove((self.res, GraphEntity.iri_cites, None))
256 # HAS PUBLICATION DATE
257 def get_pub_date(self) -> Optional[str]:
258 """
259 Getter method corresponding to the ``prism:publicationDate`` RDF predicate.
261 :return: The requested value if found, None otherwise
262 """
263 return self._get_literal(GraphEntity.iri_has_publication_date)
265 def has_pub_date(self, string: str) -> None:
266 """
267 Setter method corresponding to the ``prism:publicationDate`` RDF predicate.
269 **WARNING: this is a functional property, hence any existing value will be overwritten!**
271 `The date of publication of the bibliographic resource.`
273 :param string: The value that will be set as the object of the property related to this method. **It must
274 be a string compliant with the** ``ISO 8601`` **standard.**
275 :type string: str
276 :raises TypeError: if the parameter is of the wrong type
277 :return: None
278 """
279 cur_type, string = get_datatype_from_iso_8601(string)
280 self.remove_pub_date()
281 self._create_literal(GraphEntity.iri_has_publication_date, string, cur_type, False)
283 def remove_pub_date(self) -> None:
284 """
285 Remover method corresponding to the ``prism:publicationDate`` RDF predicate.
287 :return: None
288 """
289 self.g.remove((self.res, GraphEntity.iri_has_publication_date, None))
291 # IS EMBODIED AS (ResourceEmbodiment)
292 def get_formats(self) -> List[ResourceEmbodiment]:
293 """
294 Getter method corresponding to the ``frbr:embodiment`` RDF predicate.
296 :return: A list containing the requested values if found, None otherwise
297 """
298 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_embodiment, "re")
299 result: List[ResourceEmbodiment] = []
300 for uri in uri_list:
301 result.append(self.g_set.add_re(self.resp_agent, self.source, uri))
302 return result
304 @accepts_only("re")
305 def has_format(self, re_res: ResourceEmbodiment) -> None:
306 """
307 Setter method corresponding to the ``frbr:embodiment`` RDF predicate.
309 `The corpus identifier of the resource embodiment defining the format in which the
310 bibliographic resource has been embodied, which can be either print or digital.`
312 :param re_res: The value that will be set as the object of the property related to this method
313 :type re_res: ResourceEmbodiment
314 :raises TypeError: if the parameter is of the wrong type
315 :return: None
316 """
317 self.g.add((self.res, GraphEntity.iri_embodiment, RDFTerm("uri", str(re_res.res))))
319 @accepts_only("re")
320 def remove_format(self, re_res: ResourceEmbodiment | None = None) -> None:
321 """
322 Remover method corresponding to the ``frbr:embodiment`` RDF predicate.
324 **WARNING: this is a non-functional property, hence, if the parameter
325 is None, any existing value will be removed!**
327 :param re_res: If not None, the specific object value that will be removed from the property
328 related to this method (defaults to None)
329 :type re_res: ResourceEmbodiment
330 :raises TypeError: if the parameter is of the wrong type
331 :return: None
332 """
333 if re_res is not None:
334 self.g.remove((self.res, GraphEntity.iri_embodiment, RDFTerm("uri", str(re_res.res))))
335 else:
336 self.g.remove((self.res, GraphEntity.iri_embodiment, None))
338 # HAS NUMBER
339 def get_number(self) -> Optional[str]:
340 """
341 Getter method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
343 :return: The requested value if found, None otherwise
344 """
345 return self._get_literal(GraphEntity.iri_has_sequence_identifier)
347 def has_number(self, string: str) -> None:
348 """
349 Setter method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
351 **WARNING: this is a functional property, hence any existing value will be overwritten!**
353 `A literal (for example a number or a letter) that identifies the sequence position of the
354 bibliographic resource as a particular item within a larger collection (e.g. an article
355 number within a journal issue, a volume number of a journal, a chapter number within
356 a book).`
358 :param string: The value that will be set as the object of the property related to this method
359 :type string: str
360 :raises TypeError: if the parameter is of the wrong type
361 :return: None
362 """
363 self.remove_number()
364 self._create_literal(GraphEntity.iri_has_sequence_identifier, string)
366 def remove_number(self) -> None:
367 """
368 Remover method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
370 :return: None
371 """
372 self.g.remove((self.res, GraphEntity.iri_has_sequence_identifier, None))
374 # HAS EDITION
375 def get_edition(self) -> Optional[str]:
376 """
377 Getter method corresponding to the ``prism:edition`` RDF predicate.
379 :return: The requested value if found, None otherwise
380 """
381 return self._get_literal(GraphEntity.iri_has_edition)
383 def has_edition(self, string: str) -> None:
384 """
385 Setter method corresponding to the ``prism:edition`` RDF predicate.
387 **WARNING: this is a functional property, hence any existing value will be overwritten!**
389 `An identifier for one of several alternative editions of a particular bibliographic
390 resource.`
392 :param string: The value that will be set as the object of the property related to this method
393 :type string: str
394 :raises TypeError: if the parameter is of the wrong type
395 :return: None
396 """
397 self.remove_edition()
398 self._create_literal(GraphEntity.iri_has_edition, string)
400 def remove_edition(self) -> None:
401 """
402 Remover method corresponding to the ``prism:edition`` RDF predicate.
404 :return: None
405 """
406 self.g.remove((self.res, GraphEntity.iri_has_edition, None))
408 # HAS PART (BibliographicReference)
409 def get_contained_in_reference_lists(self) -> List[BibliographicReference]:
410 """
411 Getter method corresponding to the ``frbr:part`` RDF predicate.
413 :return: A list containing the requested values if found, None otherwise
414 """
415 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_contains_reference, "be")
416 result: List[BibliographicReference] = []
417 for uri in uri_list:
418 result.append(self.g_set.add_be(self.resp_agent, self.source, uri))
419 return result
421 @accepts_only("be")
422 def contains_in_reference_list(self, be_res: BibliographicReference) -> None:
423 """
424 Setter method corresponding to the ``frbr:part`` RDF predicate.
426 `A bibliographic reference within the bibliographic resource, or a discourse element
427 wherein the text of the bibliographic resources can be organized.`
429 :param be_res: The value that will be set as the object of the property related to this method
430 :type be_res: BibliographicReference
431 :raises TypeError: if the parameter is of the wrong type
432 :return: None
433 """
434 self.g.add((self.res, GraphEntity.iri_contains_reference, RDFTerm("uri", str(be_res.res))))
436 @accepts_only("be")
437 def remove_contained_in_reference_list(self, be_res: BibliographicReference | None = None) -> None:
438 """
439 Remover method corresponding to the ``frbr:part`` RDF predicate.
441 **WARNING: this is a non-functional property, hence, if the parameter
442 is None, any existing value will be removed!**
444 :param be_res: If not None, the specific object value that will be removed from the property
445 related to this method (defaults to None)
446 :type be_res: BibliographicReference
447 :raises TypeError: if the parameter is of the wrong type
448 :return: None
449 """
450 if be_res is not None:
451 self.g.remove((self.res, GraphEntity.iri_contains_reference, RDFTerm("uri", str(be_res.res))))
452 else:
453 self.g.remove((self.res, GraphEntity.iri_contains_reference, None))
455 # HAS PART (DiscourseElement)
456 def get_contained_discourse_elements(self) -> List[DiscourseElement]:
457 """
458 Getter method corresponding to the ``frbr:part`` RDF predicate.
460 :return: A list containing the requested values if found, None otherwise
461 """
462 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_contains_de, "de")
463 result: List[DiscourseElement] = []
464 for uri in uri_list:
465 result.append(self.g_set.add_de(self.resp_agent, self.source, uri))
466 return result
468 @accepts_only("de")
469 def contains_discourse_element(self, de_res: DiscourseElement) -> None:
470 """
471 Setter method corresponding to the ``frbr:part`` RDF predicate.
473 `A bibliographic reference within the bibliographic resource, or a discourse element
474 wherein the text of the bibliographic resources can be organized.`
476 :param de_res: The value that will be set as the object of the property related to this method
477 :type de_res: DiscourseElement
478 :raises TypeError: if the parameter is of the wrong type
479 :return: None
480 """
481 self.g.add((self.res, GraphEntity.iri_contains_de, RDFTerm("uri", str(de_res.res))))
483 @accepts_only("de")
484 def remove_contained_discourse_element(self, de_res: DiscourseElement | None = None) -> None:
485 """
486 Remover method corresponding to the ``frbr:part`` RDF predicate.
488 **WARNING: this is a non-functional property, hence, if the parameter
489 is None, any existing value will be removed!**
491 :param de_res: If not None, the specific object value that will be removed from the property
492 related to this method (defaults to None)
493 :type de_res: DiscourseElement
494 :raises TypeError: if the parameter is of the wrong type
495 :return: None
496 """
497 if de_res is not None:
498 self.g.remove((self.res, GraphEntity.iri_contains_de, RDFTerm("uri", str(de_res.res))))
499 else:
500 self.g.remove((self.res, GraphEntity.iri_contains_de, None))
502 # HAS CONTRIBUTOR (AgentRole)
503 def get_contributors(self) -> List[AgentRole]:
504 """
505 Getter method corresponding to the ``pro:isDocumentContextFor`` RDF predicate.
507 :return: A list containing the requested values if found, None otherwise
508 """
509 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_is_document_context_for, "ar")
510 result: List[AgentRole] = []
511 for uri in uri_list:
512 result.append(self.g_set.add_ar(self.resp_agent, self.source, uri))
513 return result
515 @accepts_only("ar")
516 def has_contributor(self, ar_res: AgentRole):
517 """
518 Setter method corresponding to the ``pro:isDocumentContextFor`` RDF predicate.
520 :param ar_res: The value that will be set as the object of the property related to this method
521 :type ar_res: AgentRole
522 :raises TypeError: if the parameter is of the wrong type
523 :return: None
524 """
525 self.g.add((self.res, GraphEntity.iri_is_document_context_for, RDFTerm("uri", str(ar_res.res))))
527 @accepts_only("ar")
528 def remove_contributor(self, ar_res: AgentRole | None = None):
529 """
530 Remover method corresponding to the ``frbr:part`` RDF predicate.
532 **WARNING: this is a non-functional property, hence, if the parameter
533 is None, any existing value will be removed!**
535 :param ar_res: If not None, the specific object value that will be removed from the property
536 related to this method (defaults to None)
537 :type ar_res: AgentRole
538 :raises TypeError: if the parameter is of the wrong type
539 :return: None
540 """
541 if ar_res is not None:
542 self.g.remove((self.res, GraphEntity.iri_is_document_context_for, RDFTerm("uri", str(ar_res.res))))
543 else:
544 self.g.remove((self.res, GraphEntity.iri_is_document_context_for, None))
546 # HAS RELATED DOCUMENT
547 def get_related_documents(self) -> List[str]:
548 """
549 Getter method corresponding to the ``dcterms:relation`` RDF predicate.
551 :return: A list containing the requested values if found, None otherwise
552 """
553 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_relation)
554 return uri_list
556 def has_related_document(self, thing_res: str) -> None:
557 """
558 Setter method corresponding to the ``dcterms:relation`` RDF predicate.
560 `A document external to the Corpus, that is related to the bibliographic resource (such
561 as a version of the bibliographic resource – for example a preprint – recorded in an
562 external database).`
564 :param thing_res: The value that will be set as the object of the property related to this method
565 :type thing_res: URIRef
566 :raises TypeError: if the parameter is of the wrong type
567 :return: None
568 """
569 self.g.add((self.res, GraphEntity.iri_relation, RDFTerm("uri", str(thing_res))))
571 def remove_related_document(self, thing_res: str | None = None) -> None:
572 """
573 Remover method corresponding to the ``dcterms:relation`` RDF predicate.
575 **WARNING: this is a non-functional property, hence, if the parameter
576 is None, any existing value will be removed!**
578 :param thing_res: If not None, the specific object value that will be removed from the property
579 related to this method (defaults to None)
580 :type thing_res: URIRef
581 :raises TypeError: if the parameter is of the wrong type
582 :return: None
583 """
584 if thing_res is not None:
585 self.g.remove((self.res, GraphEntity.iri_relation, RDFTerm("uri", str(thing_res))))
586 else:
587 self.g.remove((self.res, GraphEntity.iri_relation, None))
589 def create_abstract(self) -> None:
590 """
591 Setter method corresponding to the ``rdf:type`` RDF predicate.
592 It implicitly sets the object value ``doco:Abstract``.
594 **WARNING: the OCDM specification admits at most two types for an entity.
595 The main type cannot be edited or removed. Any existing secondary type
596 will be overwritten!**
598 `The type of the bibliographic resource`
600 :return: None
601 """
602 self._create_type(GraphEntity.iri_abstract)
604 # HAS TYPE
605 def create_archival_document(self) -> None:
606 """
607 Setter method corresponding to the ``rdf:type`` RDF predicate.
608 It implicitly sets the object value ``fabio:ArchivalDocument``.
610 **WARNING: the OCDM specification admits at most two types for an entity.
611 The main type cannot be edited or removed. Any existing secondary type
612 will be overwritten!**
614 `The type of the bibliographic resource`
616 :return: None
617 """
618 self._create_type(GraphEntity.iri_archival_document)
620 def create_audio_document(self) -> None:
621 """
622 Setter method corresponding to the ``rdf:type`` RDF predicate.
623 It implicitly sets the object value ``fabio:AudioDocument``.
625 **WARNING: the OCDM specification admits at most two types for an entity.
626 The main type cannot be edited or removed. Any existing secondary type
627 will be overwritten!**
629 `The type of the bibliographic resource`
631 :return: None
632 """
633 self._create_type(GraphEntity.iri_audio_document)
635 def create_book(self) -> None:
636 """
637 Setter method corresponding to the ``rdf:type`` RDF predicate.
638 It implicitly sets the object value ``fabio:Book``.
640 **WARNING: the OCDM specification admits at most two types for an entity.
641 The main type cannot be edited or removed. Any existing secondary type
642 will be overwritten!**
644 `The type of the bibliographic resource`
646 :return: None
647 """
648 self._create_type(GraphEntity.iri_book)
650 def create_book_chapter(self) -> None:
651 """
652 Setter method corresponding to the ``rdf:type`` RDF predicate.
653 It implicitly sets the object value ``fabio:BookChapter``.
655 **WARNING: the OCDM specification admits at most two types for an entity.
656 The main type cannot be edited or removed. Any existing secondary type
657 will be overwritten!**
659 `The type of the bibliographic resource`
661 :return: None
662 """
663 self._create_type(GraphEntity.iri_book_chapter)
665 def create_book_part(self) -> None:
666 """
667 Setter method corresponding to the ``rdf:type`` RDF predicate.
668 It implicitly sets the object value ``doco:Part``.
670 **WARNING: the OCDM specification admits at most two types for an entity.
671 The main type cannot be edited or removed. Any existing secondary type
672 will be overwritten!**
674 `The type of the bibliographic resource`
676 :return: None
677 """
678 self._create_type(GraphEntity.iri_part)
680 def create_book_section(self) -> None:
681 """
682 Setter method corresponding to the ``rdf:type`` RDF predicate.
683 It implicitly sets the object value ``fabio:ExpressionCollection``.
685 **WARNING: the OCDM specification admits at most two types for an entity.
686 The main type cannot be edited or removed. Any existing secondary type
687 will be overwritten!**
689 `The type of the bibliographic resource`
691 :return: None
692 """
693 self._create_type(GraphEntity.iri_expression_collection)
695 def create_book_series(self) -> None:
696 """
697 Setter method corresponding to the ``rdf:type`` RDF predicate.
698 It implicitly sets the object value ``fabio:BookSeries``.
700 **WARNING: the OCDM specification admits at most two types for an entity.
701 The main type cannot be edited or removed. Any existing secondary type
702 will be overwritten!**
704 `The type of the bibliographic resource`
706 :return: None
707 """
708 self._create_type(GraphEntity.iri_book_series)
710 def create_book_set(self) -> None:
711 """
712 Setter method corresponding to the ``rdf:type`` RDF predicate.
713 It implicitly sets the object value ``fabio:BookSet``.
715 **WARNING: the OCDM specification admits at most two types for an entity.
716 The main type cannot be edited or removed. Any existing secondary type
717 will be overwritten!**
719 `The type of the bibliographic resource`
721 :return: None
722 """
723 self._create_type(GraphEntity.iri_book_set)
725 def create_book_track(self) -> None:
726 """
727 Setter method corresponding to the ``rdf:type`` RDF predicate.
728 It implicitly sets the object value ``fabio:Expression``.
730 **WARNING: the OCDM specification admits at most two types for an entity.
731 The main type cannot be edited or removed. Any existing secondary type
732 will be overwritten!**
734 `The type of the bibliographic resource`
736 :return: None
737 """
738 self._create_type(GraphEntity.iri_expression)
740 def create_component(self) -> None:
741 """
742 Setter method corresponding to the ``rdf:type`` RDF predicate.
743 It implicitly sets the object value ``fabio:Expression``.
745 **WARNING: the OCDM specification admits at most two types for an entity.
746 The main type cannot be edited or removed. Any existing secondary type
747 will be overwritten!**
749 `The type of the bibliographic resource`
751 :return: None
752 """
753 self._create_type(GraphEntity.iri_expression)
755 def create_computer_program(self) -> None:
756 """
757 Setter method corresponding to the ``rdf:type`` RDF predicate.
758 It implicitly sets the object value ``fabio:ComputerProgram``.
760 **WARNING: the OCDM specification admits at most two types for an entity.
761 The main type cannot be edited or removed. Any existing secondary type
762 will be overwritten!**
764 `The type of the bibliographic resource`
766 :return: None
767 """
768 self._create_type(GraphEntity.iri_computer_program)
770 def create_data_management_plan(self) -> None:
771 """
772 Setter method corresponding to the ``rdf:type`` RDF predicate.
773 It implicitly sets the object value ``fabio:DataManagementPlan``.
775 **WARNING: the OCDM specification admits at most two types for an entity.
776 The main type cannot be edited or removed. Any existing secondary type
777 will be overwritten!**
779 `The type of the bibliographic resource`
781 :return: None
782 """
783 self._create_type(GraphEntity.iri_data_management_plan)
785 def create_dataset(self) -> None:
786 """
787 Setter method corresponding to the ``rdf:type`` RDF predicate.
788 It implicitly sets the object value ``fabio:DataFile``.
790 **WARNING: the OCDM specification admits at most two types for an entity.
791 The main type cannot be edited or removed. Any existing secondary type
792 will be overwritten!**
794 `The type of the bibliographic resource`
796 :return: None
797 """
798 self._create_type(GraphEntity.iri_data_file)
800 def create_dissertation(self) -> None:
801 """
802 Setter method corresponding to the ``rdf:type`` RDF predicate.
803 It implicitly sets the object value ``fabio:Thesis``.
805 **WARNING: the OCDM specification admits at most two types for an entity.
806 The main type cannot be edited or removed. Any existing secondary type
807 will be overwritten!**
809 `The type of the bibliographic resource`
811 :return: None
812 """
813 self._create_type(GraphEntity.iri_thesis)
815 def create_edited_book(self) -> None:
816 """
817 Setter method corresponding to the ``rdf:type`` RDF predicate.
818 It implicitly sets the object value ``fabio:Book``.
820 **WARNING: the OCDM specification admits at most two types for an entity.
821 The main type cannot be edited or removed. Any existing secondary type
822 will be overwritten!**
824 `The type of the bibliographic resource`
826 :return: None
827 """
828 self._create_type(GraphEntity.iri_book)
830 def create_editorial(self) -> None:
831 """
832 Setter method corresponding to the ``rdf:type`` RDF predicate.
833 It implicitly sets the object value ``fabio:Editorial``.
835 **WARNING: the OCDM specification admits at most two types for an entity.
836 The main type cannot be edited or removed. Any existing secondary type
837 will be overwritten!**
839 `The type of the bibliographic resource`
841 :return: None
842 """
843 self._create_type(GraphEntity.iri_editorial)
845 def create_journal_article(self) -> None:
846 """
847 Setter method corresponding to the ``rdf:type`` RDF predicate.
848 It implicitly sets the object value ``fabio:JournalArticle``.
850 **WARNING: the OCDM specification admits at most two types for an entity.
851 The main type cannot be edited or removed. Any existing secondary type
852 will be overwritten!**
854 `The type of the bibliographic resource`
856 :return: None
857 """
858 self._create_type(GraphEntity.iri_journal_article)
860 def create_journal_editorial(self) -> None:
861 """
862 Setter method corresponding to the ``rdf:type`` RDF predicate.
863 It implicitly sets the object value ``fabio:JournalEditorial``.
865 **WARNING: the OCDM specification admits at most two types for an entity.
866 The main type cannot be edited or removed. Any existing secondary type
867 will be overwritten!**
869 `The type of the bibliographic resource`
871 :return: None
872 """
873 self._create_type(GraphEntity.iri_journal_editorial)
875 def create_issue(self) -> None:
876 """
877 Setter method corresponding to the ``rdf:type`` RDF predicate.
878 It implicitly sets the object value ``fabio:JournalIssue``.
880 **WARNING: the OCDM specification admits at most two types for an entity.
881 The main type cannot be edited or removed. Any existing secondary type
882 will be overwritten!**
884 `The type of the bibliographic resource`
886 :return: None
887 """
888 self._create_type(GraphEntity.iri_journal_issue)
890 def create_volume(self) -> None:
891 """
892 Setter method corresponding to the ``rdf:type`` RDF predicate.
893 It implicitly sets the object value ``fabio:JournalVolume``.
895 **WARNING: the OCDM specification admits at most two types for an entity.
896 The main type cannot be edited or removed. Any existing secondary type
897 will be overwritten!**
899 `The type of the bibliographic resource`
901 :return: None
902 """
903 self._create_type(GraphEntity.iri_journal_volume)
905 def create_journal(self) -> None:
906 """
907 Setter method corresponding to the ``rdf:type`` RDF predicate.
908 It implicitly sets the object value ``fabio:Journal``.
910 **WARNING: the OCDM specification admits at most two types for an entity.
911 The main type cannot be edited or removed. Any existing secondary type
912 will be overwritten!**
914 `The type of the bibliographic resource`
916 :return: None
917 """
918 self._create_type(GraphEntity.iri_journal)
920 def create_monograph(self) -> None:
921 """
922 Setter method corresponding to the ``rdf:type`` RDF predicate.
923 It implicitly sets the object value ``fabio:Book``.
925 **WARNING: the OCDM specification admits at most two types for an entity.
926 The main type cannot be edited or removed. Any existing secondary type
927 will be overwritten!**
929 `The type of the bibliographic resource`
931 :return: None
932 """
933 self._create_type(GraphEntity.iri_book)
935 def create_newspaper(self) -> None:
936 """
937 Setter method corresponding to the ``rdf:type`` RDF predicate.
938 It implicitly sets the object value ``fabio:Newspaper``.
940 **WARNING: the OCDM specification admits at most two types for an entity.
941 The main type cannot be edited or removed. Any existing secondary type
942 will be overwritten!**
944 `The type of the bibliographic resource`
946 :return: None
947 """
948 self._create_type(GraphEntity.iri_newspaper)
950 def create_newspaper_article(self) -> None:
951 """
952 Setter method corresponding to the ``rdf:type`` RDF predicate.
953 It implicitly sets the object value ``fabio:NewspaperArticle``.
955 **WARNING: the OCDM specification admits at most two types for an entity.
956 The main type cannot be edited or removed. Any existing secondary type
957 will be overwritten!**
959 `The type of the bibliographic resource`
961 :return: None
962 """
963 self._create_type(GraphEntity.iri_newspaper_article)
965 def create_newspaper_editorial(self) -> None:
966 """
967 Setter method corresponding to the ``rdf:type`` RDF predicate.
968 It implicitly sets the object value ``fabio:NewspaperEditorial``.
970 **WARNING: the OCDM specification admits at most two types for an entity.
971 The main type cannot be edited or removed. Any existing secondary type
972 will be overwritten!**
974 `The type of the bibliographic resource`
976 :return: None
977 """
978 self._create_type(GraphEntity.iri_newspaper_editorial)
980 def create_newspaper_issue(self) -> None:
981 """
982 Setter method corresponding to the ``rdf:type`` RDF predicate.
983 It implicitly sets the object value ``fabio:NewspaperIssue``.
985 **WARNING: the OCDM specification admits at most two types for an entity.
986 The main type cannot be edited or removed. Any existing secondary type
987 will be overwritten!**
989 `The type of the bibliographic resource`
991 :return: None
992 """
993 self._create_type(GraphEntity.iri_newspaper_issue)
995 def create_peer_review(self) -> None:
996 """
997 Setter method corresponding to the ``rdf:type`` RDF predicate.
998 It implicitly sets the object value ``fr:ReviewVersion``.
1000 **WARNING: the OCDM specification admits at most two types for an entity.
1001 The main type cannot be edited or removed. Any existing secondary type
1002 will be overwritten!**
1004 `The type of the bibliographic resource`
1006 :return: None
1007 """
1008 self._create_type(GraphEntity.iri_peer_review)
1010 def create_preprint(self) -> None:
1011 """
1012 Setter method corresponding to the ``rdf:type`` RDF predicate.
1013 It implicitly sets the object value ``fabio:Preprint``.
1015 **WARNING: the OCDM specification admits at most two types for an entity.
1016 The main type cannot be edited or removed. Any existing secondary type
1017 will be overwritten!**
1019 `The type of the bibliographic resource`
1021 :return: None
1022 """
1023 self._create_type(GraphEntity.iri_preprint)
1025 def create_presentation(self) -> None:
1026 """
1027 Setter method corresponding to the ``rdf:type`` RDF predicate.
1028 It implicitly sets the object value ``fabio:Presentation``.
1030 **WARNING: the OCDM specification admits at most two types for an entity.
1031 The main type cannot be edited or removed. Any existing secondary type
1032 will be overwritten!**
1034 `The type of the bibliographic resource`
1036 :return: None
1037 """
1038 self._create_type(GraphEntity.iri_presentation)
1040 def create_proceedings_article(self) -> None:
1041 """
1042 Setter method corresponding to the ``rdf:type`` RDF predicate.
1043 It implicitly sets the object value ``fabio:ProceedingsPaper``.
1045 **WARNING: the OCDM specification admits at most two types for an entity.
1046 The main type cannot be edited or removed. Any existing secondary type
1047 will be overwritten!**
1049 `The type of the bibliographic resource`
1051 :return: None
1052 """
1053 self._create_type(GraphEntity.iri_proceedings_paper)
1055 def create_proceedings(self) -> None:
1056 """
1057 Setter method corresponding to the ``rdf:type`` RDF predicate.
1058 It implicitly sets the object value ``fabio:AcademicProceedings``.
1060 **WARNING: the OCDM specification admits at most two types for an entity.
1061 The main type cannot be edited or removed. Any existing secondary type
1062 will be overwritten!**
1064 `The type of the bibliographic resource`
1066 :return: None
1067 """
1068 self._create_type(GraphEntity.iri_academic_proceedings)
1070 def create_proceedings_series(self) -> None:
1071 """
1072 Setter method corresponding to the ``rdf:type`` RDF predicate.
1073 It implicitly sets the object value ``fabio:Series``.
1075 **WARNING: the OCDM specification admits at most two types for an entity.
1076 The main type cannot be edited or removed. Any existing secondary type
1077 will be overwritten!**
1079 `The type of the bibliographic resource`
1081 :return: None
1082 """
1083 self._create_type(GraphEntity.iri_proceedings_series)
1085 def create_reference_book(self) -> None:
1086 """
1087 Setter method corresponding to the ``rdf:type`` RDF predicate.
1088 It implicitly sets the object value ``fabio:ReferenceBook``.
1090 **WARNING: the OCDM specification admits at most two types for an entity.
1091 The main type cannot be edited or removed. Any existing secondary type
1092 will be overwritten!**
1094 `The type of the bibliographic resource`
1096 :return: None
1097 """
1098 self._create_type(GraphEntity.iri_reference_book)
1100 def create_reference_entry(self) -> None:
1101 """
1102 Setter method corresponding to the ``rdf:type`` RDF predicate.
1103 It implicitly sets the object value ``fabio:ReferenceEntry``.
1105 **WARNING: the OCDM specification admits at most two types for an entity.
1106 The main type cannot be edited or removed. Any existing secondary type
1107 will be overwritten!**
1109 `The type of the bibliographic resource`
1111 :return: None
1112 """
1113 self._create_type(GraphEntity.iri_reference_entry)
1115 def create_report_series(self) -> None:
1116 """
1117 Setter method corresponding to the ``rdf:type`` RDF predicate.
1118 It implicitly sets the object value ``fabio:Series``.
1120 **WARNING: the OCDM specification admits at most two types for an entity.
1121 The main type cannot be edited or removed. Any existing secondary type
1122 will be overwritten!**
1124 `The type of the bibliographic resource`
1126 :return: None
1127 """
1128 self._create_type(GraphEntity.iri_series)
1130 def create_report(self) -> None:
1131 """
1132 Setter method corresponding to the ``rdf:type`` RDF predicate.
1133 It implicitly sets the object value ``fabio:ReportDocument``.
1135 **WARNING: the OCDM specification admits at most two types for an entity.
1136 The main type cannot be edited or removed. Any existing secondary type
1137 will be overwritten!**
1139 `The type of the bibliographic resource`
1141 :return: None
1142 """
1143 self._create_type(GraphEntity.iri_report_document)
1145 def create_retraction_notice(self) -> None:
1146 """
1147 Setter method corresponding to the ``rdf:type`` RDF predicate.
1148 It implicitly sets the object value ``fabio:RetractionNotice``.
1150 **WARNING: the OCDM specification admits at most two types for an entity.
1151 The main type cannot be edited or removed. Any existing secondary type
1152 will be overwritten!**
1154 `The type of the bibliographic resource`
1156 :return: None
1157 """
1158 self._create_type(GraphEntity.iri_retraction_notice)
1160 def create_standard_series(self) -> None:
1161 """
1162 Setter method corresponding to the ``rdf:type`` RDF predicate.
1163 It implicitly sets the object value ``fabio:Series``.
1165 **WARNING: the OCDM specification admits at most two types for an entity.
1166 The main type cannot be edited or removed. Any existing secondary type
1167 will be overwritten!**
1169 `The type of the bibliographic resource`
1171 :return: None
1172 """
1173 self._create_type(GraphEntity.iri_series)
1175 def create_standard(self) -> None:
1176 """
1177 Setter method corresponding to the ``rdf:type`` RDF predicate.
1178 It implicitly sets the object value ``fabio:SpecificationDocument``.
1180 **WARNING: the OCDM specification admits at most two types for an entity.
1181 The main type cannot be edited or removed. Any existing secondary type
1182 will be overwritten!**
1184 `The type of the bibliographic resource`
1186 :return: None
1187 """
1188 self._create_type(GraphEntity.iri_specification_document)
1190 def create_series(self) -> None:
1191 """
1192 Setter method corresponding to the ``rdf:type`` RDF predicate.
1193 It implicitly sets the object value ``fabio:Series``.
1195 **WARNING: the OCDM specification admits at most two types for an entity.
1196 The main type cannot be edited or removed. Any existing secondary type
1197 will be overwritten!**
1199 `The type of the bibliographic resource`
1201 :return: None
1202 """
1203 self._create_type(GraphEntity.iri_series)
1205 def create_expression_collection(self) -> None:
1206 """
1207 Setter method corresponding to the ``rdf:type`` RDF predicate.
1208 It implicitly sets the object value ``fabio:ExpressionCollection``.
1210 **WARNING: the OCDM specification admits at most two types for an entity.
1211 The main type cannot be edited or removed. Any existing secondary type
1212 will be overwritten!**
1214 `The type of the bibliographic resource`
1216 :return: None
1217 """
1218 self._create_type(GraphEntity.iri_expression_collection)
1220 def create_web_content(self) -> None:
1221 """
1222 Setter method corresponding to the ``rdf:type`` RDF predicate.
1223 It implicitly sets the object value ``fabio:WebContent``.
1225 **WARNING: the OCDM specification admits at most two types for an entity.
1226 The main type cannot be edited or removed. Any existing secondary type
1227 will be overwritten!**
1229 `The type of the bibliographic resource`
1231 :return: None
1232 """
1233 self._create_type(GraphEntity.iri_web_content)
1235 def create_other(self) -> None:
1236 """
1237 Setter method corresponding to the ``rdf:type`` RDF predicate.
1238 It implicitly sets the object value ``fabio:Expression``.
1240 **WARNING: the OCDM specification admits at most two types for an entity.
1241 The main type cannot be edited or removed. Any existing secondary type
1242 will be overwritten!**
1244 `The type of the bibliographic resource`
1246 :return: None
1247 """
1248 self._create_type(GraphEntity.iri_expression)