Revision 1137 tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy

XTZCompiler.groovy (revision 1137)
7 7
import org.txm.importer.cwb.*
8 8
import org.txm.stat.utils.ConsoleProgressBar
9 9
import org.txm.core.preferences.TXMPreferences
10
import org.txm.core.preferences.TBXPreferences
10 11
import org.txm.libs.cqp.CQPLibPreferences
11 12

  
12 13
import javax.xml.stream.*
......
34 35
		
35 36
		wtag = module.getProject().getTokenizerParameter("wordelement", "w");
36 37
		
37
		doNormalizeAttributeValues = "true".equals(module.getProject().getPreferences().getNode("import").get(ImportKeys.NORMALISEATTRIBUTEVALUES))
38
		doNormalizeAnaValues = "true".equals(module.getProject().getPreferences().getNode("import").get(ImportKeys.NORMALISEANAVALUES))
38
		doNormalizeAttributeValues = "true".equals(module.getProject().getPreferencesScope().getNode("import").get(TBXPreferences.NORMALISEATTRIBUTEVALUES, "false"))
39
		doNormalizeAnaValues = "true".equals(module.getProject().getPreferencesScope().getNode("import").get(TBXPreferences.NORMALISEANAVALUES, "false"))
39 40
	}
40 41

  
41 42
	public void process(ArrayList<File> files) {
......
60 61
		corpus.setName(corpusname);
61 62
		corpus.setDescription("Built with the XTZ import module");
62 63
		
63
		String cleanDirectories = module.getProject().getPreferences().getNode("import").get(ImportKeys.CLEAN, "true");
64
		if ("true".equals(cleanDirectories)) {
64
		if (module.getProject().getCleanAfterBuild()) {
65 65
			new File(module.getBinaryDirectory(), "cqp").deleteDir()
66 66
		}
67 67
		
......
245 245
				println "Error: The registry file was not created: $regPath. See https://groupes.renater.fr/wiki/txm-users/public/faq"
246 246
				return false;
247 247
			}
248
			cwbMa.run(corpusname, module.getBinaryDirectory().getAbsolutePath() + "/registry");
248
			cwbMa.run(corpusname, regPath);
249 249
			
250 250
			// remove milestones from CWB registry and data files
251 251
			FixMilestoneDeclarations fm = new FixMilestoneDeclarations(

Also available in: Unified diff