Statistics
| Revision:

root / tmp / org.txm.core / src / java / org / txm / importer / scripts / xmltxm / AnnotationInjection.groovy @ 1688

History | View | Annotate | Download (12.7 kB)

1 1681 mdecorde
2 1681 mdecorde
3 986 mdecorde
// Copyright © 2010-2013 ENS de Lyon.
4 986 mdecorde
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
5 986 mdecorde
// Lyon 2, University of Franche-Comté, University of Nice
6 986 mdecorde
// Sophia Antipolis, University of Paris 3.
7 986 mdecorde
//
8 986 mdecorde
// The TXM platform is free software: you can redistribute it
9 986 mdecorde
// and/or modify it under the terms of the GNU General Public
10 986 mdecorde
// License as published by the Free Software Foundation,
11 986 mdecorde
// either version 2 of the License, or (at your option) any
12 986 mdecorde
// later version.
13 986 mdecorde
//
14 986 mdecorde
// The TXM platform is distributed in the hope that it will be
15 986 mdecorde
// useful, but WITHOUT ANY WARRANTY; without even the implied
16 986 mdecorde
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17 986 mdecorde
// PURPOSE. See the GNU General Public License for more
18 986 mdecorde
// details.
19 986 mdecorde
//
20 986 mdecorde
// You should have received a copy of the GNU General
21 986 mdecorde
// Public License along with the TXM platform. If not, see
22 986 mdecorde
// http://www.gnu.org/licenses.
23 986 mdecorde
//
24 986 mdecorde
//
25 986 mdecorde
//
26 986 mdecorde
// $LastChangedDate: 2016-03-29 09:51:35 +0200 (mar. 29 mars 2016) $
27 986 mdecorde
// $LastChangedRevision: 3185 $
28 986 mdecorde
// $LastChangedBy: mdecorde $
29 986 mdecorde
//
30 986 mdecorde
package org.txm.importer.scripts.xmltxm
31 986 mdecorde
32 986 mdecorde
import javax.xml.stream.*
33 986 mdecorde
34 986 mdecorde
import org.txm.importer.StaxIdentityParser
35 986 mdecorde
import org.txm.importer.filters.*
36 986 mdecorde
import org.txm.importer.PersonalNamespaceContext
37 1681 mdecorde
import java.io.File
38 1681 mdecorde
import java.io.IOException
39 1681 mdecorde
40 1681 mdecorde
import javax.xml.stream.XMLStreamException
41 1681 mdecorde
42 986 mdecorde
/**
43 986 mdecorde
 * The Class AnnotationInjection.
44 986 mdecorde
 *
45 986 mdecorde
 * @author mdecorde
46 986 mdecorde
 *
47 986 mdecorde
 * inject annotation from a stand-off file into a xml-tei-txm
48 986 mdecorde
 * file
49 986 mdecorde
 */
50 986 mdecorde
51 986 mdecorde
public class AnnotationInjection extends StaxIdentityParser {
52 986 mdecorde
53 986 mdecorde
        public static String TXMNS = "http://textometrie.org/1.0"
54 986 mdecorde
55 986 mdecorde
        /** The xml reader factory. */
56 986 mdecorde
        private def factory;
57 986 mdecorde
58 986 mdecorde
        /** The links. */
59 986 mdecorde
        private LinkedHashSet<String> links;
60 986 mdecorde
        boolean replace
61 986 mdecorde
62 986 mdecorde
        /** The linkparsers. key=type*/
63 986 mdecorde
        private LinkedHashMap<String, XMLStreamReader> linkparsers;
64 986 mdecorde
65 986 mdecorde
        /** The anaurl. */
66 986 mdecorde
        private def anaurl;
67 986 mdecorde
68 986 mdecorde
        /** The anainput data. */
69 986 mdecorde
        private def anainputData;
70 986 mdecorde
71 986 mdecorde
        /** The anafactory. */
72 986 mdecorde
        private XMLInputFactory anafactory = XMLInputFactory.newInstance();
73 986 mdecorde
74 986 mdecorde
        /** The anaparser. */
75 986 mdecorde
        private XMLStreamReader anaparser;
76 986 mdecorde
        private XMLStreamReader headerparser;
77 986 mdecorde
78 986 mdecorde
        /** The resp stmt id. */
79 986 mdecorde
        String respStmtID = "";
80 986 mdecorde
81 986 mdecorde
        /** The present taxonomies. */
82 986 mdecorde
        ArrayList<String> presentTaxonomies = new ArrayList();
83 986 mdecorde
84 986 mdecorde
        /**
85 986 mdecorde
         * Instantiates a new annotation injection.
86 986 mdecorde
         *
87 986 mdecorde
         * @param url the xml-tei-txm file
88 986 mdecorde
         * @param anaurl the stand-off file
89 986 mdecorde
         */
90 986 mdecorde
        public AnnotationInjection(URL url, URL anaurl) {
91 986 mdecorde
                this(url, anaurl, false)
92 986 mdecorde
        }
93 986 mdecorde
94 986 mdecorde
        /**
95 986 mdecorde
         * Instantiates a new annotation injection.
96 986 mdecorde
         *
97 986 mdecorde
         * @param url the xml-tei-txm file
98 986 mdecorde
         * @param anaurl the stand-off file
99 986 mdecorde
         */
100 986 mdecorde
        public AnnotationInjection(URL url, URL anaurl, boolean replace) {
101 986 mdecorde
                super(url); // init reader and writer
102 986 mdecorde
                try {
103 986 mdecorde
                        this.anaurl = anaurl;
104 986 mdecorde
                        this.replace = replace
105 986 mdecorde
                        factory = XMLInputFactory.newInstance();
106 986 mdecorde
                        this.buildLinkParsers();// build a parser per linkgroup
107 986 mdecorde
                } catch (XMLStreamException ex) {
108 986 mdecorde
                        System.out.println(ex);
109 986 mdecorde
                } catch (IOException ex) {
110 986 mdecorde
                        System.out.println("IOException while parsing ");
111 986 mdecorde
                }
112 986 mdecorde
        }
113 986 mdecorde
114 986 mdecorde
        private void getHeaderInfos(String containertag, boolean captureTheTag)
115 986 mdecorde
        {
116 986 mdecorde
                anainputData = new BufferedInputStream(anaurl.openStream());
117 986 mdecorde
                headerparser = anafactory.createXMLStreamReader(anainputData);
118 986 mdecorde
                boolean start = false;
119 986 mdecorde
                String localname;
120 986 mdecorde
                for (int event = headerparser.next(); event != XMLStreamConstants.END_DOCUMENT; event = headerparser.next())
121 986 mdecorde
                {
122 986 mdecorde
                        //String prefix = headerparser.getNamespaceURI();
123 986 mdecorde
                        if (event == XMLStreamConstants.START_ELEMENT) {
124 986 mdecorde
                                localname = headerparser.getLocalName();
125 986 mdecorde
                                if (captureTheTag && localname == containertag) // start copy  after the tag
126 986 mdecorde
                                        start = true;
127 986 mdecorde
                                if (start) { // copy header
128 986 mdecorde
                                        String prefix = headerparser.getPrefix();
129 986 mdecorde
                                        if (prefix.length() > 0)
130 986 mdecorde
                                                writer.writeStartElement(Nscontext.getNamespaceURI(prefix), localname)
131 986 mdecorde
                                        else
132 986 mdecorde
                                                writer.writeStartElement(localname);
133 986 mdecorde
                                        for (int i = 0 ; i < headerparser.getNamespaceCount(); i++)
134 986 mdecorde
                                                writer.writeNamespace(headerparser.getNamespacePrefix(i), headerparser.getNamespaceURI(i));
135 986 mdecorde
                                        for (int i = 0 ; i < headerparser.getAttributeCount(); i++)
136 986 mdecorde
                                                writer.writeAttribute(headerparser.getAttributeLocalName(i), headerparser.getAttributeValue(i));
137 986 mdecorde
                                }
138 986 mdecorde
                                if (!captureTheTag && localname == containertag) // start copy  after the tag
139 986 mdecorde
                                        start = true;
140 986 mdecorde
                        } else if (event == XMLStreamConstants.END_ELEMENT) {
141 986 mdecorde
                                localname = headerparser.getLocalName();
142 986 mdecorde
                                if (!captureTheTag && localname == containertag)
143 986 mdecorde
                                        break;// stop looping
144 986 mdecorde
145 986 mdecorde
                                if (start)
146 986 mdecorde
                                        writer.writeEndElement();
147 986 mdecorde
148 986 mdecorde
                                if (captureTheTag && localname == containertag)
149 986 mdecorde
                                        break;// stop looping
150 986 mdecorde
                        } else if (event == XMLStreamConstants.CHARACTERS) {
151 986 mdecorde
                                if (start)
152 986 mdecorde
                                        writer.writeCharacters(headerparser.getText());
153 986 mdecorde
                        } else if (event == XMLStreamConstants.COMMENT) {
154 986 mdecorde
                                if (start)
155 986 mdecorde
                                        writer.writeComment(headerparser.getText());
156 986 mdecorde
                        }
157 986 mdecorde
                }
158 986 mdecorde
                headerparser.close();
159 1688 mdecorde
                anainputData.close();
160 986 mdecorde
        }
161 986 mdecorde
162 986 mdecorde
        /**
163 986 mdecorde
         * find all refs.
164 986 mdecorde
         *
165 986 mdecorde
         * @return the list of link parser
166 986 mdecorde
         */
167 986 mdecorde
        private LinkedHashSet<String> findGrpLink()
168 986 mdecorde
        {
169 986 mdecorde
                LinkedHashSet<String> links = new LinkedHashSet<String>();
170 986 mdecorde
                anainputData = anaurl.openStream();
171 986 mdecorde
                anaparser = anafactory.createXMLStreamReader(anainputData);
172 986 mdecorde
173 986 mdecorde
                for (int event = anaparser.next(); event != XMLStreamConstants.END_DOCUMENT; event = anaparser.next()) {
174 986 mdecorde
                        if (event == XMLStreamConstants.START_ELEMENT) {
175 986 mdecorde
                                if (anaparser.getLocalName().equals("linkGrp")) {
176 986 mdecorde
                                        String targetsvalue = anaparser.getAttributeValue(0)
177 986 mdecorde
178 986 mdecorde
                                        if (links.contains(targetsvalue)) {
179 986 mdecorde
                                                System.err.println("Warning: Multiple group declaration : "+targetsvalue+" has already been added, the first one will be used")
180 986 mdecorde
                                        } else {
181 986 mdecorde
                                                links.add(targetsvalue); // add the taxonomy type
182 986 mdecorde
                                        }
183 986 mdecorde
                                } else if (anaparser.getLocalName().equals("respStmt")) {
184 986 mdecorde
                                        respStmtID = anaparser.getAttributeValue(0); // one attribute (id) only
185 986 mdecorde
                                }
186 986 mdecorde
                        }
187 986 mdecorde
                }
188 986 mdecorde
                anaparser.close();
189 1688 mdecorde
                anainputData.close();
190 986 mdecorde
                return links;
191 986 mdecorde
        }
192 986 mdecorde
193 986 mdecorde
        /**
194 986 mdecorde
         * Builds the link parsers.
195 986 mdecorde
         * I need to know what groups exists to build a parser per taxonomy and go to the first link element
196 986 mdecorde
         */
197 1205 mdecorde
        private void buildLinkParsers() {
198 1205 mdecorde
199 986 mdecorde
                // link group of the standoff file
200 986 mdecorde
                links = findGrpLink();
201 986 mdecorde
                linkparsers = new LinkedHashMap<String, XMLStreamReader>();
202 986 mdecorde
203 986 mdecorde
                // build one parser per link group
204 986 mdecorde
                for (String link : links) { // build a parser per group
205 986 mdecorde
                        anainputData = new BufferedInputStream(anaurl.openStream());
206 986 mdecorde
                        linkparsers.put(link, anafactory.createXMLStreamReader(anainputData));
207 986 mdecorde
                }
208 986 mdecorde
209 986 mdecorde
                //for each parser
210 986 mdecorde
                for (String link : links) {
211 986 mdecorde
                        anaparser = linkparsers.get(link);
212 986 mdecorde
                        for (int event = anaparser.next(); event != XMLStreamConstants.END_DOCUMENT; event = anaparser.next()) {
213 986 mdecorde
                                if (event == XMLStreamConstants.START_ELEMENT) {
214 986 mdecorde
                                        if (anaparser.getLocalName().equals("linkGrp")) { // position the parser to the right group
215 986 mdecorde
                                                String targetsvalue = anaparser.getAttributeValue(0)
216 1205 mdecorde
                                                if (targetsvalue.equals(link)) {
217 986 mdecorde
                                                        break; // next element is a link start tag
218 1205 mdecorde
                                                }
219 986 mdecorde
                                        }
220 986 mdecorde
                                }
221 986 mdecorde
                        }
222 986 mdecorde
                }
223 986 mdecorde
        }
224 1681 mdecorde
225 1681 mdecorde
        public boolean process(File outfile) throws XMLStreamException, IOException
226 1681 mdecorde
        {
227 1681 mdecorde
                boolean ret = super.process(outfile);
228 1681 mdecorde
                releaseLinkParsers();
229 1681 mdecorde
        }
230 1681 mdecorde
231 1681 mdecorde
        /**
232 1681 mdecorde
         * Release the link parsers.
233 1681 mdecorde
         */
234 1681 mdecorde
        private void releaseLinkParsers() {
235 1681 mdecorde
                if (linkparsers == null) return;
236 1681 mdecorde
237 1681 mdecorde
                for (String l : linkparsers.keySet()) {
238 1681 mdecorde
                        XMLStreamReader p = linkparsers.get(l);
239 1681 mdecorde
                        if (p != null) {
240 1681 mdecorde
                                try {
241 1681 mdecorde
                                        p.close();
242 1681 mdecorde
                                } catch(Exception e) {
243 1681 mdecorde
                                        println "** Can not close $l link parser $p: $e"
244 1681 mdecorde
                                }
245 1681 mdecorde
                        }
246 1681 mdecorde
                }
247 1681 mdecorde
        }
248 986 mdecorde
249 986 mdecorde
        /**
250 986 mdecorde
         * get the next tei:link value of a tei:LinkGrp.
251 986 mdecorde
         *
252 986 mdecorde
         * @param link the link
253 986 mdecorde
         * @return the next ana
254 986 mdecorde
         */
255 1205 mdecorde
        private String getNextAnaValue(String link, String wordId) {
256 986 mdecorde
                anaparser = linkparsers.get(link);
257 986 mdecorde
                def m;
258 986 mdecorde
                for (int event = anaparser.next(); event != XMLStreamConstants.END_DOCUMENT; event = anaparser.next()) {
259 986 mdecorde
                        if (event == XMLStreamConstants.START_ELEMENT) {
260 986 mdecorde
                                if (anaparser.getLocalName().equals("link")) {
261 986 mdecorde
                                        String targetsvalue = anaparser.getAttributeValue(0)
262 986 mdecorde
                                        if ((m = targetsvalue =~ /#(.*) #(.*)/)) { // balise externe
263 986 mdecorde
                                                def g1 = m[0][1];
264 986 mdecorde
                                                def g2 = m[0][2];
265 986 mdecorde
266 986 mdecorde
                                                String anavalue = g2;
267 986 mdecorde
                                                anavalue = anavalue.replace("&lt;", "<")
268 986 mdecorde
                                                return anavalue;
269 986 mdecorde
                                        } else {
270 986 mdecorde
                                                System.err.println("Error: getNextAna(): link target is not well formed:  = "+anaparser.getAttributeValue(0));
271 986 mdecorde
                                        }
272 986 mdecorde
                                }
273 986 mdecorde
                        }
274 986 mdecorde
                }
275 986 mdecorde
                return "";
276 986 mdecorde
        }
277 986 mdecorde
278 986 mdecorde
        /**
279 986 mdecorde
         * build the ana tags of a word.
280 986 mdecorde
         *
281 986 mdecorde
         * @param wordId the word id
282 986 mdecorde
         * @return the ana tag
283 986 mdecorde
         */
284 986 mdecorde
        private void writeAnaTags(String wordId)
285 986 mdecorde
        {
286 986 mdecorde
                String anabalises ="\n";
287 986 mdecorde
                for (String link : links) {
288 986 mdecorde
                        writer.writeStartElement(TXMNS, "ana");
289 986 mdecorde
                        writer.writeAttribute("resp", "#"+respStmtID);
290 986 mdecorde
                        writer.writeAttribute("type", "#"+link);
291 986 mdecorde
                        if (replace) {
292 986 mdecorde
                                if (linkparsers.containsKey(link)) { // order is important
293 986 mdecorde
                                        writer.writeCharacters(getNextAnaValue(link, wordId));
294 986 mdecorde
                                } else {
295 986 mdecorde
                                        writer.writeCharacters(anaValues.get(link));
296 986 mdecorde
                                }
297 986 mdecorde
                        } else { // ok no problem
298 986 mdecorde
                                writer.writeCharacters(getNextAnaValue(link, wordId));
299 986 mdecorde
                        }
300 986 mdecorde
301 986 mdecorde
                        writer.writeEndElement(); // txm:ana
302 986 mdecorde
                }
303 986 mdecorde
        }
304 986 mdecorde
305 986 mdecorde
        String wordId;
306 986 mdecorde
        HashMap<String, String> anaValues = new HashMap<String, String>();
307 986 mdecorde
        boolean flagSourceDesc = false, flagW = false, flagAna = false;
308 986 mdecorde
        String type = null, resp = null, anaValue= "";
309 1205 mdecorde
        protected void processStartElement() {
310 1205 mdecorde
311 986 mdecorde
                if (localname.equals("taxonomy")) {
312 986 mdecorde
                        String taxo = parser.getAttributeValue(0) // taxonomy type
313 986 mdecorde
                        presentTaxonomies.add(taxo);
314 986 mdecorde
                } else if (flagW && replace && localname.equals("ana")) {
315 986 mdecorde
                        flagAna = true
316 986 mdecorde
                        anaValue= ""
317 986 mdecorde
                        type = null
318 986 mdecorde
                        resp = null
319 986 mdecorde
                        for (int i= 0 ; i < parser.getAttributeCount() ; i++ ) {
320 986 mdecorde
                                if (parser.getAttributeLocalName(i) == "resp") {
321 986 mdecorde
                                        resp = parser.getAttributeValue(i);
322 986 mdecorde
                                } else if (parser.getAttributeLocalName(i) == "type") {
323 986 mdecorde
                                        type = parser.getAttributeValue(i);
324 986 mdecorde
                                }
325 986 mdecorde
                        }
326 986 mdecorde
                        if (type != null) type = type.substring(1);
327 986 mdecorde
                        if (resp != null) resp = resp.substring(1);
328 986 mdecorde
                        return; // don't write the "ana" start element
329 986 mdecorde
                } else if (localname.equals("w")) {
330 986 mdecorde
                        for (int i= 0 ; i < parser.getAttributeCount() ; i++ ) {
331 986 mdecorde
                                if (parser.getAttributeLocalName(i) == "id") {
332 986 mdecorde
                                        wordId = parser.getAttributeValue(i);
333 986 mdecorde
                                        break
334 986 mdecorde
                                }
335 986 mdecorde
                        }
336 986 mdecorde
                        flagW = true
337 986 mdecorde
                        anaValues.clear()
338 986 mdecorde
                }
339 986 mdecorde
340 986 mdecorde
                super.processStartElement();
341 986 mdecorde
        }
342 986 mdecorde
343 986 mdecorde
        protected void processCharacters() {
344 986 mdecorde
                if (flagAna) anaValue += parser.getText();
345 986 mdecorde
                else super.processCharacters(); // FORM CONTENT LOST !!!!!!!!!!!!!
346 1205 mdecorde
        }
347 986 mdecorde
348 986 mdecorde
        boolean applicationWritten = false;
349 986 mdecorde
        boolean taxonomiesWritten = false;
350 986 mdecorde
        protected void processEndElement() {
351 986 mdecorde
                switch (parser.getLocalName()) {
352 986 mdecorde
                        case "w":
353 986 mdecorde
                                writeAnaTags(wordId);
354 986 mdecorde
                                flagW = false
355 986 mdecorde
                                break;
356 986 mdecorde
                        case "ana":
357 986 mdecorde
                                if (flagAna && replace && type != null && resp != null && anaValue != null) {
358 986 mdecorde
                                        anaValues.put(type, anaValue)
359 986 mdecorde
                                        links.add(type)
360 986 mdecorde
                                        flagAna = false
361 986 mdecorde
                                        return; // don't write the "ana" end element
362 986 mdecorde
                                }
363 986 mdecorde
                                flagAna = false
364 986 mdecorde
                                break;
365 986 mdecorde
366 986 mdecorde
                        case "appInfo":
367 986 mdecorde
                                applicationWritten = true;
368 986 mdecorde
                                getHeaderInfos("appInfo", false);
369 986 mdecorde
                                break;
370 986 mdecorde
371 986 mdecorde
                        case "classDecl":
372 986 mdecorde
                                taxonomiesWritten = true;
373 986 mdecorde
                                getHeaderInfos("classDecl", false);
374 986 mdecorde
                                break;
375 986 mdecorde
376 986 mdecorde
                        case "encodingDesc":
377 986 mdecorde
                                if (!applicationWritten) {
378 986 mdecorde
                                        writer.writeStartElement("appInfo");
379 986 mdecorde
                                        getHeaderInfos("appInfo", false);
380 986 mdecorde
                                        writer.writeEndElement(); // appInfo
381 986 mdecorde
                                }
382 986 mdecorde
                                if (!taxonomiesWritten) {
383 986 mdecorde
                                        writer.writeStartElement("classDecl");
384 986 mdecorde
                                        getHeaderInfos("classDecl", false);
385 986 mdecorde
                                        writer.writeEndElement(); // classDecl
386 986 mdecorde
                                }
387 986 mdecorde
                                break;
388 986 mdecorde
389 986 mdecorde
                        case "titleStmt":
390 986 mdecorde
                                if (flagSourceDesc) {
391 986 mdecorde
                                        //output.write(this.respStmt+"\n")
392 986 mdecorde
                                        getHeaderInfos("respStmt", true);
393 986 mdecorde
                                        flagSourceDesc = false;
394 986 mdecorde
                                        break;
395 986 mdecorde
                                }
396 986 mdecorde
                                break;
397 986 mdecorde
                }
398 986 mdecorde
                super.processEndElement();
399 986 mdecorde
        }
400 986 mdecorde
401 986 mdecorde
        /** The declarenamespace. */
402 986 mdecorde
        boolean declarenamespace = false;
403 986 mdecorde
404 986 mdecorde
        /**
405 986 mdecorde
         * Declare namespace.
406 986 mdecorde
         *
407 986 mdecorde
         * @return the java.lang. object
408 986 mdecorde
         */
409 986 mdecorde
        private declareNamespace() {
410 986 mdecorde
                if (!declarenamespace) {
411 986 mdecorde
                        writer.writeDefaultNamespace("http://www.tei-c.org/ns/1.0");
412 986 mdecorde
                        writer.writeNamespace("txm", TXMNS);
413 986 mdecorde
                        declarenamespace = true;
414 986 mdecorde
                }
415 986 mdecorde
        }
416 986 mdecorde
417 986 mdecorde
        /**
418 986 mdecorde
         * The main method.
419 986 mdecorde
         *
420 986 mdecorde
         * @param args the arguments
421 986 mdecorde
         */
422 986 mdecorde
        public static void main(String[] args) {
423 986 mdecorde
424 986 mdecorde
                String rootDir = "~/xml/rgaqcj/";
425 986 mdecorde
                new File(rootDir + "/injection/").mkdir();
426 986 mdecorde
427 986 mdecorde
                def milestones = ["tagUsage", "pb", "lb","catRef"]// the tags who
428 986 mdecorde
429 986 mdecorde
                File srcfile = new File(rootDir, "/anainline/", "roland.xml");
430 986 mdecorde
                File pos1file = new File(rootDir, "/pos/", "rolandTT1-w-ana.xml");
431 986 mdecorde
432 986 mdecorde
                File src2file = new File(rootDir, "/injection/", "roland.xml");
433 986 mdecorde
                File pos2file = new File(rootDir, "/pos/", "rolandTT2-w-ana.xml");
434 986 mdecorde
435 986 mdecorde
                println("process file : " + srcfile + " with : " + pos1file);
436 986 mdecorde
                def builder = new AnnotationInjection(srcfile.toURI().toURL(),
437 986 mdecorde
                                pos1file.toURI().toURL(), milestones);
438 986 mdecorde
                builder.transfomFile(new File(rootDir + "/injection/", "roland.xml"));
439 986 mdecorde
440 986 mdecorde
                println("process file : " + src2file + " with : " + pos1file);
441 986 mdecorde
                builder = new AnnotationInjection(src2file.toURI().toURL(), pos2file.toURI().toURL(),
442 986 mdecorde
                                milestones);
443 986 mdecorde
                builder.transfomFile(rootDir + "/injection/", "roland-FINAL.xml");
444 986 mdecorde
445 986 mdecorde
                return;
446 986 mdecorde
        }
447 986 mdecorde
}