changeset 8407:f1f6e32156a6

Put date range into facet descriptions for curve and measurements.
author Tom Gottfried <tom@intevation.de>
date Tue, 14 Oct 2014 15:22:11 +0200
parents 6ae0c5116d58
children 6c16b61ba9eb
files artifacts/src/main/java/org/dive4elements/river/artifacts/states/SQRelation.java artifacts/src/main/resources/messages.properties artifacts/src/main/resources/messages_de.properties artifacts/src/main/resources/messages_de_DE.properties artifacts/src/main/resources/messages_en.properties
diffstat 5 files changed, 47 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SQRelation.java	Tue Oct 14 12:41:37 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SQRelation.java	Tue Oct 14 15:22:11 2014 +0200
@@ -175,10 +175,11 @@
     ) {
         log.debug("SQRelation.computeAdvance");
 
+        SQRelationAccess sqAccess = new SQRelationAccess(artifact);
+
         CalculationResult res = old instanceof CalculationResult
             ? (CalculationResult)old
-            : new SQRelationCalculation(
-                new SQRelationAccess(artifact)).calculate();
+            : new SQRelationCalculation(sqAccess).calculate();
 
         if (facets == null) {
             return res;
@@ -189,7 +190,7 @@
             return res;
         }
 
-        createFacets(context, facets, sqr, hash);
+        createFacets(context, facets, sqAccess, sqr, hash);
 
         Facet csv = new DataFacet(
             CSV, "CSV data", ComputeType.ADVANCE, hash, id);
@@ -207,6 +208,7 @@
     protected void createFacets(
         CallContext context,
         List<Facet> container,
+        SQRelationAccess access,
         SQResult[]  sqr,
         String      hash
     ) {
@@ -231,7 +233,10 @@
                     Resources.getMsg(
                         meta,
                         I18N_FACET_CURVE,
-                        I18N_FACET_CURVE
+                        new Object[] {
+                            access.getPeriod().getFrom(),
+                            access.getPeriod().getTo()
+                            }
                     ),
                     hash,
                     stateId
@@ -245,7 +250,10 @@
                     Resources.getMsg(
                         meta,
                         I18N_FACET_CURVE,
-                        I18N_FACET_CURVE
+                        new Object[] {
+                            access.getPeriod().getFrom(),
+                            access.getPeriod().getTo()
+                            }
                     ),
                     hash,
                     stateId
@@ -273,7 +281,6 @@
                             Resources.getMsg(
                                 meta,
                                 I18N_FACET_OUTLIERS,
-                                I18N_FACET_OUTLIERS,
                                 round
                             ),
                         hash,
@@ -287,7 +294,6 @@
                         Resources.getMsg(
                             meta,
                             I18N_FACET_OUTLIERS,
-                            I18N_FACET_OUTLIERS,
                             round
                         ),
                         hash,
@@ -301,7 +307,6 @@
                         Resources.getMsg(
                             meta,
                             I18N_FACET_OUTLIER_CURVE,
-                            I18N_FACET_OUTLIER_CURVE,
                             round
                         ),
                         hash,
@@ -315,7 +320,6 @@
                         Resources.getMsg(
                             meta,
                             I18N_FACET_OUTLIER_CURVE,
-                            I18N_FACET_OUTLIER_CURVE,
                             round
                         ),
                         hash,
@@ -329,7 +333,6 @@
                         Resources.getMsg(
                             meta,
                             I18N_FACET_OUTLIER_MEASUREMENT,
-                            I18N_FACET_OUTLIER_MEASUREMENT,
                             round
                         ),
                         hash,
@@ -343,7 +346,6 @@
                         Resources.getMsg(
                             meta,
                             I18N_FACET_OUTLIER_MEASUREMENT,
-                            I18N_FACET_OUTLIER_MEASUREMENT,
                             round
                         ),
                         hash,
@@ -358,7 +360,10 @@
                     Resources.getMsg(
                         meta,
                         I18N_FACET_MEASUREMENTS,
-                        I18N_FACET_MEASUREMENTS
+                        new Object[] {
+                            access.getPeriod().getFrom(),
+                            access.getPeriod().getTo()
+                            }
                     ),
                     hash,
                     stateId
@@ -371,7 +376,10 @@
                     Resources.getMsg(
                         meta,
                         I18N_FACET_MEASUREMENTS,
-                        I18N_FACET_MEASUREMENTS
+                        new Object[] {
+                            access.getPeriod().getFrom(),
+                            access.getPeriod().getTo()
+                            }
                     ),
                     hash,
                     stateId
--- a/artifacts/src/main/resources/messages.properties	Tue Oct 14 12:41:37 2014 +0200
+++ b/artifacts/src/main/resources/messages.properties	Tue Oct 14 15:22:11 2014 +0200
@@ -242,18 +242,18 @@
 
 chart.sq_relation.xaxis.label = Discharge [m\u00b3/s]
 chart.sq_relation.yaxis.label = Transport [kg/s]
-chart.sq_relation_a.title = Feinkornanteil
-chart.sq_relation_b.title = Sand (Suspensionstransport)
-chart.sq_relation_c.title = Sand (Geschiebetransport)
-chart.sq_relation_d.title = Fein- und Mittelkies
-chart.sq_relation_e.title = Grobkornanteil (> Mittelkies)
-chart.sq_relation_f.title = Geschiebetransport gesamt
-facet.sq_relation.curve = Potenziell (Geschiebedaten)
+chart.sq_relation_a.title = Fine material
+chart.sq_relation_b.title = Sand (suspended)
+chart.sq_relation_c.title = Sand (bed load)
+chart.sq_relation_d.title = Fine/middle gravel
+chart.sq_relation_e.title = Coarse gravel
+chart.sq_relation_f.title = Total bed load
+facet.sq_relation.curve = Potential (bed load {0,date} - {1,date})
+facet.sq_relation.measurements = Bed load {0,date} - {1,date}
 facet.sq_relation.static_data = {0} to {1}
-facet.sq_relation.measurements = Geschiebedaten
-facet.sq_relation.outliers = Ausrei\u00dfer Durchgang {0}
-facet.sq_relation.outlier.curve = Potenziell Durchgang {0}
-facet.sq_relation.outlier.measurement = Geschiebedaten Durchgang {0}
+facet.sq_relation.outliers = Outliers pass {0}
+facet.sq_relation.outlier.curve = Potential pass {0}
+facet.sq_relation.outlier.measurement = bed load data pass {0}
 
 sedimentdensity = sediment density
 coarse = Coarse gravel
--- a/artifacts/src/main/resources/messages_de.properties	Tue Oct 14 12:41:37 2014 +0200
+++ b/artifacts/src/main/resources/messages_de.properties	Tue Oct 14 15:22:11 2014 +0200
@@ -248,8 +248,8 @@
 chart.sq_relation_d.title = Fein- und Mittelkies
 chart.sq_relation_e.title = Grobkornanteil (> Mittelkies)
 chart.sq_relation_f.title = Geschiebetransport gesamt
-facet.sq_relation.curve = Potenziell (Geschiebedaten)
-facet.sq_relation.measurements = Geschiebedaten
+facet.sq_relation.curve = Potenziell (Geschiebedaten {0,date} - {1,date})
+facet.sq_relation.measurements = Geschiebedaten {0,date} - {1,date}
 facet.sq_relation.static_data = {0} bis {1}
 facet.sq_relation.outliers = Ausrei\u00dfer Durchgang {0}
 facet.sq_relation.outlier.curve = Potenziell Durchgang {0}
--- a/artifacts/src/main/resources/messages_de_DE.properties	Tue Oct 14 12:41:37 2014 +0200
+++ b/artifacts/src/main/resources/messages_de_DE.properties	Tue Oct 14 15:22:11 2014 +0200
@@ -247,8 +247,8 @@
 chart.sq_relation_d.title = Fein- und Mittelkies
 chart.sq_relation_e.title = Grobkornanteil (> Mittelkies)
 chart.sq_relation_f.title = Geschiebetransport gesamt
-facet.sq_relation.curve = Potenziell (Geschiebedaten)
-facet.sq_relation.measurements = Geschiebedaten
+facet.sq_relation.curve = Potenziell (Geschiebedaten {0,date} - {1,date})
+facet.sq_relation.measurements = Geschiebedaten {0,date} - {1,date}
 facet.sq_relation.static_data = {0} bis {1}
 facet.sq_relation.outliers = Ausrei\u00dfer Durchgang {0}
 facet.sq_relation.outlier.curve = Potenziell Durchgang {0}
--- a/artifacts/src/main/resources/messages_en.properties	Tue Oct 14 12:41:37 2014 +0200
+++ b/artifacts/src/main/resources/messages_en.properties	Tue Oct 14 15:22:11 2014 +0200
@@ -244,18 +244,18 @@
 
 chart.sq_relation.xaxis.label = Discharge [m\u00b3/s]
 chart.sq_relation.yaxis.label = Transport [kg/s]
-chart.sq_relation_a.title = Feinkornanteil
-chart.sq_relation_b.title = Sand (Suspensionstransport)
-chart.sq_relation_c.title = Sand (Geschiebetransport)
-chart.sq_relation_d.title = Fein- und Mittelkies
-chart.sq_relation_e.title = Grobkornanteil (> Mittelkies)
-chart.sq_relation_f.title = Geschiebetransport gesamt
-facet.sq_relation.curve = Potenziell (Geschiebedaten)
-facet.sq_relation.measurements = Geschiebedaten
+chart.sq_relation_a.title = Fine material
+chart.sq_relation_b.title = Sand (suspended)
+chart.sq_relation_c.title = Sand (bed load)
+chart.sq_relation_d.title = Fine/middle gravel
+chart.sq_relation_e.title = Coarse gravel
+chart.sq_relation_f.title = Total bed load
+facet.sq_relation.curve = Potential (bed load {0,date} - {1,date})
+facet.sq_relation.measurements = Bed load {0,date} - {1,date}
 facet.sq_relation.static_data = {0} to {1}
-facet.sq_relation.outliers = Ausrei\u00dfer Durchgang {0}
-facet.sq_relation.outlier.curve = Potenziell Durchgang {0}
-facet.sq_relation.outlier.measurement = Geschiebedaten Durchgang {0}
+facet.sq_relation.outliers = Outliers pass {0}
+facet.sq_relation.outlier.curve = Potential pass {0}
+facet.sq_relation.outlier.measurement = bed load data pass {0}
 
 sedimentdensity = sediment density
 coarse = Coarse gravel

http://dive4elements.wald.intevation.org