Project

General

Profile

Download (1.74 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 a.mueller
24
 * @created 20.06.2008
25
 * @version 1.0
26
 */
27
public class XlsSources {
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
			
39
//			URL url = new TcsSources().getClass().getResource("excel/NormalExplicit.xls");
40
			boolean exists = new File(url.getFile()).exists();
41
			if (! exists) throw new RuntimeException("File not found: " + url);
42
			URI uri = url.toURI();
43
			return uri;
44
		} catch (MalformedURLException e1) {
45
			// TODO Auto-generated catch block
46
			e1.printStackTrace();
47
			throw new RuntimeException(e1);
48
		} catch (URISyntaxException e) {
49
			e.printStackTrace();
50
			throw new RuntimeException(e);
51
		}
52

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

    
65
	
66
}
(8-8/8)