oc_ocdm.graph.entities.bibliographic.bibliographic_resource module

class oc_ocdm.graph.entities.bibliographic.bibliographic_resource.BibliographicResource(g, g_set, res=None, res_type=None, resp_agent=None, source=None, count=None, label=None, short_name='', preexisting_graph=None)[source]

Bases: oc_ocdm.graph.entities.bibliographic_entity.BibliographicEntity

Bibliographic resource (short: br): a published bibliographic resource that cites/is cited by another published bibliographic resource.

Constructor of the AbstractEntity class.

Parameters
  • g (Graph) –

  • g_set (GraphSet) –

  • res (URIRef) –

  • res_type (URIRef) –

  • resp_agent (str) –

  • source (str) –

  • count (str) –

  • label (str) –

  • short_name (str) –

  • preexisting_graph (Graph) –

Return type

None

merge(other)[source]

The merge operation allows combining two BibliographicResource entities into a single one, by marking the second entity as to be deleted while also copying its data into the current BibliographicResource. Moreover, every triple from the containing GraphSet referring to the second entity gets “redirected” to the current entity: every other reference contained inside a different source (e.g. a triplestore) must be manually handled by the user!

In case of functional properties, values from the current entity get overwritten by those coming from the second entity while, in all other cases, values from the second entity are simply appended to those of the current entity. In this context, rdfs:label is considered as a functional property, while rdf:type is not.

Parameters

other (BibliographicResource) – The entity which will be marked as to be deleted and whose properties will be merged into the current entity.

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

get_title()[source]

Getter method corresponding to the dcterms:title RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_title(string)[source]

Setter method corresponding to the dcterms:title RDF predicate.

WARNING: this is a functional property, hence any existing value will be overwritten!

The title of the bibliographic resource.

Parameters

string (str) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_title()[source]

Remover method corresponding to the dcterms:title RDF predicate.

Returns

None

Return type

None

get_subtitle()[source]

Getter method corresponding to the fabio:hasSubtitle RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_subtitle(string)[source]

Setter method corresponding to the fabio:hasSubtitle RDF predicate.

WARNING: this is a functional property, hence any existing value will be overwritten!

The subtitle of the bibliographic resource.

Parameters

string (str) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_subtitle()[source]

Remover method corresponding to the fabio:hasSubtitle RDF predicate.

Returns

None

Return type

None

get_is_part_of()[source]

Getter method corresponding to the frbr:partOf RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[BibliographicResource]

is_part_of(br_res)[source]

Setter method corresponding to the frbr:partOf RDF predicate.

WARNING: this is a functional property, hence any existing value will be overwritten!

The corpus identifier of the bibliographic resource (e.g. issue, volume, journal, conference proceedings) that contains the subject bibliographic resource.

Parameters

br_res (BibliographicResource) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_is_part_of()[source]

Remover method corresponding to the frbr:partOf RDF predicate.

Returns

None

Return type

None

get_citations()[source]

Getter method corresponding to the cito:cites RDF predicate.

Returns

A list containing the requested values if found, None otherwise

Return type

List[BibliographicResource]

has_citation(br_res)[source]

Setter method corresponding to the cito:cites RDF predicate.

The corpus identifier of the bibliographic resource cited by the subject bibliographic resource.

Parameters

br_res (BibliographicResource) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_citation(br_res=None)[source]

Remover method corresponding to the cito:cites RDF predicate.

WARNING: this is a non-functional property, hence, if the parameter is None, any existing value will be removed!

Parameters

br_res (BibliographicResource) – If not None, the specific object value that will be removed from the property related to this method (defaults to None)

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

get_pub_date()[source]

Getter method corresponding to the prism:publicationDate RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_pub_date(string)[source]

Setter method corresponding to the prism:publicationDate RDF predicate.

WARNING: this is a functional property, hence any existing value will be overwritten!

The date of publication of the bibliographic resource.

Parameters

string (str) – The value that will be set as the object of the property related to this method. It must be a string compliant with the ISO 8601 standard.

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_pub_date()[source]

Remover method corresponding to the prism:publicationDate RDF predicate.

Returns

None

Return type

None

get_formats()[source]

Getter method corresponding to the frbr:embodiment RDF predicate.

Returns

A list containing the requested values if found, None otherwise

Return type

List[ResourceEmbodiment]

has_format(re_res)[source]

Setter method corresponding to the frbr:embodiment RDF predicate.

The corpus identifier of the resource embodiment defining the format in which the bibliographic resource has been embodied, which can be either print or digital.

Parameters

re_res (ResourceEmbodiment) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_format(re_res=None)[source]

Remover method corresponding to the frbr:embodiment RDF predicate.

WARNING: this is a non-functional property, hence, if the parameter is None, any existing value will be removed!

Parameters

re_res (ResourceEmbodiment) – If not None, the specific object value that will be removed from the property related to this method (defaults to None)

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

get_number()[source]

Getter method corresponding to the fabio:hasSequenceIdentifier RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_number(string)[source]

Setter method corresponding to the fabio:hasSequenceIdentifier RDF predicate.

WARNING: this is a functional property, hence any existing value will be overwritten!

A literal (for example a number or a letter) that identifies the sequence position of the bibliographic resource as a particular item within a larger collection (e.g. an article number within a journal issue, a volume number of a journal, a chapter number within a book).

Parameters

string (str) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_number()[source]

Remover method corresponding to the fabio:hasSequenceIdentifier RDF predicate.

Returns

None

Return type

None

get_edition()[source]

Getter method corresponding to the prism:edition RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_edition(string)[source]

Setter method corresponding to the prism:edition RDF predicate.

WARNING: this is a functional property, hence any existing value will be overwritten!

An identifier for one of several alternative editions of a particular bibliographic resource.

Parameters

string (str) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_edition()[source]

Remover method corresponding to the prism:edition RDF predicate.

Returns

None

Return type

None

get_contained_in_reference_lists()[source]

Getter method corresponding to the frbr:part RDF predicate.

Returns

A list containing the requested values if found, None otherwise

Return type

List[BibliographicReference]

contains_in_reference_list(be_res)[source]

Setter method corresponding to the frbr:part RDF predicate.

A bibliographic reference within the bibliographic resource, or a discourse element wherein the text of the bibliographic resources can be organized.

Parameters

be_res (BibliographicReference) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_contained_in_reference_list(be_res=None)[source]

Remover method corresponding to the frbr:part RDF predicate.

WARNING: this is a non-functional property, hence, if the parameter is None, any existing value will be removed!

Parameters

be_res (BibliographicReference) – If not None, the specific object value that will be removed from the property related to this method (defaults to None)

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

get_contained_discourse_elements()[source]

Getter method corresponding to the frbr:part RDF predicate.

Returns

A list containing the requested values if found, None otherwise

Return type

List[DiscourseElement]

contains_discourse_element(de_res)[source]

Setter method corresponding to the frbr:part RDF predicate.

A bibliographic reference within the bibliographic resource, or a discourse element wherein the text of the bibliographic resources can be organized.

Parameters

de_res (DiscourseElement) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_contained_discourse_element(de_res=None)[source]

Remover method corresponding to the frbr:part RDF predicate.

WARNING: this is a non-functional property, hence, if the parameter is None, any existing value will be removed!

Parameters

de_res (DiscourseElement) – If not None, the specific object value that will be removed from the property related to this method (defaults to None)

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

get_contributors()[source]

Getter method corresponding to the pro:isDocumentContextFor RDF predicate.

Returns

A list containing the requested values if found, None otherwise

Return type

List[AgentRole]

has_contributor(ar_res)[source]

Setter method corresponding to the pro:isDocumentContextFor RDF predicate.

Parameters

ar_res (AgentRole) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

remove_contributor(ar_res=None)[source]

Remover method corresponding to the frbr:part RDF predicate.

WARNING: this is a non-functional property, hence, if the parameter is None, any existing value will be removed!

Parameters

ar_res (AgentRole) – If not None, the specific object value that will be removed from the property related to this method (defaults to None)

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Getter method corresponding to the dcterms:relation RDF predicate.

Returns

A list containing the requested values if found, None otherwise

Return type

List[URIRef]

Setter method corresponding to the dcterms:relation RDF predicate.

A document external to the Corpus, that is related to the bibliographic resource (such as a version of the bibliographic resource – for example a preprint – recorded in an external database).

Parameters

thing_res (URIRef) – The value that will be set as the object of the property related to this method

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

Remover method corresponding to the dcterms:relation RDF predicate.

WARNING: this is a non-functional property, hence, if the parameter is None, any existing value will be removed!

Parameters

thing_res (URIRef) – If not None, the specific object value that will be removed from the property related to this method (defaults to None)

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

create_archival_document()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:ArchivalDocument.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_book()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Book.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_book_chapter()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:BookChapter.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_book_part()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value doco:Part.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_book_section()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:ExpressionCollection.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_book_series()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:BookSeries.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_book_set()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:BookSet.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_book_track()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Expression.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_component()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Expression.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_dataset()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:DataFile.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_dissertation()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Thesis.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_edited_book()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Book.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_journal_article()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:JournalArticle.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_issue()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:JournalIssue.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_volume()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:JournalVolume.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_journal()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Journal.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_monograph()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Book.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_peer_review()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fr:ReviewVersion.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_proceedings_article()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:ProceedingsPaper.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_proceedings()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:AcademicProceedings.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_proceedings_series()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Series.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_reference_book()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:ReferenceBook.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_reference_entry()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:ReferenceEntry.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_report_series()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Series.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_report()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:ReportDocument.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_standard_series()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Series.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_standard()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:SpecificationDocument.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_series()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Series.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_expression_collection()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:ExpressionCollection.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_web_content()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:WebContent.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None

create_other()[source]

Setter method corresponding to the rdf:type RDF predicate. It implicitly sets the object value fabio:Expression.

WARNING: the OCDM specification admits at most two types for an entity. The main type cannot be edited or removed. Any existing secondary type will be overwritten!

The type of the bibliographic resource

Returns

None

Return type

None