Package org.apdplat.platform.util

Examples of org.apdplat.platform.util.XMLFactory


            LOG.error("解析数据字典出错(Error in parsing the data dictionary)",e);
        }
        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


            LOG.error("获取根模块出错",e);
        }
        return null;
    }
    private static Module parseModule(String xml) {
        XMLFactory factory=new XMLFactory(Module.class,Command.class);
        Module module=factory.unmarshal(xml);
        //将XML表示的模块转变为JAVA对象表示的模块
        assembleMudule(module);
        return module;
    }
View Full Code Here

    private long totalRecords = 0;
    private List<T> models = new ArrayList<>();

    public static <T extends Model> Page<T> newInstance(Class<T> modelClass, InputStream in) {
        XMLFactory factory = new XMLFactory(Page.class, modelClass);
        try {
            return factory.unmarshal(in);
        } catch (Exception e) {
            LOG.error("生成对象出错",e);
        }
        return null;
    }
View Full Code Here

        }
        return null;
    }

    public String toXml() {
        XMLFactory factory = new XMLFactory(Page.class, getModelClass());
        String xml = null;
        try {
            xml = factory.marshal(this);
        } catch (Exception e) {
            LOG.error("生成XML出错",e);
        }
        return xml;
    }
View Full Code Here

        if(!pass){
            LOG.info("验证没有通过,请参考dtd文件");
            return ;
        }
        LOG.info("验证通过");
        XMLFactory factory=new XMLFactory(Position.class);
        position=factory.unmarshal(RegistePosition.class.getResourceAsStream(xml));
       
        assemblePosition(position);
        registePosition(position);
    }
View Full Code Here

        if(!pass){
            LOG.info("验证没有通过,请参考dtd文件");
            return ;
        }
        LOG.info("验证通过");
        XMLFactory factory=new XMLFactory(Org.class);
        org=factory.unmarshal(RegisteOrg.class.getResourceAsStream(xml));
       
        assembleOrg(org);
        registeOrg(org);
    }
View Full Code Here

        if(!pass){
            LOG.info("验证没有通过,请参考dtd文件");
            return ;
        }
        LOG.info("验证通过");
        XMLFactory factory=new XMLFactory(Role.class);
        role=factory.unmarshal(RegisteRole.class.getResourceAsStream(xml));
       
        assembleRole(role);
        registeRole(role);
    }
View Full Code Here

        if(!pass){
            LOG.info("验证没有通过,请参考dtd文件");
            return ;
        }
        LOG.info("验证通过");
        XMLFactory factory=new XMLFactory(InfoType.class);
        infoType=factory.unmarshal(RegisteInfoType.class.getResourceAsStream(xml));
       
        assembleInfoType(infoType);       
        registeInfoType(infoType);
    }
View Full Code Here

TOP

Related Classes of org.apdplat.platform.util.XMLFactory

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.