oc_ocdm.prov.entities.snapshot_entity module

class oc_ocdm.prov.entities.snapshot_entity.SnapshotEntity(prov_subject, g, p_set, res=None, resp_agent=None, source=None, res_type=None, count=None, label=None, short_name='')[source]

Bases: oc_ocdm.prov.prov_entity.ProvEntity

Snapshot of entity metadata (short: se): a particular snapshot recording the metadata associated with an individual entity (either a bibliographic entity or an identifier) at a particular date and time, including the agent, such as a person, organisation or automated process that created or modified the entity metadata.

Constructor of the AbstractEntity class.

Parameters
  • prov_subject (GraphEntity) –

  • g (Graph) –

  • p_set (ProvSet) –

  • res (URIRef) –

  • resp_agent (str) –

  • source (str) –

  • res_type (URIRef) –

  • count (str) –

  • label (str) –

  • short_name (str) –

Return type

None

get_generation_time()[source]

Getter method corresponding to the prov:generatedAtTime RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_generation_time(string)[source]

Setter method corresponding to the prov:generatedAtTime RDF predicate.

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

The date on which a particular snapshot of a bibliographic entity’s metadata was created.

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 xsd:dateTime datatype.

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_generation_time()[source]

Remover method corresponding to the prov:generatedAtTime RDF predicate.

Returns

None

Return type

None

get_invalidation_time()[source]

Getter method corresponding to the prov:invalidatedAtTime RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_invalidation_time(string)[source]

Setter method corresponding to the prov:invalidatedAtTime RDF predicate.

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

The date on which a snapshot of a bibliographic entity’s metadata was invalidated due to an update (e.g. a correction, or the addition of some metadata that was not specified in the previous snapshot), or due to a merger of the entity with another one.

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 xsd:dateTime datatype.

Raises

TypeError – if the parameter is of the wrong type

Returns

None

Return type

None

remove_invalidation_time()[source]

Remover method corresponding to the prov:invalidatedAtTime RDF predicate.

Returns

None

Return type

None

get_is_snapshot_of()[source]

Getter method corresponding to the prov:specializationOf RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[URIRef]

is_snapshot_of(en_res)[source]

Setter method corresponding to the prov:specializationOf RDF predicate.

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

This property is used to link a snapshot of entity metadata to the bibliographic entity to which the snapshot refers.

Parameters

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

Returns

None

Return type

None

remove_is_snapshot_of()[source]

Remover method corresponding to the prov:specializationOf RDF predicate.

Returns

None

Return type

None

get_derives_from()[source]

Getter method corresponding to the prov:wasDerivedFrom RDF predicate.

Returns

A list containing the requested values if found, None otherwise

Return type

List[ProvEntity]

derives_from(se_res)[source]

Setter method corresponding to the prov:wasDerivedFrom RDF predicate.

This property is used to identify the immediately previous snapshot of entity metadata associated with the same bibliographic entity.

Parameters

se_res (ProvEntity) – 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_derives_from(se_res=None)[source]

Remover method corresponding to the prov:wasDerivedFrom RDF predicate.

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

Parameters

se_res (SnapshotEntity) – 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_primary_source()[source]

Getter method corresponding to the prov:hadPrimarySource RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[URIRef]

has_primary_source(any_res)[source]

Setter method corresponding to the prov:hadPrimarySource RDF predicate.

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

This property is used to identify the primary source from which the metadata described in the snapshot are derived (e.g. Crossref, as the result of querying the CrossRef API).

Parameters

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

Returns

None

Return type

None

remove_primary_source()[source]

Remover method corresponding to the prov:hadPrimarySource RDF predicate.

Returns

None

Return type

None

get_update_action()[source]

Getter method corresponding to the oco:hasUpdateQuery RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_update_action(string)[source]

Setter method corresponding to the oco:hasUpdateQuery RDF predicate.

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

The UPDATE SPARQL query that specifies which data, associated to the bibliographic entity in consideration, have been modified (e.g. for correcting a mistake) in the current snapshot starting from those associated to the previous snapshot of the entity.

Parameters

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

Returns

None

Return type

None

remove_update_action()[source]

Remover method corresponding to the oco:hasUpdateQuery RDF predicate.

Returns

None

Return type

None

get_description()[source]

Getter method corresponding to the dcterms:description RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[str]

has_description(string)[source]

Setter method corresponding to the dcterms:description RDF predicate.

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

A textual description of the events that have resulted in the current snapshot (e.g. the creation of the initial snapshot, the creation of a new snapshot following the modification of the entity to which the metadata relate, or the creation of a new snapshot following the merger with another entity of the entity to which the previous snapshot related).

Parameters

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

Returns

None

Return type

None

remove_description()[source]

Remover method corresponding to the dcterms:description RDF predicate.

Returns

None

Return type

None

get_resp_agent()[source]

Getter method corresponding to the prov:wasAttributedTo RDF predicate.

Returns

The requested value if found, None otherwise

Return type

Optional[URIRef]

has_resp_agent(se_agent)[source]

Setter method corresponding to the prov:wasAttributedTo RDF predicate.

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

The agent responsible for the creation of the current entity snapshot.

Parameters

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

Returns

None

Return type

None

remove_resp_agent()[source]

Remover method corresponding to the prov:wasAttributedTo RDF predicate.

Returns

None

Return type

None