comparison flys-artifacts/src/main/java/org/dive4elements/river/exports/VisibleAttribute.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/VisibleAttribute.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 import org.dive4elements.artifactdatabase.state.DefaultAttribute;
7
8
9 /**
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
11 */
12 public class VisibleAttribute extends DefaultAttribute {
13
14 protected boolean visible;
15
16
17 public VisibleAttribute(String name, Object value, boolean visible) {
18 super(name, value);
19 this.visible = visible;
20 }
21
22
23 /**
24 * This implementation of Attribute calls DefaultAttribute.toXML() first.
25 * After this, a new Attr <i>display</i> is added to the resulting Node.
26 *
27 * @param parent The parent Node.
28 *
29 * @return a new Node that represents this Attribute.
30 */
31 @Override
32 public Node toXML(Node parent) {
33 Element ele = (Element) super.toXML(parent);
34 ele.setAttribute("display", String.valueOf(visible));
35
36 return ele;
37 }
38 }
39 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org