Examples of KladrCode


Examples of framework.beans.address.KladrCode

        String s = null;
        int c = 0;
        for (c = 1; c <= recordCount; c++) {
            try {
                dbf.read();
                KladrCode oldCode = null;
                KladrCode newCode = null;
                for (int i = 0; i < fields.length; i++) {
                    s = new String(fields[i].get().trim());
                    switch (i) {
                        case f_old_code:
                            oldCode = new KladrCode(parseCode(s));
                            break;
                        case f_new_code:
                            newCode = new KladrCode(parseCode(s));
                            break;
                        case f_level: {
                            //do nothing
                        }
                    }
View Full Code Here

Examples of framework.beans.address.KladrCode

            if (cc[0] == 0) {
                throw new ClipsException("Неверный код объекта: " + code);
            }

            //определяем уровень и код
            item.kladrCode = new KladrCode(cc);
            //оставляем только код родителя
            for (int level = code_section_count - 1; level >= 0; level--) {
                if (cc[level] > 0) {
                    itemLevel = level + 1;
                    cc[level] = 0;
                    break;
                }
            }
            KladrCode parentCode = new KladrCode(cc);

            //set type by abbrivation and level
            DirectoryKladrTypeItem type = kladrTypes.get(abbr + itemLevel);
            if (type == null) {
                throw new ClipsException("Неизвестный тип адресуемого объекта (abbrivation: " + abbr + " level: " + itemLevel + "), обновите файл сокращений");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.