Displaying differences for changeset
 
display as  

src/java/m/rhem/ApplicationConfig.java

@@ -5,7 +5,7 @@
 package m.rhem;
 
 import csip.Config;
-import csip.ContextConfig;
+
 import java.util.Set;
 import javax.servlet.ServletContext;
 import javax.ws.rs.core.Application;
@@ -26,8 +26,8 @@
   public Set<Class<?>> getClasses() {
     Set<Class<?>> resources = new java.util.HashSet<>();
     addRestResourceClasses(resources);
-    ContextConfig.filterServices(context, resources);
-    Config.register(resources);
+    
+    Config.register(resources, context);
     return resources;
   }
 

src/java/m/rhem/model/Parameter.java

@@ -5,7 +5,7 @@
  */
 package m.rhem.model;
 
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;

src/java/m/rhem/model/RhemModel.java

@@ -1,7 +1,7 @@
 
 package m.rhem.model;
 
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;

src/java/m/rhem/rhem01_runmodel/V1_0.java

@@ -11,10 +11,10 @@
  */
 package m.rhem.rhem01_runmodel;
 
-import csip.Executable;
+import csip.api.server.Executable;
 import csip.ModelDataService;
-import csip.PayloadParameter;
-import csip.ServiceException;
+import csip.api.server.PayloadParameter;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import java.io.IOException;

src/java/m/rhem/rhem01_runmodel/V2_0.java

@@ -11,10 +11,10 @@
  */
 package m.rhem.rhem01_runmodel;
 
-import csip.Executable;
+import csip.api.server.Executable;
 import csip.ModelDataService;
-import csip.ModelDataServiceCall;
-import csip.ServiceException;
+import csip.api.client.ModelDataServiceCall;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import java.io.IOException;
@@ -226,7 +226,7 @@
     results().put("POR", parameter.getPor(), "porosity");
     results().put("FRACT", parameter.getFract(), "list of particle class fractions");
 
-    double asl = new TextParser(sumFile).toLineContaining("Avg-Soil-Loss").rightOf("=").asDouble();
+    double asl = new TextParser(sumFile).toLineContaining("Avg-Soil-Loss").rightOfFirst("=").asDouble();
     results().put("TDS", Double.parseDouble(rhemModel.getTDS(asl)), "total dissolved solids");
 
     results().put("cli_station_id", res.getInt("stationId", 0));
@@ -241,7 +241,7 @@
     results().put("monthly_avg_precip", mavg, "monthly average precip", "mm");
 
     e = new TextParser(workspace().getFile(summaryFileName));
-    double yavg = e.toLineContaining("Avg. Precipitation").rightOf("=").asDouble();
+    double yavg = e.toLineContaining("Avg. Precipitation").rightOfFirst("=").asDouble();
     results().put("yearly_avg_precip", yavg, "yearly average precip", "mm");
 
     results().put(workspace().getFile(parameterFileName), "Parameter input file");

src/java/m/rhem/rhem01_runmodel/V2_1.java

@@ -11,10 +11,10 @@
  */
 package m.rhem.rhem01_runmodel;
 
-import csip.Executable;
+import csip.api.server.Executable;
 import csip.ModelDataService;
-import csip.ModelDataServiceCall;
-import csip.ServiceException;
+import csip.api.client.ModelDataServiceCall;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import java.io.IOException;
@@ -229,7 +229,7 @@
     results().put("fract", new TextParser(parameter.getFract(), "fract").nextLine().tokens().asDoubleArray(),
         "list of particle class fractions");
 
-    double asl = new TextParser(sumFile).toLineContaining("Avg-Soil-Loss").rightOf("=").asDouble();
+    double asl = new TextParser(sumFile).toLineContaining("Avg-Soil-Loss").rightOfFirst("=").asDouble();
     results().put("tds", Double.parseDouble(rhemModel.getTDS(asl)), "total dissolved solids");
 
     results().put("cli_station_id", res.getInt("stationId", 0));
@@ -247,52 +247,52 @@
     try (TextParser tp = new TextParser(sumFile).autoClose(false)) {
 
 //    Avg. Precipitation (mm/year) =        335.49133
-      double avg = tp.toLineContaining("Avg. Precipitation").rightOf("=").asDouble();
+      double avg = tp.toLineContaining("Avg. Precipitation").rightOfFirst("=").asDouble();
       results().put("avg_precip", avg, "yearly average precip", "mm/y");
 
 //  Avg-Runoff(mm/year)=          26.79858
-      avg = tp.toLineContaining("Avg-Runoff").rightOf("=").asDouble();
+      avg = tp.toLineContaining("Avg-Runoff").rightOfFirst("=").asDouble();
       results().put("avg_runoff", avg, "yearly average runoff", "mm/y");
 
 //  Avg-Soil-Loss(Mg/ha/year)=          0.32337
-      avg = tp.toLineContaining("Avg-Soil-Loss").rightOf("=").asDouble();
+      avg = tp.toLineContaining("Avg-Soil-Loss").rightOfFirst("=").asDouble();
       results().put("avg_soilloss", avg, "yearly average soil loss", "Mg/ha/y");
 
 //  Avg-SY(Mg/ha/year)=          0.32165
-      avg = tp.toLineContaining("Avg-SY").rightOf("=").asDouble();
+      avg = tp.toLineContaining("Avg-SY").rightOfFirst("=").asDouble();
       results().put("avg_sy", avg, "yearly sediment yield", "Mg/ha/y");
 
 // RETURN-FREQUENCY-RESULTS-YEARLY TOTALS
       //  Rain (mm)      326.50723      397.08432      434.37115      488.36038      506.88202      545.54865
-      double[] rf = tp.toLineContaining("Rain").rightOf(")").tokens().asDoubleArray();
+      double[] rf = tp.toLineContaining("Rain").rightOfFirst(")").tokens().asDoubleArray();
       results().put("retfreq_total_rain", rf, "rain return frequency, totals for years 2, 5, 10, 25, 50, 100", "mm");
 
       //  Runoff(mm)       22.74758       39.80891       51.82090       67.55290       80.73241       97.35841
-      rf = tp.toLineContaining("Runoff").rightOf(")").tokens().asDoubleArray();
+      rf = tp.toLineContaining("Runoff").rightOfFirst(")").tokens().asDoubleArray();
       results().put("retfreq_total_runoff", rf, "runoff return frequency, totals for years 2, 5, 10, 25, 50, 100", "mm");
 
       //  Soil-Loss(Mg/ha)        0.25164        0.48592        0.72893        0.98490        1.19312        1.60915
-      rf = tp.toLineContaining("Soil-Loss").rightOf(")").tokens().asDoubleArray();
+      rf = tp.toLineContaining("Soil-Loss").rightOfFirst(")").tokens().asDoubleArray();
       results().put("retfreq_total_soilloss", rf, "soil loss return frequency, totals for years 2, 5, 10, 25, 50, 100", "Mg/ha");
 
       //  Sediment-Yield(Mg/ha)        0.25011        0.48314        0.72740        0.98077        1.18747        1.60272
-      rf = tp.toLineContaining("Sediment-Yield").rightOf(")").tokens().asDoubleArray();
+      rf = tp.toLineContaining("Sediment-Yield").rightOfFirst(")").tokens().asDoubleArray();
       results().put("retfreq_total_sy", rf, "sediment yield return frequency, totals for years 2, 5, 10, 25, 50, 100", "Mg/ha");
 
 // RETURN-FREQUENCY-RESULTS-YEARLY MAXIMUM DAILY      
-      rf = tp.toLineContaining("Rain").rightOf(")").tokens().asDoubleArray();
+      rf = tp.toLineContaining("Rain").rightOfFirst(")").tokens().asDoubleArray();
       results().put("retfreq_dailymax_rain", rf, "rain return frequency, max daily for years 2, 5, 10, 25, 50, 100 ", "mm");
 
       //  Runoff(mm)       22.74758       39.80891       51.82090       67.55290       80.73241       97.35841
-      rf = tp.toLineContaining("Runoff").rightOf(")").tokens().asDoubleArray();
+      rf = tp.toLineContaining("Runoff").rightOfFirst(")").tokens().asDoubleArray();
       results().put("retfreq_dailymax_runoff", rf, "runoff return frequency, max daily for years 2, 5, 10, 25, 50, 100", "mm");
 
       //  Soil-Loss(Mg/ha)        0.25164        0.48592        0.72893        0.98490        1.19312        1.60915
-      rf = tp.toLineContaining("Soil-Loss").rightOf(")").tokens().asDoubleArray();
+      rf = tp.toLineContaining("Soil-Loss").rightOfFirst(")").tokens().asDoubleArray();
       results().put("retfreq_dailymax_soilloss", rf, "soil loss return frequency, max daily for years 2, 5, 10, 25, 50, 100", "Mg/ha");
 
       //  Sediment-Yield(Mg/ha)        0.25011        0.48314        0.72740        0.98077        1.18747        1.60272
-      rf = tp.toLineContaining("Sediment-Yield").rightOf(")").tokens().asDoubleArray();
+      rf = tp.toLineContaining("Sediment-Yield").rightOfFirst(")").tokens().asDoubleArray();
       results().put("retfreq_dailymax_sy", rf, "sediment yield return frequency, max daily for years 2, 5, 10, 25, 50, 100", "Mg/ha");
     }
 

src/java/m/rhem/rhem02_getclimatestations/V1_0.java

@@ -12,7 +12,7 @@
 package m.rhem.rhem02_getclimatestations;
 
 import csip.ModelDataService;
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import csip.utils.JSONUtils;

src/java/m/rhem/rhem03_compEsd/V1_0.java

@@ -16,7 +16,7 @@
 import gisobjects.GISObject;
 import gisobjects.GISObjectFactory;
 import csip.ModelDataService;
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import csip.utils.JSONUtils;

src/java/m/rhem/rhem03_compEsd/V2_0.java

@@ -16,7 +16,7 @@
 import gisobjects.GISObjectException;
 import gisobjects.GISObjectFactory;
 import csip.ModelDataService;
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import csip.SessionLogger;
 import csip.annotations.Polling;
 import csip.annotations.Resource;

src/java/m/rhem/rhem04_surfacetextureclasses/V1_0.java

@@ -12,7 +12,7 @@
 package m.rhem.rhem04_surfacetextureclasses;
 
 import csip.ModelDataService;
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import csip.utils.JSONUtils;

src/java/m/rhem/rhem05_slopeShapes/V1_0.java

@@ -12,7 +12,7 @@
 package m.rhem.rhem05_slopeShapes;
 
 import csip.ModelDataService;
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import csip.utils.JSONUtils;

src/java/m/rhem/rhem06_riskassessment/V1_0.java

@@ -11,9 +11,9 @@
  */
 package m.rhem.rhem06_riskassessment;
 
-import csip.Executable;
+import csip.api.server.Executable;
 import csip.ModelDataService;
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import static csip.annotations.ResourceType.OUTPUT;

src/java/m/rhem/rhem07_editparfile/V1_0.java

@@ -11,9 +11,9 @@
  */
 package m.rhem.rhem07_editparfile;
 
-import csip.Executable;
+import csip.api.server.Executable;
 import csip.ModelDataService;
-import csip.ServiceException;
+import csip.api.server.ServiceException;
 import csip.annotations.Polling;
 import csip.annotations.Resource;
 import java.io.File;

src/java/rhem/utils/RHEMUtils.java

@@ -11,8 +11,8 @@
  */
 package rhem.utils;
 
-import csip.PayloadParameter;
-import csip.ServiceException;
+import csip.api.server.PayloadParameter;
+import csip.api.server.ServiceException;
 import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
 import java.util.ArrayList;

web/WEB-INF/csip-defaults.json

@@ -1,5 +1,5 @@
 {  
-    "csip.context.version": "$version: 2.1.25 default 199 7a0a9e07b047 2021-02-05 od, built at 2021-03-15 18:51 by od$",
+    "csip.context.version": "$version: 2.1.28 default 202 b67d962d9367 2021-03-16 od, built at 2021-12-28 12:43 by od$",
     "csip.archive.max.filesize": "1KB",
     "esd.db": "jdbc:sqlserver://129.82.20.129:1433;databaseName=esd;user=sa;password=csurams#1",
     "crdb.db": "jdbc:sqlserver://129.82.20.129:1433;databaseName=conservation_resources;user=sa;password=csurams#1",