teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5994: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5994: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.themes; ingo@340: ingo@340: import org.w3c.dom.Document; ingo@340: ingo@340: ingo@340: /** ingo@340: * @author Ingo Weinzierl ingo@340: */ ingo@340: public interface ThemeField { ingo@340: ingo@340: /** ingo@340: * Returns the name of this field. ingo@340: * ingo@340: * @return the name of this field. ingo@340: */ ingo@340: String getName(); ingo@340: ingo@340: /** ingo@340: * Returns the type of this field. ingo@340: * ingo@340: * @return the type of this field. ingo@340: */ ingo@340: String getType(); ingo@340: ingo@340: ingo@340: /** ingo@340: * Returns the value of this field. ingo@340: * ingo@340: * @return the value of this field. ingo@340: */ ingo@340: Object getValue(); ingo@340: ingo@340: ingo@340: /** ingo@340: * Changes the value of this field. ingo@340: * ingo@340: * @param value The new value. ingo@340: */ ingo@340: void setValue(Object value); ingo@340: ingo@340: ingo@340: /** ingo@340: * Sets the value of an attribute. ingo@340: * ingo@340: * @param name The name of an attribute. ingo@340: * @param value The value of an attribute. ingo@340: */ ingo@340: void setAttribute(String name, Object value); ingo@340: ingo@340: ingo@340: /** ingo@340: * Dumps the field to XML. ingo@340: * ingo@340: * @return a document. ingo@340: */ ingo@340: Document toXML(); ingo@340: } ingo@340: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :