Revision 1000 tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/importer/XTZImporterMacro.groovy

XTZImporterMacro.groovy (revision 1000)
29 29

  
30 30
import javax.xml.stream.XMLStreamReader;
31 31

  
32
import org.txm.sw.RemoveTag;
33
import org.txm.scripts.importer.ApplyXsl2;
34
import org.txm.scripts.importer.ValidateXml;
32
import org.txm.scripts.importer.RemoveTag;
33
import org.txm.importer.ApplyXsl2;
34
import org.txm.importer.ValidateXml;
35 35
import org.txm.scripts.importer.xml.importer;
36 36
import org.txm.scripts.importer.xml.compiler;
37 37
import org.txm.scripts.importer.xml.pager;
......
40 40
import org.txm.utils.*
41 41
import org.txm.utils.io.*;
42 42
import org.txm.*;
43
import org.txm.scripts.importer.xmltxm.*;
43
import org.txm.importer.scripts.xmltxm.*;
44 44
import org.txm.utils.i18n.*;
45 45
import org.txm.metadatas.*;
46 46
import javax.xml.stream.*;
......
167 167
	println " stop if a XML source is malformed: "+stopIfMalformed
168 168
}
169 169

  
170
File allmetadatasfile = Metadatas.findMetadataFile(srcDir);
170
File allMetadataFile = Metadatas.findMetadataFile(srcDir);
171 171

  
172 172
// Apply XSL
173 173
if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
......
230 230
//get metadatas values from CSV
231 231
Metadatas metadatas; // text metadatas
232 232

  
233
println "Trying to read metadatas from: "+allmetadatasfile
233
println "Trying to read metadatas from: "+allMetadataFile
234 234
if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
235
if (allmetadatasfile.exists()) {
236
	File copy = new File(binDir, allmetadatasfile.getName())
237
	if (!FileCopy.copy(allmetadatasfile, copy)) {
238
		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
235
if (allMetadataFile.exists()) {
236
	File copy = new File(binDir, allMetadataFile.getName())
237
	if (!FileCopy.copy(allMetadataFile, copy)) {
238
		println "Error: could not create a copy of metadata file "+allMetadataFile.getAbsoluteFile();
239 239
		return;
240 240
	}
241 241
	metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
242 242
} else {
243
	println "no metadata file: "+allmetadatasfile
243
	println "no metadata file: "+allMetadataFile
244 244
}
245 245

  
246 246
if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }

Also available in: Unified diff