GraphDB Enterprise supports consistency violation checks using standard OWL2RL semantics. It is possible to define rulesets that contain consistency rules.
Important: When creating a new repository, the parameter check-for-inconsistencies should be set to true. It is false by default - for compatibility with previous OWLIM releases.
Materialisation and consistency mix: the rulesets support the definition of a mixture of materialization and consistency rules. This follows the existing naming syntax “id:” and “Consistency:”
Multiple named rulesets: GraphDB Enterprise supports multiple named rulesets.
No down time deployment: The deployment of new/updated rulesets can be done to a running instance.
Update transaction ruleset: Each update transaction can specify which named ruleset to apply. This is done by using “special” RDF statements within the update transaction.
Consistency violation exceptions: GraphDB Enterprise throws exceptions if a consistency rule is violated. The exception includes details as which rule has been violated and to which RDF statements.
Consistency Rollback: if a consistency rule is violated within an update transaction, the transaction will be rolled back and no statements will be committed.
GraphDB inference engine background
In order to instantiate an inferencer, first GraphDB requires the .pie file of each ruleset to be compiled. The process includes several steps:
Generating a java code out of the pie file contents using the built-in GraphDB rule compiler.
Compiling the java code (it requires JDK instead of JRE, hence the java compiler will be available through the standard java instrumentation infrastructure).
Instantiating the java code using a custom bytecode class loader.
In prior-GraphDB 6 versions, this inferencer was instantiated when the repository was initialized. The process was slow and took some time depending on the ruleset used and the rules included.
In GraphDB 6, the inferencer can be dynamically extended with new rulesets, as specified in the text section.
Operations on rulesets
All examples below use the sys: namespace, defined as:
Add a custom ruleset from .pie file
Adds a custom ruleset from the specified .pie file. The ruleset is named after the filename, without the .pie extension.