droolsElements = new ArrayList<DroolsElement>();
resourcesMap.put(file, droolsElements);
}
droolsElements.add(rule);
} else {
Query query = DroolsModelBuilder.addQuery(
pkg, ruleName, file, ruleDescr.getStartCharacter(),
ruleDescr.getEndCharacter() - ruleDescr.getStartCharacter() + 1);
// create link between resource and created rule nodes
List<DroolsElement> droolsElements = resourcesMap.get(file);
if (droolsElements == null) {