1 package uk.ac.ebi.intenz.tools.sib;
2
3 import uk.ac.ebi.intenz.tools.sib.comparator.FlatFileComparator;
4 import uk.ac.ebi.intenz.tools.sib.writer.EnzymeFlatFileWriter;
5
6 import java.io.File;
7 import java.util.PropertyResourceBundle;
8
9 import org.apache.log4j.Logger;
10
11
12
13
14
15
16
17 public class EnzymeFlatFileComparatorApp {
18
19 private static final Logger LOGGER =
20 Logger.getLogger(EnzymeFlatFileComparatorApp.class.getName());
21
22
23
24
25
26
27 public static void main(String[] args) {
28
29
30
31
32 LOGGER.debug("Running comparator");
33 File flatFile1 = new File(ApplicationResources.getInstance().getInputFlatFileName());
34 File flatFile2 = new File(ApplicationResources.getInstance().getExportFlatFileName());
35 LOGGER.debug("Enzyme.dat input file found at: "+ApplicationResources.getInstance().getInputFlatFileName());
36
37 FlatFileComparator.compare(flatFile1, flatFile2);
38 }
39
40
41
42
43
44
45
46
47
48
49
50
51 private static boolean argumentsOk(String[] args) {
52 if (args.length != 2) {
53 System.err.println("Please provide the two file names (incl. abs. path info) of the flat files to be compared.");
54 return false;
55 }
56 return true;
57 }
58
59
60
61
62 private static void printHelp() {
63 StringBuffer help = new StringBuffer();
64 help.append("Usage: java EnzymeFlatFileComparatorApp <flat file 1> <flat file 2>\n");
65 help.append("Examples: java EnzymeFlatFileComparatorApp -v 33.0\n");
66 help.append(" java EnzymeFlatFileComparatorApp -v 33.12\n");
67 System.out.println(help.toString());
68 }
69
70 }