Project

General

Profile

Download (4.5 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2008 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
*/
6

    
7
package eu.etaxonomy.cdm.io.jaxb;
8

    
9
import org.apache.log4j.Logger;
10

    
11
import eu.etaxonomy.cdm.database.ICdmDataSource;
12
import eu.etaxonomy.cdm.io.common.ExportConfiguratorBase;
13
import eu.etaxonomy.cdm.io.common.IExportConfigurator;
14

    
15
/**
16
 * @author a.babadshanjan
17
 * @created 03.09.2008
18
 */
19
public class JaxbExportConfigurator extends ExportConfiguratorBase implements IExportConfigurator {
20
	
21
	private static final Logger logger = Logger.getLogger(JaxbExportConfigurator.class);
22

    
23
	private int maxRows = 0;
24
	private boolean formattedOutput = Boolean.TRUE;
25
	private String encoding = "UTF-8"; 
26

    
27
//	private boolean doAgents = true;
28
	private boolean doAgentData = true;
29
	private boolean doLanguageData = true;
30
	private boolean doFeatureData = true;
31
	private boolean doDescriptions = true;
32
	private boolean doMedia = true;
33
//	private boolean doOccurrences = true;
34
//	private boolean doReferences = true;
35
	private boolean doReferencedEntities = true;
36
//	private boolean doRelationships = true;
37
	private boolean doSynonyms = true;
38
//	private boolean doTaxonNames = true;
39
//	private boolean doTaxa = true;
40
	private boolean doTerms = true;
41
	private boolean doTermVocabularies = true;
42
	private boolean doHomotypicalGroups = true;
43
	
44
	
45
	public int getMaxRows() {
46
		return maxRows;
47
	}
48
	
49
	public void setMaxRows(int maxRows) {
50
		this.maxRows = maxRows;
51
	}
52
	
53
	public boolean isFormattedOutput() {
54
		return formattedOutput;
55
	}
56
	
57
	public void setFormattedOutput(boolean formattedOutput) {
58
		this.formattedOutput = formattedOutput;
59
	}
60
	
61
	public String getEncoding() {
62
		return encoding;
63
	}
64
	
65
	public void setEncoding(String encoding) {
66
		this.encoding = encoding;
67
	}
68
	
69
	public boolean isDoAgentData() {
70
		return doAgentData;
71
	}
72
	
73
	public void setDoAgentData(boolean doAgentData) {
74
		this.doAgentData = doAgentData;
75
	}
76

    
77
	public boolean isDoLanguageData() {
78
		return doLanguageData;
79
	}
80
	
81
	public void setDoLanguageData(boolean doLanguageData) {
82
		this.doLanguageData = doLanguageData;
83
	}
84

    
85
	public boolean isDoFeatureData() {
86
		return doFeatureData;
87
	}
88
	
89
	public void setDoFeatureData(boolean doFeatureData) {
90
		this.doFeatureData = doFeatureData;
91
	}
92

    
93
	public boolean isDoDescriptions() {
94
		return doDescriptions;
95
	}
96
	
97
	public void setDoDescriptions(boolean doDescriptions) {
98
		this.doDescriptions = doDescriptions;
99
	}
100

    
101
	public boolean isDoMedia() {
102
		return doMedia;
103
	}
104
	
105
	public void setDoMedia(boolean doMedia) {
106
		this.doMedia = doMedia;
107
	}
108

    
109
	public boolean isDoReferencedEntities() {
110
		return doReferencedEntities;
111
	}
112
	
113
	public void setDoReferencedEntities(boolean doReferencedEntities) {
114
		this.doReferencedEntities = doReferencedEntities;
115
	}
116

    
117

    
118
	public boolean isDoSynonyms() {
119
		return doSynonyms;
120
	}
121
	
122
	public void setDoSynonyms(boolean doSynonyms) {
123
		this.doSynonyms = doSynonyms;
124
	}
125

    
126

    
127
	public boolean isDoTerms() {
128
		return doTerms;
129
	}
130
	
131
	public void setDoTerms(boolean doTerms) {
132
		this.doTerms = doTerms;
133
	}
134

    
135
	public boolean isDoTermVocabularies() {
136
		return doTermVocabularies;
137
	}
138
	
139
	public void setDoTermVocabularies(boolean doTermVocabularies) {
140
		this.doTermVocabularies = doTermVocabularies;
141
	}
142

    
143
	public boolean isDoHomotypicalGroups() {
144
		return doHomotypicalGroups;
145
	}
146
	
147
	public void setDoHomotypicalGroups(boolean doHomotypicalGroups) {
148
		this.doHomotypicalGroups = doHomotypicalGroups;
149
	}
150

    
151
	
152
//	@SuppressWarnings("unchecked")
153
	protected void makeIoClassList() {
154
		ioClassList = new Class[] {
155
				JaxbExport.class,
156
		};
157
	};
158

    
159
	
160
	public static JaxbExportConfigurator NewInstance(ICdmDataSource source, String url) {
161
		return new JaxbExportConfigurator(source, url);
162
	}
163
	
164
	
165
	/**
166
	 * @param url
167
	 * @param destination
168
	 */
169
	private JaxbExportConfigurator(ICdmDataSource source, String url) {
170
		super();
171
		setDestination(url);
172
		setSource(source);
173
	}
174
	
175

    
176
	/* (non-Javadoc)
177
	 * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSource()
178
	 */
179
	public String getDestination() {
180
		return (String)super.getDestination();
181
	}
182

    
183
	
184
	/**
185
	 * @param file
186
	 */
187
	public void setDestination(String fileName) {
188
		super.setDestination(fileName);
189
	}
190
	
191

    
192
	/* (non-Javadoc)
193
	 * @see eu.etaxonomy.cdm.io.common.IExportConfigurator#getDestinationNameString()
194
	 */
195
	public String getDestinationNameString() {
196
		if (this.getDestination() == null) {
197
			return null;
198
		} else {
199
			return (String)this.getDestination();
200
		}
201
	}
202
		
203
}
(7-7/10)