Delete/Update user-defined rules

Hi there,

I managed to add in a rule using Stardog Studio/Workspace, then the code in Turtle. But when it comes time to delete/update it, I can't find a way to. Can someone share how or point me to some relevant documentation? Many thanks in advance!

The best way to handle this is to keep your rules in a single named graph. Then it's very simple to clear the single graph and write the new copy of the rules.

You can use the database property reasoning.schema.graphs to create a single schema, say "foo", that encompasses both your rules graph and the graph where you keep your core ontology.

Then you can use the schema "foo" in both Studio and Explorer to enable your specific ontology and rule set. You can also have multiple different schemas each with their own ontologies and rules.

Thanks Michael for the pointers. Can u explain how I can clear the graph in Studio?... cos "Remove Data" in Workspace (with the rule code in the editing area & the graph name selected) did not delete the rule. What am I doing wrong?

Additionally, to clarify...if I have 10 rules and I want users to be able to edit/delete all 10 rules independently of each other, then I ought to have 10 named graphs. Have I understood you correctly?

Your help is very much appreciated.

The easiest way to clear a graph in Studio is to use SPARQL, e.g.

clear graph <graph:iri:goes:here>

And yes, if you'd like people to edit and maintain the rules completely independently of each other, separate named graphs for each rule is the easiest way to go. Then your schema just uses all N of the graphs for the N rules rather than one graph for all N.

Thanks Mike for all your help!

Cheers,
tsc