1 2 12 15 16 21 22 package com.versant.core.jdo.tools.ant; 23 24 import java.util.*; 25 26 27 30 31 32 33 34 37 38 47 public class VdsSchemaTask extends JdoTaskBase { 48 49 private ArrayList cmdArgs = new ArrayList(); 50 51 52 public void execute() { 53 cmdArgs.add("-cp"); 54 cmdArgs.add(classpath.toString()); 55 cmdArgs.add("-p"); 56 cmdArgs.add(configFilename); 57 58 String [] args = new String [cmdArgs.size()]; 59 cmdArgs.toArray(args); 60 61 try { 62 63 66 } catch (Exception exp) { 67 System.err.println (exp); 68 exp.printStackTrace(); 69 } 70 } 71 72 73 public void setOutputdir(String out) { 74 cmdArgs.add("-out"); 75 cmdArgs.add(out); 76 } 77 78 public void setDefine(String s) { 79 if (isTrue(s)) { 80 cmdArgs.add("-action"); 81 cmdArgs.add("define"); 82 } 83 } 84 85 public void setCompare(String s) { 86 if (isTrue(s)) { 87 cmdArgs.add("-action"); 88 cmdArgs.add("compare"); 89 } 90 } 91 92 public void setEvolve(String s) { 93 if (isTrue(s)) { 94 cmdArgs.add("-action"); 95 cmdArgs.add("evolve"); 96 } 97 } 98 99 private static boolean isTrue(String s) { 100 return "*".equals(s) || "true".equals(s); 101 } 102 } 103 | Popular Tags |