Mercurial > dive4elements > river
changeset 8853:8c64617a7991
Some source code comments and fixme's
author | gernotbelger |
---|---|
date | Thu, 18 Jan 2018 18:33:52 +0100 |
parents | 8f6d6d26e96f |
children | 7bbfb24e6eec |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java gwt-client/src/main/webapp/WEB-INF/web.xml |
diffstat | 7 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java Thu Jan 18 18:32:30 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java Thu Jan 18 18:33:52 2018 +0100 @@ -104,12 +104,14 @@ */ @Override public Facet deepCopy() { + // FIXME: why not use the full constructor instead? would also fix the next problem DataFacet copy = new DataFacet(); + // FIXME: usage of internal knowledge of parent class... + // Either the set method should be correctly overwritten, or implement a correct copy-constructor! copy.set(this); copy.type = type; copy.hash = hash; copy.stateId = stateId; return copy; } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : +} \ No newline at end of file
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java Thu Jan 18 18:32:30 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java Thu Jan 18 18:33:52 2018 +0100 @@ -109,6 +109,7 @@ /** * Access the data (wkms) of an artifact, coded in mingle. */ + // FIXME: meanwhile used by several places outside this context; refactor into separate helper class to access waterlevels public WKms getWKms(String mingle, CallContext context, double from, double to) { log.debug("WDifferencesState.getWKms " + mingle); String[] def = mingle.split(";");
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java Thu Jan 18 18:32:30 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java Thu Jan 18 18:33:52 2018 +0100 @@ -89,6 +89,9 @@ @Override public String getAxisLabel(DiagramGenerator generator) { if (yAxisLabel != null && !yAxisLabel.isEmpty()) { + // FIXME/UNINTENDED: yAxisLabel is probably a resolved message (side-effect of StyledXYSeries#putMetadata), + // and cannot be resolved again. + // An explicit (German) default label is therefore given here, probably the English version will also show German (CHECK) return generator.msg(yAxisLabel, I18N_AXIS_LABEL_DEFAULT); } return generator.msg(
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java Thu Jan 18 18:32:30 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java Thu Jan 18 18:33:52 2018 +0100 @@ -137,6 +137,7 @@ @Override + // FIXME: bad! method with undocumented side-effects; given metadata will be changed inline public void putMetaData(Map<String, String> metaData, Artifact artifact, CallContext context) { @@ -146,6 +147,7 @@ String unit = ""; if (river != null) { rivername = river.getName(); + // FIXME: this will always return the wst unit, regardless if the series is a water level or not! unit = river.getWstUnit().getName(); } if (metaData.containsKey("X")) {
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java Thu Jan 18 18:32:30 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java Thu Jan 18 18:33:52 2018 +0100 @@ -199,6 +199,9 @@ this.parameterList = new ParameterList( flys, this, + // FIXME: literally every information about the artifact is transported from the server side + // but... the international name is resolved client-side.... Instead also transport the description of the artifact and use it! + // FIXME: the same holds for a very few other international strings (e.g. names of facets used in Tabs) messages.getString(artifact.getName()), artifact); }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java Thu Jan 18 18:32:30 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java Thu Jan 18 18:33:52 2018 +0100 @@ -84,6 +84,8 @@ account.setAttribute("name", user.getAccount()); //TODO create roles + // FIXME: not creating the roles will write an broken xmldocument (only header) into the artifacts db + // which in turn will result in an exception (which is handled) artuser.appendChild(account); action.appendChild(type); action.appendChild(artuser);
--- a/gwt-client/src/main/webapp/WEB-INF/web.xml Thu Jan 18 18:32:30 2018 +0100 +++ b/gwt-client/src/main/webapp/WEB-INF/web.xml Thu Jan 18 18:33:52 2018 +0100 @@ -85,6 +85,8 @@ <url-pattern>/flys/user</url-pattern> </servlet-mapping> + <!-- FIXME: mixing the order of elements here i.e. (servlet - servlet-mapping - servlet) results in errors when validating against the official DTD --> + <servlet> <servlet-name>server-info</servlet-name> <servlet-class>org.dive4elements.river.client.server.ServerInfoServiceImpl</servlet-class>