Revision 1000 tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xmltxm/xmltxmLoader.groovy

xmltxmLoader.groovy (revision 1000)
44 44
import org.txm.utils.io.*;
45 45
import org.txm.*;
46 46
import org.txm.core.engines.*;
47
import org.txm.scripts.importer.xmltxm.*;
47

  
48
import org.txm.importer.scripts.xmltxm.*;
48 49
import org.txm.metadatas.*;
49 50
import org.txm.utils.i18n.*;
50 51
import org.txm.utils.xml.*
51 52
import org.w3c.dom.Element;
53
import org.txm.importer.*
52 54

  
53 55
String userDir = System.getProperty("user.home");
54 56
boolean debug = false
......
96 98
txmDir.deleteDir();
97 99
txmDir.mkdirs();
98 100

  
99
File allmetadatasfile = Metadatas.findMetadataFile(srcDir);
101
File allMetadataFile = Metadatas.findMetadataFile(srcDir);
100 102

  
101 103
// Apply XSL
102 104
if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
......
130 132
////get metadata values from CSV
131 133
//Metadatas metadatas; // text metadata
132 134
//if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
133
//if (allmetadatasfile.exists()) {
134
//	println "Trying to read metadata from: "+allmetadatasfile
135
//if (allMetadataFile.exists()) {
136
//	println "Trying to read metadata from: "+allMetadataFile
135 137
//	File copy = new File(binDir, "metadata.csv")
136
//	if (!FileCopy.copy(allmetadatasfile, copy)) {
137
//		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
138
//	if (!FileCopy.copy(allMetadataFile, copy)) {
139
//		println "Error: could not create a copy of metadata file "+allMetadataFile.getAbsoluteFile();
138 140
//		return;
139 141
//	}
140 142
//	metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
141 143
//} else {
142
//	println "no metadata file: "+allmetadatasfile
144
//	println "no metadata file: "+allMetadataFile
143 145
//}
144 146
//
145 147
//if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
146
//if (MONITOR != null) MONITOR.worked(20, "INJECTING METADATA - from csv file: "+allmetadatasfile)
148
//if (MONITOR != null) MONITOR.worked(20, "INJECTING METADATA - from csv file: "+allMetadataFile)
147 149
//if (metadatas != null) {
148 150
//	println("Injecting metadata: "+metadatas.getHeadersList()+" in texts of directory "+txmDir)
149 151
//	for (File infile : files) {

Also available in: Unified diff