Previous topic  Top  Next topic  Print this Topic

Materialization Commands


This section describes how to manage the materialization using server commands. The commands can be executed remotely (e.g. via the webconsole) or via the API (OntologyManager.execute()).

Add Rule as Materialized Rule (For Updatable Materialization Only)


mat_addRule <ruleID>, <ontologyID>


To materialize the rule

@{r1} ?X[enemyOf->Jerry] :- ?X:Cat AND ?X[hasName->Tom].

of ontology "comics" you have to execute the command

mat_addRule r1, comics

If you use the API you can write

OntologyManager manager;

manager.execute("mat_addRule r1 comics");

Remove Rule as Materialized Rule (For Updatable Materialization Only)


mat_removeRule <ruleID>, <ontologyID>

This command will remove the rule with the given ID as a materialized rule. Note that the rule still remains in the ontology. The materialized facts for this rule will be removed.

Execute the Materialization (For Updatable Materialization Only)



This command will trigger an immediate update of the materialization.

Materialize rules (for not revertable/not updatable materialization)


mat_materializeRules <ruleIDs>, <ontologyID>

This command works similar to the "mat_addRule" command, but the materialization of these rules can not be updated again.

This example shows how to materialize a single rule:

mat_materializeRules r1, comics

You have to specify at least one rule ID. To materialize multiple rules you can execute

mat_materializeRules r1, r2, r3, r4, comics

Materialization Status



This command will return a short status about the materialized rules, and so on. The output will look like this:

# of facts in the EDB: 132

# of rules in the IDB: 22

Materialization strategy: RFS

Materialized rules:

   @{r1} ?X[enemyOf->Jerry] :- ?X:Cat AND ?X[hasName->Tom].