try { NSDictionary dic = Services.dictionaryFromFile(modelFile); 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); }
NSDictionary dic = dictionaryFromFile(modelFile); 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);
    protected void mergePathURL(URL modelURL) {        if(modelURL != null) {            File modelFile = new File(modelURL.getFile());            if (log.isDebugEnabled()) log.debug("Merging rule file \"" + modelFile.getPath()                                                + "\"");            setCurrentFile(modelFile);            try {                NSDictionary dic = Services.dictionaryFromFile(modelFile);                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);                        }                    }                } else {                    ERD2WModel model = new ERD2WModel(new EOKeyValueUnarchiver(dic));                    addRules(model.rules());                }            } catch (IOException except) {                ruleDecodeLog.error("Could not load rule file: " + except.getMessage());            }            setDirty(false);        }        setCurrentFile(null);    }