raimund@1439: package de.intevation.flys.client.shared.model; raimund@1439: raimund@1439: import java.util.HashMap; raimund@1439: import java.util.ArrayList; raimund@1439: raimund@1439: /** raimund@1439: * @author Raimund Renkert raimund@1439: */ raimund@1439: public class PropertySetting implements Property { raimund@1439: raimund@1439: /**The settings name.*/ raimund@1439: protected String name; raimund@1439: raimund@1439: /** The default value.*/ raimund@1439: protected String value; raimund@1439: raimund@1439: /** Additional attributes.*/ raimund@1439: protected HashMap attributes; raimund@1439: raimund@1439: /** raimund@1439: * Create a new StyleSetting for theme attribution. raimund@1439: */ raimund@1439: public PropertySetting() { raimund@1439: this.attributes = new HashMap(); raimund@1439: } raimund@1439: raimund@1439: raimund@1439: /** raimund@1439: * Create a new PropertySet. raimund@1439: * @param name The attribute name. raimund@1439: * @param value The current value. raimund@1439: */ raimund@1439: public PropertySetting( raimund@1439: String name, raimund@1439: String value) raimund@1439: { raimund@1439: this.name = name; raimund@1439: this.value = value; raimund@1439: this.attributes = new HashMap(); raimund@1439: } raimund@1439: raimund@1439: public void setName(String name) { raimund@1439: this.name = name; raimund@1439: } raimund@1439: raimund@1439: public void setValue(String value) { raimund@1439: this.value = value; raimund@1439: } raimund@1439: raimund@1478: public void setAttribute(String k, String v) { raimund@1478: attributes.put(k, v); raimund@1439: } raimund@1439: raimund@1439: public String getName() { raimund@1439: return this.name; raimund@1439: } raimund@1439: raimund@1439: public String getValue() { raimund@1439: return this.value; raimund@1439: } raimund@1439: raimund@1439: public String getAttribute(String key) { raimund@1439: return attributes.get(key); raimund@1439: } raimund@1439: raimund@1439: public ArrayList getAttributeList() { raimund@1439: return new ArrayList(attributes.keySet()); raimund@1439: } raimund@1439: } raimund@1439: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :