if (ruleDecodeLog.isDebugEnabled()) {
ruleDecodeLog.debug("Got dictionary for file: " + modelFile + "\n\n");
for (Enumeration e = ((NSArray)dic.objectForKey("rules")).objectEnumerator(); e.hasMoreElements();) {
NSDictionary aRule = (NSDictionary)e.nextElement();
NSMutableDictionary aRuleDictionary = new NSMutableDictionary(aRule, "rule");
EOKeyValueUnarchiver archiver = new EOKeyValueUnarchiver(aRuleDictionary);
try {
addRule((Rule)archiver.decodeObjectForKey("rule"));
} catch (Exception ex) {
ruleDecodeLog.error("Bad rule: " + aRule, ex);
ruleDecodeLog.error("Decoded rule: " + archiver.decodeObjectForKey("rule"));
}
}
} else {
NSArray rules = (NSArray) new EOKeyValueUnarchiver(dic).decodeObjectForKey("rules");
if(rules != null) {
ERD2WModel model = new ERD2WModel(rules);
addRules(model.rules());
}
}