Package org.geotools.validation.dto

Examples of org.geotools.validation.dto.PlugInDTO


        if (plugIns != null) {
            i = plugIns.keySet().iterator();

            while (i.hasNext()) {
                PlugInDTO dto = null;
                Object key = null;

                try {
                    key = i.next();
                    dto = (PlugInDTO) plugIns.get(key);
        String fName = dto.getName().replaceAll(" ", "") + ".xml";
                    File pFile = WriterUtils.initWriteFile(new File(plugInDir, fName), false);
                    FileWriter fw = new FileWriter(pFile);
                    XMLWriter.writePlugIn(dto, fw);
                    fw.close();
                } catch (Exception e) {
                    e.printStackTrace();
                    throw new ServletException(e);
                }
            }
        }

        // deletes of plug ins here

        /*File[] pluginFL = plugInDir.listFiles();
           for(int j=0;j<pluginFL.length;j++){
                   String flName = pluginFL[j].getName();
                   flName = flName.substring(0,flName.length()-4);
                   if(plugIns.get(flName)==null){
                           // delete this
                           pluginFL[j].delete();
                   }
           }*/
        if (testSuites != null) {
            i = testSuites.keySet().iterator();

            while (i.hasNext()) {
                TestSuiteDTO dto = null;

                try {
                    dto = (TestSuiteDTO) testSuites.get(i.next());
        String fName = dto.getName().replaceAll(" ", "") + ".xml";
                    File pFile = WriterUtils.initWriteFile(new File(validationDir, fName), false);
                    FileWriter fw = new FileWriter(pFile);//new File(validationDir,
        //dto.getName().replaceAll(" ", "") + ".xml"));
                    XMLWriter.writeTestSuite(dto, fw);
                    fw.close();
                } catch (Exception e) {
                    System.err.println(dto.getClass());
                    e.printStackTrace();
                    throw new ServletException(e);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.geotools.validation.dto.PlugInDTO

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.