Skip to content

Commit

Permalink
Fixed compiled error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jia020 committed Jan 31, 2024
1 parent 53a123b commit 176833d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,11 @@ public String makeWFSGetFeaturePostMethod(String serviceUrl, String wfsVersion,
// this result will not be cached as it will change regularly and is only performed once per serviceUrl anyway
int retryCount = 0;
boolean isSuccess = false;
String result = "";
while( retryCount < 5 && isSuccess == false) {
try{
retryCount += 1;
String result = this.httpServiceCaller.getMethodResponseAsString(method);
result = this.httpServiceCaller.getMethodResponseAsString(method);
isSuccess = true;
} catch (Exception e) {
logger.debug("RETRY: makeWFSGetFeaturePostMethod: "+retryCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ public boolean getDownSampledData() {
String holeIdentifier = boreholeVo.getHoleIdentifier(); boreholeVo.setStatus(1); //error status;

boolean isHit = false;
Float count = 0.0f;
float ratio = (float) 0.0;
for(String logid : boreholeVo.logidList) {
totalProcessedLogid++;
logger.debug("Stage3:process:boreholeid: " + holeIdentifier + " logid: " + logid);
try {

String responseString = NVCLAnalyticalRequestSvc.dataAccess.getDownSampledDataMethod(nvclDataServiceUrl, logid, span, startDepth, endDepth, "csv");

String csvLine;
Expand All @@ -177,35 +178,34 @@ public boolean getDownSampledData() {

List<String> cells = Arrays.asList(csvLine.split("\\s*,\\s*"));
String depth = cells.get(0);
Float count = 0.0f;
Float count0 = 0.0f;
String csvClassfication;
if (this.isdecimalTypeScalar == false) {
count = Float.parseFloat(cells.get(3));
count0 = Float.parseFloat(cells.get(3));
csvClassfication = cells.get(1);
} else {
count = Float.parseFloat(cells.get(1));
count0 = Float.parseFloat(cells.get(1));
csvClassfication="averageValue";
//get the float;
}
Float countSum = 0.0f ;
if (depthMap.get(depth) != null) {
countSum= depthMap.get(depth) + count;
countSum= depthMap.get(depth) + count0;
} else {
countSum = 0 + count;
countSum = 0 + count0;
}
depthMap.put(depth, countSum);
if( !depthClassificationMap.containsKey(depth)) {
depthClassificationMap.put(depth, (float) 0.0);
}
if (csvClassfication.equalsIgnoreCase(classification)) {
depthClassificationMap.put(depth, count);
depthClassificationMap.put(depth, count0);
}
}

String depthKey;
Float count = 0.0f;
String depthKey;
Float countSum;
float ratio = (float) 0.0;

/* Now, iterate over the map's contents, sorted by key. */
for (Entry<String, Float> entry : depthClassificationMap.entrySet()) {
depthKey = entry.getKey();
Expand Down

0 comments on commit 176833d

Please sign in to comment.