Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java @ 778:9a828e5a2390
Removed trailing whitespace
gnv-artifacts/trunk@851 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 07:58:51 +0000 |
parents | f28a7eac542a |
children | b1f5f2a8840f |
comparison
equal
deleted
inserted
replaced
777:8009961db1cb | 778:9a828e5a2390 |
---|---|
486 | 486 |
487 | 487 |
488 /** | 488 /** |
489 * TODO Result is not used at the moment. Change result with correct data. | 489 * TODO Result is not used at the moment. Change result with correct data. |
490 */ | 490 */ |
491 protected void createODV(OutputStream outputStream, | 491 protected void createODV(OutputStream outputStream, |
492 Collection result, | 492 Collection result, |
493 String uuid) | 493 String uuid) |
494 throws IOException, StateException { | 494 throws IOException, StateException { |
495 | 495 |
496 Export export = new ODVExport(new SimpleOdvDataCollector( | 496 Export export = new ODVExport(new SimpleOdvDataCollector( |
521 while (it.hasNext()) { | 521 while (it.hasNext()) { |
522 StatisticSet set = it.next(); | 522 StatisticSet set = it.next(); |
523 Element setElement = xmlUtilities.createArtifactElement(doc, | 523 Element setElement = xmlUtilities.createArtifactElement(doc, |
524 "statistic"); | 524 "statistic"); |
525 setElement.setAttribute("name", set.getName()); | 525 setElement.setAttribute("name", set.getName()); |
526 | 526 |
527 Iterator<Statistic> sit = set.getStatistics().iterator(); | 527 Iterator<Statistic> sit = set.getStatistics().iterator(); |
528 while (sit.hasNext()){ | 528 while (sit.hasNext()){ |
529 Statistic s = sit.next(); | 529 Statistic s = sit.next(); |
530 Element result = xmlUtilities.createArtifactElement(doc, | 530 Element result = xmlUtilities.createArtifactElement(doc, |
531 "statistic-value"); | 531 "statistic-value"); |
859 String measurementNameValue = Config.getStringXPath(configuration, | 859 String measurementNameValue = Config.getStringXPath(configuration, |
860 "value-names/value-name[@name='measurement']/@value"); | 860 "value-names/value-name[@name='measurement']/@value"); |
861 if (measurementNameValue != null) { | 861 if (measurementNameValue != null) { |
862 this.measuremenValueName = measurementNameValue; | 862 this.measuremenValueName = measurementNameValue; |
863 } | 863 } |
864 | 864 |
865 String dateNameValue = Config.getStringXPath(configuration, | 865 String dateNameValue = Config.getStringXPath(configuration, |
866 "value-names/value-name[@name='date']/@value"); | 866 "value-names/value-name[@name='date']/@value"); |
867 if (dateNameValue != null) { | 867 if (dateNameValue != null) { |
868 this.dateValueName = dateNameValue; | 868 this.dateValueName = dateNameValue; |
869 } | 869 } |
876 if (link != null ){ | 876 if (link != null ){ |
877 String absolutFileName = Config.replaceConfigDir(link); | 877 String absolutFileName = Config.replaceConfigDir(link); |
878 gapDefinition = (Element)new ArtifactXMLUtilities(). | 878 gapDefinition = (Element)new ArtifactXMLUtilities(). |
879 readConfiguration(absolutFileName); | 879 readConfiguration(absolutFileName); |
880 } | 880 } |
881 | 881 |
882 NodeList gapDefinitions = Config.getNodeSetXPath(gapDefinition, | 882 NodeList gapDefinitions = Config.getNodeSetXPath(gapDefinition, |
883 "/time-gaps/time-gap"); | 883 "/time-gaps/time-gap"); |
884 if (gapDefinition != null){ | 884 if (gapDefinition != null){ |
885 timeGapDefinitions = new ArrayList<TimeGap>(gapDefinitions. | 885 timeGapDefinitions = new ArrayList<TimeGap>(gapDefinitions. |
886 getLength()); | 886 getLength()); |
887 for (int i = 0; i < gapDefinitions.getLength(); i++){ | 887 for (int i = 0; i < gapDefinitions.getLength(); i++){ |
888 Element gapNode = (Element)gapDefinitions.item(i); | 888 Element gapNode = (Element)gapDefinitions.item(i); |
889 String unit = gapNode.getAttribute("unit"); | 889 String unit = gapNode.getAttribute("unit"); |
890 int key = Integer.parseInt(gapNode.getAttribute("key")); | 890 int key = Integer.parseInt(gapNode.getAttribute("key")); |
891 int value = Integer.parseInt(gapNode.getAttribute("gap")); | 891 int value = Integer.parseInt(gapNode.getAttribute("gap")); |
892 log.info("Add new Timegap: "+key+" "+value+" "+ unit); | 892 log.info("Add new Timegap: "+key+" "+value+" "+ unit); |
893 timeGapDefinitions.add(new DefaultTimeGap(unit, | 893 timeGapDefinitions.add(new DefaultTimeGap(unit, |
894 key, | 894 key, |
895 value)); | 895 value)); |
896 } | 896 } |
897 } | 897 } |
898 } | 898 } |
899 } | 899 } |