Project

General

Profile

Download (1.77 KB) Statistics
| Branch: | Revision:
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.caryophyllales;
11

    
12
import java.io.File;
13
import java.net.MalformedURLException;
14
import java.net.URI;
15
import java.net.URISyntaxException;
16
import java.net.URL;
17

    
18
import org.apache.log4j.Logger;
19

    
20

    
21

    
22
/**
23
 * @author k.luther
24
 * @since Jun 2015
25
 */
26
public class XlsSources {
27
	@SuppressWarnings("unused")
28
    private static final Logger logger = Logger.getLogger(XlsSources.class);
29

    
30

    
31
	public static URI normalExplicit(){
32
		try {
33
//			URL url = new File(("C:\\localCopy\\eclipse\\cdmlib\\trunk\\app-import\\src\\main\\resources\\excel\\NormalExplicit.xls")).toURL();
34

    
35
			// FIXME what is this????
36
			URL url = new File("D:\\NormalExplicit.xls").toURI().toURL();
37

    
38
//			URL url = new TcsSources().getClass().getResource("excel/NormalExplicit.xls");
39
			boolean exists = new File(url.getFile()).exists();
40
			if (! exists) {
41
                throw new RuntimeException("File not found: " + url);
42
            }
43
			URI uri = url.toURI();
44
			return uri;
45
		} catch (MalformedURLException e1) {
46
			// TODO Auto-generated catch block
47
			e1.printStackTrace();
48
			throw new RuntimeException(e1);
49
		} catch (URISyntaxException e) {
50
			e.printStackTrace();
51
			throw new RuntimeException(e);
52
		}
53

    
54
	}
55

    
56
	public static String xls_nyctaginaceae(){
57
		try {
58
			File file = new File("C:\\Users\\k.luther\\Documents\\Caryophyllales\\Arenaria_ThePlantList.xls");
59
			return file.toURI().toURL().toString();
60
		} catch (MalformedURLException e) {
61
			throw new RuntimeException(e);
62
		}
63

    
64
	}
65

    
66

    
67
}
(14-14/14)