# HG changeset patch # User Ingo Weinzierl # Date 1304082409 0 # Node ID 4a8d934e745fe66ce1086214751ef3cbb29f8a05 # Parent 2ce7b473620edc472e725751eaab0efb5ee26ba9 Bugfix: Changed the datastructure of the ThemeList (inner class of FLYSArtifactCollection) to store the theme of a chart in an ordered list -> Q curves of longitudinal section charts are now drawn. flys-artifacts/trunk@1779 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 2ce7b473620e -r 4a8d934e745f flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Fri Apr 29 10:13:24 2011 +0000 +++ b/flys-artifacts/ChangeLog Fri Apr 29 13:06:49 2011 +0000 @@ -1,3 +1,11 @@ +2011-04-29 Ingo Weinzierl + + * src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java: + Bugfix: Now, curves for Q values are drawn into a longitudinal section + chart as well. Therefore, it was necessary to change the datastructure + of the inner class ThemeList that stores all themes included in a chart + in an ordered list (stored in a java.util.Vector now). + 2011-04-29 Ingo Weinzierl * src/main/java/de/intevation/flys/exports/XYChartGenerator.java: New. An diff -r 2ce7b473620e -r 4a8d934e745f flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java --- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Fri Apr 29 10:13:24 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Fri Apr 29 13:06:49 2011 +0000 @@ -7,6 +7,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Vector; import javax.xml.xpath.XPathConstants; @@ -181,6 +182,7 @@ ManagedFacet theme = themeList.get(i); if (theme == null) { + log.debug("Theme is empty - no output is generated."); continue; } @@ -659,10 +661,10 @@ */ private class ThemeList { private Logger logger = Logger.getLogger(ThemeList.class); - protected Map themes; + protected Vector themes; public ThemeList(Document output) { - themes = new HashMap(); + themes = new Vector(); parse(output); } @@ -715,18 +717,18 @@ } try { - Integer pos = new Integer(position); - Integer act = new Integer(active); + int pos = Integer.parseInt(position); + int act = Integer.parseInt(active); - themes.put(pos, new ManagedFacet(name, null, uuid, pos, act)); + themes.add(pos-1, new ManagedFacet(name, null, uuid, pos, act)); } catch (NumberFormatException nfe) { - // do nothing + logger.warn(nfe, nfe); } } public ManagedFacet get(int idx) { - return themes.get(new Integer(idx)); + return themes.get(idx); } public int size() {