1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.app.wp6.palmae;
|
11
|
|
12
|
import java.io.File;
|
13
|
import java.util.UUID;
|
14
|
|
15
|
import org.apache.log4j.Logger;
|
16
|
|
17
|
import eu.etaxonomy.cdm.app.common.CdmDestinations;
|
18
|
import eu.etaxonomy.cdm.app.images.ImageImportConfigurator;
|
19
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
20
|
import eu.etaxonomy.cdm.io.PalmaeImageImport;
|
21
|
import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
|
22
|
import eu.etaxonomy.cdm.io.common.IImportConfigurator;
|
23
|
|
24
|
/**
|
25
|
* TODO not working at the moment
|
26
|
*
|
27
|
* @author n.hoffmann
|
28
|
* @created 18.11.2008
|
29
|
* @version 1.0
|
30
|
*/
|
31
|
public class PalmaeImageActivator {
|
32
|
@SuppressWarnings("unused")
|
33
|
private static final Logger logger = Logger.getLogger(PalmaeImageActivator.class);
|
34
|
|
35
|
public static final File sourceFolder = new File("\\\\Media\\EditWP6\\palmae\\photos\\new");
|
36
|
private static final ICdmDataSource cdmDestination = CdmDestinations.localH2Palmae();
|
37
|
|
38
|
|
39
|
// set the webserver path to the images
|
40
|
private static final String urlString = "http://wp5.e-taxonomy.eu/media/palmae/photos/";
|
41
|
|
42
|
static final UUID secUuid = UUID.fromString("5f32b8af-0c97-48ac-8d33-6099ed68c625");
|
43
|
|
44
|
public static void main (String[] cowabunga){
|
45
|
ImageImportConfigurator imageConfigurator = ImageImportConfigurator.NewInstance(sourceFolder, cdmDestination, urlString, PalmaeImageImport.class);
|
46
|
imageConfigurator.setSecUuid(secUuid);
|
47
|
|
48
|
CdmDefaultImport<IImportConfigurator> importer = new CdmDefaultImport<IImportConfigurator>();
|
49
|
//AbstractImageImporter imageImporter = new PalmaeImageActivator();
|
50
|
importer.invoke(imageConfigurator);
|
51
|
}
|
52
|
|
53
|
}
|