oc_ocdm.abstract_set module
- class oc_ocdm.abstract_set.AbstractSet[source]
Bases:
abc.ABC
Abstract class which represents a generic set of entities. It is the base class for each concrete set of entities.
Constructor of the
AbstractSet
class.- Return type
None
- short_name_to_type_iri: ClassVar[Dict[str, URIRef]] = {}
- graphs()[source]
A utility method that allows to retrieve the list of
rdflib.Graph
instances corresponding to each entity contained in the set.- Returns
The requested list of graphs
- Return type
List[Graph]
- abstract get_entity(res)[source]
Method signature for concrete implementations that allow to retrieve a contained entity identified by its URI.
- Parameters
res (URIRef) – The URI that identifies the requested entity
- Returns
The requested entity if found, None otherwise
- Return type
Optional[AbstractEntity]
- static get_graph_iri(g)[source]
A utility method that allows to retrieve the IRI which represents the name of a given named graph.
NOTE: this is a static function!
- Parameters
g (Graph) – The named graph whose name will be returned
- Returns
The requested string whose content is the IRI associated to the given named graph
- Return type
str