Package org.apdplat.module.dictionary.model

Examples of org.apdplat.module.dictionary.model.Dic


        }
        return dics;
    }   
    private static void parseDic(String xml, List<Dic> dics) {
        XMLFactory factory=new XMLFactory(Dic.class,DicItem.class);
        Dic dic=factory.unmarshal(xml);
        //将XML表示的数据字典转变为JAVA对象表示的数据字典
        assembleDic(dic);
        dics.add(dic);
    }
View Full Code Here


            rootDic=dic;
            data.add(dic);
        }else{
            LOG.info("以前已经注册过数据字典(Already registered the data dictionary)");
            LOG.info("查找出根数据字典(Find out the root data dictionary)");
            Dic root=null;
            Dic existRoot=dicService.getRootDic();
            if(existRoot!=null){
                root=existRoot;
                LOG.info("找到以前导入的根数据字典(Find out previous imported root data dictionary): "+root.getChinese());
            }else{
                LOG.info("没有找到以前导入的根数据字典(Failed to find out previous imported root data dictionary)");
View Full Code Here

                data.add(sub);
            }
        }
    }
    private boolean hasRegisteDic(Dic dic){
        Dic existsDic=dicService.getDic(dic.getEnglish());
        if(existsDic==null){
            return false;
        }
        return true;
    }
View Full Code Here

     * 1、普通下拉选项
     * 2、树形下拉选项
     *
     */
    public String store(){
        Dic dictionary=dicService.getDic(dic);
        if(dictionary==null){
            LOG.info("没有找到数据词典 "+dic);
            return null;
        }
        if("true".equals(tree)){
            String json = dicService.toStoreJson(dictionary);
            Struts2Utils.renderJson(json);
        }else{
            List<Map<String,String>> data=new ArrayList<>();
            for(DicItem item : dictionary.getDicItems()){
                Map<String,String> map=new HashMap<>();
                if(justCode){
                    map.put("value", item.getCode());
                }else{
                    map.put("value", item.getId().toString());
View Full Code Here

     */
    public String store() {
        if (node == null) {
            return null;
        }
        Dic dic=null;
        if(node.trim().startsWith("root")){
            dic = dicService.getRootDic();
        }else{
            int id=Integer.parseInt(node);
            dic = dicService.getDic(id);
View Full Code Here

TOP

Related Classes of org.apdplat.module.dictionary.model.Dic

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.