svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.about / org.gvsig.about.impl / src / main / java / org / gvsig / about / impl / DefaultAboutContribution.java @ 42024
History | View | Annotate | Download (2.68 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.about.impl; |
23 |
|
24 |
import java.util.Date; |
25 |
|
26 |
import org.gvsig.about.AboutContribution; |
27 |
import org.gvsig.about.AboutManager; |
28 |
import org.gvsig.about.AboutParticipant; |
29 |
|
30 |
/**
|
31 |
* @author gvSIG Team
|
32 |
* @version $Id$
|
33 |
*
|
34 |
*/
|
35 |
public class DefaultAboutContribution implements AboutContribution { |
36 |
|
37 |
private AboutParticipant participant;
|
38 |
private Date begin; |
39 |
private Date end; |
40 |
private String description; |
41 |
private String title; |
42 |
|
43 |
public DefaultAboutContribution(AboutParticipant participant, String title, |
44 |
String description, Date begin, Date end) { |
45 |
this.participant = participant;
|
46 |
this.title = title;
|
47 |
this.description = description;
|
48 |
this.begin = begin;
|
49 |
this.end = end;
|
50 |
} |
51 |
|
52 |
public DefaultAboutContribution(AboutManager manager, String tipo, |
53 |
String participantName, String title, String description, Date begin, |
54 |
Date end) {
|
55 |
AboutParticipant ap = null;
|
56 |
if (tipo.equals("AboutDeveloper")) { |
57 |
ap = manager.getDeveloper(participantName); |
58 |
} else
|
59 |
if (tipo.equals("AboutSponsor")) { |
60 |
ap = manager.getSponsor(participantName); |
61 |
} else
|
62 |
if (tipo.equals("AboutTranslator")) { |
63 |
ap = manager.getTranslator(participantName); |
64 |
} |
65 |
this.participant = ap;
|
66 |
this.title = title;
|
67 |
this.description = description;
|
68 |
this.begin = begin;
|
69 |
this.end = end;
|
70 |
} |
71 |
|
72 |
public String getTitle() { |
73 |
return this.title; |
74 |
} |
75 |
|
76 |
public Date getEnd() { |
77 |
return this.end; |
78 |
} |
79 |
|
80 |
public Date getBegin() { |
81 |
return this.begin; |
82 |
} |
83 |
|
84 |
public AboutParticipant getParticipant() {
|
85 |
return this.participant; |
86 |
} |
87 |
|
88 |
public String getDescription() { |
89 |
return this.description; |
90 |
} |
91 |
} |