Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/DiagramAttributes.java @ 7060:78ded33f5f5b generator-refactoring
Some more accessors and typo fix
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 20 Sep 2013 12:04:14 +0200 |
parents | f9d5020af0af |
children | 4f6b3ba542de |
comparison
equal
deleted
inserted
replaced
7059:f9d5020af0af | 7060:78ded33f5f5b |
---|---|
124 | 124 |
125 public void addArgument(Argument argument) { | 125 public void addArgument(Argument argument) { |
126 arguments.add(argument); | 126 arguments.add(argument); |
127 } | 127 } |
128 | 128 |
129 public String evalute(D4EArtifact artifact, CallContext context) { | 129 public String evaluate(D4EArtifact artifact, CallContext context) { |
130 if (key == null || key.isEmpty()) { | 130 if (key == null || key.isEmpty()) { |
131 return def; | 131 return def; |
132 } | 132 } |
133 Object [] args = new Object[arguments.size()]; | 133 Object [] args = new Object[arguments.size()]; |
134 for (int i = 0; i < args.length; ++i) { | 134 for (int i = 0; i < args.length; ++i) { |
153 this(); | 153 this(); |
154 parseAxis(config); | 154 parseAxis(config); |
155 parseProcessors(config); | 155 parseProcessors(config); |
156 parseTitle(config); | 156 parseTitle(config); |
157 parseSubtitle(config); | 157 parseSubtitle(config); |
158 } | |
159 | |
160 public List<AxisAttributes> getAxesAttributes() { | |
161 return axesAttrs; | |
158 } | 162 } |
159 | 163 |
160 private void parseAxis(Element config) { | 164 private void parseAxis(Element config) { |
161 NodeList axisNodes = config.getElementsByTagName("axis"); | 165 NodeList axisNodes = config.getElementsByTagName("axis"); |
162 | 166 |
247 String type = argumentElement.getAttribute("type"); | 251 String type = argumentElement.getAttribute("type"); |
248 title.addArgument(new Argument(expression, type)); | 252 title.addArgument(new Argument(expression, type)); |
249 } | 253 } |
250 return title; | 254 return title; |
251 } | 255 } |
256 | |
257 public int getAxisIndex(String axisName) { | |
258 for (int i=0; i < axesAttrs.size(); i++) { | |
259 if (axesAttrs.get(i).getName().equals(axisName)) { | |
260 return i; | |
261 } | |
262 } | |
263 return -1; | |
264 } | |
252 } | 265 } |
253 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 266 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |