Revision 1804 tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/bfm/compiler.groovy

compiler.groovy (revision 1804)
755 755
			return false;
756 756
		}
757 757
		
758
		CorpusBuild corpus = project.getCorpusBuild(project.getName());
758
		CorpusBuild corpus = project.getCorpusBuild(project.getName(), MainCorpus.class);
759 759
		if (corpus != null) {
760
			//println "CLEAN PREVIOUS CORPUS"
761
			corpus.delete(); // remove old files
760
			if (project.getDoUpdate()) {
761
				corpus.clean(); // remove old files
762
			} else {
763
				corpus.delete(); // remove old files and TXMResult children
764
			}
765
		} else {
766
			corpus = new MainCorpus(project);
767
			corpus.setID(project.getName());
768
			corpus.setName(project.getName());
762 769
		}
763
			
764
		// make new one
765
		corpus = new MainCorpus(project);
766
		corpus.setID(project.getName());
767
		corpus.setName(project.getName());
768 770
		corpus.setDescription("Built with the BFM import module");
769 771
		
770 772
		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");

Also available in: Unified diff