2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.app
.caryophyllales
;
13 import java
.net
.MalformedURLException
;
15 import java
.net
.URISyntaxException
;
18 import org
.apache
.log4j
.Logger
;
20 import eu
.etaxonomy
.cdm
.app
.sdd
.SDDSources
;
27 public class TcsSources
{
28 private static final Logger logger
= Logger
.getLogger(TcsSources
.class);
31 public static URI
normalExplicit(){
33 // URL url = new File(("C:\\localCopy\\eclipse\\cdmlib\\trunk\\app-import\\src\\main\\resources\\excel\\NormalExplicit.xls")).toURL();
35 // FIXME what is this????
36 URL url
= new File("D:\\NormalExplicit.xls").toURI().toURL();
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();
44 } catch (MalformedURLException e1
) {
45 // TODO Auto-generated catch block
47 throw new RuntimeException(e1
);
48 } catch (URISyntaxException e
) {
50 throw new RuntimeException(e
);
55 public static String
arecaceae(){
57 String sourceUrl
= "http://dev.e-taxonomy.eu/trac/attachment/wiki/SampleDataConversion/Monocotyledonae/arecaceae.rdf?format=raw";
58 logger
.debug("TcsSource " + sourceUrl
);
63 public static String
taxonX_local(){
65 //String sourceUrl = "file:C:/localCopy/eclipse/cdmlib/app-import/src/main/resources/palm_tn_29336.xml";
66 URL url
= new SDDSources().getClass().getResource("/taxonX/palm_tn_29336.xml");
67 String sourceUrl
= url
.toString();
71 public static File
taxonX_localDir(){
73 File sourceDir
= new File("target/classes/taxonX/"); //palm_tc_14495.xml
77 public static String
arecaceae_local(){
79 //String sourceUrl = "file:C:/localCopy/eclipse/cdmlib/app-import/src/main/resources/arecaceae.rdf";
80 URL url
= new SDDSources().getClass().getResource("/arecaceae.rdf");
81 String sourceUrl
= url
.toString();
87 public static String
tcsXml_cichorium(){
89 URL url
= new TcsSources().getClass().getResource("/tcs/Cichorium_tcs.xml");
90 String sourceUrl
= url
.toString();
94 public static String
tcsXml_nyctaginaceae(){
96 File file
= new File("C:\\Users\\k.luther\\Desktop\\ipni-Nyctaginaceae-Caryophyllaceae.xml\\ipni-Caryophyllaceae.xml");
97 return file
.toURI().toURL().toString();
98 } catch (MalformedURLException e
) {
99 throw new RuntimeException(e
);
106 public static String
tcsXml_localPath(){
107 File file
= new File("C:\\localCopy\\Data\\tdwg\\Cichorium_tcs.xml");
110 sourceUrl
= file
.toURI().toURL().toString();
111 } catch (MalformedURLException e
) {
113 throw new RuntimeException(e
);
119 public static String
tcsXmlTest_local2(){
121 URL url
= new TcsSources().getClass().getResource("/TcsXmlImportConfiguratorTest-input.xml");
122 String sourceUrl
= url
.toString();
126 public static String
tcsRdf_globis(){
128 //String sourceUrl = "file:C:/Dokumente und Einstellungen/a.kohlbecker.BGBM/Desktop/globis.rdf.xml";
129 String sourceUrl
= "/globis_valid.rdf.xml";
130 URL resourceUrl
= new TcsSources().getClass().getResource(sourceUrl
);
131 logger
.debug("TcsRdfSource " + resourceUrl
.toString());
132 return resourceUrl
.toString();