From 92bf8897d5b67e55be3a18cb3fe51dc22a201077 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Sun, 27 Nov 2022 13:11:00 +0100 Subject: [PATCH] sparql to enable/disable inference rules --- .../sparql/for-ontology-loading.sparql | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/for-ontology-loading.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/for-ontology-loading.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/for-ontology-loading.sparql new file mode 100644 index 0000000..b347a54 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/for-ontology-loading.sparql @@ -0,0 +1,32 @@ +# Loading the ontology on the repository with inference enabled does not work. +# Let's disable it: + +PREFIX sys: +INSERT DATA { + _:b sys:addRuleset "empty" . + _:b sys:defaultRuleset "empty" . +} + +# Now load the ontology (with SPARQL INSERT or importing the RDFS) + +# After the ontology is loaded we can re-enable the inference ruleset + +PREFIX sys: + +INSERT DATA { + [] sys:defaultRuleset "rdfsplus-optimized" . + [] sys:reinfer [] . +} + +# sys:reinfer tells the repository to reinfer everything according to the ruleset +# it is now running on staging and we need to wait to see if it works. + +# To list the rulesets: + +PREFIX sys: +SELECT ?state ?ruleset { + ?state sys:listRulesets ?ruleset +} + + +#Alternative: load the ontology in a separate repository. \ No newline at end of file