Project

General

Profile

« Previous | Next » 

Revision 2cbe89e5

Added by Andreas Müller almost 10 years ago

changes to TCS

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/app/tcs/TcsSources.java
28 28
	private static final Logger logger = Logger.getLogger(TcsSources.class);
29 29
	
30 30
	
31
	@SuppressWarnings("deprecation")
32 31
	public static URI normalExplicit(){
33 32
		try {
34 33
//			URL url = new File(("C:\\localCopy\\eclipse\\cdmlib\\trunk\\app-import\\src\\main\\resources\\excel\\NormalExplicit.xls")).toURL();
......
84 83
		
85 84
	}
86 85

  
87
	
88
	public static String arecaceae_short(){
89
		//		Monocots rdf
90
		URL url = new SDDSources().getClass().getResource("/arecaceae_short.rdf");
91
		String sourceUrl = url.toString();
92
		return sourceUrl;
93
	}
94

  
95
	public static String tcsXmlTest_local(){
96
		//		tcsXmlTest.xml
97
		URL url = new TcsSources().getClass().getResource("/tcs/tcsXmlTest.xml");
98
		String sourceUrl = url.toString();
99
		return sourceUrl;
100
		
101
	}	
102 86

  
103 87
	public static String tcsXml_cichorium(){
104 88
		//		tcsXmlTest.xml
......
106 90
		String sourceUrl = url.toString();
107 91
		return sourceUrl;	
108 92
	}
93

  
94
	public static String tcsXml_nyctaginaceae(){
95
		try {
96
			File file = new File("\\\\PESIIMPORT3\\caryo\\nyctaginaceae\\ipni-Nyctaginaceae-Caryophyllaceae.xml");
97
			return file.toURI().toURL().toString();
98
		} catch (MalformedURLException e) {
99
			throw new RuntimeException(e);
100
		}
101
		
102
	}
103

  
104
	
109 105
	
110 106
	public static String tcsXml_localPath(){
111 107
		File file = new File("C:\\localCopy\\Data\\tdwg\\Cichorium_tcs.xml");
app-import/src/main/java/eu/etaxonomy/cdm/app/tcs/TcsXmlTestActivator.java
34 34
	
35 35
	//database validation status (create, update, validate ...)
36 36
	static DbSchemaValidation hbm2dll = DbSchemaValidation.CREATE;
37
	static final String tcsSource = TcsSources.tcsXml_cichorium();
38
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_andreasM();
37
//	static final String tcsSource = TcsSources.tcsXml_cichorium();
38
	static final String tcsSource = TcsSources.tcsXml_nyctaginaceae();
39
	
39 40
	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
40
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_local_postgres_CdmTest();
41 41

  
42
	static final UUID treeUuid = UUID.fromString("00000000-0c97-48ac-8d33-6099ed68c625");
42
	static final UUID treeUuid = UUID.fromString("00708000-0c97-48ac-8d33-6099ed68c625");
43 43
	static final String sourceSecId = "TestTCS";
44 44
	
45 45
	static final boolean includeNormalExplicit = true; 
......
97 97
//			refService.saveOrUpdate((Reference)book);
98 98
//			tcsImport.getCdmAppController().close();
99 99
			
100
			NormalExplicitTestActivator normExActivator = new NormalExplicitTestActivator();
101
			normExActivator.doImport(destination, DbSchemaValidation.VALIDATE);
100
//			NormalExplicitTestActivator normExActivator = new NormalExplicitTestActivator();
101
//			normExActivator.doImport(destination, DbSchemaValidation.VALIDATE);
102 102
			
103 103
			logger.info("End");
104 104
			System.out.println("End import from TCS ("+ source.toString() + ")...");

Also available in: Unified diff