aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/graph/graph.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-01-16 21:43:38 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-01-16 21:43:38 +0100
commite12cd52ad267563c8046a593ad551b1dd089a702 (patch)
treed94cdf7ac540eb82630f78cbf564682b66007f51 /bsfs/graph/graph.py
parent7f5a2920ef311b2077300714d7700313077a0bf6 (diff)
parent3504609e1ba1f7f653fa79910474bebd3ec24d8a (diff)
downloadbsfs-e12cd52ad267563c8046a593ad551b1dd089a702.tar.gz
bsfs-e12cd52ad267563c8046a593ad551b1dd089a702.tar.bz2
bsfs-e12cd52ad267563c8046a593ad551b1dd089a702.zip
Merge branch 'mb/features' into develop
Diffstat (limited to 'bsfs/graph/graph.py')
-rw-r--r--bsfs/graph/graph.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bsfs/graph/graph.py b/bsfs/graph/graph.py
index f030fed..2210755 100644
--- a/bsfs/graph/graph.py
+++ b/bsfs/graph/graph.py
@@ -10,7 +10,7 @@ import typing
# bsfs imports
from bsfs.query import ast, validate
-from bsfs.schema import Schema
+from bsfs import schema as bsc
from bsfs.triple_store import TripleStoreBase
from bsfs.utils import URI, typename
@@ -67,11 +67,11 @@ class Graph():
return f'{typename(self)}({str(self._backend)}, {self._user})'
@property
- def schema(self) -> Schema:
+ def schema(self) -> bsc.Schema:
"""Return the store's local schema."""
return self._backend.schema
- def migrate(self, schema: Schema, append: bool = True) -> 'Graph':
+ def migrate(self, schema: bsc.Schema, append: bool = True) -> 'Graph':
"""Migrate the current schema to a new *schema*.
Appends to the current schema by default; control this via *append*.
@@ -79,14 +79,14 @@ class Graph():
"""
# check args
- if not isinstance(schema, Schema):
+ if not isinstance(schema, bsc.Schema):
raise TypeError(schema)
# append to current schema
if append:
schema = schema + self._backend.schema
# add Graph schema requirements
with open(os.path.join(os.path.dirname(__file__), 'schema.nt'), mode='rt', encoding='UTF-8') as ifile:
- schema = schema + Schema.from_string(ifile.read())
+ schema = schema + bsc.from_string(ifile.read())
# migrate schema in backend
# FIXME: consult access controls!
self._backend.schema = schema