Set<SWRLAtom> antecedent = Collections.emptySet();
URI ruleBodyURI = consumer.getResourceObject(mainNode, SWRLVocabulary.BODY.getURI(), true);
if (ruleBodyURI != null) {
antecedent = listTranslator.translateToSet(ruleBodyURI);
}
SWRLRule rule = null;
if (!consumer.isAnonymousNode(mainNode)) {
rule = consumer.getDataFactory().getSWRLRule(mainNode, antecedent, consequent);
}
else {
rule = consumer.getDataFactory().getSWRLRule(mainNode, true, antecedent, consequent);