# HG changeset patch # User Felix Wolfsteller # Date 1384253184 -3600 # Node ID 4e999b1d7acdc35bf449604d081729070ed8fd57 # Parent 81d5939ec064552c67486a85c15a9f0ace59ff2a issue1542: Add timeinterval-data to mainvalues made available via service. diff -r 81d5939ec064 -r 4e999b1d7acd artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java Tue Nov 12 11:45:47 2013 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java Tue Nov 12 11:46:24 2013 +0100 @@ -320,6 +320,15 @@ cr.addAttr(el, "value", mainValue.getValue().toString()); cr.addAttr(el, "name", namedMainValue.getName()); cr.addAttr(el, "type", mainValueType.getName()); + if (mainValue.getTimeInterval() != null) { + // TODO instead of bulky toString, use i18n. + if (mainValue.getTimeInterval().getStartTime() != null) { + cr.addAttr(el, "starttime", ""+mainValue.getTimeInterval().getStartTime()); + } + if (mainValue.getTimeInterval().getStopTime() != null) { + cr.addAttr(el, "stoptime", ""+mainValue.getTimeInterval().getStopTime()); + } + } if (hasOfficialLine(namedMainValue, riverId)) { cr.addAttr(el, "official", "true");