Project

General

Profile

Download (3.91 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2009 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.cdm.io.dwca.out;
11

    
12
import java.io.PrintWriter;
13
import java.net.URI;
14
import java.util.Arrays;
15
import java.util.List;
16
import java.util.Set;
17

    
18
import org.apache.log4j.Logger;
19
import org.joda.time.DateTime;
20

    
21
import eu.etaxonomy.cdm.model.agent.AgentBase;
22
import eu.etaxonomy.cdm.model.location.Point;
23
import eu.etaxonomy.cdm.model.media.Rights;
24

    
25
/**
26
 * @author a.mueller
27
 * @date 20.04.2011
28
 *
29
 */
30
public class DwcaImageRecord extends DwcaRecordBase{
31
	@SuppressWarnings("unused")
32
	private static final Logger logger = Logger.getLogger(DwcaImageRecord.class);
33
	private Integer coreid;
34
	private URI identifier;
35
	private String title;
36
	private String description;
37
	
38
	//TODO ??
39
	private String spatial;
40
	private Point coordinates;
41
	private String format;
42
	private Set<Rights> license;
43
	private DateTime created;
44
	private AgentBase<?> creator;
45
	private AgentBase<?> contributor;
46
	private AgentBase<?> publisher;
47
	private String audience;
48

    
49
	@Override
50
	public List<String> getHeaderList() {
51
		String[] result = new String[]{"coreid", "identifier","title","description", 
52
				"spatial", "latitude", "longitude","format", "license", 
53
				"created", "creator", "contributor", "publisher", "audience"};
54
		return Arrays.asList(result);
55
	}
56

    
57
	
58
	
59
	public void write(PrintWriter writer) {
60
		print(coreid, writer, IS_FIRST);
61
		print(identifier, writer, IS_NOT_FIRST);
62
		print(title, writer, IS_NOT_FIRST);
63
		print(description, writer, IS_NOT_FIRST);
64
		print(spatial, writer, IS_NOT_FIRST);
65
		print(coordinates, writer, IS_NOT_FIRST);
66
		print(license, writer, IS_NOT_FIRST);
67
		print(getDate(created), writer, IS_NOT_FIRST);
68
		print(creator, writer, IS_NOT_FIRST);
69
		print(contributor, writer, IS_NOT_FIRST);
70
		print(publisher, writer, IS_NOT_FIRST);
71
		print(audience, writer, IS_NOT_FIRST);
72

    
73
		writer.println();
74
	}
75

    
76

    
77
	public Integer getCoreid() {
78
		return coreid;
79
	}
80

    
81
	public void setCoreid(Integer coreid) {
82
		this.coreid = coreid;
83
	}
84
	
85
	public URI getIdentifier() {
86
		return identifier;
87
	}
88
	
89
	public void setIdentifier(URI identifier) {
90
		this.identifier = identifier;
91
	}
92

    
93
	public String getTitle() {
94
		return title;
95
	}
96

    
97
	public void setTitle(String title) {
98
		this.title = title;
99
	}
100

    
101
	public String getDescription() {
102
		return description;
103
	}
104

    
105
	public void setDescription(String description) {
106
		this.description = description;
107
	}
108

    
109
	public String getSpatial() {
110
		return spatial;
111
	}
112

    
113
	public void setSpatial(String spatial) {
114
		this.spatial = spatial;
115
	}
116

    
117
	public Point getCoordinates() {
118
		return coordinates;
119
	}
120

    
121
	public void setCoordinates(Point coordinates) {
122
		this.coordinates = coordinates;
123
	}
124

    
125
	public String getFormat() {
126
		return format;
127
	}
128

    
129
	public void setFormat(String format) {
130
		this.format = format;
131
	}
132

    
133
	public Set<Rights> getLicense() {
134
		return license;
135
	}
136

    
137
	public void setLicense(Set<Rights> set) {
138
		this.license = set;
139
	}
140

    
141
	public DateTime getCreated() {
142
		return created;
143
	}
144

    
145
	public void setCreated(DateTime created) {
146
		this.created = created;
147
	}
148

    
149
	public AgentBase<?> getCreator() {
150
		return creator;
151
	}
152

    
153
	public void setCreator(AgentBase<?> creator) {
154
		this.creator = creator;
155
	}
156

    
157
	public AgentBase<?> getContributor() {
158
		return contributor;
159
	}
160

    
161
	public void setContributor(AgentBase<?> contributor) {
162
		this.contributor = contributor;
163
	}
164

    
165
	public AgentBase<?> getPublisher() {
166
		return publisher;
167
	}
168

    
169
	public void setPublisher(AgentBase<?> publisher) {
170
		this.publisher = publisher;
171
	}
172

    
173
	public String getAudience() {
174
		return audience;
175
	}
176

    
177
	public void setAudience(String audience) {
178
		this.audience = audience;
179
	}
180

    
181

    
182
	
183
}
(7-7/23)