felix@2723: package de.intevation.flys.artifacts.states; felix@2723: felix@2723: import java.util.List; felix@2723: felix@2723: import org.apache.log4j.Logger; felix@2723: felix@2723: import de.intevation.artifacts.CallMeta; felix@2723: felix@2723: import de.intevation.artifactdatabase.state.Facet; felix@2723: felix@2723: import de.intevation.flys.artifacts.FLYSArtifact; felix@2723: felix@2723: import de.intevation.flys.artifacts.model.GaugeDischargeFacet; felix@2723: import de.intevation.flys.artifacts.model.FacetTypes; felix@2723: felix@2723: import de.intevation.flys.artifacts.resources.Resources; felix@2723: felix@2723: felix@2723: /** felix@2723: * The only state for an GaugeDischargeState (River and km known). felix@2723: */ felix@2723: public class GaugeDischargeState felix@2723: extends DefaultState felix@2723: implements FacetTypes felix@2723: { felix@2723: /** Developer-centric description of facet. */ felix@2723: public static final String I18N_DESCRIPTION = "facet.discharge.curve"; felix@2723: felix@2723: /** The logger that is used in this state. */ felix@2723: private static final Logger logger = Logger.getLogger(GaugeDischargeState.class); felix@2723: felix@2723: felix@2723: /** felix@2723: * Add an GaugeDischargeFacet to list of Facets. felix@2723: * felix@2723: * @param artifact Ignored. felix@2723: * @param hash Ignored. felix@2723: * @param context Ignored. felix@2723: * @param meta CallMeta to be used for internationalization. felix@2723: * @param facets List to add AnnotationFacet to. felix@2723: * felix@2723: * @return null. felix@2723: */ felix@2723: @Override felix@2723: public Object computeInit( felix@2723: FLYSArtifact artifact, felix@2723: String hash, felix@2723: Object context, felix@2723: CallMeta meta, felix@2723: List facets felix@2723: ) { felix@2723: logger.debug("GaugeDischargeState.computeInit()"); felix@2723: felix@2723: // TODO caching, / CalculationResultusage felix@2723: felix@2723: GaugeDischargeFacet facet = new GaugeDischargeFacet( felix@2723: 0, felix@2723: DISCHARGE_CURVE, felix@2723: DISCHARGE_CURVE); felix@2723: //Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION)); felix@2723: facets.add(facet); felix@2723: felix@2723: return null; felix@2723: } felix@2723: // computeAdvance felix@2723: //WINFOArtifact#getDischargeCurveData felix@2723: felix@2723: } felix@2723: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :