oc_ocdm.graph.entities.bibliographic.responsible_agent module
- class oc_ocdm.graph.entities.bibliographic.responsible_agent.ResponsibleAgent(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
Responsible agent (short: ra): the agent (usually a person or an organisation) having a certain role with respect to a bibliographic resource (e.g. an author of a paper or book, or an editor of a journal).
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
ResponsibleAgent
entities into a single one, by marking the second entity as to be deleted while also copying its data into the currentResponsibleAgent
. Moreover, every triple from the containingGraphSet
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, whilerdf:type
is not.- Parameters
other (ResponsibleAgent) – 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_name()[source]
Getter method corresponding to the
foaf:name
RDF predicate.- Returns
The requested value if found, None otherwise
- Return type
Optional[str]
- has_name(string)[source]
Setter method corresponding to the
foaf:name
RDF predicate.WARNING: this is a functional property, hence any existing value will be overwritten!
The name of an agent (for people, usually in the format: given name followed by family name, separated by a space).
- 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_name()[source]
Remover method corresponding to the
foaf:name
RDF predicate.- Returns
None
- Return type
None
- get_given_name()[source]
Getter method corresponding to the
foaf:givenName
RDF predicate.- Returns
The requested value if found, None otherwise
- Return type
Optional[str]
- has_given_name(string)[source]
Setter method corresponding to the
foaf:givenName
RDF predicate.WARNING: this is a functional property, hence any existing value will be overwritten!
The given name of an agent, if a person.
- 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_given_name()[source]
Remover method corresponding to the
foaf:givenName
RDF predicate.- Returns
None
- Return type
None
- get_family_name()[source]
Getter method corresponding to the
foaf:familyName
RDF predicate.- Returns
The requested value if found, None otherwise
- Return type
Optional[str]
- has_family_name(string)[source]
Setter method corresponding to the
foaf:familyName
RDF predicate.WARNING: this is a functional property, hence any existing value will be overwritten!
The family name of an agent, if a person.
- 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_family_name()[source]
Remover method corresponding to the
foaf:familyName
RDF predicate.- Returns
None
- Return type
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.An external agent that/who is related in some relevant way with this responsible agent (e.g. for inter-linking purposes).
- Parameters
thing_res (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
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