Revision b920f5c2
Added by Andreas Müller over 3 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/phycobank/IAPTActivator.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.cdm.app.phycobank; |
11 | 10 |
|
12 | 11 |
import java.io.File; |
... | ... | |
28 | 27 |
import eu.etaxonomy.cdm.model.reference.Reference; |
29 | 28 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
30 | 29 |
|
31 |
|
|
32 | 30 |
/** |
33 | 31 |
* @author a.kohlbecker |
34 | 32 |
* @since Jul 26, 2016 |
35 |
* |
|
36 | 33 |
*/ |
37 | 34 |
public class IAPTActivator { |
38 | 35 |
private static final Logger logger = Logger.getLogger(IAPTActivator.class); |
... | ... | |
112 | 109 |
doSingleSource(fileURI(), config, myImport); |
113 | 110 |
|
114 | 111 |
System.exit(0); |
115 |
|
|
116 | 112 |
} |
117 | 113 |
|
118 |
/** |
|
119 |
* @param source |
|
120 |
* @param config |
|
121 |
* @param myImport |
|
122 |
*/ |
|
123 | 114 |
private void doSingleSource(URI source, IAPTImportConfigurator config, CdmDefaultImport<IAPTImportConfigurator> myImport) { |
124 | 115 |
config.setSource(source); |
125 | 116 |
String fileName = source.toString(); |
... | ... | |
150 | 141 |
return f.toURI(); |
151 | 142 |
} |
152 | 143 |
|
153 |
/** |
|
154 |
* @param args |
|
155 |
*/ |
|
156 | 144 |
public static void main(String[] args) { |
157 | 145 |
if(args.length == 0){ |
158 | 146 |
logger.warn("Missing argument, valid values are: 'import' , 'createRegistrations'"); |
... | ... | |
160 | 148 |
IAPTActivator me = new IAPTActivator(); |
161 | 149 |
me.doImport(cdmDestination); |
162 | 150 |
} |
163 |
|
|
164 |
} |
|
151 |
} |
Also available in: Unified diff
cleanup