Project

General

Profile

Download (4.04 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.sdd;
11

    
12
import java.io.File;
13
import java.net.URI;
14
import java.net.URL;
15

    
16
import org.apache.log4j.Logger;
17

    
18
/**
19
 * @author h.fradin
20
 * @created 24.10.2008
21
 * @version 1.0
22
 */
23
public class SDDSources {
24
	@SuppressWarnings("unused")
25
	private static final Logger logger = Logger.getLogger(SDDSources.class);
26
	
27

    
28
	public static URI tdwg_expert(){
29

    
30
		//		SDD XML example from the SDD v1.1 package
31
//		URL url = null;
32
//		try {
33
//			url = new File("C:\\localCopy\\tdwg2010\\data\\descriptions\\sdd\\Xper-Cichorium_spinosum.sdd.xml").toURL();
34
//		} catch (MalformedURLException e) {
35
//			// TODO Auto-generated catch block
36
//			e.printStackTrace();
37
//		}
38
//		
39
//		URL url = new SDDSources().getClass().getResource("/sdd/SDD-Test-Simple.xml");
40
		String sourceUrl = "C:\\localCopy\\tdwg2010\\data\\descriptions\\sdd\\Xper-Cichorium_spinosum.sdd.xml";
41
//		String sourceUrl = url.toString();
42
		URI uri = new File(sourceUrl).toURI();
43
		return uri;
44
		
45
	}
46

    
47
	
48
	public static String viola_local(){
49
		//		SDD XML example from the SDD v1.1 package
50
		URL url = new SDDSources().getClass().getResource("/sdd/SDD-Test-Simple.xml");
51
		String sourceUrl = url.toString();
52
		return sourceUrl;
53
		
54
	}
55
	
56
	public static String SDDImport_local(String filePath){
57
		//		any SDD XML file
58
		String sourceUrl = "file:" + filePath;
59
		return sourceUrl;
60
		
61
	}
62
	
63
	public static String LIAS_local(){
64
		//		SDD XML example from http://wiki.tdwg.org/twiki/bin/view/SDD/RealWorldExamples_SDD1dot1
65
		//String sourceUrl = "file:C:/Documents and Settings/lis/Mes documents/SDD/SDD bis/SDD1.1/SDD1.1/examples/LIAS_Main.sdd11/LIAS_Main.sdd11.xml";
66
		URL url = new SDDSources().getClass().getResource("/sdd/LIAS_Main.sdd11.xml");
67
		String sourceUrl = url.toString();
68
		return sourceUrl;
69
		
70
	}
71
	
72
	public static String Erythroneura_local(){
73
		//		SDD XML example from http://wiki.tdwg.org/twiki/bin/view/SDD/RealWorldExamples_SDD1dot1
74
		//String sourceUrl = "file:C:/Documents and Settings/lis/Mes documents/SDD/SDD bis/SDD1.1/SDD1.1/examples/Erythroneura.sdd11/Erythroneura.sdd11.xml";
75
		URL url = new SDDSources().getClass().getResource("/sdd/Erythroneura.sdd11.xml");
76
		String sourceUrl = url.toString();
77
		return sourceUrl;
78
		
79
	}
80
	
81
	public static String Cicad_local(){
82
		//		SDD XML example from http://wiki.tdwg.org/twiki/bin/view/SDD/RealWorldExamples_SDD1dot1
83
		//String sourceUrl = "file:C:/Documents and Settings/lis/Mes documents/SDD/SDD bis/SDD1.1/SDD1.1/examples/Cicad.sdd11/Cicad.sdd11.xml";
84
		URL url = new SDDSources().getClass().getResource("/sdd/Cicad.sdd11.xml");
85
		String sourceUrl = url.toString();
86
		return sourceUrl;
87
		
88
	}
89
	
90
	public static String ValRosandraFRIDAKey_local(){
91
		//		SDD XML example from http://wiki.tdwg.org/twiki/bin/view/SDD/RealWorldExamples_SDD1dot1
92
		//String sourceUrl = "file:C:/Documents and Settings/lis/Mes documents/SDD/SDD bis/SDD1.1/SDD1.1/examples/Val-Rosandra-FRIDA-Key.sdd11/Val-Rosandra-FRIDA-Key.sdd11.xml";
93
		URL url = new SDDSources().getClass().getResource("/sdd/Val-Rosandra-FRIDA-Key.sdd11.xml");
94
		String sourceUrl = url.toString();
95
		return sourceUrl;
96
		
97
	}
98
	
99
	public static String FreshwaterAquaticInsects_local(){
100
		//		SDD export from an Xper2 application
101
		String sourceUrl = "file:C:/Documents and Settings/lis/Mes documents/SDD/SDD bis/SDD1.1/SDD1.1/examples/Freshwater aquatic insects/test v2.sdd.xml";
102
		return sourceUrl;
103
	}
104
	
105
	public static String cichorieae_Xper2_local(){
106
		URL url = new SDDSources().getClass().getResource("/sdd/cichorieae-Xper2.xml");
107
		String sourceUrl = url.toString();
108
		return sourceUrl;	
109
	}
110
	
111
	public static String Cichorieae_DA_export_sdd(){
112
		String locationString = "/sdd/Xper2-import-export.sdd.xml";
113
		//String locationString = "/sdd/Cichorieae-DA-export-sdd.xml";
114
		
115
		URL url = new SDDSources().getClass().getResource(locationString);
116
		String sourceUrl = url.toString();
117
		return sourceUrl;	
118
	}
119
	
120
}
(13-13/19)