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