aboutsummaryrefslogtreecommitdiffstats
path: root/bsie/apps
diff options
context:
space:
mode:
Diffstat (limited to 'bsie/apps')
-rw-r--r--bsie/apps/index.py28
1 files changed, 11 insertions, 17 deletions
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