Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/org/dive4elements/river/exports/ChoiceStringAttribute.java @ 5831:bd047b71ab37
Repaired internal references
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:06:39 +0200 |
parents | flys-artifacts/src/main/java/de/intevation/flys/exports/ChoiceStringAttribute.java@58bdf95df5e4 |
children |
comparison
equal
deleted
inserted
replaced
5830:160f53ee0870 | 5831:bd047b71ab37 |
---|---|
1 package org.dive4elements.river.exports; | |
2 | |
3 import org.w3c.dom.Element; | |
4 import org.w3c.dom.Node; | |
5 | |
6 | |
7 /** | |
8 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
9 */ | |
10 public class ChoiceStringAttribute extends StringAttribute { | |
11 | |
12 /** Indicator which type of choice is dealt with. */ | |
13 protected String choiceType; | |
14 | |
15 | |
16 public ChoiceStringAttribute(String name, | |
17 String value, | |
18 boolean visible, | |
19 String choiceType) { | |
20 super(name, value, visible); | |
21 this.choiceType = choiceType; | |
22 } | |
23 | |
24 | |
25 /** | |
26 * Calls VisibleAttribute.toXML() and appends afterwards an attribute | |
27 * <i>type</i> with value <i>string</i>. | |
28 * | |
29 * @param parent The parent Node. | |
30 * | |
31 * @return the new Node that represents this Attribute. | |
32 */ | |
33 @Override | |
34 public Node toXML(Node parent) { | |
35 Element ele = (Element) super.toXML(parent); | |
36 ele.setAttribute("type", "string"); | |
37 ele.setAttribute("choice", choiceType); | |
38 | |
39 return ele; | |
40 } | |
41 } | |
42 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |