From 9fb18f64fc1ce4a08e892a778244ec40012f152a Mon Sep 17 00:00:00 2001 From: WerLaj Date: Mon, 5 Feb 2024 05:37:09 +0100 Subject: [PATCH] Fixes in image path --- pkg_api/core/namespaces.py | 2 +- pkg_api/pkg.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_api/core/namespaces.py b/pkg_api/core/namespaces.py index d5c29f6..93d65b7 100644 --- a/pkg_api/core/namespaces.py +++ b/pkg_api/core/namespaces.py @@ -15,7 +15,7 @@ class PKGPrefixes(Enum): DCAT = "http://www.w3.org/ns/dcat#" DOAP = "http://usefulinc.com/ns/doap#" EVENT = "http://purl.org/NET/c4dm/event.owl#" - EX = "http://example.com#" + EX = "http://example.org/pkg#" FOAF = "http://xmlns.com/foaf/0.1/" GEO = "http://www.w3.org/2003/01/geo/wgs84_pos#" OWL = "http://www.w3.org/2002/07/owl#" diff --git a/pkg_api/pkg.py b/pkg_api/pkg.py index 81135cd..a27c121 100644 --- a/pkg_api/pkg.py +++ b/pkg_api/pkg.py @@ -161,8 +161,8 @@ def visualize_graph(self) -> str: owner_name = "" for _, namespace in PKGPrefixes.__members__.items(): - if namespace.value in str(self._owner_uri): - owner_name = self._owner_uri.replace(str(namespace.value), "") + if namespace.value.replace("#", "") in str(self._owner_uri): + owner_name = self._owner_uri.replace(str(namespace.value.replace("#", "")), "") path = self._visualization_path + "/" + owner_name + ".png"