Package cli_fmw.delegate.directory.complex

Examples of cli_fmw.delegate.directory.complex.DirectoryKladrTypeItem


                }
            }
            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 + "), обновите файл сокращений");
            }
            item.typeId = type.getID();

            Set<KladrItem> childrenFromMap = notAddedYet.get(item.kladrCode);    //add children from 'needParent' map
            if (childrenFromMap != null) {
                if (item.children == null) {
                    item.children = new ArrayList<KladrItem>();
View Full Code Here


    private void remapTypes() throws ClipsException {
        directoryKladrType = (DirectoryKladrType) DirectoryLocator.getDirectory(DirectoryKladrType.class, true);
        kladrTypes = new HashMap<String, DirectoryKladrTypeItem>();
        SelectorEditableExceptional<DirectoryKladrTypeItem> see = directoryKladrType.getItems();
        for (int i = 0; i < see.size(); i++) {
            DirectoryKladrTypeItem type = see.get(i);
            kladrTypes.put(type.getAbbrivation() + type.getLevel(), type);
        }
    }
View Full Code Here

                    String title = "";
                    //Попытка по названию KLSTREET
                    if (!klStreet.isEmpty()) {
                        DirectoryKladrItem itemByCode = dirKladr.getItemByCode(klStreet);
                        title = itemByCode.getTitle();
                        DirectoryKladrTypeItem type = itemByCode.getType();
                        childByTitle = item.getChildByTitle(title, type);
                    }
                    //попытка поиска по NAM_STREET
                    if (childByTitle == null && !namstreet.isEmpty()) {
                        //определяем  если это переулок
                        DirectoryKladrTypeItem type;
                        if (namstreet.toUpperCase().startsWith("ПЕР.") || namstreet.toUpperCase().startsWith("ПЕР ")) {
                            type = PER;
                        } else {
                            type = STREET;
                        }
View Full Code Here

  private ArrayList<DirectoryKladrTypeItem> getItemsByShortTitle(String shortTitle) throws ClipsException {
        SelectorEditableExceptional<DirectoryKladrTypeItem> selector = dir.getItems();
        ArrayList<DirectoryKladrTypeItem> target = new ArrayList<DirectoryKladrTypeItem>();
    int      size = selector.size();
    for (int i = 0; i < size; i++){
      DirectoryKladrTypeItem item = selector.get(i);
      if (item.getID() == 0){
        continue;
      }
            if (item.getAbbrivation() != null && item.getAbbrivation().equals(shortTitle)) {
                target.add(item);
            }
        }
        return target;
    }
View Full Code Here

                //ITEM
                lf.item.put(id, target, data.item);

                //TYPE_ITEM
                DirectoryKladrTypeItem typeItem = dirKladrType.getItemFromID(data.type_item);
                if (typeItem == null) {
                    lf.type_item.put("");
                } else {
                    try {
                        String extKey = typeItem.getExtKey();
                        if (extKey == null || extKey.isEmpty()) {
                            lf.type_item.put("");
                        } else {
                            lf.type_item.put(Integer.parseInt(extKey));
                        }
View Full Code Here

TOP

Related Classes of cli_fmw.delegate.directory.complex.DirectoryKladrTypeItem

Copyright © 2018 www.massapicom. 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.