Package org.apache.tuscany.generate

Examples of org.apache.tuscany.generate.TemplateType


           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
              File f = new File(filename);
              // Create folders since the package doesn't exist before the code-gen for the 1st time
              f.getParentFile().mkdirs();
                FileWriter fw = new FileWriter(f);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

View Full Code Here


           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
              File f = new File(filename);
              // Create folders since the package doesn't exist before the code-gen for the 1st time
              f.getParentFile().mkdirs();
                FileWriter fw = new FileWriter(f);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

View Full Code Here

           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
              File f = new File(filename);
              // Create folders since the package doesn't exist before the code-gen for the 1st time
              f.getParentFile().mkdirs();
                FileWriter fw = new FileWriter(f);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

View Full Code Here

           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
                FileWriter fw = new FileWriter(filename);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

        } catch (Exception e) {
View Full Code Here

           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
              File f = new File(filename);
              // Create folders since the package doesn't exist before the code-gen for the 1st time
              f.getParentFile().mkdirs();
                FileWriter fw = new FileWriter(f);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

View Full Code Here

           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
                FileWriter fw = new FileWriter(filename);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

        } catch (Exception e) {
View Full Code Here

           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
                FileWriter fw = new FileWriter(filename);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

View Full Code Here

           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
                FileWriter fw = new FileWriter(filename);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.generate.TemplateType

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.