Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 1715:a70e0cbc5e02
Added support for removing themes from output.
flys-artifacts/trunk@2989 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 17 Oct 2011 14:55:45 +0000 |
parents | f643ea084213 |
children | 755a890ecf0e |
comparison
equal
deleted
inserted
replaced
1714:004b1b0838d6 | 1715:a70e0cbc5e02 |
---|---|
798 String uuid = theme.getAttributeNS(uri, "artifact"); | 798 String uuid = theme.getAttributeNS(uri, "artifact"); |
799 String pos = theme.getAttributeNS(uri, "pos"); | 799 String pos = theme.getAttributeNS(uri, "pos"); |
800 String active = theme.getAttributeNS(uri, "active"); | 800 String active = theme.getAttributeNS(uri, "active"); |
801 String idx = theme.getAttributeNS(uri, "index"); | 801 String idx = theme.getAttributeNS(uri, "index"); |
802 String desc = theme.getAttributeNS(uri, "description"); | 802 String desc = theme.getAttributeNS(uri, "description"); |
803 | 803 String visible = theme.getAttributeNS(uri, "visible"); |
804 addTheme(uuid, name, idx, pos, active, desc); | 804 |
805 addTheme(uuid, name, idx, pos, active, desc, visible); | |
805 } | 806 } |
806 } | 807 } |
807 | 808 |
808 protected void addTheme( | 809 protected void addTheme( |
809 String uuid, | 810 String uuid, |
810 String name, | 811 String name, |
811 String index, | 812 String index, |
812 String position, | 813 String position, |
813 String active, | 814 String active, |
814 String description) | 815 String desc, |
816 String visible) | |
815 { | 817 { |
816 if (logger.isDebugEnabled()) { | 818 if (logger.isDebugEnabled()) { |
817 logger.debug("Add theme: "); | 819 logger.debug("Add theme: "); |
818 logger.debug(".. name: " + name); | 820 logger.debug(".. name: " + name); |
819 logger.debug(".. uuid: " + uuid); | 821 logger.debug(".. uuid: " + uuid); |
820 logger.debug(".. position: " + position); | 822 logger.debug(".. position: " + position); |
821 logger.debug(".. active: " + active); | 823 logger.debug(".. active: " + active); |
824 logger.debug(".. visible: " + visible); | |
822 } | 825 } |
823 | 826 |
824 try { | 827 try { |
825 int pos = Integer.parseInt(position); | 828 int pos = Integer.parseInt(position); |
826 int act = Integer.parseInt(active); | 829 int act = Integer.parseInt(active); |
827 int idx = Integer.parseInt(index); | 830 int idx = Integer.parseInt(index); |
831 int vis = Integer.parseInt(visible); | |
828 | 832 |
829 themes.put( | 833 themes.put( |
830 new Integer(pos-1), | 834 new Integer(pos-1), |
831 new ManagedFacet(name, idx, description, uuid, pos, act)); | 835 new ManagedFacet(name, idx, desc, uuid, pos, act, vis)); |
832 } | 836 } |
833 catch (NumberFormatException nfe) { | 837 catch (NumberFormatException nfe) { |
834 logger.warn(nfe, nfe); | 838 logger.warn(nfe, nfe); |
835 } | 839 } |
836 } | 840 } |