Statistics
| Revision:

root / tmp / org.txm.core.tests / src / org / txm / scripts / tests / test1 / create.groovy @ 1626

History | View | Annotate | Download (757 Bytes)

1
package org.txm.scripts.tests.test1
2

    
3
import java.util.Calendar
4
import java.util.Locale
5

    
6
import org.txm.*
7
import org.txm.core.results.TXMResult
8
import org.txm.objects.*
9
import org.txm.searchengine.cqp.corpus.MainCorpus
10
import org.txm.properties.core.functions.*
11

    
12
Workspace w = Toolbox.workspace
13

    
14
Project p = w.getProject("NANOBROWN")
15
if (p != null) {
16
        p.delete();
17
}
18

    
19
p = new Project(w, "NANOBROWN", true)
20
p.setSourceDirectory("")
21
p.setDescription("Test1 corpus");
22
p.setLang("en");
23
p.setImportModuleName("xtz")
24
if (!p.compute()) {
25
        return false;
26
}
27

    
28
MainCorpus c = p.getCorpusBuild("NANOBROWN")
29
if (c == null) {
30
        return false;
31
}
32

    
33
Properties props = new Properties(c)
34
if (!props.compute()) {
35
        return false
36
}
37

    
38
return ["project":p, "corpus":c, "properties":props]