View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.saxbenchmark;
17  
18  
19  /***
20   * @author JMcCrindle
21   */
22  public class Main {
23      public static void main(String[] args) throws Throwable {
24          if(args.length != 6) {
25              System.err.println("usage: org.saxbenchmark.Main inputDir outputDir relativeInputDir relativeOutputDir resultsOutputDir count");
26              System.exit(0);
27          }
28          String inputDir = args[0];
29          String outputDir = args[1];
30          String relativeInputDir = args[2];
31          String relativeOutputDir = args[3];
32          String resultsOutputDir = args[4];
33          int count = Integer.parseInt(args[5]);
34          SaxBenchmarkBean bean = new SaxBenchmarkBean();
35          bean.setCount(count);
36          bean.setInputDir(inputDir);
37          bean.setOutputDir(outputDir);
38          bean.setRelativeInputDir(relativeInputDir);
39          bean.setRelativeOutputDir(relativeOutputDir);
40          bean.setResultsOutputDir(resultsOutputDir);
41          bean.run();
42      }
43  }