|
|
|
|
@ -43,6 +43,7 @@ public class FMParser extends TemplateProcessor {
@@ -43,6 +43,7 @@ public class FMParser extends TemplateProcessor {
|
|
|
|
|
|
|
|
|
|
private Statement stm; |
|
|
|
|
private String isSimpleParser; |
|
|
|
|
private String myParams=""; |
|
|
|
|
private static String sqlDialect; |
|
|
|
|
|
|
|
|
|
FMParser() { |
|
|
|
|
@ -58,7 +59,16 @@ public class FMParser extends TemplateProcessor {
@@ -58,7 +59,16 @@ public class FMParser extends TemplateProcessor {
|
|
|
|
|
outfile = GetOpts.getValue("-out:"); |
|
|
|
|
if (GetOpts.isPresent("-simpleParser")) |
|
|
|
|
isSimpleParser = GetOpts.getValue("-simpleParser:"); |
|
|
|
|
if (GetOpts.isPresent("-params")) |
|
|
|
|
myParams = GetOpts.getValue("-params"); |
|
|
|
|
|
|
|
|
|
String input = StringUtils.readFile(new File(infile)); |
|
|
|
|
if(myParams !="") |
|
|
|
|
{ |
|
|
|
|
String paramName = "<<" +myParams.substring(0, myParams.indexOf("="))+">>"; |
|
|
|
|
String paramVal = "'"+myParams.substring(myParams.indexOf("=") + 1)+"'"; |
|
|
|
|
input=de.memtext.util.StringUtils.replace(input, paramName, paramVal); |
|
|
|
|
} |
|
|
|
|
String output = ""; |
|
|
|
|
if (isSimpleParser != null && isSimpleParser.equalsIgnoreCase("true")) { |
|
|
|
|
output = simpleParser(dbprop, input); |
|
|
|
|
|