created a structure for the odf print publishing
[cdmlib.git] / cdmlib-print / src / main / java / eu / etaxonomy / cdm / odfprint / OdfConfigurator.java
1 package eu.etaxonomy.cdm.odfprint;
2
3 import java.io.File;
4 import java.util.ArrayList;
5 import java.util.List;
6 import java.util.UUID;
7
8 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
9
10 public class OdfConfigurator {
11
12 //-------- parameters----------
13
14 private boolean remote;
15
16
17 //TODO find out, what kind of result this parameter should produce
18 private boolean allInOne;
19
20 private List<UUID> nodesToPublish = new ArrayList<UUID>();
21
22 private String webserviceUrl;
23
24 private String exportFile;
25
26
27 // ------- getters and setters ----------
28
29 public String getExportFile() {
30 return exportFile;
31 }
32
33 public void setExportFile(String exportFile) {
34 this.exportFile = exportFile;
35 }
36
37 public boolean isAllInOne() {
38 return allInOne;
39 }
40
41 public boolean isSeprateDocs(){
42 return !allInOne;
43 }
44
45 public void setAllInOne() {
46 this.allInOne = true;
47 }
48
49 public boolean setSeprateDocs(){
50 return !allInOne;
51 }
52
53 public String getWebserviceUrl() {
54 return webserviceUrl;
55 }
56
57 public void setNodesToPublish(List<UUID> nodesToPublish) {
58 this.nodesToPublish = nodesToPublish;
59 }
60
61 public boolean isRemote() {
62 return remote;
63 }
64
65 public void setRemote() {
66 this.remote = true;
67 }
68
69 public boolean isLocal() {
70 return !remote;
71 }
72
73
74 public void setLocal() {
75 this.remote = false;
76 }
77
78 public void setWebserviceUrl(String Url){
79 this.webserviceUrl=Url;
80
81 }
82
83 //--------------------------------------------------
84
85 public void addNodesToPublish(UUID taxonNodeUUID) {
86 this.nodesToPublish.add(taxonNodeUUID);
87 }
88
89 public static OdfConfigurator getDefaultConfigurator(){
90 //TODO
91 return new OdfConfigurator();
92 }
93
94
95
96 public List<UUID> getNodesToPublish() {
97 // TODO Auto-generated method stub
98 return this.nodesToPublish;
99 }
100
101 public IOdfEntityCollector getEntityCollector() {
102 if (remote) {
103 return new OdfRemoteEntityCollector();
104 }
105 else
106 return new OdfLocalEntityCollector();
107 }
108
109 public OdfFactory newOdfFactory() {
110 return new OdfFactory();
111 }
112
113 }