Révision 3391

TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImporter.groovy (revision 3391)
191 191
		
192 192
		File xslDirectory = new File(module.getSourceDirectory(), "xsl/1-split-merge")
193 193
		
194
		def xslFiles = xslDirectory.listFiles()
194
		def xslFiles = xslDirectory.listFiles(new FileFilter() {
195
			public boolean accept(File pathname) { return pathname.getName().endsWith(".xsl");}
196
		});
195 197
		if (xslDirectory.exists() && xslFiles != null && xslFiles.size() > 0) {
196 198
			
197 199
			println "-- Split-Merge XSL Step with $xslDirectory"
......
271 273
		
272 274
		File frontXSLdirectory = new File(module.getSourceDirectory(), "xsl/2-front")
273 275
		
274
		def xslFiles = frontXSLdirectory.listFiles()
276
		def xslFiles = frontXSLdirectory.listFiles(new FileFilter() {
277
			public boolean accept(File pathname) { return pathname.getName().endsWith(".xsl");}
278
		});
275 279
		
276 280
		xslParams["output-directory"] = outputDirectory.getAbsoluteFile().toURI().toString();
277 281
		
......
387 391
			for (File f : filesToProcess) {
388 392
				cpb.tick()
389 393
				File infile = f;
390
				File outfile = new File(module.getBinaryDirectory(),"tokenized/"+f.getName());
394
				File outfile = new File(module.getBinaryDirectory(), "tokenized/"+f.getName());
391 395
				SimpleTokenizerXml tokenizer = new SimpleTokenizerXml(infile, outfile, TokenizerClasses.newTokenizerClasses(project.getPreferencesScope(), lang))
392 396
				if (module.getProject().getAnnotate()) { // an annotation will be done, does the annotation engine needs another tokenizer ?
393 397
					String engineName = module.getProject().getImportParameters().node("annotate").get("engine", "TreeTagger")
......
431 435
	 */
432 436
	public boolean doPostTokenizeXSLStep() {
433 437
		
434
		filesToProcess = new File(module.getBinaryDirectory(),"tokenized").listFiles()
438
		filesToProcess = new File(module.getBinaryDirectory(), "tokenized").listFiles()
435 439
		File xslDirectory = new File(module.getSourceDirectory(), "xsl/3-posttok")
436
		def xslFiles = xslDirectory.listFiles()
440
		def xslFiles = xslDirectory.listFiles(new FileFilter() {
441
			public boolean accept(File pathname) { return pathname.getName().endsWith(".xsl");}
442
		});
437 443
		if (!xslDirectory.exists() || xslFiles == null || xslFiles.size() == 0) return true;
438 444
		
439 445
		println "-- Posttokenize XSL Step with $xslDirectory"

Formats disponibles : Unified diff