1
2
3
4
5
6 package uk.ac.ebi.intenz.tools.importer;
7
8 import java.util.Arrays;
9 import java.util.Date;
10
11 import org.apache.log4j.Logger;
12
13
14
15
16
17
18
19
20
21
22
23
24 public class ImportController {
25
26 static Logger LOGGER = Logger.getLogger(ImportController.class);
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 public static void main (String[] args) throws Exception, InstantiationException, ClassNotFoundException {
42
43 for (int i = 0; i < args.length; i++){
44 args[i] = args[i].toLowerCase();
45 }
46 Arrays.sort(args);
47
48 Importer imp = null;
49
50 LOGGER.info("Starting time: "+new Date(System.currentTimeMillis()));
51
52 if (args.length == 0 || Arrays.binarySearch(args, "uniprot") > -1){
53 LOGGER.info("Obtaining ProteinImporter...");
54
55 imp = ImporterFactory.createImporter(ImporterFactory.KRAKEN_IMPORTER);
56 LOGGER.info("Doing import");
57 imp.doImport();
58 }
59
60 if (args.length == 0 || Arrays.binarySearch(args, "go") > -1){
61 LOGGER.info("Obtaining GoImporter...");
62 imp = ImporterFactory.createImporter(ImporterFactory.GO_IMPORTER);
63 LOGGER.info("Doing import");
64 imp.doImport();
65 }
66
67 LOGGER.info("Ending time: "+new Date(System.currentTimeMillis()));
68
69 }
70 }