comparison flys-artifacts/src/main/java/de/intevation/flys/exports/BooleanAttribute.java @ 3786:4adc35aa655c

merged flys-artifacts/2.9.1
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:47 +0200
parents 5c1e7c1e9e09
children 58bdf95df5e4
comparison
equal deleted inserted replaced
3719:e82acd5c86f7 3786:4adc35aa655c
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 BooleanAttribute extends VisibleAttribute {
12
13
14 public BooleanAttribute(String name, boolean 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>boolean</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", "boolean");
33
34 return ele;
35 }
36 }
37 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org