Mercurial > dive4elements > river
changeset 6326:5c880567a020
Artifacts: Moved code from WINFO artifact into state where it belongs.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 13 Jun 2013 12:48:12 +0200 |
parents | ee701de9c875 |
children | 447ed3dee890 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java |
diffstat | 2 files changed, 5 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java Thu Jun 13 11:43:02 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java Thu Jun 13 12:48:12 2013 +0200 @@ -1153,13 +1153,5 @@ return values.toNativeArray(); } - - /** - * Returns the WstValueTable of current river. - */ - public WstValueTable getWstValueTable() { - River r = RiverUtils.getRiver(this); - return WstValueTableFactory.getTable(r); - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java Thu Jun 13 11:43:02 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java Thu Jun 13 12:48:12 2013 +0200 @@ -34,6 +34,7 @@ import org.dive4elements.river.artifacts.model.WstFactory; import org.dive4elements.river.artifacts.model.WstValueTable; +import org.dive4elements.river.artifacts.model.WstValueTableFactory; import org.dive4elements.river.artifacts.resources.Resources; import org.dive4elements.river.utils.RiverUtils; @@ -423,7 +424,8 @@ logger.debug("WQSelect.determineMinMaxWFree"); WINFOArtifact winfo = (WINFOArtifact) artifact; - WstValueTable valueTable = winfo.getWstValueTable(); + WstValueTable valueTable = WstValueTableFactory.getTable( + RiverUtils.getRiver(winfo)); double[] minmaxW = null; if(valueTable != null) { @@ -485,7 +487,8 @@ logger.debug("WQSelect.determineMinMaxQ"); WINFOArtifact winfo = (WINFOArtifact) artifact; - WstValueTable valueTable = winfo.getWstValueTable(); + WstValueTable valueTable = WstValueTableFactory.getTable( + RiverUtils.getRiver(winfo)); double[] minmaxQ = null; if(valueTable != null) {