comparison flys-artifacts/src/main/java/de/intevation/flys/exports/StringAttribute.java @ 3814:8083f6384023

merged flys-artifacts/pre2.6-2012-01-04
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:56 +0200
parents 5c1e7c1e9e09
children 58bdf95df5e4
comparison
equal deleted inserted replaced
1491:2a00f4849738 3814:8083f6384023
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 StringAttribute extends VisibleAttribute {
12
13
14 public StringAttribute(String name, String 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>string</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", "string");
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