[PATCH 5 of 5] Added metadata to facets

Wald Commits scm-commit at wald.intevation.org
Wed May 21 11:43:52 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1400665390 -7200
# Branch facet-metadata
# Node ID 42076d94977e79fc96be28d684eaca28e96a615a
# Parent  56e7e6c18c26d6e352034fd1dd6f2021be9bf033
Added metadata to facets.

diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -40,6 +40,8 @@
         String      hash
     ) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.flow_velocity.section.yaxis.label");
     }
 
 
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -44,6 +44,8 @@
         String      hash
     ) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.flow_velocity.section.yaxis.label");
     }
 
 
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -42,6 +42,8 @@
         String      hash
     ) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedheight_middle.section.yaxis.label");
     }
 
 
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensityFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensityFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensityFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -36,6 +36,8 @@
     public BedDensityFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedquality.yaxis.label.density");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterDataFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterDataFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterDataFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -28,6 +28,8 @@
         String hash
     ) {
         super(ndx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedquality.yaxis.label.diameter");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -36,6 +36,8 @@
     public BedDiameterFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedquality.yaxis.label.diameter");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -30,6 +30,8 @@
     public BedDiffEpochFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.beddifference.height.yaxis.label");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFilterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFilterFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFilterFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -34,6 +34,8 @@
     public BedDiffEpochFilterFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.beddifference.height.yaxis.label");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -30,6 +30,8 @@
     public BedDiffYearFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.beddifference.axis.label.y");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFilterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFilterFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFilterFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -34,6 +34,8 @@
     public BedDiffYearFilterFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.beddifference.height.yaxis.label");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -28,6 +28,8 @@
         this.description = description;
         this.type = type;
         this.index = 0;
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedheight.height.yaxis.label");
     }
 
     /**
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingleData.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingleData.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingleData.java	Wed May 21 11:43:10 2014 +0200
@@ -82,6 +82,9 @@
 
     public double getWidth(double station) {
         int ndx = this.station.indexOf(station);
+        if (ndx < 0) {
+            return Double.NaN;
+        }
         return width.get(ndx);
     }
 }
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorosityFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorosityFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorosityFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -36,6 +36,8 @@
     public BedPorosityFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedquality.yaxis.label.porosity");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -29,6 +29,8 @@
         String hash
     ) {
         super(ndx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedquality.yaxis.label.diameter");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -37,6 +37,8 @@
     public BedloadDiameterFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedquality.yaxis.label.diameter");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -29,6 +29,8 @@
         this.name = name;
         this.description = description;
         this.index = 0;
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.flow_velocity.section.yaxis.label");
     }
 
 
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -36,6 +36,8 @@
     public MorphologicWidthFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.beddifference.yaxis.label.morph");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -42,6 +42,8 @@
     public PorosityFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.bedquality.yaxis.label.porosity");
     }
 
     public Object getData(Artifact artifact, CallContext context) {
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -39,6 +39,8 @@
     public SedimentDensityFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "chart.yaxis.label.sedimentdensity");
     }
 
     @Override
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -54,6 +54,8 @@
     public SedimentLoadFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "");
     }
 
     @Override
diff -r 56e7e6c18c26 -r 42076d94977e artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadUnknownFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadUnknownFacet.java	Wed May 21 11:41:06 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadUnknownFacet.java	Wed May 21 11:43:10 2014 +0200
@@ -22,6 +22,8 @@
     public SedimentLoadUnknownFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
+        this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
+        this.metaData.put("Y", "");
     }
 
     /** Get data from SedimentLoad with unknown type, from factory. */


More information about the Dive4Elements-commits mailing list