Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/AnalysisPeriods.java @ 2651:9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
analysis.
flys-artifacts/trunk@4312 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 26 Apr 2012 15:08:51 +0000 |
parents | |
children | 15523818eae4 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/AnalysisPeriods.java Thu Apr 26 15:08:51 2012 +0000 @@ -0,0 +1,99 @@ +package de.intevation.flys.artifacts.states.fixation; + +import org.apache.log4j.Logger; + +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +import de.intevation.artifacts.Artifact; +import de.intevation.artifacts.CallContext; + +import de.intevation.artifacts.common.utils.XMLUtils; + +import de.intevation.artifactdatabase.ProtocolUtils; +import de.intevation.artifactdatabase.data.StateData; + +import de.intevation.flys.artifacts.FLYSArtifact; +import de.intevation.flys.artifacts.resources.Resources; +import de.intevation.flys.artifacts.states.DefaultState; + + +/** + * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> + */ +public class AnalysisPeriods extends DefaultState { + + /** The logger used in this class. */ + private static Logger logger = Logger.getLogger(AnalysisPeriods.class); + + + /** + * The default constructor that initializes an empty State object. + */ + public AnalysisPeriods() { + } + + + /** + * Initialize the state based on the state node in the configuration. + * + * @param config The state configuration node. + */ + public void setup(Node config) { + super.setup(config); + } + + + protected Element createData( + XMLUtils.ElementCreator cr, + Artifact artifact, + StateData data, + CallContext context) + { + Element select = ProtocolUtils.createArtNode( + cr, "select", + new String[] { "uiprovider" }, + new String[] { "time_range_selector" }); + cr.addAttr(select, "name", data.getName(), true); + + Element label = ProtocolUtils.createArtNode( + cr, "label", null, null); + + select.appendChild(label); + + label.setTextContent(Resources.getMsg( + context.getMeta(), + getID(), + getID())); + + return select; + } + + + @Override + protected Element[] createItems( + XMLUtils.ElementCreator cr, + Artifact artifact, + String name, + CallContext context) + { + return null; + } + + + protected Object getLower(FLYSArtifact artifact) { + return null; + } + + + protected Object getUpper(FLYSArtifact artifact) { + return null; + } + + + @Override + protected String getUIProvider() { + return "time_range_selector"; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :