Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / groovy / org / txm / scripts / importer / transcriber / compiler.groovy @ 1688

History | View | Annotate | Download (18.2 kB)

1
// Copyright © 2010-2013 ENS de Lyon.
2
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
3
// Lyon 2, University of Franche-Comté, University of Nice
4
// Sophia Antipolis, University of Paris 3.
5
//
6
// The TXM platform is free software: you can redistribute it
7
// and/or modify it under the terms of the GNU General Public
8
// License as published by the Free Software Foundation,
9
// either version 2 of the License, or (at your option) any
10
// later version.
11
//
12
// The TXM platform is distributed in the hope that it will be
13
// useful, but WITHOUT ANY WARRANTY; without even the implied
14
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
// PURPOSE. See the GNU General Public License for more
16
// details.
17
//
18
// You should have received a copy of the GNU General
19
// Public License along with the TXM platform. If not, see
20
// http://www.gnu.org/licenses.
21
//
22
//
23
//
24
// $LastChangedDate:$
25
// $LastChangedRevision:$
26
// $LastChangedBy:$
27
//
28
package org.txm.scripts.importer.transcriber
29

    
30
import java.io.File;
31

    
32
import javax.xml.stream.*;
33

    
34
import java.io.OutputStreamWriter;
35
import java.util.LinkedHashMap;
36
import org.txm.objects.*
37
import org.txm.searchengine.cqp.corpus.*
38
import org.txm.importer.cwb.CwbEncode
39
import org.txm.importer.cwb.CwbMakeAll
40
import org.txm.importer.cwb.CwbProcess;
41
import org.txm.importer.cwb.PatchCwbRegistry;
42
import org.txm.utils.Pair;
43

    
44
/**
45
 * The Class compiler.
46
 */
47
class compiler {
48

    
49
        boolean ADD_TEXTID_TO_REF = true
50
        
51
        /** The input data. */
52
        private def inputData;
53

    
54
        /** The factory. */
55
        private def factory;
56

    
57
        /** The parser. */
58
        private XMLStreamReader parser;
59

    
60
        /** The output. */
61
        OutputStreamWriter output;
62

    
63
        /** The basename. */
64
        String corpusname;
65

    
66
        /** The projectname. */
67
        String projectname
68

    
69
        /** The outdir. */
70
        String outdir;
71

    
72
        /** The debug. */
73
        boolean debug = false;
74

    
75
        /** The annotation succes. */
76
        boolean annotationSucces = false;
77

    
78
        /** The removeinterviewers. */
79
        boolean removeinterviewers = false;
80

    
81
        /** The trans. */
82
        HashMap<String, ArrayList<Pair<String, String>>> trans;
83

    
84
        /** The speakers. */
85
        HashMap<String, ArrayList<Pair<String, String>>> speakers;
86

    
87
        /** The speakersname. */
88
        HashMap<String, String> speakersname = new HashMap<String, String>();
89

    
90
        /** The topics. */
91
        HashMap<String, ArrayList<Pair<String, String>>> topics;
92

    
93

    
94
        /** The interviewers. */
95
        ArrayList<String> interviewers = [];
96
        static HashSet<String> sectionAttrs;
97

    
98
        /** The anatypes. */
99
        private static anatypes = []
100
        private static anavalues = [:]
101

    
102
        /**
103
         * Removes the interviewers.
104
         *
105
         * @param value the value
106
         * @return the java.lang. object
107
         */
108
        public removeInterviewers(boolean value) {
109
                this.removeinterviewers = value;
110
        }
111

    
112
        File cqpFile
113
        /**
114
         * Run.
115
         *
116
         * @param xmlfiles the xmlfiles
117
         * @param basename the basename
118
         * @param projectname the projectname
119
         * @param outdir the outdir
120
         * @return true, if successful
121
         */
122
        public boolean run(Project project, List<File> xmlfiles, String corpusname, String projectname, File binDir) {
123
                Collections.sort(xmlfiles);
124
                //println "run compiler with $xmlfiles, $basename and $outdir"
125
                this.outdir = binDir;
126
                this.corpusname = corpusname;
127
                this.projectname = projectname;
128

    
129
                anatypes = ["event"] // reset
130
                anavalues = [:] // reset
131

    
132
                sectionAttrs = new HashSet<String>() // reset section attributs set
133

    
134
                CorpusBuild corpus = project.getCorpusBuild(project.getName());
135
                if (corpus != null) {
136
                        //println "CLEAN PREVIOUS CORPUS"
137
                        corpus.delete(); // remove old files
138
                }
139
                        
140
                // make new one
141
                corpus = new MainCorpus(project);
142
                corpus.setID(project.getName());
143
                corpus.setName(project.getName());
144
                corpus.setDescription("Built with the XML-TRS import module");
145
                
146
                cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
147
                new File(binDir,"cqp").mkdirs()
148
                new File(binDir,"data").mkdirs()
149
                new File(binDir,"registry").mkdirs()
150

    
151
                // get all anatypes
152
                for (File f : xmlfiles) {
153
                        getAnaTypes(f)
154
                }
155
                //println "ANATYPES: "+anatypes
156
                if (!createOutput(cqpFile)) return false;
157
                output.write("<txmcorpus lang=\"fr\">\n")
158
                output.close();
159

    
160
                println("Compiling "+xmlfiles.size()+" files")
161
                for (File f :xmlfiles) {
162
                        if (f.exists())
163
                                if (!process(f)) {
164
                                        println("Failed to compile "+f)
165
                                }
166
                }
167

    
168
                if (!createOutput(cqpFile)) return false;
169
                output.write("</txmcorpus>\n")
170
                output.close();
171

    
172
                //2- Import into CWB
173
                File registryFile = new File(binDir, "registry/"+corpusname.toLowerCase())
174
                File dataDir = new File(binDir, "data/$corpusname")
175

    
176
                new File(binDir, "registry").mkdir();
177
                if (!new File(binDir, "registry").exists()) {
178
                        println "Can't create registry directory"
179
                        return false;
180
                }
181

    
182
                if (!(CwbEncode.isExecutableAvailable() && CwbMakeAll.isExecutableAvailable())) {
183
                        println ("Error: CWB executables not well set.")
184
                        return false;
185
                }
186
                CwbEncode cwbEn = new CwbEncode();
187
                CwbMakeAll cwbMa = new CwbMakeAll();
188
                cwbEn.setDebug(debug);
189
                cwbMa.setDebug(debug);
190

    
191
                String uAttr = "u:0+spkid+spk+scope+accent+s+time+check+dialect+type";
192
                String textAttr ="text:0+base+project"
193
                if (trans != null) {
194
                        for (String key : trans.keySet()) {
195
                                for (Pair p : trans.get(key)) {
196
                                        if (ignoreTranscriberMetadata) {
197
                                                String meta =p.getFirst();
198
                                                if (        meta != "scribe" && meta != "audio_filename" &&
199
                                                meta != "version" && meta != "version_date")
200
                                                        textAttr+="+"+meta
201
                                        } else {
202
                                                textAttr+="+"+p.getFirst()
203
                                        }
204
                                }
205
                                break;
206
                        }
207
                }
208

    
209
                String sectionAttr = "div:0" // "div:0+id+topic+endtime+starttime+type"
210
                for (String attr : sectionAttrs) {
211
                        sectionAttr += "+"+attr
212
                }
213

    
214
                List<String> pargs = ["spk", "ref", "id", "entitytype", "entityid"]
215
                for (String ana : anatypes) pargs.add(ana)
216

    
217
                String[] pAttributes = pargs
218

    
219
                String[] sAttributes = ["txmcorpus:0+lang", uAttr , textAttr, "event:0+id+desc+type+extent", sectionAttr, "sp:0+id+speaker+endtime+starttime+overlap+time"];
220

    
221
                println "pAttributes: $pAttributes"
222
                println "sAttributes: $sAttributes"
223
                //return;
224
                try {
225
                        cwbEn.run(dataDir.getAbsolutePath(),
226
                                        cqpFile.getAbsolutePath(),
227
                                        registryFile.getAbsolutePath(), pAttributes, sAttributes);
228
                        if (!registryFile.exists()) {
229
                                println "Error: The registry file was not created: $regPath. See https://groupes.renater.fr/wiki/txm-users/public/faq"
230
                                return false;
231
                        }
232
                        cwbMa.run(corpusname, registryFile.getParent());
233

    
234
                } catch (Exception ex) {System.out.println(ex); return false;}
235

    
236
                return true;
237
        }
238

    
239
        /**
240
         * Creates the output.
241
         *
242
         * @param dirPathName the dir path name
243
         * @param fileName the file name
244
         * @return true, if successful
245
         */
246
        private boolean createOutput(File f){
247
                try {
248
                        //File f = new File(dirPathName, fileName)
249
                        output = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(f,f.exists())) , "UTF-8");
250
                        return true;
251
                } catch (Exception e) {
252
                        System.out.println(e.getLocalizedMessage());
253
                        return false;
254
                }
255
        }
256

    
257
        /** The text_id. */
258
        String text_id
259

    
260
        /** The u opened. */
261
        boolean uOpened = false;
262

    
263
        /** The idturn. */
264
        int idturn = 1;
265

    
266
        /** The idsection. */
267
        int idsection = 1;
268

    
269
        /** The idu. */
270
        int idu = 1;
271

    
272
        /** The idevent. */
273
        int idevent = 1;
274

    
275
        /** The events. */
276
        List<String> events = [];
277
        static int vEntityId = 0;
278
        static int vEntityIdCount = 1;
279

    
280
        /**
281
         * Process.
282
         *
283
         * @param xmlfile the xmlfile
284
         * @return true, if successful
285
         */
286
        private boolean process(File xmlfile) {
287
                text_id = xmlfile.getName();
288
                text_id = text_id.substring(0, text_id.length() -4);
289

    
290
                idturn = 1;
291
                idsection = 1;
292
                idu = 1;
293

    
294
                boolean flagAna;
295
                boolean flagForm;
296
                boolean flagWord;
297
                String vWord="";
298
                String vForm="";
299
                String vAna="";
300
                String vEvents = "N/A";
301
                String vEntityType = "N/A"
302
                String wordid= "";
303
                //def wordattributes = [:];
304
                String anatype = "";
305
                String anavalue = "";
306

    
307
                String formatedTime;
308

    
309
                LinkedHashMap<String, String> anahash = new LinkedHashMap<String, String>();
310
                String currentType;
311

    
312
                URL url = xmlfile.toURI().toURL();
313
                inputData = url.openStream();
314
                factory = XMLInputFactory.newInstance();
315
                parser = factory.createXMLStreamReader(inputData);
316
                String filename = xmlfile.getName()
317
                String textid = filename.substring(0, filename.length() - 4);
318

    
319
                createOutput(cqpFile);
320
                String localname;
321

    
322
                //get all metadatas declared before Episode tag
323
                speakers = new HashMap<String, ArrayList<Pair<String, String>>>();
324
                trans = new HashMap<String, ArrayList<Pair<String, String>>>();
325
                topics = new HashMap<String, ArrayList<Pair<String, String>>>();
326
                //println "parse infos"
327
                parseInfos();
328

    
329
                //                println "Trans: $trans"
330
                //                println "Topics: $topics"
331
                //                println "Speakers: $speakers"
332
                //                def transproperties = ""
333
                //                for (String key : trans.keySet()) {
334
                //                        for (Pair p : trans.get(key))
335
                //                                transproperties+="\t"+p.getSecond();
336
                //                        break;
337
                //                }
338
                //                println "Trans properties: "+transproperties
339
                List<String> localspeakers;
340

    
341

    
342
                for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
343
                        //print "event: "+event +" "
344
                        switch (event) {
345
                                case XMLStreamConstants.START_ELEMENT:
346
                                        localname = parser.getLocalName();
347
                                //println localname
348
                                        switch(localname) {
349
                                                case "div":
350
                                                        output.write("<div");
351
                                                        for (int i = 0 ; i < parser.getAttributeCount() ; i ++) {
352
                                                                String name = parser.getAttributeLocalName(i).replace("_","").toLowerCase()
353
                                                                output.write(" "+name+"=\""+parser.getAttributeValue(i)+"\"");
354
                                                                sectionAttrs << name
355
                                                        }
356
                                                        output.write ">\n"
357
                                                        break;
358
                                                case "sp":
359
                                                        output.write("<sp");
360
                                                        writeAttributes();
361
                                                        output.write ">\n"
362
                                                        break;
363
                                                case "u":
364
                                                        output.write("<u");
365
                                                        for (int i = 0 ; i < parser.getAttributeCount() ; i ++) {
366
                                                                String name = parser.getAttributeLocalName(i).replace("_","").toLowerCase()
367
                                                                output.write(" "+name+"=\""+parser.getAttributeValue(i)+"\"");
368
                                                                if (name == "time") formatedTime = parser.getAttributeValue(i)
369
                                                                else if (name == "spk") u_name = parser.getAttributeValue(i)
370
                                                        }
371
                                                        output.write ">\n"
372
                                                        break;
373
                                                case "event":
374
                                                        output.write("<event");
375
                                                        writeAttributes();
376
                                                        output.write ">\n"
377

    
378
                                                        if (parser.getAttributeValue(null, "type") == "entities") {
379
                                                                if (parser.getAttributeValue(null, "extent") == "begin") {
380
                                                                        vEntityType = parser.getAttributeValue(null, "desc");
381
                                                                        vEntityId = vEntityIdCount++;
382
                                                                } else {
383
                                                                        vEntityType = "N/A";
384
                                                                        vEntityId = 0;
385
                                                                }
386
                                                        } else if (parser.getAttributeValue(null, "type") == "pronounce") {
387
                                                                if (parser.getAttributeValue(null, "extent") == "begin")
388
                                                                        events.add(parser.getAttributeValue(null, "desc"))
389
                                                                else if (parser.getAttributeValue(null, "extent") == "end")
390
                                                                        events.remove(parser.getAttributeValue(null, "desc"))
391
                                                                vEvents = "";
392
                                                                for (String s : events)
393
                                                                        vEvents += s+"#";
394
                                                                if (vEvents.length() > 0)
395
                                                                        vEvents = vEvents.substring(0, vEvents.length()-1);
396
                                                                else
397
                                                                        vEvents = ""
398
                                                        }
399
                                                        break;
400
                                                case "w":
401
                                                        for (int i = 0 ; i < parser.getAttributeCount(); i++) {
402
                                                                if (parser.getAttributeLocalName(i).equals("id")) {
403
                                                                        wordid = parser.getAttributeValue(i);
404
                                                                        break;
405
                                                                }
406
                                                        }
407
                                                        anavalues = [:];
408
                                                        break;
409
                                                case "form":
410
                                                        flagForm = true;
411
                                                        vForm = "";
412
                                                        vAna ="";
413
                                                        break;
414
                                                case "ana":
415
                                                        flagAna = true;
416
                                                        anavalue = "";
417
                                                        for (int i = 0 ; i < parser.getAttributeCount(); i++)
418
                                                                if (parser.getAttributeLocalName(i).equals("type")) {
419
                                                                        anatype = parser.getAttributeValue(i).substring(1);//remove the #
420
                                                                        break;
421
                                                                }
422
                                                        break;
423
                                        }
424
                                        break;
425
                                case XMLStreamConstants.END_ELEMENT:
426
                                        localname = parser.getLocalName();
427

    
428
                                        switch (localname) {
429
                                                case "text":
430
                                                        output.write("</text>\n")
431
                                                        break;
432
                                                case "Topics":
433
                                                        break;
434
                                                case "Topic":
435
                                                        break;
436
                                                case "Speakers":
437
                                                        break;
438
                                                case "Speaker":
439
                                                        break;
440
                                                case "Episode":
441
                                                        break;
442
                                                case "div":
443
                                                        output.write("</div>\n")
444
                                                        break;
445
                                                case "sp":
446
                                                        output.write("</sp>\n")
447
                                                        break;
448
                                                case "u":
449
                                                        output.write("</u>\n")
450
                                                        break;
451
                                                case "event":
452
                                                        output.write("</event>\n")
453
                                                        break;
454
                                                case "form":
455
                                                        flagForm = false;
456
                                                        break;
457
                                                case "ana":
458
                                                        anavalues.put(anatype, anavalue)
459
                                                        flagAna = false;
460
                                                        break;
461
                                                case "w":
462
                                                // concat spk id and ref
463
                                                        String isEnq = (interviewers.contains(u_name))?"*":"";
464
                                                        String ref = (u_name+", "+formatedTime+""+isEnq)
465
                                                        if (ADD_TEXTID_TO_REF) ref = textid+", "+ref
466
                                                        vForm +="\t"+u_name+"\t"+ref
467

    
468
                                                // concat entity and entity ID
469
                                                        vAna+= "\t"+vEntityType+"\t"+vEntityId;
470

    
471
                                                //concat ana values
472
                                                        for (String type : anatypes) {
473
                                                                def v = anavalues.get(type);
474
                                                                if (v == null) v = "";
475

    
476
                                                                if ("event" == type) {
477
                                                                        if (v.length() > 0)
478
                                                                                vAna+="\t#"+v;
479
                                                                        else
480
                                                                                vAna+="\t";
481

    
482
                                                                        //concat <Event> values
483
                                                                        if (vEvents != null && vEvents.length() > 0 && vEvents != "N/A")
484
                                                                                vAna += "#"+vEvents;
485
                                                                } else {
486
                                                                        vAna+="\t"+v;
487
                                                                }
488
                                                        }
489

    
490

    
491
                                                        vForm = vForm.replaceAll("\n", "").replaceAll("&", "&amp;").replaceAll("<", "&lt;");
492

    
493
                                                        if (removeinterviewers) {
494
                                                                if (!interviewers.contains(u_name))
495
                                                                        output.write(vForm+"\t"+wordid+vAna+"\n");
496
                                                        } else {
497
                                                                output.write(vForm+"\t"+wordid+vAna+"\n");
498
                                                        }
499

    
500
                                                        vAna = "";
501
                                                        vForm = "";
502
                                                        break;
503
                                        }
504
                                        break
505
                                case XMLStreamConstants.CHARACTERS:
506
                                        if (flagForm)
507
                                                vForm += parser.getText().trim();
508
                                        if (flagAna) {
509
                                                anavalue += parser.getText().trim();
510
                                        }
511
                                        break;
512
                        }
513
                }
514

    
515
                parser.close();
516
                inputData.close();
517
                output.close();
518
                return true;
519
        }
520

    
521
        /** The u_name. */
522
        String u_name;
523

    
524
        /**
525
         * Write start tag.
526
         */
527
        private void writeStartTag() {
528
                output.write("<"+parser.getLocalName());
529
                writeAttributes();
530
                output.write ">\n"
531
        }
532

    
533
        /**
534
         * Write attributes.
535
         */
536
        private void writeAttributes() {
537
                for (int i = 0 ; i < parser.getAttributeCount() ; i ++) {
538
                        output.write(" "+parser.getAttributeLocalName(i).replace("_","").toLowerCase()+"=\""+parser.getAttributeValue(i)+"\"");
539
                }
540
        }
541

    
542
        private void getAnaTypes(File xmlFile) {
543
                inputData = xmlFile.toURI().toURL().openStream();
544
                factory = XMLInputFactory.newInstance();
545
                parser = factory.createXMLStreamReader(inputData);
546
                String ana = "ana"
547
                HashSet<String> types = new HashSet<String>();
548
                for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
549
                        if (event == XMLStreamConstants.START_ELEMENT) { // start elem
550
                                if (ana.equals(parser.getLocalName())) { // ana elem
551
                                        for (int i = 0 ; i < parser.getAttributeCount(); i++) { // find @type
552
                                                if ("type".equals(parser.getAttributeLocalName(i))) { // @type
553
                                                        types.add(parser.getAttributeValue(i).substring(1)); //remove the #
554
                                                        break;
555
                                                }
556
                                        }
557
                                }
558
                        }
559
                }
560
                if (parser != null) parser.close();
561
                if (inputData != null) inputData.close();
562
                
563
                for (String type : types)
564
                        if (!anatypes.contains(type))
565
                                anatypes << type
566
        }
567

    
568
        /**
569
         * Write start tag.
570
         *
571
         * @param id the id
572
         */
573
        private void writeStartTag(int id) {
574
                output.write("<"+parser.getLocalName().toLowerCase());
575
                output.write(" id=\""+id+"\"");
576
                writeAttributes();
577
                output.write ">\n"
578
        }
579

    
580
        /**
581
         * Write end tag.
582
         */
583
        private void writeEndTag() {
584
                output.write("</"+parser.getLocalName().toLowerCase()+">\n");
585
        }
586

    
587
        /** The ignore transcriber metadata. */
588
        boolean ignoreTranscriberMetadata = false;
589

    
590
        /**
591
         * Sets the ignore transcriber metadata.
592
         *
593
         * @param state the new ignore transcriber metadata
594
         */
595
        public void setIgnoreTranscriberMetadata(boolean state) {
596
                this.ignoreTranscriberMetadata = state;
597
        }
598

    
599
        /**
600
         * Parses the infos.
601
         */
602
        private void parseInfos() { //until tag Episode
603
                String localname;
604
                //assert(parser != null);
605
                for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
606
                        if (event == XMLStreamConstants.START_ELEMENT) {
607
                                localname = parser.getLocalName();
608
                                switch (localname) {
609
                                        case "text":
610
                                                output.write("<text project=\""+projectname+"\" base=\""+corpusname+"\"")
611
                                                for (int i = 0 ; i < parser.getAttributeCount() ; i ++) {
612
                                                        if (ignoreTranscriberMetadata) {
613
                                                                if (parser.getAttributeLocalName(i) != "scribe" &&
614
                                                                parser.getAttributeLocalName(i) != "audio_filename" &&
615
                                                                parser.getAttributeLocalName(i) != "version" &&
616
                                                                parser.getAttributeLocalName(i) != "version_date")
617
                                                                        output.write(" "+parser.getAttributeLocalName(i).replace("_","").toLowerCase()+"=\""+parser.getAttributeValue(i)+"\"");
618
                                                        } else {
619
                                                                output.write(" "+parser.getAttributeLocalName(i).replace("_","").toLowerCase()+"=\""+parser.getAttributeValue(i)+"\"");
620
                                                        }
621
                                                }
622

    
623
                                                output.write ">\n"
624

    
625
                                                ArrayList list = new ArrayList<Pair<String, String>>()
626
                                                trans.put("trans", list);
627

    
628
                                                for (int i = 0 ; i < parser.getAttributeCount() ; i ++) {
629
                                                        list.add(new Pair(parser.getAttributeLocalName(i).replace("_","").toLowerCase(), parser.getAttributeValue(i)));
630
                                                        if(parser.getAttributeLocalName(i).startsWith("enq"))
631
                                                                interviewers.add(parser.getAttributeValue(i));
632
                                                }
633
                                                return
634
                                        case "Topic":
635
                                                String id = parser.getAttributeValue(null, "id");
636
                                                if (id != null) {
637
                                                        ArrayList list = new ArrayList<Pair<String, String>>()
638
                                                        topics.put(id, list);
639
                                                } else {
640
                                                        println "found tag $localname with no id"
641
                                                }
642
                                                break;
643
                                        case "Speaker":
644
                                        //case "Trans":
645
                                                String id = parser.getAttributeValue(null, "id");
646
                                                String name = parser.getAttributeValue(null, "name");
647
                                                if (id != null && name != null) {
648
                                                        speakersname.put(id, name);
649
                                                } else {
650
                                                        println "found tag $localname with no id ($id)or name ($name)"
651
                                                        return;
652
                                                }
653
                                                if (id != null) {
654
                                                        ArrayList list = new ArrayList<Pair<String, String>>()
655
                                                        speakers.put(id, list);
656

    
657
                                                        for (int i = 0 ; i < parser.getAttributeCount() ; i ++) {
658
                                                                list.add(new Pair(parser.getAttributeLocalName(i), parser.getAttributeValue(i)));
659
                                                        }
660
                                                } else {
661
                                                        println "found tag $localname with no id"
662
                                                        return;
663
                                                }
664
                                                break;
665
                                }
666
                        }
667
                }
668
        }
669

    
670
        /**
671
         * Sets the debug.
672
         */
673
        public void setDebug() {
674
                debug = true;
675
        }
676

    
677
        /**
678
         * Sets the annotation success.
679
         *
680
         * @param val the new annotation success
681
         */
682
        public void setAnnotationSuccess(boolean val) {
683
                annotationSucces = val
684
        }
685
}