001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/model/metadata/iso19115/Citation.java $
002 /*
003 ---------------- FILE HEADER ------------------------------------------
004
005 This file is part of deegree.
006 Copyright (C) 2001-2007 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: 6704 $, $Date: 2007-04-26 21:43:13 +0200 (Do, 26 Apr 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,
098 Date[] date, String edition, String editiondate, String[] identifier,
099 String isbn, String issn, String issueidentification,
100 String seriesname, String title ) {
101
102 this.alternatetitle = new ArrayList<String>();
103 this.citedresponsibleparty = new ArrayList<CitedResponsibleParty>();
104 this.date = new ArrayList<Date>();
105 this.identifier = new ArrayList<String>();
106
107 setAlternateTitle( alternatetitle );
108 setCitedResponsibleParty( citedresponsibleparty );
109 setDate( date );
110 setEdition( edition );
111 setEditionDate( editiondate );
112 setIdentifier( identifier );
113 setIsbn( isbn );
114 setIssn( issn );
115 setIssueIdentification( issueidentification );
116 setSeriesName( seriesname );
117 setTitle( title );
118 }
119
120 /**
121 * @return aleternate titles
122 *
123 */
124 public String[] getAlternateTitle() {
125 return alternatetitle.toArray( new String[alternatetitle.size()] );
126 }
127
128 /**
129 * @see Citation#getAlternateTitle()
130 */
131 public void addAlternateTitle( String alternatetitle ) {
132 this.alternatetitle.add( alternatetitle );
133 }
134
135 /**
136 * @see Citation#getAlternateTitle()
137 */
138 public void setAlternateTitle( String[] alternatetitle ) {
139 this.alternatetitle.clear();
140 for ( int i = 0; i < alternatetitle.length; i++ ) {
141 this.alternatetitle.add( alternatetitle[i] );
142 }
143 }
144
145 /**
146 * @return Cited Responsible Parties
147 */
148 public CitedResponsibleParty[] getCitedResponsibleParty() {
149 return citedresponsibleparty.toArray( new CitedResponsibleParty[citedresponsibleparty.size()] );
150 }
151
152 /**
153 * @see Citation#getCitedResponsibleParty()
154 * @param citedresponsibleparty
155 */
156 public void addCitedResponsibleParty( CitedResponsibleParty citedresponsibleparty ) {
157 this.citedresponsibleparty.add( citedresponsibleparty );
158 }
159
160 /**
161 * @see Citation#getCitedResponsibleParty()
162 * @param citedresponsibleparty
163 */
164 public void setCitedResponsibleParty( CitedResponsibleParty[] citedresponsibleparty ) {
165 this.citedresponsibleparty.clear();
166 for ( int i = 0; i < citedresponsibleparty.length; i++ ) {
167 this.citedresponsibleparty.add( citedresponsibleparty[i] );
168 }
169 }
170
171 /**
172 * @return dates
173 *
174 */
175 public Date[] getDate() {
176 return date.toArray( new Date[date.size()] );
177 }
178
179 /**
180 * @see Citation#getDate()
181 */
182 public void addDate( Date date ) {
183 this.date.add( date );
184 }
185
186 /**
187 * @see Citation#getDate()
188 */
189 public void setDate( Date[] date ) {
190 this.date.clear();
191 for ( int i = 0; i < date.length; i++ ) {
192 this.date.add( date[i] );
193 }
194 }
195
196 /**
197 * @return String
198 *
199 */
200 public String getEdition() {
201 return edition;
202 }
203
204 /**
205 * @see Citation#getEdition()
206 * @param edition
207 */
208 public void setEdition( String edition ) {
209 this.edition = edition;
210 }
211
212 /**
213 * @return edition date
214 */
215 public String getEditionDate() {
216 return editiondate;
217 }
218
219 /**
220 * @see Citation#getEditionDate()
221 * @param editiondate
222 */
223 public void setEditionDate( String editiondate ) {
224 this.editiondate = editiondate;
225 }
226
227 /**
228 * @return identifiers
229 *
230 */
231 public String[] getIdentifier() {
232 return identifier.toArray( new String[identifier.size()] );
233 }
234
235 /**
236 * @see Citation#getIdentifier()
237 * @param identifier
238 */
239 public void addIdentifier( String identifier ) {
240 this.identifier.add( identifier );
241 }
242
243 /**
244 * @see Citation#getIdentifier()
245 * @param identifier
246 */
247 public void setIdentifier( String[] identifier ) {
248 this.identifier.clear();
249 for ( int i = 0; i < identifier.length; i++ ) {
250 this.identifier.add( identifier[i] );
251 }
252 }
253
254 /**
255 *
256 * @return isbn
257 */
258 public String getIsbn() {
259 return isbn;
260 }
261
262 /**
263 * @see Citation#getIsbn()
264 * @param isbn
265 */
266 public void setIsbn( String isbn ) {
267 this.isbn = isbn;
268 }
269
270 /**
271 * @return issn
272 *
273 */
274 public String getIssn() {
275 return issn;
276 }
277
278 /**
279 * @see Citation#getIssn()
280 * @param issn
281 */
282 public void setIssn( String issn ) {
283 this.issn = issn;
284 }
285
286 /**
287 * @return Issue Identification
288 *
289 */
290 public String getIssueIdentification() {
291 return issueidentification;
292 }
293
294 /**
295 * @see Citation#getIssueIdentification()
296 * @param issueidentification
297 */
298 public void setIssueIdentification( String issueidentification ) {
299 this.issueidentification = issueidentification;
300 }
301
302 /**
303 * @return sereis name
304 *
305 */
306 public String getSeriesName() {
307 return seriesname;
308 }
309
310 /**
311 * @see Citation#getSeriesName()
312 * @param seriesname
313 */
314 public void setSeriesName( String seriesname ) {
315 this.seriesname = seriesname;
316 }
317
318 /**
319 * @return title
320 *
321 */
322 public String getTitle() {
323 return title;
324 }
325
326 /**
327 * @see Citation#getTitle()
328 *
329 * @param title
330 */
331 public void setTitle( String title ) {
332 this.title = title;
333 }
334
335 /**
336 * to String method
337 *
338 * @param string
339 * representation
340 */
341 public String toString() {
342 String ret = null;
343 ret = "alternatetitle = " + alternatetitle + "\n";
344 ret += "citedresponsibleparty = " + citedresponsibleparty + "\n";
345 ret += "date = " + date + "\n";
346 ret += "edition = " + edition + "\n";
347 ret += "editiondate = " + editiondate + "\n";
348 ret += "identifier = " + identifier + "\n";
349 ret += "isbn = " + isbn + "\n";
350 ret += "issn = " + issn + "\n";
351 ret += "issueidentification = " + issueidentification + "\n";
352 ret += "seriesname = " + seriesname + "\n";
353 ret += "title = " + title + "\n";
354 return ret;
355 }
356
357 }