Displaying differences for changeset
 
display as  

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

@@ -186,22 +186,34 @@
                 }
                 while ((line = bufferedReader.readLine()) != null) {
                     counter++;
-                    String[] test = line.split("\\s+");
-                    for (int i = 1; i < test.length; i++) {
-                        switch (counter) {
-                            case 13:
-                                if (i == 1) {
-                                    writer.print(String.format("%-28s", "Precipitation(mm)"));
-                                    i = 2;
-                                } else {
-                                    writer.print(String.format("%-28s", test[i]));
-                                }
-                                break;
-                            default:
+                    if (line.toLowerCase().contains("variable")) {
+                        int c = 0;
+                        if (c < 4) {
+                            String[] test = line.split("\\s+");
+                            for (int i = 1; i < test.length; i++) {
                                 writer.print(String.format("%-28s", test[i]));
-                                break;
+                            }
                         }
+                        c++;
+                    } else {
+                        writer.print(line);
                     }
+//                    String[] test = line.split("\\s+");
+//                    for (int i = 1; i < test.length; i++) {
+////                        switch (counter) {
+////                            case 13:
+////                                if (i == 1) {
+////                                    writer.print(String.format("%-28s", "Precipitation(mm)"));
+////                                    i = 2;
+////                                } else {
+////                                    writer.print(String.format("%-28s", test[i]));
+////                                }
+////                                break;
+////                            default:
+////                                writer.print(String.format("%-28s", test[i]));
+////                                break;
+////                        }
+//                    }
                     writer.println();
                 }
                 bufferedReader.close();

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

@@ -32,6 +32,7 @@
 import m.rhem.model.RhemModel;
 import csip.annotations.Description;
 import csip.annotations.Name;
+import static csip.annotations.ResourceType.OUTPUT;
 import rhem.utils.DBQueries;
 import static rhem.utils.DBResources.RHEM_EXE;
 import rhem.utils.DBResources;
@@ -51,6 +52,7 @@
 @Path("m/rhem/runrhem/1.0")
 @Polling(first = 10000, next = 2000)
 @Resource(from = DBResources.class)
+@Resource(file = "*", type = OUTPUT)
 
 public class V1_0 extends ModelDataService {