Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/BedHeightsArtifact.java @ 4497:a2735a4bf75e
Change facets member variable to private
Don't allow direct access to the facets member variable. Use the addFacets and
getFacets methods instead.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 14 Nov 2012 11:15:57 +0100 |
parents | d83e021ff638 |
children | b48c74988fd4 |
comparison
equal
deleted
inserted
replaced
4496:d8992459b408 | 4497:a2735a4bf75e |
---|---|
114 states.add(getState()); | 114 states.add(getState()); |
115 return states; | 115 return states; |
116 } | 116 } |
117 | 117 |
118 /** | 118 /** |
119 * Get the "current" state (there is but one). | |
120 * @param cc ignored. | |
121 * @return the "current" (only possible) state. | |
122 */ | |
123 @Override | |
124 public State getCurrentState(Object cc) { | |
125 return getState(); | |
126 } | |
127 | |
128 | |
129 /** | |
130 * Get the only possible state. | |
131 * @return the state. | |
132 */ | |
133 protected State getState() { | |
134 return getState(null, null); | |
135 } | |
136 | |
137 | |
138 /** | |
139 * Get the state. | |
140 * @param context ignored. | |
141 * @param stateID ignored. | |
142 * @return the state. | |
143 */ | |
144 @Override | |
145 protected State getState(Object context, String stateID) { | |
146 return (state != null) | |
147 ? state | |
148 : new StaticState(STATIC_STATE_NAME); | |
149 } | |
150 | |
151 /** | |
152 * Get WKms from factory. | |
153 * @param idx param is not needed (TODO?) | |
154 * @return WKms according to parameterization (can be null); | |
155 */ | 119 */ |
156 public BedHeight getHeight() { | 120 public BedHeight getHeight() { |
157 return BedHeightFactory.getHeight( | 121 return BedHeightFactory.getHeight( |
158 getDataAsString("type"), | 122 getDataAsString("type"), |
159 Integer.parseInt(getDataAsString("height_id")), | 123 Integer.parseInt(getDataAsString("height_id")), |