Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/TypeSection.java @ 3615:f84854eba0b3
Preparations for logo inclusion in charts.
flys-artifacts/trunk@5278 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 28 Aug 2012 12:47:11 +0000 |
parents | 76eeb3b4358e |
children | cbe2febe30cc |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/TypeSection.java Tue Aug 28 11:45:23 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/TypeSection.java Tue Aug 28 12:47:11 2012 +0000 @@ -1,5 +1,7 @@ package de.intevation.flys.exports; +import org.apache.log4j.Logger; + import de.intevation.artifactdatabase.state.Attribute; import de.intevation.artifactdatabase.state.DefaultSection; @@ -9,11 +11,29 @@ */ public class TypeSection extends DefaultSection { + private static final Logger logger = Logger.getLogger(TypeSection.class); + public TypeSection(String key) { super(key); } + public void setChoiceStringValue(String key, String value, String choiceType) { + if (value == null || value.length() == 0) { + return; + } + + Attribute attr = getAttribute(key); + if (attr == null) { + attr = new ChoiceStringAttribute(key, value, true, choiceType); + addAttribute(key, attr); + } + else { + attr.setValue(value); + } + } + + public void setStringValue(String key, String value) { if (value == null || value.length() == 0) { return; @@ -37,6 +57,8 @@ return (String) attr.getValue(); } + logger.debug("attribute " + key + " not found in typesection.getString"); + return null; }