From 5850ff2bcb1052883cf301590126609b0657fbc9 Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Sun, 18 Dec 2022 13:37:02 +0100 Subject: cosmetic changes --- bsie/apps/index.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'bsie/apps/index.py') diff --git a/bsie/apps/index.py b/bsie/apps/index.py index e37684b..1dbfdd8 100644 --- a/bsie/apps/index.py +++ b/bsie/apps/index.py @@ -98,23 +98,17 @@ def main(argv): walk(print) return None - else: - # initialize bsfs - # NOTE: With presistent storages, the schema migration will be a seaparte operation. - # Here, we'd simply examine the schema and potentially discard more predicates. - store = bsfs.Open({ - 'Graph': { - 'user': args.user, - 'backend': { - 'SparqlStore': {}}, - }}) - store.migrate(bsie.schema) - # process files - def handle(node, pred, value): - store.node(node.node_type, node.uri).set(pred.uri, value) - walk(handle) - # return store - return store + # initialize bsfs + # NOTE: With presistent storages, the schema migration will be a seaparte operation. + # Here, we'd simply examine the schema and potentially discard more predicates. + store = bsfs.Open(bsfs.init_sparql_store(args.user)) + store.migrate(bsie.schema) + # process files + def handle(node, pred, value): + store.node(node.node_type, node.uri).set(pred.uri, value) + walk(handle) + # return store + return store -- cgit v1.2.3