diff --git a/cmem_plugin_shapes/plugin_shapes.py b/cmem_plugin_shapes/plugin_shapes.py index ade604e..cb2ce4a 100644 --- a/cmem_plugin_shapes/plugin_shapes.py +++ b/cmem_plugin_shapes/plugin_shapes.py @@ -193,10 +193,9 @@ def get_class_dict(self) -> dict: def make_shapes(self, shapes_graph: Graph) -> Graph: """Make shapes""" - prop_uuids = [] class_uuids = [] - class_dict = self.get_class_dict() - for cls, props in class_dict.items(): + prop_uuids = [] + for cls, props in self.get_class_dict().items(): class_uuid = uuid5(NAMESPACE_URL, cls) node_shape_uri = URIRef(f"{format_namespace(self.shapes_graph_iri)}{class_uuid}") if class_uuid not in class_uuids: @@ -250,12 +249,12 @@ def import_shapes_graph(self) -> None: def execute(self, inputs: tuple, context: ExecutionContext) -> None: # noqa: ARG002 """Execute plugin""" - self.context = context setup_cmempy_user_access(context.user) - self.dp_api_endpoint = get_dp_api_endpoint() - self.prefixes = self.get_prefixes() if not self.overwrite and self.shapes_graph_iri in [i["iri"] for i in get_graphs_list()]: raise ValueError(f"Graph <{self.shapes_graph_iri}> already exists") + self.context = context + self.dp_api_endpoint = get_dp_api_endpoint() + self.prefixes = self.get_prefixes() shapes_graph = self.init_shapes_graph() shapes_graph = self.make_shapes(shapes_graph) nt_file = BytesIO(shapes_graph.serialize(format="nt", encoding="utf-8")) diff --git a/cmem_plugin_shapes/prefix.cc.json b/cmem_plugin_shapes/prefix.cc.json index cb2f61c..4e34002 100644 --- a/cmem_plugin_shapes/prefix.cc.json +++ b/cmem_plugin_shapes/prefix.cc.json @@ -29,6 +29,7 @@ "adw": "https://animaldiversity.org/accounts/", "aec3po": "https://w3id.org/lbd/aec3po/", "aeo": "http://purl.obolibrary.org/obo/AEO_", + "aero": "http://purl.obolibrary.org/obo/AERO_", "aerols": "http://xmlns.com/aerols/0.1/", "aers": "http://aers.data2semantics.org/resource/", "aersv": "http://aers.data2semantics.org/vocab/", @@ -92,6 +93,7 @@ "apf": "http://jena.apache.org/ARQ/property#", "api": "http://purl.org/linked-data/api/vocab#", "apivc": "http://purl.org/linked-data/api/vocab#", + "apmwg": "http://apmwg.ovh/", "apo": "http://purl.obolibrary.org/obo/APO_", "apods": "http://activitypods.org/ns/core#", "apollosv": "http://purl.obolibrary.org/obo/APOLLO_SV_", @@ -1037,7 +1039,7 @@ "gg": "http://www.gemeentegeschiedenis.nl/gg-schema#", "ggbn": "http://data.ggbn.org/schemas/ggbn/terms/", "ghga": "http://w3id.org/ghga/", - "gist": "https://ontologies.semanticarts.com/o/gistCore#", + "gist": "http://ontologies.semanticarts.com/gist#", "giving": "http://ontologi.es/giving#", "gl": "http://schema.geolink.org/", "gldp": "http://www.w3.org/ns/people#", @@ -1085,7 +1087,7 @@ "gridworks": "http://purl.org/net/opmv/types/gridworks#", "grs": "http://www.georss.org/georss/", "grscicoll": "https://www.gbif.org/grscicoll/collection/", - "gs1": "http://gs1.org/voc/", + "gs1": "https://ref.gs1.org/voc/", "gso": "http://www.w3.org/2006/gen/ont#", "gsp": "http://www.opengis.net/ont/geosparql#", "gt": "https://vocab.eccenca.com/geniustex/",