Project

General

Profile

Download (1.79 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.URISyntaxException;
15
import java.net.URL;
16

    
17
import org.apache.log4j.Logger;
18

    
19
import eu.etaxonomy.cdm.common.URI;
20

    
21

    
22

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

    
31

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

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

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

    
55
	}
56

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

    
65
	}
66

    
67

    
68
}
(18-18/18)