Skip to content

Commit

Permalink
Fix main method for DDF to JSON generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Sangoi committed Jan 26, 2015
1 parent 1fade07 commit 553e471
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ public int compare(ObjectSpec o1, ObjectSpec o2) {

public static void main(String[] args) throws FileNotFoundException, IOException {
// default value
String DDFFilesPath = "ddffiles";
String ddfFilesPath = "ddffiles";
String outputPath = "src/main/resources/objectspec.json";

// use arguments if they exit
if (args.length >= 1)
DDFFilesPath = args[1]; // the path to a DDF file or a folder which contains DDF files.
ddfFilesPath = args[0]; // the path to a DDF file or a folder which contains DDF files.
if (args.length >= 2)
outputPath = args[2]; // the path of the output file.
outputPath = args[1]; // the path of the output file.

// generate object spec file
Ddf2JsonGenerator ddfJsonGenerator = new Ddf2JsonGenerator();
try (FileOutputStream fileOutputStream = new FileOutputStream(outputPath)) {
ddfJsonGenerator.generate(new File(DDFFilesPath), fileOutputStream);
ddfJsonGenerator.generate(new File(ddfFilesPath), fileOutputStream);
}
}
}

0 comments on commit 553e471

Please sign in to comment.