comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/BedHeightsArtifact.java @ 4504:d7e1aee9d51e

Merged.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 14 Nov 2012 12:37:57 +0100
parents 5b0a545fceef
children b838d16c629e
comparison
equal deleted inserted replaced
4503:f91260ccef03 4504:d7e1aee9d51e
93 Facet bedHFacet = new BedHeightFacet( 93 Facet bedHFacet = new BedHeightFacet(
94 "bedheight", 94 "bedheight",
95 bedHName); 95 bedHName);
96 96
97 fs.add(bedHFacet); 97 fs.add(bedHFacet);
98 facets.put(state.getID(), fs); 98 addFacets(state.getID(), fs);
99 } 99 }
100 } 100 }
101 101
102 //spawnState(); 102 //spawnState();
103 super.setup(identifier, factory, context, callMeta, data); 103 super.setup(identifier, factory, context, callMeta, data);
109 * @return list with one and only state. 109 * @return list with one and only state.
110 */ 110 */
111 @Override 111 @Override
112 protected List<State> getStates(Object context) { 112 protected List<State> getStates(Object context) {
113 ArrayList<State> states = new ArrayList<State>(); 113 ArrayList<State> states = new ArrayList<State>();
114 states.add(getState()); 114 states.add(state);
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")),

http://dive4elements.wald.intevation.org