Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 4573:b87073a05f9d
flys-client: Patch to render combobox options as clickable links.
The way of passing data arguments to the links and further to
the Artifact feeding service is somewhat hacked and should be
refactored (later...).
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Tue, 27 Nov 2012 12:50:10 +0100 |
parents | ecd237428af6 |
children | 1c6c2ddac3d6 |
comparison
equal
deleted
inserted
replaced
4572:4bd42fe098b4 | 4573:b87073a05f9d |
---|---|
1 package de.intevation.flys.utils; | 1 package de.intevation.flys.utils; |
2 | |
3 import java.awt.Color; | |
4 import java.awt.Font; | |
5 | |
6 import javax.xml.xpath.XPathConstants; | |
7 | |
8 import org.apache.log4j.Logger; | |
9 import org.w3c.dom.Document; | |
10 import org.w3c.dom.Element; | |
11 import org.w3c.dom.NodeList; | |
12 | 2 |
13 import de.intevation.artifacts.common.utils.XMLUtils; | 3 import de.intevation.artifacts.common.utils.XMLUtils; |
14 import de.intevation.flys.artifacts.model.MapserverStyle; | 4 import de.intevation.flys.artifacts.model.MapserverStyle; |
15 import de.intevation.flys.artifacts.model.MapserverStyle.Clazz; | 5 import de.intevation.flys.artifacts.model.MapserverStyle.Clazz; |
16 import de.intevation.flys.artifacts.model.MapserverStyle.Expression; | 6 import de.intevation.flys.artifacts.model.MapserverStyle.Expression; |
17 import de.intevation.flys.artifacts.model.MapserverStyle.Label; | 7 import de.intevation.flys.artifacts.model.MapserverStyle.Label; |
18 import de.intevation.flys.artifacts.model.MapserverStyle.Style; | 8 import de.intevation.flys.artifacts.model.MapserverStyle.Style; |
9 | |
10 import java.awt.Color; | |
11 import java.awt.Font; | |
12 | |
13 import javax.xml.xpath.XPathConstants; | |
14 | |
15 import org.apache.log4j.Logger; | |
16 import org.w3c.dom.Document; | |
17 import org.w3c.dom.Element; | |
18 import org.w3c.dom.NodeList; | |
19 | 19 |
20 | 20 |
21 /** | 21 /** |
22 * Utility to deal with themes and their representations. | 22 * Utility to deal with themes and their representations. |
23 */ | 23 */ |
625 XPathConstants.NODESET); | 625 XPathConstants.NODESET); |
626 | 626 |
627 return createWSPLGENStyle(categories).toString(); | 627 return createWSPLGENStyle(categories).toString(); |
628 } | 628 } |
629 | 629 |
630 /** | |
631 * Creates a style for the Mapfile template used by MapfileGenerator | |
632 * to generate floodmaps. | |
633 * @param categories | |
634 * @return | |
635 */ | |
630 protected static MapserverStyle createWSPLGENStyle(NodeList categories) { | 636 protected static MapserverStyle createWSPLGENStyle(NodeList categories) { |
631 MapserverStyle ms = new MapserverStyle(); | 637 MapserverStyle ms = new MapserverStyle(); |
632 | 638 |
633 for (int i = 0, n = categories.getLength(); i < n; i++) { | 639 for (int i = 0, n = categories.getLength(); i < n; i++) { |
634 Element cat = (Element) categories.item(i); | 640 Element cat = (Element) categories.item(i); |