Revision c09572ee
Added by Patrick Plitzner almost 8 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/out/BfnXmlExportConfigurator.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.cdm.io.redlist.bfnXml.out; |
|
11 |
|
|
12 |
import java.io.File; |
|
13 |
|
|
14 |
import org.apache.log4j.Logger; |
|
15 |
import org.jdom2.Document; |
|
16 |
|
|
17 |
import eu.etaxonomy.cdm.database.ICdmDataSource; |
|
18 |
import eu.etaxonomy.cdm.io.common.XmlExportConfiguratorBase; |
|
19 |
import eu.etaxonomy.cdm.io.common.mapping.out.IExportTransformer; |
|
20 |
|
|
21 |
/** |
|
22 |
* |
|
23 |
* @author pplitzner |
|
24 |
* @date May 3, 2016 |
|
25 |
* |
|
26 |
*/ |
|
27 |
public class BfnXmlExportConfigurator extends XmlExportConfiguratorBase<BfnXmlExportState>{ |
|
28 |
|
|
29 |
private static final long serialVersionUID = -74469857806841119L; |
|
30 |
|
|
31 |
@SuppressWarnings("unused") |
|
32 |
private static Logger logger = Logger.getLogger(BfnXmlExportConfigurator.class); |
|
33 |
|
|
34 |
private final Document document; |
|
35 |
|
|
36 |
public static BfnXmlExportConfigurator NewInstance(File destination, ICdmDataSource cdmSource, IExportTransformer transformer, Document document){ |
|
37 |
return new BfnXmlExportConfigurator(destination, cdmSource, transformer, document); |
|
38 |
} |
|
39 |
|
|
40 |
private BfnXmlExportConfigurator(File destination, ICdmDataSource cdmSource, IExportTransformer transformer, Document document) { |
|
41 |
super(destination, cdmSource, transformer); |
|
42 |
this.document = document; |
|
43 |
} |
|
44 |
|
|
45 |
@Override |
|
46 |
protected void makeIoClassList(){ |
|
47 |
ioClassList = new Class[]{ |
|
48 |
BfnXmlTaxonNameExport.class |
|
49 |
}; |
|
50 |
|
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
public BfnXmlExportState getNewState() { |
|
55 |
return new BfnXmlExportState(this); |
|
56 |
} |
|
57 |
|
|
58 |
public Document getDocument() { |
|
59 |
return document; |
|
60 |
} |
|
61 |
|
|
62 |
} |
|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.cdm.io.redlist.bfnXml.out; |
|
11 |
|
|
12 |
import java.io.File; |
|
13 |
|
|
14 |
import org.apache.log4j.Logger; |
|
15 |
import org.jdom2.Document; |
|
16 |
|
|
17 |
import eu.etaxonomy.cdm.database.ICdmDataSource; |
|
18 |
import eu.etaxonomy.cdm.io.common.XmlExportConfiguratorBase; |
|
19 |
import eu.etaxonomy.cdm.io.common.mapping.out.IExportTransformer; |
|
20 |
|
|
21 |
/** |
|
22 |
* |
|
23 |
* @author pplitzner |
|
24 |
* @date May 3, 2016 |
|
25 |
* |
|
26 |
*/ |
|
27 |
public class BfnXmlExportConfigurator extends XmlExportConfiguratorBase<BfnXmlExportState>{ |
|
28 |
|
|
29 |
private static final long serialVersionUID = -74469857806841119L; |
|
30 |
|
|
31 |
@SuppressWarnings("unused") |
|
32 |
private static Logger logger = Logger.getLogger(BfnXmlExportConfigurator.class); |
|
33 |
|
|
34 |
private final Document document; |
|
35 |
|
|
36 |
public static BfnXmlExportConfigurator NewInstance(File destination, ICdmDataSource cdmSource, IExportTransformer transformer, Document document){ |
|
37 |
return new BfnXmlExportConfigurator(destination, cdmSource, transformer, document); |
|
38 |
} |
|
39 |
|
|
40 |
private BfnXmlExportConfigurator(File destination, ICdmDataSource cdmSource, IExportTransformer transformer, Document document) { |
|
41 |
super(destination, cdmSource, transformer); |
|
42 |
this.document = document; |
|
43 |
} |
|
44 |
|
|
45 |
@Override |
|
46 |
protected void makeIoClassList(){ |
|
47 |
ioClassList = new Class[]{ |
|
48 |
BfnXmlTaxonNameExport.class |
|
49 |
}; |
|
50 |
|
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
public BfnXmlExportState getNewState() { |
|
55 |
return new BfnXmlExportState(this); |
|
56 |
} |
|
57 |
|
|
58 |
public Document getDocument() { |
|
59 |
return document; |
|
60 |
} |
|
61 |
|
|
62 |
} |
Also available in: Unified diff
minor