}
}
for (int i = 0; i < rule.headLength(); i++) {
Object hClause = rule.getHeadElement(i);
if (hClause instanceof TriplePattern) {
Triple t = env.instantiate((TriplePattern) hClause);
// Used to filter out triples with literal subjects
// but this is not necessary
// if (!t.getSubject().isLiteral()) {
// Only add the result if it is legal at the RDF level.
// E.g. RDFS rules can create assertions about literals