Coverage for oc_ocdm / graph / entities / bibliographic / bibliographic_resource.py: 82%
267 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-05-08 20:23 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-05-08 20:23 +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 In case of functional properties, values from the current entity get overwritten
42 by those coming from the second entity while, in all other cases, values from the
43 second entity are simply appended to those of the current entity. In this context,
44 `rdfs:label` is considered as a functional property, while `rdf:type` is not.
46 :param other: The entity which will be marked as to be deleted and whose properties will
47 be merged into the current entity.
48 :type other: BibliographicResource
49 :param prefer_self: If True, prefer values from the current entity for non-functional properties
50 :type prefer_self: bool
51 :raises TypeError: if the parameter is of the wrong type
52 :return: None
53 """
54 super()._merge_properties(other, prefer_self)
55 assert isinstance(other, BibliographicResource)
57 title: Optional[str] = other.get_title()
58 if title is not None:
59 self.has_title(title)
61 subtitle: Optional[str] = other.get_subtitle()
62 if subtitle is not None:
63 self.has_subtitle(subtitle)
65 container: Optional[BibliographicResource] = other.get_is_part_of()
66 if container is not None:
67 self.is_part_of(container)
69 citations_list: List[BibliographicResource] = other.get_citations()
70 if not (prefer_self and self.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:
76 self.has_pub_date(pub_date)
78 re_list: List[ResourceEmbodiment] = other.get_formats()
79 if not (prefer_self and self.get_formats()):
80 for cur_format in re_list:
81 self.has_format(cur_format)
83 number: Optional[str] = other.get_number()
84 if number is not None:
85 self.has_number(number)
87 edition: Optional[str] = other.get_edition()
88 if edition is not None:
89 self.has_edition(edition)
91 be_list: List[BibliographicReference] = other.get_contained_in_reference_lists()
92 if not (prefer_self and self.get_contained_in_reference_lists()):
93 for reference in be_list:
94 self.contains_in_reference_list(reference)
96 de_list: List[DiscourseElement] = other.get_contained_discourse_elements()
97 if not (prefer_self and self.get_contained_discourse_elements()):
98 for discourse_element in de_list:
99 self.contains_discourse_element(discourse_element)
101 ar_list: List[AgentRole] = other.get_contributors()
102 if not (prefer_self and self.get_contributors()):
103 for agent_role in ar_list:
104 self.has_contributor(agent_role)
106 related_doc_list: List[str] = other.get_related_documents()
107 if not (prefer_self and self.get_related_documents()):
108 for doc in related_doc_list:
109 self.has_related_document(doc)
111 # HAS TITLE
112 def get_title(self) -> Optional[str]:
113 """
114 Getter method corresponding to the ``dcterms:title`` RDF predicate.
116 :return: The requested value if found, None otherwise
117 """
118 return self._get_literal(GraphEntity.iri_title)
120 def has_title(self, string: str) -> None:
121 """
122 Setter method corresponding to the ``dcterms:title`` RDF predicate.
124 **WARNING: this is a functional property, hence any existing value will be overwritten!**
126 `The title of the bibliographic resource.`
128 :param string: The value that will be set as the object of the property related to this method
129 :type string: str
130 :raises TypeError: if the parameter is of the wrong type
131 :return: None
132 """
133 self.remove_title()
134 self._create_literal(GraphEntity.iri_title, string)
136 def remove_title(self) -> None:
137 """
138 Remover method corresponding to the ``dcterms:title`` RDF predicate.
140 :return: None
141 """
142 self.g.remove((self.res, GraphEntity.iri_title, None))
144 # HAS SUBTITLE
145 def get_subtitle(self) -> Optional[str]:
146 """
147 Getter method corresponding to the ``fabio:hasSubtitle`` RDF predicate.
149 :return: The requested value if found, None otherwise
150 """
151 return self._get_literal(GraphEntity.iri_has_subtitle)
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[str] = 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, RDFTerm("uri", str(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[str] = 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, RDFTerm("uri", str(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, RDFTerm("uri", str(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 def has_pub_date(self, string: str) -> None:
271 """
272 Setter method corresponding to the ``prism:publicationDate`` RDF predicate.
274 **WARNING: this is a functional property, hence any existing value will be overwritten!**
276 `The date of publication of the bibliographic resource.`
278 :param string: The value that will be set as the object of the property related to this method. **It must
279 be a string compliant with the** ``ISO 8601`` **standard.**
280 :type string: str
281 :raises TypeError: if the parameter is of the wrong type
282 :return: None
283 """
284 cur_type, string = get_datatype_from_iso_8601(string)
285 if cur_type is not None and string is not None:
286 self.remove_pub_date()
287 self._create_literal(GraphEntity.iri_has_publication_date, string, cur_type, False)
289 def remove_pub_date(self) -> None:
290 """
291 Remover method corresponding to the ``prism:publicationDate`` RDF predicate.
293 :return: None
294 """
295 self.g.remove((self.res, GraphEntity.iri_has_publication_date, None))
297 # IS EMBODIED AS (ResourceEmbodiment)
298 def get_formats(self) -> List[ResourceEmbodiment]:
299 """
300 Getter method corresponding to the ``frbr:embodiment`` RDF predicate.
302 :return: A list containing the requested values if found, None otherwise
303 """
304 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_embodiment, 're')
305 result: List[ResourceEmbodiment] = []
306 for uri in uri_list:
307 result.append(self.g_set.add_re(self.resp_agent, self.source, uri))
308 return result
310 @accepts_only('re')
311 def has_format(self, re_res: ResourceEmbodiment) -> None:
312 """
313 Setter method corresponding to the ``frbr:embodiment`` RDF predicate.
315 `The corpus identifier of the resource embodiment defining the format in which the
316 bibliographic resource has been embodied, which can be either print or digital.`
318 :param re_res: The value that will be set as the object of the property related to this method
319 :type re_res: ResourceEmbodiment
320 :raises TypeError: if the parameter is of the wrong type
321 :return: None
322 """
323 self.g.add((self.res, GraphEntity.iri_embodiment, RDFTerm("uri", str(re_res.res))))
325 @accepts_only('re')
326 def remove_format(self, re_res: ResourceEmbodiment | None = None) -> None:
327 """
328 Remover method corresponding to the ``frbr:embodiment`` RDF predicate.
330 **WARNING: this is a non-functional property, hence, if the parameter
331 is None, any existing value will be removed!**
333 :param re_res: If not None, the specific object value that will be removed from the property
334 related to this method (defaults to None)
335 :type re_res: ResourceEmbodiment
336 :raises TypeError: if the parameter is of the wrong type
337 :return: None
338 """
339 if re_res is not None:
340 self.g.remove((self.res, GraphEntity.iri_embodiment, RDFTerm("uri", str(re_res.res))))
341 else:
342 self.g.remove((self.res, GraphEntity.iri_embodiment, None))
344 # HAS NUMBER
345 def get_number(self) -> Optional[str]:
346 """
347 Getter method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
349 :return: The requested value if found, None otherwise
350 """
351 return self._get_literal(GraphEntity.iri_has_sequence_identifier)
353 def has_number(self, string: str) -> None:
354 """
355 Setter method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
357 **WARNING: this is a functional property, hence any existing value will be overwritten!**
359 `A literal (for example a number or a letter) that identifies the sequence position of the
360 bibliographic resource as a particular item within a larger collection (e.g. an article
361 number within a journal issue, a volume number of a journal, a chapter number within
362 a book).`
364 :param string: The value that will be set as the object of the property related to this method
365 :type string: str
366 :raises TypeError: if the parameter is of the wrong type
367 :return: None
368 """
369 self.remove_number()
370 self._create_literal(GraphEntity.iri_has_sequence_identifier, string)
372 def remove_number(self) -> None:
373 """
374 Remover method corresponding to the ``fabio:hasSequenceIdentifier`` RDF predicate.
376 :return: None
377 """
378 self.g.remove((self.res, GraphEntity.iri_has_sequence_identifier, None))
380 # HAS EDITION
381 def get_edition(self) -> Optional[str]:
382 """
383 Getter method corresponding to the ``prism:edition`` RDF predicate.
385 :return: The requested value if found, None otherwise
386 """
387 return self._get_literal(GraphEntity.iri_has_edition)
389 def has_edition(self, string: str) -> None:
390 """
391 Setter method corresponding to the ``prism:edition`` RDF predicate.
393 **WARNING: this is a functional property, hence any existing value will be overwritten!**
395 `An identifier for one of several alternative editions of a particular bibliographic
396 resource.`
398 :param string: The value that will be set as the object of the property related to this method
399 :type string: str
400 :raises TypeError: if the parameter is of the wrong type
401 :return: None
402 """
403 self.remove_edition()
404 self._create_literal(GraphEntity.iri_has_edition, string)
406 def remove_edition(self) -> None:
407 """
408 Remover method corresponding to the ``prism:edition`` RDF predicate.
410 :return: None
411 """
412 self.g.remove((self.res, GraphEntity.iri_has_edition, None))
414 # HAS PART (BibliographicReference)
415 def get_contained_in_reference_lists(self) -> List[BibliographicReference]:
416 """
417 Getter method corresponding to the ``frbr:part`` RDF predicate.
419 :return: A list containing the requested values if found, None otherwise
420 """
421 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_contains_reference, 'be')
422 result: List[BibliographicReference] = []
423 for uri in uri_list:
424 result.append(self.g_set.add_be(self.resp_agent, self.source, uri))
425 return result
427 @accepts_only('be')
428 def contains_in_reference_list(self, be_res: BibliographicReference) -> None:
429 """
430 Setter method corresponding to the ``frbr:part`` RDF predicate.
432 `A bibliographic reference within the bibliographic resource, or a discourse element
433 wherein the text of the bibliographic resources can be organized.`
435 :param be_res: The value that will be set as the object of the property related to this method
436 :type be_res: BibliographicReference
437 :raises TypeError: if the parameter is of the wrong type
438 :return: None
439 """
440 self.g.add((self.res, GraphEntity.iri_contains_reference, RDFTerm("uri", str(be_res.res))))
442 @accepts_only('be')
443 def remove_contained_in_reference_list(self, be_res: BibliographicReference | None = None) -> None:
444 """
445 Remover method corresponding to the ``frbr:part`` RDF predicate.
447 **WARNING: this is a non-functional property, hence, if the parameter
448 is None, any existing value will be removed!**
450 :param be_res: If not None, the specific object value that will be removed from the property
451 related to this method (defaults to None)
452 :type be_res: BibliographicReference
453 :raises TypeError: if the parameter is of the wrong type
454 :return: None
455 """
456 if be_res is not None:
457 self.g.remove((self.res, GraphEntity.iri_contains_reference, RDFTerm("uri", str(be_res.res))))
458 else:
459 self.g.remove((self.res, GraphEntity.iri_contains_reference, None))
461 # HAS PART (DiscourseElement)
462 def get_contained_discourse_elements(self) -> List[DiscourseElement]:
463 """
464 Getter method corresponding to the ``frbr:part`` RDF predicate.
466 :return: A list containing the requested values if found, None otherwise
467 """
468 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_contains_de, 'de')
469 result: List[DiscourseElement] = []
470 for uri in uri_list:
471 result.append(self.g_set.add_de(self.resp_agent, self.source, uri))
472 return result
474 @accepts_only('de')
475 def contains_discourse_element(self, de_res: DiscourseElement) -> None:
476 """
477 Setter method corresponding to the ``frbr:part`` RDF predicate.
479 `A bibliographic reference within the bibliographic resource, or a discourse element
480 wherein the text of the bibliographic resources can be organized.`
482 :param de_res: The value that will be set as the object of the property related to this method
483 :type de_res: DiscourseElement
484 :raises TypeError: if the parameter is of the wrong type
485 :return: None
486 """
487 self.g.add((self.res, GraphEntity.iri_contains_de, RDFTerm("uri", str(de_res.res))))
489 @accepts_only('de')
490 def remove_contained_discourse_element(self, de_res: DiscourseElement | None = None) -> None:
491 """
492 Remover method corresponding to the ``frbr:part`` RDF predicate.
494 **WARNING: this is a non-functional property, hence, if the parameter
495 is None, any existing value will be removed!**
497 :param de_res: If not None, the specific object value that will be removed from the property
498 related to this method (defaults to None)
499 :type de_res: DiscourseElement
500 :raises TypeError: if the parameter is of the wrong type
501 :return: None
502 """
503 if de_res is not None:
504 self.g.remove((self.res, GraphEntity.iri_contains_de, RDFTerm("uri", str(de_res.res))))
505 else:
506 self.g.remove((self.res, GraphEntity.iri_contains_de, None))
508 # HAS CONTRIBUTOR (AgentRole)
509 def get_contributors(self) -> List[AgentRole]:
510 """
511 Getter method corresponding to the ``pro:isDocumentContextFor`` RDF predicate.
513 :return: A list containing the requested values if found, None otherwise
514 """
515 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_is_document_context_for, 'ar')
516 result: List[AgentRole] = []
517 for uri in uri_list:
518 result.append(self.g_set.add_ar(self.resp_agent, self.source, uri))
519 return result
521 @accepts_only('ar')
522 def has_contributor(self, ar_res: AgentRole):
523 """
524 Setter method corresponding to the ``pro:isDocumentContextFor`` RDF predicate.
526 :param ar_res: The value that will be set as the object of the property related to this method
527 :type ar_res: AgentRole
528 :raises TypeError: if the parameter is of the wrong type
529 :return: None
530 """
531 self.g.add((self.res, GraphEntity.iri_is_document_context_for, RDFTerm("uri", str(ar_res.res))))
533 @accepts_only('ar')
534 def remove_contributor(self, ar_res: AgentRole | None = None):
535 """
536 Remover method corresponding to the ``frbr:part`` RDF predicate.
538 **WARNING: this is a non-functional property, hence, if the parameter
539 is None, any existing value will be removed!**
541 :param ar_res: If not None, the specific object value that will be removed from the property
542 related to this method (defaults to None)
543 :type ar_res: AgentRole
544 :raises TypeError: if the parameter is of the wrong type
545 :return: None
546 """
547 if ar_res is not None:
548 self.g.remove((self.res, GraphEntity.iri_is_document_context_for, RDFTerm("uri", str(ar_res.res))))
549 else:
550 self.g.remove((self.res, GraphEntity.iri_is_document_context_for, None))
552 # HAS RELATED DOCUMENT
553 def get_related_documents(self) -> List[str]:
554 """
555 Getter method corresponding to the ``dcterms:relation`` RDF predicate.
557 :return: A list containing the requested values if found, None otherwise
558 """
559 uri_list: List[str] = self._get_multiple_uri_references(GraphEntity.iri_relation)
560 return uri_list
562 def has_related_document(self, thing_res: str) -> None:
563 """
564 Setter method corresponding to the ``dcterms:relation`` RDF predicate.
566 `A document external to the Corpus, that is related to the bibliographic resource (such
567 as a version of the bibliographic resource – for example a preprint – recorded in an
568 external database).`
570 :param thing_res: The value that will be set as the object of the property related to this method
571 :type thing_res: URIRef
572 :raises TypeError: if the parameter is of the wrong type
573 :return: None
574 """
575 self.g.add((self.res, GraphEntity.iri_relation, RDFTerm("uri", str(thing_res))))
577 def remove_related_document(self, thing_res: str | None = None) -> None:
578 """
579 Remover method corresponding to the ``dcterms:relation`` RDF predicate.
581 **WARNING: this is a non-functional property, hence, if the parameter
582 is None, any existing value will be removed!**
584 :param thing_res: If not None, the specific object value that will be removed from the property
585 related to this method (defaults to None)
586 :type thing_res: URIRef
587 :raises TypeError: if the parameter is of the wrong type
588 :return: None
589 """
590 if thing_res is not None:
591 self.g.remove((self.res, GraphEntity.iri_relation, RDFTerm("uri", str(thing_res))))
592 else:
593 self.g.remove((self.res, GraphEntity.iri_relation, None))
595 def create_abstract(self) -> None:
596 """
597 Setter method corresponding to the ``rdf:type`` RDF predicate.
598 It implicitly sets the object value ``doco:Abstract``.
600 **WARNING: the OCDM specification admits at most two types for an entity.
601 The main type cannot be edited or removed. Any existing secondary type
602 will be overwritten!**
604 `The type of the bibliographic resource`
606 :return: None
607 """
608 self._create_type(GraphEntity.iri_abstract)
610 # HAS TYPE
611 def create_archival_document(self) -> None:
612 """
613 Setter method corresponding to the ``rdf:type`` RDF predicate.
614 It implicitly sets the object value ``fabio:ArchivalDocument``.
616 **WARNING: the OCDM specification admits at most two types for an entity.
617 The main type cannot be edited or removed. Any existing secondary type
618 will be overwritten!**
620 `The type of the bibliographic resource`
622 :return: None
623 """
624 self._create_type(GraphEntity.iri_archival_document)
626 def create_audio_document(self) -> None:
627 """
628 Setter method corresponding to the ``rdf:type`` RDF predicate.
629 It implicitly sets the object value ``fabio:AudioDocument``.
631 **WARNING: the OCDM specification admits at most two types for an entity.
632 The main type cannot be edited or removed. Any existing secondary type
633 will be overwritten!**
635 `The type of the bibliographic resource`
637 :return: None
638 """
639 self._create_type(GraphEntity.iri_audio_document)
641 def create_book(self) -> None:
642 """
643 Setter method corresponding to the ``rdf:type`` RDF predicate.
644 It implicitly sets the object value ``fabio:Book``.
646 **WARNING: the OCDM specification admits at most two types for an entity.
647 The main type cannot be edited or removed. Any existing secondary type
648 will be overwritten!**
650 `The type of the bibliographic resource`
652 :return: None
653 """
654 self._create_type(GraphEntity.iri_book)
656 def create_book_chapter(self) -> None:
657 """
658 Setter method corresponding to the ``rdf:type`` RDF predicate.
659 It implicitly sets the object value ``fabio:BookChapter``.
661 **WARNING: the OCDM specification admits at most two types for an entity.
662 The main type cannot be edited or removed. Any existing secondary type
663 will be overwritten!**
665 `The type of the bibliographic resource`
667 :return: None
668 """
669 self._create_type(GraphEntity.iri_book_chapter)
671 def create_book_part(self) -> None:
672 """
673 Setter method corresponding to the ``rdf:type`` RDF predicate.
674 It implicitly sets the object value ``doco:Part``.
676 **WARNING: the OCDM specification admits at most two types for an entity.
677 The main type cannot be edited or removed. Any existing secondary type
678 will be overwritten!**
680 `The type of the bibliographic resource`
682 :return: None
683 """
684 self._create_type(GraphEntity.iri_part)
686 def create_book_section(self) -> None:
687 """
688 Setter method corresponding to the ``rdf:type`` RDF predicate.
689 It implicitly sets the object value ``fabio:ExpressionCollection``.
691 **WARNING: the OCDM specification admits at most two types for an entity.
692 The main type cannot be edited or removed. Any existing secondary type
693 will be overwritten!**
695 `The type of the bibliographic resource`
697 :return: None
698 """
699 self._create_type(GraphEntity.iri_expression_collection)
701 def create_book_series(self) -> None:
702 """
703 Setter method corresponding to the ``rdf:type`` RDF predicate.
704 It implicitly sets the object value ``fabio:BookSeries``.
706 **WARNING: the OCDM specification admits at most two types for an entity.
707 The main type cannot be edited or removed. Any existing secondary type
708 will be overwritten!**
710 `The type of the bibliographic resource`
712 :return: None
713 """
714 self._create_type(GraphEntity.iri_book_series)
716 def create_book_set(self) -> None:
717 """
718 Setter method corresponding to the ``rdf:type`` RDF predicate.
719 It implicitly sets the object value ``fabio:BookSet``.
721 **WARNING: the OCDM specification admits at most two types for an entity.
722 The main type cannot be edited or removed. Any existing secondary type
723 will be overwritten!**
725 `The type of the bibliographic resource`
727 :return: None
728 """
729 self._create_type(GraphEntity.iri_book_set)
731 def create_book_track(self) -> None:
732 """
733 Setter method corresponding to the ``rdf:type`` RDF predicate.
734 It implicitly sets the object value ``fabio:Expression``.
736 **WARNING: the OCDM specification admits at most two types for an entity.
737 The main type cannot be edited or removed. Any existing secondary type
738 will be overwritten!**
740 `The type of the bibliographic resource`
742 :return: None
743 """
744 self._create_type(GraphEntity.iri_expression)
746 def create_component(self) -> None:
747 """
748 Setter method corresponding to the ``rdf:type`` RDF predicate.
749 It implicitly sets the object value ``fabio:Expression``.
751 **WARNING: the OCDM specification admits at most two types for an entity.
752 The main type cannot be edited or removed. Any existing secondary type
753 will be overwritten!**
755 `The type of the bibliographic resource`
757 :return: None
758 """
759 self._create_type(GraphEntity.iri_expression)
761 def create_computer_program(self) -> None:
762 """
763 Setter method corresponding to the ``rdf:type`` RDF predicate.
764 It implicitly sets the object value ``fabio:ComputerProgram``.
766 **WARNING: the OCDM specification admits at most two types for an entity.
767 The main type cannot be edited or removed. Any existing secondary type
768 will be overwritten!**
770 `The type of the bibliographic resource`
772 :return: None
773 """
774 self._create_type(GraphEntity.iri_computer_program)
776 def create_data_management_plan(self) -> None:
777 """
778 Setter method corresponding to the ``rdf:type`` RDF predicate.
779 It implicitly sets the object value ``fabio:DataManagementPlan``.
781 **WARNING: the OCDM specification admits at most two types for an entity.
782 The main type cannot be edited or removed. Any existing secondary type
783 will be overwritten!**
785 `The type of the bibliographic resource`
787 :return: None
788 """
789 self._create_type(GraphEntity.iri_data_management_plan)
791 def create_dataset(self) -> None:
792 """
793 Setter method corresponding to the ``rdf:type`` RDF predicate.
794 It implicitly sets the object value ``fabio:DataFile``.
796 **WARNING: the OCDM specification admits at most two types for an entity.
797 The main type cannot be edited or removed. Any existing secondary type
798 will be overwritten!**
800 `The type of the bibliographic resource`
802 :return: None
803 """
804 self._create_type(GraphEntity.iri_data_file)
806 def create_dissertation(self) -> None:
807 """
808 Setter method corresponding to the ``rdf:type`` RDF predicate.
809 It implicitly sets the object value ``fabio:Thesis``.
811 **WARNING: the OCDM specification admits at most two types for an entity.
812 The main type cannot be edited or removed. Any existing secondary type
813 will be overwritten!**
815 `The type of the bibliographic resource`
817 :return: None
818 """
819 self._create_type(GraphEntity.iri_thesis)
821 def create_edited_book(self) -> None:
822 """
823 Setter method corresponding to the ``rdf:type`` RDF predicate.
824 It implicitly sets the object value ``fabio:Book``.
826 **WARNING: the OCDM specification admits at most two types for an entity.
827 The main type cannot be edited or removed. Any existing secondary type
828 will be overwritten!**
830 `The type of the bibliographic resource`
832 :return: None
833 """
834 self._create_type(GraphEntity.iri_book)
836 def create_editorial(self) -> None:
837 """
838 Setter method corresponding to the ``rdf:type`` RDF predicate.
839 It implicitly sets the object value ``fabio:Editorial``.
841 **WARNING: the OCDM specification admits at most two types for an entity.
842 The main type cannot be edited or removed. Any existing secondary type
843 will be overwritten!**
845 `The type of the bibliographic resource`
847 :return: None
848 """
849 self._create_type(GraphEntity.iri_editorial)
851 def create_journal_article(self) -> None:
852 """
853 Setter method corresponding to the ``rdf:type`` RDF predicate.
854 It implicitly sets the object value ``fabio:JournalArticle``.
856 **WARNING: the OCDM specification admits at most two types for an entity.
857 The main type cannot be edited or removed. Any existing secondary type
858 will be overwritten!**
860 `The type of the bibliographic resource`
862 :return: None
863 """
864 self._create_type(GraphEntity.iri_journal_article)
866 def create_journal_editorial(self) -> None:
867 """
868 Setter method corresponding to the ``rdf:type`` RDF predicate.
869 It implicitly sets the object value ``fabio:JournalEditorial``.
871 **WARNING: the OCDM specification admits at most two types for an entity.
872 The main type cannot be edited or removed. Any existing secondary type
873 will be overwritten!**
875 `The type of the bibliographic resource`
877 :return: None
878 """
879 self._create_type(GraphEntity.iri_journal_editorial)
881 def create_issue(self) -> None:
882 """
883 Setter method corresponding to the ``rdf:type`` RDF predicate.
884 It implicitly sets the object value ``fabio:JournalIssue``.
886 **WARNING: the OCDM specification admits at most two types for an entity.
887 The main type cannot be edited or removed. Any existing secondary type
888 will be overwritten!**
890 `The type of the bibliographic resource`
892 :return: None
893 """
894 self._create_type(GraphEntity.iri_journal_issue)
896 def create_volume(self) -> None:
897 """
898 Setter method corresponding to the ``rdf:type`` RDF predicate.
899 It implicitly sets the object value ``fabio:JournalVolume``.
901 **WARNING: the OCDM specification admits at most two types for an entity.
902 The main type cannot be edited or removed. Any existing secondary type
903 will be overwritten!**
905 `The type of the bibliographic resource`
907 :return: None
908 """
909 self._create_type(GraphEntity.iri_journal_volume)
911 def create_journal(self) -> None:
912 """
913 Setter method corresponding to the ``rdf:type`` RDF predicate.
914 It implicitly sets the object value ``fabio:Journal``.
916 **WARNING: the OCDM specification admits at most two types for an entity.
917 The main type cannot be edited or removed. Any existing secondary type
918 will be overwritten!**
920 `The type of the bibliographic resource`
922 :return: None
923 """
924 self._create_type(GraphEntity.iri_journal)
926 def create_monograph(self) -> None:
927 """
928 Setter method corresponding to the ``rdf:type`` RDF predicate.
929 It implicitly sets the object value ``fabio:Book``.
931 **WARNING: the OCDM specification admits at most two types for an entity.
932 The main type cannot be edited or removed. Any existing secondary type
933 will be overwritten!**
935 `The type of the bibliographic resource`
937 :return: None
938 """
939 self._create_type(GraphEntity.iri_book)
941 def create_newspaper(self) -> None:
942 """
943 Setter method corresponding to the ``rdf:type`` RDF predicate.
944 It implicitly sets the object value ``fabio:Newspaper``.
946 **WARNING: the OCDM specification admits at most two types for an entity.
947 The main type cannot be edited or removed. Any existing secondary type
948 will be overwritten!**
950 `The type of the bibliographic resource`
952 :return: None
953 """
954 self._create_type(GraphEntity.iri_newspaper)
956 def create_newspaper_article(self) -> None:
957 """
958 Setter method corresponding to the ``rdf:type`` RDF predicate.
959 It implicitly sets the object value ``fabio:NewspaperArticle``.
961 **WARNING: the OCDM specification admits at most two types for an entity.
962 The main type cannot be edited or removed. Any existing secondary type
963 will be overwritten!**
965 `The type of the bibliographic resource`
967 :return: None
968 """
969 self._create_type(GraphEntity.iri_newspaper_article)
971 def create_newspaper_editorial(self) -> None:
972 """
973 Setter method corresponding to the ``rdf:type`` RDF predicate.
974 It implicitly sets the object value ``fabio:NewspaperEditorial``.
976 **WARNING: the OCDM specification admits at most two types for an entity.
977 The main type cannot be edited or removed. Any existing secondary type
978 will be overwritten!**
980 `The type of the bibliographic resource`
982 :return: None
983 """
984 self._create_type(GraphEntity.iri_newspaper_editorial)
986 def create_newspaper_issue(self) -> None:
987 """
988 Setter method corresponding to the ``rdf:type`` RDF predicate.
989 It implicitly sets the object value ``fabio:NewspaperIssue``.
991 **WARNING: the OCDM specification admits at most two types for an entity.
992 The main type cannot be edited or removed. Any existing secondary type
993 will be overwritten!**
995 `The type of the bibliographic resource`
997 :return: None
998 """
999 self._create_type(GraphEntity.iri_newspaper_issue)
1001 def create_peer_review(self) -> None:
1002 """
1003 Setter method corresponding to the ``rdf:type`` RDF predicate.
1004 It implicitly sets the object value ``fr:ReviewVersion``.
1006 **WARNING: the OCDM specification admits at most two types for an entity.
1007 The main type cannot be edited or removed. Any existing secondary type
1008 will be overwritten!**
1010 `The type of the bibliographic resource`
1012 :return: None
1013 """
1014 self._create_type(GraphEntity.iri_peer_review)
1016 def create_preprint(self) -> None:
1017 """
1018 Setter method corresponding to the ``rdf:type`` RDF predicate.
1019 It implicitly sets the object value ``fabio:Preprint``.
1021 **WARNING: the OCDM specification admits at most two types for an entity.
1022 The main type cannot be edited or removed. Any existing secondary type
1023 will be overwritten!**
1025 `The type of the bibliographic resource`
1027 :return: None
1028 """
1029 self._create_type(GraphEntity.iri_preprint)
1031 def create_presentation(self) -> None:
1032 """
1033 Setter method corresponding to the ``rdf:type`` RDF predicate.
1034 It implicitly sets the object value ``fabio:Presentation``.
1036 **WARNING: the OCDM specification admits at most two types for an entity.
1037 The main type cannot be edited or removed. Any existing secondary type
1038 will be overwritten!**
1040 `The type of the bibliographic resource`
1042 :return: None
1043 """
1044 self._create_type(GraphEntity.iri_presentation)
1046 def create_proceedings_article(self) -> None:
1047 """
1048 Setter method corresponding to the ``rdf:type`` RDF predicate.
1049 It implicitly sets the object value ``fabio:ProceedingsPaper``.
1051 **WARNING: the OCDM specification admits at most two types for an entity.
1052 The main type cannot be edited or removed. Any existing secondary type
1053 will be overwritten!**
1055 `The type of the bibliographic resource`
1057 :return: None
1058 """
1059 self._create_type(GraphEntity.iri_proceedings_paper)
1061 def create_proceedings(self) -> None:
1062 """
1063 Setter method corresponding to the ``rdf:type`` RDF predicate.
1064 It implicitly sets the object value ``fabio:AcademicProceedings``.
1066 **WARNING: the OCDM specification admits at most two types for an entity.
1067 The main type cannot be edited or removed. Any existing secondary type
1068 will be overwritten!**
1070 `The type of the bibliographic resource`
1072 :return: None
1073 """
1074 self._create_type(GraphEntity.iri_academic_proceedings)
1076 def create_proceedings_series(self) -> None:
1077 """
1078 Setter method corresponding to the ``rdf:type`` RDF predicate.
1079 It implicitly sets the object value ``fabio:Series``.
1081 **WARNING: the OCDM specification admits at most two types for an entity.
1082 The main type cannot be edited or removed. Any existing secondary type
1083 will be overwritten!**
1085 `The type of the bibliographic resource`
1087 :return: None
1088 """
1089 self._create_type(GraphEntity.iri_proceedings_series)
1091 def create_reference_book(self) -> None:
1092 """
1093 Setter method corresponding to the ``rdf:type`` RDF predicate.
1094 It implicitly sets the object value ``fabio:ReferenceBook``.
1096 **WARNING: the OCDM specification admits at most two types for an entity.
1097 The main type cannot be edited or removed. Any existing secondary type
1098 will be overwritten!**
1100 `The type of the bibliographic resource`
1102 :return: None
1103 """
1104 self._create_type(GraphEntity.iri_reference_book)
1106 def create_reference_entry(self) -> None:
1107 """
1108 Setter method corresponding to the ``rdf:type`` RDF predicate.
1109 It implicitly sets the object value ``fabio:ReferenceEntry``.
1111 **WARNING: the OCDM specification admits at most two types for an entity.
1112 The main type cannot be edited or removed. Any existing secondary type
1113 will be overwritten!**
1115 `The type of the bibliographic resource`
1117 :return: None
1118 """
1119 self._create_type(GraphEntity.iri_reference_entry)
1121 def create_report_series(self) -> None:
1122 """
1123 Setter method corresponding to the ``rdf:type`` RDF predicate.
1124 It implicitly sets the object value ``fabio:Series``.
1126 **WARNING: the OCDM specification admits at most two types for an entity.
1127 The main type cannot be edited or removed. Any existing secondary type
1128 will be overwritten!**
1130 `The type of the bibliographic resource`
1132 :return: None
1133 """
1134 self._create_type(GraphEntity.iri_series)
1136 def create_report(self) -> None:
1137 """
1138 Setter method corresponding to the ``rdf:type`` RDF predicate.
1139 It implicitly sets the object value ``fabio:ReportDocument``.
1141 **WARNING: the OCDM specification admits at most two types for an entity.
1142 The main type cannot be edited or removed. Any existing secondary type
1143 will be overwritten!**
1145 `The type of the bibliographic resource`
1147 :return: None
1148 """
1149 self._create_type(GraphEntity.iri_report_document)
1151 def create_retraction_notice(self) -> None:
1152 """
1153 Setter method corresponding to the ``rdf:type`` RDF predicate.
1154 It implicitly sets the object value ``fabio:RetractionNotice``.
1156 **WARNING: the OCDM specification admits at most two types for an entity.
1157 The main type cannot be edited or removed. Any existing secondary type
1158 will be overwritten!**
1160 `The type of the bibliographic resource`
1162 :return: None
1163 """
1164 self._create_type(GraphEntity.iri_retraction_notice)
1166 def create_standard_series(self) -> None:
1167 """
1168 Setter method corresponding to the ``rdf:type`` RDF predicate.
1169 It implicitly sets the object value ``fabio:Series``.
1171 **WARNING: the OCDM specification admits at most two types for an entity.
1172 The main type cannot be edited or removed. Any existing secondary type
1173 will be overwritten!**
1175 `The type of the bibliographic resource`
1177 :return: None
1178 """
1179 self._create_type(GraphEntity.iri_series)
1181 def create_standard(self) -> None:
1182 """
1183 Setter method corresponding to the ``rdf:type`` RDF predicate.
1184 It implicitly sets the object value ``fabio:SpecificationDocument``.
1186 **WARNING: the OCDM specification admits at most two types for an entity.
1187 The main type cannot be edited or removed. Any existing secondary type
1188 will be overwritten!**
1190 `The type of the bibliographic resource`
1192 :return: None
1193 """
1194 self._create_type(GraphEntity.iri_specification_document)
1196 def create_series(self) -> None:
1197 """
1198 Setter method corresponding to the ``rdf:type`` RDF predicate.
1199 It implicitly sets the object value ``fabio:Series``.
1201 **WARNING: the OCDM specification admits at most two types for an entity.
1202 The main type cannot be edited or removed. Any existing secondary type
1203 will be overwritten!**
1205 `The type of the bibliographic resource`
1207 :return: None
1208 """
1209 self._create_type(GraphEntity.iri_series)
1211 def create_expression_collection(self) -> None:
1212 """
1213 Setter method corresponding to the ``rdf:type`` RDF predicate.
1214 It implicitly sets the object value ``fabio:ExpressionCollection``.
1216 **WARNING: the OCDM specification admits at most two types for an entity.
1217 The main type cannot be edited or removed. Any existing secondary type
1218 will be overwritten!**
1220 `The type of the bibliographic resource`
1222 :return: None
1223 """
1224 self._create_type(GraphEntity.iri_expression_collection)
1226 def create_web_content(self) -> None:
1227 """
1228 Setter method corresponding to the ``rdf:type`` RDF predicate.
1229 It implicitly sets the object value ``fabio:WebContent``.
1231 **WARNING: the OCDM specification admits at most two types for an entity.
1232 The main type cannot be edited or removed. Any existing secondary type
1233 will be overwritten!**
1235 `The type of the bibliographic resource`
1237 :return: None
1238 """
1239 self._create_type(GraphEntity.iri_web_content)
1241 def create_other(self) -> None:
1242 """
1243 Setter method corresponding to the ``rdf:type`` RDF predicate.
1244 It implicitly sets the object value ``fabio:Expression``.
1246 **WARNING: the OCDM specification admits at most two types for an entity.
1247 The main type cannot be edited or removed. Any existing secondary type
1248 will be overwritten!**
1250 `The type of the bibliographic resource`
1252 :return: None
1253 """
1254 self._create_type(GraphEntity.iri_expression)