2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.app
.excelImport
.distribution
;
13 import java
.net
.URISyntaxException
;
15 import org
.apache
.log4j
.Logger
;
17 import eu
.etaxonomy
.cdm
.app
.util
.TestDatabase
;
18 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
19 import eu
.etaxonomy
.cdm
.io
.common
.CdmDefaultImport
;
20 import eu
.etaxonomy
.cdm
.io
.excel
.distribution
.DistributionImportConfigurator
;
24 * @author a.babadshanjan
27 public class CichorieaeDistributionActivator
{
29 private static final String dbName
= "cdm_test_anahit";
30 private static String fileName
=
31 new String( System
.getProperty("user.home") + "\\workspace\\cdmlibNew\\app-import\\src\\main\\resources\\distribution\\distribution_cich.xls");
32 // private static String fileName = new String( System.getProperty("user.home") + File.separator + "Africa plus x.xls");
34 private static final ICdmDataSource destinationDb
= TestDatabase
.CDM_DB(dbName
);
35 private static final Logger logger
= Logger
.getLogger(CichorieaeDistributionActivator
.class);
37 public static void main(String
[] args
) {
39 DistributionImportConfigurator distributionImportConfigurator
;
41 distributionImportConfigurator
= DistributionImportConfigurator
.NewInstance(new URI(fileName
), destinationDb
);
43 CdmDefaultImport
<DistributionImportConfigurator
> distributionImport
=
44 new CdmDefaultImport
<DistributionImportConfigurator
>();
47 logger
.debug("Invoking Cichorieae distribution import");
48 distributionImport
.invoke(distributionImportConfigurator
);
49 } catch (URISyntaxException e
) {