view gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultInputData.java @ 605:e8ebdbc7f1e3

First step of removing the cache blob. The static part of the describe document will be created by using the input data stored at each state. Some TODOs left (see ChangeLog). gnv-artifacts/trunk@671 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 09 Feb 2010 14:27:55 +0000
parents 9681ac6b6527
children 292fbcd5e9ac
line wrap: on
line source
/**
 *
 */
package de.intevation.gnv.state;

/**
 * @author Tim Englich <tim.englich@intevation.de>
 * 
 */
public class DefaultInputData implements InputData {

    /**
     *
     */
    private static final long serialVersionUID = 4308041648698108066L;
    
    private final static String VALUE_SEPARATOR = " , ";

    private String name = null;
    private String value = null;

    /**
     * Constructor
     */
    public DefaultInputData(String name, String value) {
        this.name = name;
        this.value = value;
    }

    /**
     * @see de.intevation.gnv.state.InputData#getName()
     */
    public String getName() {
        return this.name;
    }

    /**
     * @see de.intevation.gnv.state.InputData#getValue()
     */
    public String getValue() {
        return this.value;
    }

    /**
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return this.name + "==> " + this.value;
    }

    /**
     * @see de.intevation.gnv.state.InputData#concartValue(java.lang.String)
     */
    public void concartValue(String value) {
        this.value = this.value + VALUE_SEPARATOR + value;
    }

    /**
     * @see de.intevation.gnv.state.InputData#splitValue()
     */
    public String[] splitValue() {
        if (this.value != null){
            return this.value.split(VALUE_SEPARATOR);
        }
        return null;
    }

}

http://dive4elements.wald.intevation.org