oc_ocdm.graph.entities.bibliographic.bibliographic_reference module

class oc_ocdm.graph.entities.bibliographic.bibliographic_reference.BibliographicReference(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 reference (short: be): the particular textual bibliographic reference, usually occurring in the reference list (and denoted by one or more in-text reference pointers within the text of a citing bibliographic resource), that references another 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 BibliographicReference entities into a single one, by marking the second entity as to be deleted while also copying its data into the current BibliographicReference. 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 (BibliographicReference) – 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_content()[source]

Getter method corresponding to the c4o:hasContent RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_content(string)[source]

Setter method corresponding to the c4o:hasContent RDF predicate.

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

The literal text of a bibliographic reference occurring in the reference list (or elsewhere) within a bibliographic resource, that references another bibliographic resource. The reference text should be recorded “as given” in the citing bibliographic resource, including any errors (e.g. mis-spellings of authors’ names, or changes from “β” in the original published title to “beta” in the reference text) or omissions (e.g. omission of the title of the referenced bibliographic resource, or omission of sixth and subsequent authors’ names, as required by certain publishers), and in whatever format it has been made available. For instance, the reference text can be either as plain text or as a block of XML.

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_content()[source]

Remover method corresponding to the c4o:hasContent RDF predicate.

Returns

None

Return type

None

get_annotations()[source]

Getter method corresponding to the oco:hasAnnotation RDF predicate.

Returns

A list containing the requested values if found, None otherwise

Return type

List[ReferenceAnnotation]

has_annotation(an_res)[source]

Setter method corresponding to the oco:hasAnnotation RDF predicate.

An annotation characterizing the related citation, in terms of its citation function (the reason for that citation).

Parameters

an_res (ReferenceAnnotation) – 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_annotation(an_res=None)[source]

Remover method corresponding to the oco:hasAnnotation RDF predicate.

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

Parameters

an_res (ReferenceAnnotation) – 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_referenced_br()[source]

Getter method corresponding to the biro:references RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[BibliographicResource]

references_br(br_res)[source]

Setter method corresponding to the biro:references RDF predicate.

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

The bibliographic reference that cites this 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_referenced_br()[source]

Remover method corresponding to the biro:references RDF predicate.

Returns

None

Return type

None