variableMap = new HashMap<String,Integer>();
Iterator<RuleAtom> it = headAtomList.iterator();
while (it.hasNext()) {
RuleAtom atom = it.next();
ClauseEntry clauseEntry = adaptRuleAtomTo(atom, com.hp.hpl.jena.reasoner.rulesys.Rule.class);
if (clauseEntry instanceof HigherOrderClauseEntry) {
List<ClauseEntry> clauseEntries = ((HigherOrderClauseEntry) clauseEntry)
.getClauseEntries();
for (ClauseEntry ce : clauseEntries) {
headClauseEntries.add(ce);
}
} else {
headClauseEntries.add(clauseEntry);
}
}
it = bodyAtomList.iterator();
while (it.hasNext()) {
RuleAtom atom = it.next();
ClauseEntry clauseEntry = adaptRuleAtomTo(atom, com.hp.hpl.jena.reasoner.rulesys.Rule.class);
if (clauseEntry instanceof HigherOrderClauseEntry) {
List<ClauseEntry> clauseEntries = ((HigherOrderClauseEntry) clauseEntry)
.getClauseEntries();