001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/branches/2.2_testing/src/org/deegree/model/metadata/iso19115/Citation.java $
002 /*
003 ---------------- FILE HEADER ------------------------------------------
004
005 This file is part of deegree.
006 Copyright (C) 2001-2008 by:
007 EXSE, Department of Geography, University of Bonn
008 http://www.giub.uni-bonn.de/deegree/
009 lat/lon GmbH
010 http://www.lat-lon.de
011
012 This library is free software; you can redistribute it and/or
013 modify it under the terms of the GNU Lesser General Public
014 License as published by the Free Software Foundation; either
015 version 2.1 of the License, or (at your option) any later version.
016
017 This library is distributed in the hope that it will be useful,
018 but WITHOUT ANY WARRANTY; without even the implied warranty of
019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
020 Lesser General Public License for more details.
021
022 You should have received a copy of the GNU Lesser General Public
023 License along with this library; if not, write to the Free Software
024 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
025
026 Contact:
027
028 Andreas Poth
029 lat/lon GmbH
030 Aennchenstr. 19
031 53115 Bonn
032 Germany
033 E-Mail: poth@lat-lon.de
034
035 Prof. Dr. Klaus Greve
036 Department of Geography
037 University of Bonn
038 Meckenheimer Allee 166
039 53115 Bonn
040 Germany
041 E-Mail: greve@giub.uni-bonn.de
042
043
044 ---------------------------------------------------------------------------*/
045
046 package org.deegree.model.metadata.iso19115;
047
048 import java.util.ArrayList;
049
050 /**
051 *
052 *
053 *
054 * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a>
055 * @author last edited by: $Author: apoth $
056 *
057 * @version. $Revision: 9343 $, $Date: 2007-12-27 14:30:32 +0100 (Do, 27 Dez 2007) $
058 */
059 public class Citation {
060
061 private ArrayList<String> alternatetitle = null;
062
063 private ArrayList<CitedResponsibleParty> citedresponsibleparty = null;
064
065 private ArrayList<Date> date = null;
066
067 private String edition = null;
068
069 private String editiondate = null;
070
071 private ArrayList<String> identifier = null;
072
073 private String isbn = null;
074
075 private String issn = null;
076
077 private String issueidentification = null;
078
079 private String seriesname = null;
080
081 private String title = null;
082
083 /**
084 *
085 * @param alternatetitle
086 * @param citedresponsibleparty
087 * @param date
088 * @param edition
089 * @param editiondate
090 * @param identifier
091 * @param isbn
092 * @param issn
093 * @param issueidentification
094 * @param seriesname
095 * @param title
096 */
097 public Citation( String[] alternatetitle, CitedResponsibleParty[] citedresponsibleparty, Date[] date,
098 String edition, String editiondate, String[] identifier, String isbn, String issn,
099 String issueidentification, String seriesname, String title ) {
100
101 this.alternatetitle = new ArrayList<String>();
102 this.citedresponsibleparty = new ArrayList<CitedResponsibleParty>();
103 this.date = new ArrayList<Date>();
104 this.identifier = new ArrayList<String>();
105
106 setAlternateTitle( alternatetitle );
107 setCitedResponsibleParty( citedresponsibleparty );
108 setDate( date );
109 setEdition( edition );
110 setEditionDate( editiondate );
111 setIdentifier( identifier );
112 setIsbn( isbn );
113 setIssn( issn );
114 setIssueIdentification( issueidentification );
115 setSeriesName( seriesname );
116 setTitle( title );
117 }
118
119 /**
120 * @return aleternate titles
121 *
122 */
123 public String[] getAlternateTitle() {
124 return alternatetitle.toArray( new String[alternatetitle.size()] );
125 }
126
127 /**
128 * @see Citation#getAlternateTitle()
129 */
130 public void addAlternateTitle( String alternatetitle ) {
131 this.alternatetitle.add( alternatetitle );
132 }
133
134 /**
135 * @see Citation#getAlternateTitle()
136 */
137 public void setAlternateTitle( String[] alternatetitle ) {
138 this.alternatetitle.clear();
139 for ( int i = 0; i < alternatetitle.length; i++ ) {
140 this.alternatetitle.add( alternatetitle[i] );
141 }
142 }
143
144 /**
145 * @return Cited Responsible Parties
146 */
147 public CitedResponsibleParty[] getCitedResponsibleParty() {
148 return citedresponsibleparty.toArray( new CitedResponsibleParty[citedresponsibleparty.size()] );
149 }
150
151 /**
152 * @see Citation#getCitedResponsibleParty()
153 * @param citedresponsibleparty
154 */
155 public void addCitedResponsibleParty( CitedResponsibleParty citedresponsibleparty ) {
156 this.citedresponsibleparty.add( citedresponsibleparty );
157 }
158
159 /**
160 * @see Citation#getCitedResponsibleParty()
161 * @param citedresponsibleparty
162 */
163 public void setCitedResponsibleParty( CitedResponsibleParty[] citedresponsibleparty ) {
164 this.citedresponsibleparty.clear();
165 for ( int i = 0; i < citedresponsibleparty.length; i++ ) {
166 this.citedresponsibleparty.add( citedresponsibleparty[i] );
167 }
168 }
169
170 /**
171 * @return dates
172 *
173 */
174 public Date[] getDate() {
175 return date.toArray( new Date[date.size()] );
176 }
177
178 /**
179 * @see Citation#getDate()
180 */
181 public void addDate( Date date ) {
182 this.date.add( date );
183 }
184
185 /**
186 * @see Citation#getDate()
187 */
188 public void setDate( Date[] date ) {
189 this.date.clear();
190 for ( int i = 0; i < date.length; i++ ) {
191 this.date.add( date[i] );
192 }
193 }
194
195 /**
196 * @return String
197 *
198 */
199 public String getEdition() {
200 return edition;
201 }
202
203 /**
204 * @see Citation#getEdition()
205 * @param edition
206 */
207 public void setEdition( String edition ) {
208 this.edition = edition;
209 }
210
211 /**
212 * @return edition date
213 */
214 public String getEditionDate() {
215 return editiondate;
216 }
217
218 /**
219 * @see Citation#getEditionDate()
220 * @param editiondate
221 */
222 public void setEditionDate( String editiondate ) {
223 this.editiondate = editiondate;
224 }
225
226 /**
227 * @return identifiers
228 *
229 */
230 public String[] getIdentifier() {
231 return identifier.toArray( new String[identifier.size()] );
232 }
233
234 /**
235 * @see Citation#getIdentifier()
236 * @param identifier
237 */
238 public void addIdentifier( String identifier ) {
239 this.identifier.add( identifier );
240 }
241
242 /**
243 * @see Citation#getIdentifier()
244 * @param identifier
245 */
246 public void setIdentifier( String[] identifier ) {
247 this.identifier.clear();
248 for ( int i = 0; i < identifier.length; i++ ) {
249 this.identifier.add( identifier[i] );
250 }
251 }
252
253 /**
254 *
255 * @return isbn
256 */
257 public String getIsbn() {
258 return isbn;
259 }
260
261 /**
262 * @see Citation#getIsbn()
263 * @param isbn
264 */
265 public void setIsbn( String isbn ) {
266 this.isbn = isbn;
267 }
268
269 /**
270 * @return issn
271 *
272 */
273 public String getIssn() {
274 return issn;
275 }
276
277 /**
278 * @see Citation#getIssn()
279 * @param issn
280 */
281 public void setIssn( String issn ) {
282 this.issn = issn;
283 }
284
285 /**
286 * @return Issue Identification
287 *
288 */
289 public String getIssueIdentification() {
290 return issueidentification;
291 }
292
293 /**
294 * @see Citation#getIssueIdentification()
295 * @param issueidentification
296 */
297 public void setIssueIdentification( String issueidentification ) {
298 this.issueidentification = issueidentification;
299 }
300
301 /**
302 * @return sereis name
303 *
304 */
305 public String getSeriesName() {
306 return seriesname;
307 }
308
309 /**
310 * @see Citation#getSeriesName()
311 * @param seriesname
312 */
313 public void setSeriesName( String seriesname ) {
314 this.seriesname = seriesname;
315 }
316
317 /**
318 * @return title
319 *
320 */
321 public String getTitle() {
322 return title;
323 }
324
325 /**
326 * @see Citation#getTitle()
327 *
328 * @param title
329 */
330 public void setTitle( String title ) {
331 this.title = title;
332 }
333
334 /**
335 * to String method
336 *
337 * @param string
338 * representation
339 */
340 public String toString() {
341 String ret = null;
342 ret = "alternatetitle = " + alternatetitle + "\n";
343 ret += "citedresponsibleparty = " + citedresponsibleparty + "\n";
344 ret += "date = " + date + "\n";
345 ret += "edition = " + edition + "\n";
346 ret += "editiondate = " + editiondate + "\n";
347 ret += "identifier = " + identifier + "\n";
348 ret += "isbn = " + isbn + "\n";
349 ret += "issn = " + issn + "\n";
350 ret += "issueidentification = " + issueidentification + "\n";
351 ret += "seriesname = " + seriesname + "\n";
352 ret += "title = " + title + "\n";
353 return ret;
354 }
355
356 }