Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DoubleAttribute.java @ 3318:dbe2f85bf160
merged flys-artifacts/2.8
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:35 +0200 |
parents | e1c9f28e2675 |
children | 58bdf95df5e4 |
comparison
equal
deleted
inserted
replaced
2987:98c7a46ec5ae | 3318:dbe2f85bf160 |
---|---|
1 package de.intevation.flys.exports; | |
2 | |
3 import org.w3c.dom.Document; | |
4 import org.w3c.dom.Element; | |
5 import org.w3c.dom.Node; | |
6 | |
7 | |
8 /** | |
9 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
10 */ | |
11 public class DoubleAttribute extends VisibleAttribute { | |
12 | |
13 | |
14 public DoubleAttribute(String name, double value, boolean visible) { | |
15 super(name, value, visible); | |
16 } | |
17 | |
18 | |
19 /** | |
20 * Calls VisibleAttribute.toXML() and appends afterwards an attribute | |
21 * <i>type</i> with value <i>double</i>. | |
22 * | |
23 * @param parent The parent Node. | |
24 * | |
25 * @return the new Node that represents this Attribute. | |
26 */ | |
27 @Override | |
28 public Node toXML(Node parent) { | |
29 Document owner = parent.getOwnerDocument(); | |
30 | |
31 Element ele = (Element) super.toXML(parent); | |
32 ele.setAttribute("type", "double"); | |
33 | |
34 return ele; | |
35 } | |
36 } | |
37 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |