teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5863: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5863: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.exports; ingo@1990: ingo@1990: import org.w3c.dom.Element; ingo@1990: import org.w3c.dom.Node; ingo@1990: ingo@1990: ingo@1990: /** ingo@1990: * @author Ingo Weinzierl ingo@1990: */ ingo@1990: public class IntegerAttribute extends VisibleAttribute { ingo@1990: ingo@1990: ingo@1990: public IntegerAttribute(String name, int value, boolean visible) { ingo@1990: super(name, value, visible); ingo@1990: } ingo@1990: ingo@1990: ingo@1990: /** ingo@1990: * Calls VisibleAttribute.toXML() and appends afterwards an attribute ingo@1990: * type with value integer. ingo@1990: * ingo@1990: * @param parent The parent Node. ingo@1990: * ingo@1990: * @return the new Node that represents this Attribute. ingo@1990: */ ingo@1990: @Override ingo@1990: public Node toXML(Node parent) { ingo@1990: Element ele = (Element) super.toXML(parent); ingo@1990: ele.setAttribute("type", "integer"); ingo@1990: ingo@1990: return ele; ingo@1990: } ingo@1990: } ingo@1990: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :