Mercurial > dive4elements > gnv-client
comparison gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/ArtifactFactory.java @ 690:254f062e334b
Added JavaDoc.
gnv/trunk@908 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 12 Apr 2010 16:45:16 +0000 |
parents | 57fa8019fbdc |
children | d4d1eb56d725 |
comparison
equal
deleted
inserted
replaced
689:8487581dfe3b | 690:254f062e334b |
---|---|
1 package de.intevation.gnv.artifactdatabase.objects; | 1 package de.intevation.gnv.artifactdatabase.objects; |
2 | 2 |
3 /** | 3 /** |
4 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> | 4 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
5 * | |
6 */ | 5 */ |
7 public class ArtifactFactory implements ArtifactObject { | 6 public class ArtifactFactory implements ArtifactObject { |
8 | 7 |
9 /** | 8 /** |
10 * The UID of this Class. | 9 * The UID of this Class. |
18 private boolean selected = false; | 17 private boolean selected = false; |
19 | 18 |
20 private String dataBaseUrl = null; | 19 private String dataBaseUrl = null; |
21 | 20 |
22 /** | 21 /** |
22 * Returns the url of the artifact server. | |
23 * | |
23 * @return the dataBaseUrl | 24 * @return the dataBaseUrl |
24 */ | 25 */ |
25 public String getDataBaseUrl() { | 26 public String getDataBaseUrl() { |
26 return dataBaseUrl; | 27 return dataBaseUrl; |
27 } | 28 } |
38 this.name = name; | 39 this.name = name; |
39 this.description = description; | 40 this.description = description; |
40 this.dataBaseUrl = dataBaseUrl; | 41 this.dataBaseUrl = dataBaseUrl; |
41 } | 42 } |
42 | 43 |
43 /** | 44 |
44 * @see de.intevation.gnv.artifactdatabase.objects.ArtifactObject#getId() | |
45 */ | |
46 public String getId() { | 45 public String getId() { |
47 return this.name; | 46 return this.name; |
48 } | 47 } |
49 | 48 |
50 /** | 49 |
51 * @see de.intevation.gnv.artifactdatabase.objects.ArtifactObject#isSelected() | |
52 */ | |
53 public boolean isSelected() { | 50 public boolean isSelected() { |
54 | 51 |
55 return this.selected; | 52 return this.selected; |
56 } | 53 } |
57 | 54 |
58 /** | 55 |
59 * @see de.intevation.gnv.artifactdatabase.objects.ArtifactObject#setSelected(boolean) | |
60 */ | |
61 public void setSelected(boolean selected) { | 56 public void setSelected(boolean selected) { |
62 this.selected = selected; | 57 this.selected = selected; |
63 } | 58 } |
64 | 59 |
65 /** | 60 |
66 * @see de.intevation.gnv.artifactdatabase.objects.ArtifactObject#getName() | |
67 */ | |
68 public String getName() { | 61 public String getName() { |
69 return name; | 62 return name; |
70 } | 63 } |
71 | 64 |
72 /** | 65 |
73 * @see de.intevation.gnv.artifactdatabase.objects.ArtifactObject#getDescription() | |
74 */ | |
75 public String getDescription() { | 66 public String getDescription() { |
76 return description; | 67 return description; |
77 } | 68 } |
78 | 69 |
79 /** | 70 |
80 * @see de.intevation.gnv.artifactdatabase.objects.ArtifactObject#getHash() | |
81 */ | |
82 public String getHash() { | 71 public String getHash() { |
83 return null; | 72 return null; |
84 } | 73 } |
85 | 74 |
75 /** | |
76 * Two ArtifactFactories are equal, if the name and the url to the artifact | |
77 * server are equal. | |
78 * | |
79 * @param obj | |
80 * @return true, if the factories are equal - otherwise false. | |
81 */ | |
86 @Override | 82 @Override |
87 public boolean equals(Object obj) { | 83 public boolean equals(Object obj) { |
88 boolean returnValue = false; | 84 boolean returnValue = false; |
89 if (obj instanceof ArtifactFactory){ | 85 if (obj instanceof ArtifactFactory){ |
90 ArtifactFactory af = (ArtifactFactory)obj; | 86 ArtifactFactory af = (ArtifactFactory)obj; |
91 returnValue = this.getName().equals(af.getName()) && | 87 returnValue = this.getName().equals(af.getName()) && |
92 this.getDataBaseUrl().equals(af.getDataBaseUrl()); | 88 this.getDataBaseUrl().equals(af.getDataBaseUrl()); |
93 } | 89 } |
94 return returnValue; | 90 return returnValue; |
95 } | 91 } |
96 | |
97 } | 92 } |
93 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |