ingo@1115: /* ingo@1115: * Copyright (c) 2010 by Intevation GmbH ingo@1115: * ingo@1115: * This program is free software under the LGPL (>=v2.1) ingo@1115: * Read the file LGPL.txt coming with the software for details ingo@1115: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@1115: */ ingo@1115: ingo@785: package de.intevation.gnv.state; ingo@785: ingo@785: /** ingo@796: * This class is used to save the relation between two attributes. Mainly used ingo@796: * to save the relation between a measurement and the parameter it belongs to. sascha@803: * ingo@796: * @see MeasurementState ingo@785: * @author Ingo Weinzierl ingo@785: */ ingo@785: public class ExtendedInputData extends DefaultInputData { ingo@785: ingo@796: /** ingo@796: * The separater used to separate measurement ids and parameter ids. ingo@796: */ ingo@785: public static final String SEPARATOR = ";"; ingo@785: ingo@796: /** ingo@796: * The parameter this object belongs to. ingo@796: */ ingo@785: protected String parameterid; ingo@785: ingo@796: /** ingo@796: * Constructcor. ingo@796: * ingo@796: * @param name ingo@796: * @param value ingo@796: * @param object ingo@796: * @param parameterid ingo@796: */ ingo@785: public ExtendedInputData( ingo@785: String name, ingo@785: String value, ingo@785: Object object, ingo@785: String parameterid) ingo@785: { ingo@785: super(name, value, object); ingo@785: this.parameterid = parameterid; ingo@785: } ingo@785: ingo@796: /** ingo@796: * Return the parameter ids this object belongs to. ingo@796: * ingo@796: * @return the parameter id. ingo@796: */ ingo@785: public String getParameterID() { ingo@785: return parameterid; ingo@785: } ingo@785: ingo@796: /** ingo@796: * Set the parameter ids. ingo@796: * ingo@796: * @param parameterid Parameter ids. ingo@796: */ ingo@785: public void setParameter(String parameterid) { ingo@785: this.parameterid = parameterid; ingo@785: } ingo@786: ingo@796: /** ingo@796: * Return all parameter ids as array. ingo@796: * ingo@796: * @return Array of parameter ids. ingo@796: */ ingo@786: public String[] splitParameter() { ingo@786: if (parameterid != null) ingo@786: return parameterid.split(SEPARATOR); ingo@786: ingo@786: return null; ingo@786: } ingo@785: } ingo@785: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :