for (Iterator iterator = rules.iterator(); iterator.hasNext();) {
RuleDescr ruleDescr = (RuleDescr) iterator.next();
boolean isQuery = ruleDescr instanceof QueryDescr;
String ruleName = ruleDescr.getName();
if (!isQuery) {
Rule rule = DroolsModelBuilder.addRule(
pkg, ruleName, file, ruleDescr.getStartCharacter(),
ruleDescr.getEndCharacter() - ruleDescr.getStartCharacter() + 1, null);
// create link between resource and created rule nodes
List droolsElements = (List) resourcesMap.get(file);
if (droolsElements == null) {