root / tmp / org.txm.groovy.core / src / groovy / org / txm / scripts / importer / xtz / xtzLoader.groovy @ 2126
History | View | Annotate | Download (1.8 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: 2015-06-03 15:04:53 +0200 (mer., 03 juin 2015) $
|
25 |
// $LastChangedRevision: 2984 $
|
26 |
// $LastChangedBy: mdecorde $
|
27 |
//
|
28 |
package org.txm.scripts.importer.xtz;
|
29 |
|
30 |
import javax.xml.stream.* |
31 |
|
32 |
import org.txm.* |
33 |
import org.txm.metadatas.* |
34 |
import org.txm.objects.* |
35 |
import org.txm.importer.scripts.xmltxm.* |
36 |
import org.txm.tokenizer.TokenizerClasses |
37 |
import org.txm.utils.* |
38 |
import org.txm.utils.i18n.* |
39 |
import org.txm.importer.xtz.* |
40 |
|
41 |
String userDir = System.getProperty("user.home"); |
42 |
|
43 |
def MONITOR;
|
44 |
Project project; |
45 |
|
46 |
try {project=projectBinding;MONITOR=monitor} catch (Exception) |
47 |
{ } |
48 |
if (project == null) { println "no project set. Aborting"; return; } |
49 |
|
50 |
XTZImport i = new XTZImport(project);
|
51 |
/*
|
52 |
* To customize the XTZ import, replace the importer, compiler, annotater or pager objects before calling process()
|
53 |
i.importer = new XTZImporter(i)
|
54 |
i.compiler = new XTZCompiler(i)
|
55 |
i.annotater = new TTAnnotater(i);
|
56 |
i.pager = new XTZPager(i)
|
57 |
*/
|
58 |
i.process(); |
59 |
readyToLoad = i.isSuccessful && project.save() |