Revision 1973 tmp/org.txm.analec.rcp/src/org/txm/macro/urs/edit/ConcordanceToUnitMacro.groovy

ConcordanceToUnitMacro.groovy (revision 1973)
46 46
}
47 47

  
48 48
// check the analec corpus is ready
49
MainCorpus corpus = concordance.getCorpus().getMainCorpus();
49
CQPCorpus corpus = concordance.getCorpus().getMainCorpus();
50 50
String name = corpus.getID()
51
if (!URSCorpora.isAnnotationStructureReady(name)) {
51
if (!URSCorpora.isAnnotationStructureReady(corpus)) {
52 52
	println "Annotation structure is not ready."
53 53
	return
54 54
}
......
57 57
if (!ParametersDialog.open(this)) return;
58 58

  
59 59
// check the corpus structure has the unit_type provided
60
def analecCorpus = URSCorpora.getCorpus(name)
60
def analecCorpus = URSCorpora.getCorpus(corpus)
61 61
if (!analecCorpus.getStructure().getUnites().contains(unit_type)) {
62 62
	//println "The corpus structure does not contains unit with type=$unit_type"
63 63
	//return;
......
93 93
			if (iUnit < units.size()) {
94 94
				unit = units[iUnit++]
95 95
				if (unit.getDeb() == m.getStart() && unit.getFin() == m.getEnd()) { // skip and print the line
96
					println "skiping concordance line '"+line.keywordToString()+"' at "+line.getViewRef().toString()+" ("+unit.getDeb(), ", "+unit.getFin()+")"
96
					println("skiping concordance line '"+line.keywordToString()+"' at "+line.getViewRef().toString()+" ("+unit.getDeb()+ ", "+unit.getFin()+")")
97 97
					do_create = false
98 98
					continue
99 99
				}

Also available in: Unified diff