comparison artifacts/src/main/java/org/dive4elements/river/exports/ChoiceStringAttribute.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-artifacts/src/main/java/org/dive4elements/river/exports/ChoiceStringAttribute.java@bd047b71ab37
children 4897a58c8746
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
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 :

http://dive4elements.wald.intevation.org