aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/triple_store
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-03-04 13:31:11 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-03-04 13:44:26 +0100
commit4fead04055be4967d9ea3b24ff61fe37a93108dd (patch)
tree40fb5ea2874466cae1b3fb6ad84d1d133992bf34 /bsfs/triple_store
parent2c6c23f85e7f2123c508f9ff8a4aa776948bb589 (diff)
downloadbsfs-4fead04055be4967d9ea3b24ff61fe37a93108dd.tar.gz
bsfs-4fead04055be4967d9ea3b24ff61fe37a93108dd.tar.bz2
bsfs-4fead04055be4967d9ea3b24ff61fe37a93108dd.zip
namespace refactoring and cleanup
Diffstat (limited to 'bsfs/triple_store')
-rw-r--r--bsfs/triple_store/sparql/distance.py6
-rw-r--r--bsfs/triple_store/sparql/sparql.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/bsfs/triple_store/sparql/distance.py b/bsfs/triple_store/sparql/distance.py
index 9b58088..2c2f355 100644
--- a/bsfs/triple_store/sparql/distance.py
+++ b/bsfs/triple_store/sparql/distance.py
@@ -43,9 +43,9 @@ def manhatten(fst, snd) -> float:
# Known distance functions.
DISTANCE_FU = {
- ns.bsfs.euclidean: euclid,
- ns.bsfs.cosine: cosine,
- ns.bsfs.manhatten: manhatten,
+ ns.bsd.euclidean: euclid,
+ ns.bsd.cosine: cosine,
+ ns.bsd.manhatten: manhatten,
}
## EOF ##
diff --git a/bsfs/triple_store/sparql/sparql.py b/bsfs/triple_store/sparql/sparql.py
index 68c0027..99e67d6 100644
--- a/bsfs/triple_store/sparql/sparql.py
+++ b/bsfs/triple_store/sparql/sparql.py
@@ -28,7 +28,7 @@ __all__: typing.Sequence[str] = (
## code ##
-rdflib.term.bind(ns.bsfs.BinaryBlob, bytes, constructor=base64.b64decode)
+rdflib.term.bind(ns.bsl.BinaryBlob, bytes, constructor=base64.b64decode)
class _Transaction():
"""Lightweight rdflib transactions for in-memory databases."""
@@ -335,8 +335,8 @@ class SparqlStore(base.TripleStoreBase):
# convert value
if isinstance(predicate.range, bsc.Literal):
dtype = rdflib.URIRef(predicate.range.uri)
- if predicate.range <= self.schema.literal(ns.bsfs.BinaryBlob):
- dtype = rdflib.URIRef(ns.bsfs.BinaryBlob)
+ if predicate.range <= self.schema.literal(ns.bsl.BinaryBlob):
+ dtype = rdflib.URIRef(ns.bsl.BinaryBlob)
value = base64.b64encode(value)
value = rdflib.Literal(value, datatype=dtype)
elif isinstance(predicate.range, bsc.Node):