@@ -96,22 +96,33 @@ |
//gets |
public String getElevationGraphTitle(){ |
if (downstreamCalculation){ |
- return "Downstream Elevation Profile.png"; |
+ return "Downstream Elevation Profile"; |
} |
else{ |
- return "Upstream Elevation Profile.png"; |
+ return "Upstream Elevation Profile"; |
} |
} |
- public String getElevationGraphOutputName(){ |
+ public String getElevationGraph(){ |
if (downstreamCalculation){ |
- String title = "_" + measuredDownstreamDepth + "m_StartDepth_DownstreamElevationProfile.png"; |
+ String title = "_" + measuredDownstreamDepth + "m_StartDepth_DownstreamElevationProfile.jpg"; |
return title; |
} |
else{ |
- String title = "_" + measuredDownstreamDepth + "m_StartDepth_UpstreamElevationProfile.png"; |
+ String title = "_" + measuredDownstreamDepth + "m_StartDepth_UpstreamElevationProfile.jpg"; |
return title; |
} |
} |
+ |
+ public File getElevationGraphOutput(){ |
+ if (downstreamCalculation){ |
+ String title = "_" + measuredDownstreamDepth + "m_StartDepth_DownstreamElevationProfile.out"; |
+ return new File(mainFolder, title); |
+ } |
+ else{ |
+ String title = "_" + measuredDownstreamDepth + "m_StartDepth_UpstreamElevationProfile.out"; |
+ return new File(mainFolder, title); |
+ } |
+ } |
public String getSummaryTitle(){ |
if (downstreamCalculation){ |
return " Downstream Summary Data"; |
@@ -120,7 +131,7 @@ |
return " Upstream Summary Data"; |
} |
} |
- public String getSummaryOutputName(){ |
+ public String getSummary(){ |
if (downstreamCalculation){ |
String title = "_" + measuredDownstreamDepth + "m_StartDepth_DownstreamData.txt"; |
return title; |
@@ -375,7 +386,7 @@ |
graphLongitudinalProfile(crossSectionResultsArray, |
numberOfReaches, |
getElevationGraphTitle(), |
- getElevationGraphOutputName(), |
+ getElevationGraph(), |
"Water Surface Elevation", |
"Critical Depth", |
"Normal Depth", |
@@ -963,7 +974,7 @@ |
public void writeSummaryFile(double[][][] crossSectionResultsArray, |
double reachResultsArray[][]) throws IOException { |
//open the file writer and set path |
- String summaryOutputName = getSummaryOutputName(); |
+ String summaryOutputName = getSummary(); |
String path = mainFolder + File.separator + summaryOutputName; |
FileWriter writer = new FileWriter(path, false); |
PrintWriter print_line = new PrintWriter(writer); |
@@ -3,6 +3,7 @@ |
import csip.ModelDataService; |
import static csip.ModelDataService.EXEC_OK; |
import hydraulics.StandardStepMethod; |
+import java.io.File; |
import javax.ws.rs.Path; |
import oms3.annotations.Description; |
import oms3.annotations.Name; |
@@ -41,9 +42,10 @@ |
|
@Override |
protected void postProcess() throws Exception { |
- // files |
- |
- // values |
+ putResult(new File(model.getElevationGraph()), |
+ new File(model.getSummary()), |
+ //Below are the result graph files for use by JHighCharts on eRAMS for duplicating the above graphs |
+ model.getElevationGraphOutput()); |
} |
} |
|