Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java @ 7553:4e999b1d7acd
issue1542: Add timeinterval-data to mainvalues made available via service.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 12 Nov 2013 11:46:24 +0100 |
parents | 81d5939ec064 |
children | 74e9768098a0 |
comparison
equal
deleted
inserted
replaced
7552:81d5939ec064 | 7553:4e999b1d7acd |
---|---|
318 Element el = cr.create("mainvalue"); | 318 Element el = cr.create("mainvalue"); |
319 | 319 |
320 cr.addAttr(el, "value", mainValue.getValue().toString()); | 320 cr.addAttr(el, "value", mainValue.getValue().toString()); |
321 cr.addAttr(el, "name", namedMainValue.getName()); | 321 cr.addAttr(el, "name", namedMainValue.getName()); |
322 cr.addAttr(el, "type", mainValueType.getName()); | 322 cr.addAttr(el, "type", mainValueType.getName()); |
323 if (mainValue.getTimeInterval() != null) { | |
324 // TODO instead of bulky toString, use i18n. | |
325 if (mainValue.getTimeInterval().getStartTime() != null) { | |
326 cr.addAttr(el, "starttime", ""+mainValue.getTimeInterval().getStartTime()); | |
327 } | |
328 if (mainValue.getTimeInterval().getStopTime() != null) { | |
329 cr.addAttr(el, "stoptime", ""+mainValue.getTimeInterval().getStopTime()); | |
330 } | |
331 } | |
323 | 332 |
324 if (hasOfficialLine(namedMainValue, riverId)) { | 333 if (hasOfficialLine(namedMainValue, riverId)) { |
325 cr.addAttr(el, "official", "true"); | 334 cr.addAttr(el, "official", "true"); |
326 } | 335 } |
327 | 336 |