Revision 23de68fc
Added by Andreas Müller almost 2 years ago
cdmlib-print/src/main/java/eu/etaxonomy/cdm/print/PublishConfigurator.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.cdm.print; |
11 | 10 |
|
12 | 11 |
import java.io.File; |
... | ... | |
17 | 16 |
import java.util.List; |
18 | 17 |
import java.util.UUID; |
19 | 18 |
|
20 |
import org.apache.log4j.Logger; |
|
19 |
import org.apache.logging.log4j.LogManager; |
|
20 |
import org.apache.logging.log4j.Logger; |
|
21 | 21 |
import org.jdom.Element; |
22 | 22 |
|
23 | 23 |
import eu.etaxonomy.cdm.api.application.CdmApplicationController; |
... | ... | |
29 | 29 |
/** |
30 | 30 |
* This class holds the complete configuration for the print publishing process. |
31 | 31 |
* All aspects of the process are defined here. |
32 |
*
|
|
32 |
* |
|
33 | 33 |
* @author n.hoffmann |
34 | 34 |
* @since Aug 3, 2010 |
35 |
* @version 1.0 |
|
36 | 35 |
*/ |
37 | 36 |
public class PublishConfigurator implements Serializable { |
38 | 37 |
|
39 |
private static final Logger logger = Logger |
|
40 |
.getLogger(PublishConfigurator.class); |
|
38 |
private static final Logger logger = LogManager.getLogger(PublishConfigurator.class); |
|
41 | 39 |
|
42 | 40 |
private static final long serialVersionUID = 4896190792717383839L; |
43 | 41 |
|
... | ... | |
50 | 48 |
private boolean doSynonymy = true; |
51 | 49 |
|
52 | 50 |
private boolean doDescriptions = true; |
53 |
|
|
51 |
|
|
54 | 52 |
private boolean doPolytomousKey = true; |
55 | 53 |
|
56 | 54 |
private UUID featureTreeUuid; |
... | ... | |
75 | 73 |
|
76 | 74 |
/** |
77 | 75 |
* Creates a new instance connected to the given application controller. |
78 |
*
|
|
76 |
* |
|
79 | 77 |
* @param applicationConfiguration |
80 | 78 |
* @return |
81 | 79 |
*/ |
... | ... | |
91 | 89 |
/** |
92 | 90 |
* Creates a new instance, ready to be connected to a CDM Community Stores |
93 | 91 |
* access point. |
94 |
*
|
|
92 |
* |
|
95 | 93 |
* @return |
96 | 94 |
*/ |
97 | 95 |
public static PublishConfigurator NewRemoteInstance() { |
... | ... | |
104 | 102 |
/** |
105 | 103 |
* Returns the CDM Community Stores access point connected to this |
106 | 104 |
* configuration. |
107 |
*
|
|
105 |
* |
|
108 | 106 |
* @return the access points url or null if this configurator is configured |
109 | 107 |
* to be local. |
110 | 108 |
*/ |
... | ... | |
134 | 132 |
/** |
135 | 133 |
* Returns a list of taxon node elements that should be processed by the |
136 | 134 |
* print publisher. |
137 |
*
|
|
135 |
* |
|
138 | 136 |
* @return a list of elements |
139 | 137 |
*/ |
140 | 138 |
public List<Element> getSelectedTaxonNodeElements() { |
... | ... | |
144 | 142 |
/** |
145 | 143 |
* Set the list of taxon node elements that should be processed by the print |
146 | 144 |
* publisher. |
147 |
*
|
|
145 |
* |
|
148 | 146 |
* @see {@link #getSelectedTaxonNodeElements()} |
149 | 147 |
* @param selectedTaxonNodeElements |
150 | 148 |
*/ |
... | ... | |
156 | 154 |
/** |
157 | 155 |
* Add a taxon node element to list of taxon nodes that will be processed by |
158 | 156 |
* the print publisher. |
159 |
*
|
|
157 |
* |
|
160 | 158 |
* @see {@link #getSelectedTaxonNodeElements()} |
161 | 159 |
* @param selectedTaxonNodeElement |
162 | 160 |
*/ |
... | ... | |
166 | 164 |
|
167 | 165 |
/** |
168 | 166 |
* Whether to export descriptions. |
169 |
*
|
|
167 |
* |
|
170 | 168 |
* @return |
171 | 169 |
*/ |
172 | 170 |
public boolean isDoDescriptions() { |
... | ... | |
183 | 181 |
|
184 | 182 |
/** |
185 | 183 |
* Whether to export images |
186 |
*
|
|
184 |
* |
|
187 | 185 |
* @return |
188 | 186 |
*/ |
189 | 187 |
public boolean isDoImages() { |
... | ... | |
200 | 198 |
|
201 | 199 |
/** |
202 | 200 |
* The folder, the produced output will be written to. |
203 |
*
|
|
201 |
* |
|
204 | 202 |
* @return the exportFile |
205 | 203 |
*/ |
206 | 204 |
public File getExportFolder() { |
... | ... | |
227 | 225 |
/** |
228 | 226 |
* Returns a list of output modules. The print publisher will export into |
229 | 227 |
* the formats defined by these output modules |
230 |
*
|
|
228 |
* |
|
231 | 229 |
* @see {@link IPublishOutputModule} and implementations thereof |
232 | 230 |
* @return the outputModules |
233 | 231 |
*/ |
... | ... | |
253 | 251 |
|
254 | 252 |
/** |
255 | 253 |
* Adds an output modules to this configurators list of output modules. |
256 |
*
|
|
254 |
* |
|
257 | 255 |
* @see {@link IPublishOutputModule} and implementations thereof |
258 | 256 |
* @param module |
259 | 257 |
*/ |
... | ... | |
263 | 261 |
|
264 | 262 |
/** |
265 | 263 |
* Whether this configurator is connected to a remote CDM Community Store |
266 |
*
|
|
264 |
* |
|
267 | 265 |
* @return |
268 | 266 |
*/ |
269 | 267 |
public boolean isRemote() { |
... | ... | |
279 | 277 |
|
280 | 278 |
/** |
281 | 279 |
* Whether this configurator is connected to a local application controller. |
282 |
*
|
|
280 |
* |
|
283 | 281 |
* @return |
284 | 282 |
*/ |
285 | 283 |
public boolean isLocal() { |
... | ... | |
297 | 295 |
* Returns a {@link RemoteXMLEntityFactory} if <code>this</code> is a remote |
298 | 296 |
* instance or a {@link LocalXMLEntityFactory} if <code>this</code> is a |
299 | 297 |
* local instance |
300 |
*
|
|
298 |
* |
|
301 | 299 |
* @return an {@link IXMLEntityFactory} |
302 | 300 |
*/ |
303 | 301 |
public IXMLEntityFactory getFactory() { |
... | ... | |
308 | 306 |
|
309 | 307 |
/** |
310 | 308 |
* FIXME this is a dummy implementation |
311 |
*
|
|
309 |
* |
|
312 | 310 |
* @return |
313 | 311 |
*/ |
314 | 312 |
public int calculateNumberOfNodes() { |
... | ... | |
321 | 319 |
* Whether taxonomically included taxa for the |
322 | 320 |
* {@linkplain #getSelectedTaxonNodeElements() selected taxon nodes} should |
323 | 321 |
* be exported recursively. |
324 |
*
|
|
322 |
* |
|
325 | 323 |
* @return <code>true</code> if this is desired |
326 | 324 |
*/ |
327 | 325 |
public boolean isDoPublishEntireBranches() { |
... | ... | |
338 | 336 |
|
339 | 337 |
/** |
340 | 338 |
* Whether the synonymy should be exported. |
341 |
*
|
|
339 |
* |
|
342 | 340 |
* @return <code>true</code> if this is desired |
343 | 341 |
*/ |
344 | 342 |
public boolean isDoSynonymy() { |
... | ... | |
356 | 354 |
/** |
357 | 355 |
* The {@linkplain CdmApplicationController application controller} |
358 | 356 |
* associated with this instance |
359 |
*
|
|
357 |
* |
|
360 | 358 |
* @return the {@link CdmApplicationController} or null if <code>this</code> |
361 | 359 |
* is a {@linkplain #isRemote() remote} instance |
362 | 360 |
*/ |
... | ... | |
376 | 374 |
/** |
377 | 375 |
* The feature tree configures which features and in which order and nesting |
378 | 376 |
* will be exported by the application |
379 |
*
|
|
377 |
* |
|
380 | 378 |
* @return the featureTrees uuid |
381 | 379 |
*/ |
382 | 380 |
public UUID getFeatureTreeUuid() { |
Also available in: Unified diff
ref #9359 upgrade cdmlib to log4j 2