else if (attr.getLocalName(i).equals("lastasked")){ shareDO.setLastAsked(Long.parseLong(attr.getValue(i))); } else if (attr.getLocalName(i).equals("askcount")){ shareDO.setAskCount(Long.parseLong(attr.getValue(i))); } else if (attr.getLocalName(i).equals("searchcount")){ shareDO.setSearchCount(Long.parseLong(attr.getValue(i))); }
    private void checkShareAttributes(Attributes attr){        int id = -1;        for (int i = 0; i < attr.getLength(); i++) {            if (attr.getLocalName(i).equals("id")) {                id = Integer.parseInt(attr.getValue(i));                break;            }        }        if (id == -1) {            return;        }        ShareDO shareDO = new ShareDO(id);        shareMap.put(Integer.toString(id), shareDO);        for (int i = 0; i < attr.getLength(); i++) {            if (attr.getLocalName(i).equals("filename")){                shareDO.setFilename(attr.getValue(i));            }            else if (attr.getLocalName(i).equals("shortfilename")){                shareDO.setShortfilename(attr.getValue(i));            }            else if (attr.getLocalName(i).equals("size")){                shareDO.setSize(Long.parseLong(attr.getValue(i)));            }            else if (attr.getLocalName(i).equals("checksum")){                shareDO.setChecksum(attr.getValue(i));            }            else if (attr.getLocalName(i).equals("priority")){                shareDO.setPrioritaet(Integer.parseInt(attr.getValue(i)));            }        }    }