Set<SWRLRule> ruleAxioms = ontology.getRules();
createGraph(ruleAxioms);
if (!ruleAxioms.isEmpty()) {
writeBanner("Rules");
SWRLVariableExtractor variableExtractor = new SWRLVariableExtractor();
for (SWRLRule rule : ruleAxioms) {
beginObject();
if (!rule.isAnonymous()) {
render(new RDFResourceNode(rule.getURI()));
}
rule.accept(variableExtractor);
endObject();
}
for (SWRLAtomVariable var : variableExtractor.getIVariables()) {
render(new RDFResourceNode(var.getURI()));
}
for (SWRLAtomVariable var : variableExtractor.getDVariables()) {
render(new RDFResourceNode(var.getURI()));
}
renderAnonRoots();
}