Merge remote-tracking branch 'origin/station' into station

This commit is contained in:
nieziyan 2023-09-15 10:06:17 +08:00
commit 023ca06a9d
6 changed files with 163 additions and 68 deletions

View File

@ -0,0 +1,27 @@
package org.jeecg.modules.base.enums;
public enum CalibrationType {
Cal_Energy(0),
Cal_Resolution(1),
Cal_Efficiency(2),
Cal_Tot_efficiency(3),
Cal_Tail(4),
Cal_Tail_alpha(5),
Cal_Tail_right(6),
Cal_Tail_right_alpha(7),
Cal_Step_ratio(8),
Cal_HalflifeAnalysis(9),
Cal_Default(10);
public int num;
CalibrationType(int num){
this.num = num;
}
public int getNum(){
return this.num;
}
}

View File

@ -801,63 +801,63 @@ public class PHDFileUtil {
BgDataAnlyseResultIn resultIn = new BgDataAnlyseResultIn(); BgDataAnlyseResultIn resultIn = new BgDataAnlyseResultIn();
resultIn.setXe131m_con(bgAnalyseResult.Xe131m_con); resultIn.setXe131m_con(bgAnalyseResult.Xe131m_con);
resultIn.setXe131m_uncer(bgAnalyseResult.Xe131m_uncer); resultIn.setXe131m_uncer(bgAnalyseResult.Xe131m_uncer);
resultIn.setMDC_Xe131m(bgAnalyseResult.MDC_Xe131m); resultIn.setMdc_Xe131m(bgAnalyseResult.MDC_Xe131m);
resultIn.setLC_Xe131m(bgAnalyseResult.LC_Xe131m); resultIn.setLc_Xe131m(bgAnalyseResult.LC_Xe131m);
resultIn.setXe131mFlag(bgAnalyseResult.XE_131m_NID_FLAG); resultIn.setXe131mFlag(bgAnalyseResult.XE_131m_NID_FLAG);
resultIn.setXe133_con(bgAnalyseResult.Xe133_con); resultIn.setXe133_con(bgAnalyseResult.Xe133_con);
resultIn.setXe133_uncer(bgAnalyseResult.Xe133_uncer); resultIn.setXe133_uncer(bgAnalyseResult.Xe133_uncer);
resultIn.setMDC_Xe133(bgAnalyseResult.MDC_Xe133); resultIn.setMdc_Xe133(bgAnalyseResult.MDC_Xe133);
resultIn.setLC_Xe133(bgAnalyseResult.LC_Xe133); resultIn.setLc_Xe133(bgAnalyseResult.LC_Xe133);
resultIn.setXe133Flag(bgAnalyseResult.XE_133_NID_FLAG); resultIn.setXe133Flag(bgAnalyseResult.XE_133_NID_FLAG);
resultIn.setXe133m_con(bgAnalyseResult.Xe133m_con); resultIn.setXe133m_con(bgAnalyseResult.Xe133m_con);
resultIn.setXe133m_uncer(bgAnalyseResult.Xe133m_uncer); resultIn.setXe133m_uncer(bgAnalyseResult.Xe133m_uncer);
resultIn.setMDC_Xe133m(bgAnalyseResult.MDC_Xe133m); resultIn.setMdc_Xe133m(bgAnalyseResult.MDC_Xe133m);
resultIn.setLC_Xe133m(bgAnalyseResult.LC_Xe133m); resultIn.setLc_Xe133m(bgAnalyseResult.LC_Xe133m);
resultIn.setXe133mFlag(bgAnalyseResult.XE_133m_NID_FLAG); resultIn.setXe133mFlag(bgAnalyseResult.XE_133m_NID_FLAG);
resultIn.setXe135_con(bgAnalyseResult.Xe135_con); resultIn.setXe135_con(bgAnalyseResult.Xe135_con);
resultIn.setXe135_uncer(bgAnalyseResult.Xe135_uncer); resultIn.setXe135_uncer(bgAnalyseResult.Xe135_uncer);
resultIn.setMDC_Xe135(bgAnalyseResult.MDC_Xe135); resultIn.setMdc_Xe135(bgAnalyseResult.MDC_Xe135);
resultIn.setLC_Xe135(bgAnalyseResult.LC_Xe135); resultIn.setLc_Xe135(bgAnalyseResult.LC_Xe135);
resultIn.setXe135Flag(bgAnalyseResult.XE_135_NID_FLAG); resultIn.setXe135Flag(bgAnalyseResult.XE_135_NID_FLAG);
List<GardsCalibrationSpectrum> gammaCalibrationSpectrumList = new LinkedList<>(); List<GardsCalibrationSpectrum> gammaCalibrationSpectrumList = new LinkedList<>();
GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum(); GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum();
gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
gammaCalibrationS.setCoeff1(bgAnalyseResult.s_g_fitting_e_c.get(0)); gammaCalibrationS.setCoeff1(bgAnalyseResult.s_g_fitting_c_e.get(0));
gammaCalibrationS.setCoeff2(bgAnalyseResult.s_g_fitting_e_c.get(1)); gammaCalibrationS.setCoeff2(bgAnalyseResult.s_g_fitting_c_e.get(1));
gammaCalibrationS.setCoeff3(bgAnalyseResult.s_g_fitting_e_c.get(2)); gammaCalibrationS.setCoeff3(bgAnalyseResult.s_g_fitting_c_e.get(2));
gammaCalibrationSpectrumList.add(gammaCalibrationS); gammaCalibrationSpectrumList.add(gammaCalibrationS);
GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum(); GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum();
gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
gammaCalibrationG.setCoeff1(bgAnalyseResult.g_g_fitting_e_c.get(0)); gammaCalibrationG.setCoeff1(bgAnalyseResult.g_g_fitting_c_e.get(0));
gammaCalibrationG.setCoeff2(bgAnalyseResult.g_g_fitting_e_c.get(1)); gammaCalibrationG.setCoeff2(bgAnalyseResult.g_g_fitting_c_e.get(1));
gammaCalibrationG.setCoeff3(bgAnalyseResult.g_g_fitting_e_c.get(2)); gammaCalibrationG.setCoeff3(bgAnalyseResult.g_g_fitting_c_e.get(2));
gammaCalibrationSpectrumList.add(gammaCalibrationG); gammaCalibrationSpectrumList.add(gammaCalibrationG);
GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum(); GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum();
gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
gammaCalibrationD.setCoeff1(bgAnalyseResult.d_g_fitting_e_c.get(0)); gammaCalibrationD.setCoeff1(bgAnalyseResult.d_g_fitting_c_e.get(0));
gammaCalibrationD.setCoeff2(bgAnalyseResult.d_g_fitting_e_c.get(1)); gammaCalibrationD.setCoeff2(bgAnalyseResult.d_g_fitting_c_e.get(1));
gammaCalibrationD.setCoeff3(bgAnalyseResult.d_g_fitting_e_c.get(2)); gammaCalibrationD.setCoeff3(bgAnalyseResult.d_g_fitting_c_e.get(2));
gammaCalibrationSpectrumList.add(gammaCalibrationD); gammaCalibrationSpectrumList.add(gammaCalibrationD);
List<GardsCalibrationSpectrum> betaCalibrationSpectrumList = new LinkedList<>(); List<GardsCalibrationSpectrum> betaCalibrationSpectrumList = new LinkedList<>();
// GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum(); GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum();
// betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
// betaCalibrationS.setCoeff1(bgAnalyseResult.s_b_fitting_c_e.get(0)); gammaCalibrationS.setCoeff1(bgAnalyseResult.s_b_fitting_c_e.get(0));
// betaCalibrationS.setCoeff2(bgAnalyseResult.s_b_fitting_c_e.get(1)); gammaCalibrationS.setCoeff2(bgAnalyseResult.s_b_fitting_c_e.get(1));
// betaCalibrationS.setCoeff3(bgAnalyseResult.s_b_fitting_c_e.get(2)); gammaCalibrationS.setCoeff3(bgAnalyseResult.s_b_fitting_c_e.get(2));
// betaCalibrationSpectrumList.add(betaCalibrationS); betaCalibrationSpectrumList.add(betaCalibrationS);
// GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum(); GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum();
// betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
// betaCalibrationG.setCoeff1(bgAnalyseResult.g_b_fitting_c_e.get(0)); betaCalibrationG.setCoeff1(bgAnalyseResult.g_b_fitting_c_e.get(0));
// betaCalibrationG.setCoeff2(bgAnalyseResult.g_b_fitting_c_e.get(1)); betaCalibrationG.setCoeff2(bgAnalyseResult.g_b_fitting_c_e.get(1));
// betaCalibrationG.setCoeff3(bgAnalyseResult.g_b_fitting_c_e.get(2)); betaCalibrationG.setCoeff3(bgAnalyseResult.g_b_fitting_c_e.get(2));
// betaCalibrationSpectrumList.add(betaCalibrationG); betaCalibrationSpectrumList.add(betaCalibrationG);
// GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum(); GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum();
// betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
// betaCalibrationD.setCoeff1(bgAnalyseResult.d_b_fitting_c_e.get(0)); betaCalibrationD.setCoeff1(bgAnalyseResult.d_b_fitting_c_e.get(0));
// betaCalibrationD.setCoeff2(bgAnalyseResult.d_b_fitting_c_e.get(1)); betaCalibrationD.setCoeff2(bgAnalyseResult.d_b_fitting_c_e.get(1));
// betaCalibrationD.setCoeff3(bgAnalyseResult.d_b_fitting_c_e.get(2)); betaCalibrationD.setCoeff3(bgAnalyseResult.d_b_fitting_c_e.get(2));
// betaCalibrationSpectrumList.add(betaCalibrationD); betaCalibrationSpectrumList.add(betaCalibrationD);
List<GardsROIChannelsSpectrum> roiChannelsSpectrumList = new LinkedList<>(); List<GardsROIChannelsSpectrum> roiChannelsSpectrumList = new LinkedList<>();
for (int i=0; i<bgAnalyseResult.S_ROI_B_Boundary_start.size(); i++) { for (int i=0; i<bgAnalyseResult.S_ROI_B_Boundary_start.size(); i++) {
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum(); GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
@ -868,15 +868,30 @@ public class PHDFileUtil {
roiChannels.setGChanStop(bgAnalyseResult.S_ROI_G_Boundary_stop.get(i)); roiChannels.setGChanStop(bgAnalyseResult.S_ROI_G_Boundary_stop.get(i));
roiChannelsSpectrumList.add(roiChannels); roiChannelsSpectrumList.add(roiChannels);
} }
for (int i=0; i<bgAnalyseResult.G_ROI_B_Boundary_start.size(); i++) {
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
roiChannels.setRoi(i+1);
roiChannels.setBChanStart(bgAnalyseResult.G_ROI_B_Boundary_start.get(i));
roiChannels.setBChanStop(bgAnalyseResult.G_ROI_B_Boundary_stop.get(i));
roiChannels.setGChanStart(bgAnalyseResult.G_ROI_G_Boundary_start.get(i));
roiChannels.setGChanStop(bgAnalyseResult.G_ROI_G_Boundary_stop.get(i));
roiChannelsSpectrumList.add(roiChannels);
}
for (int i=0; i<bgAnalyseResult.D_ROI_B_Boundary_start.size(); i++) {
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
roiChannels.setRoi(i+1);
roiChannels.setBChanStart(bgAnalyseResult.D_ROI_B_Boundary_start.get(i));
roiChannels.setBChanStop(bgAnalyseResult.D_ROI_B_Boundary_stop.get(i));
roiChannels.setGChanStart(bgAnalyseResult.D_ROI_G_Boundary_start.get(i));
roiChannels.setGChanStop(bgAnalyseResult.D_ROI_G_Boundary_stop.get(i));
roiChannelsSpectrumList.add(roiChannels);
}
List<GardsROIResultsSpectrum> roiResultsSpectrumList = new LinkedList<>(); List<GardsROIResultsSpectrum> roiResultsSpectrumList = new LinkedList<>();
for (int i=0; i<bgAnalyseResult.s_roi_cts.size(); i++) { for (int i=0; i<bgAnalyseResult.s_roi_cts.size(); i++) {
GardsROIResultsSpectrum roiResults = new GardsROIResultsSpectrum(); GardsROIResultsSpectrum roiResults = new GardsROIResultsSpectrum();
roiResults.setRoi(i+1); roiResults.setRoi(i+1);
if (i==0) { bgAnalyseResult.LC.add(0, 0.0);
roiResults.setLc(0.0); roiResults.setLc(bgAnalyseResult.LC.get(i));
} else {
roiResults.setLc(bgAnalyseResult.LC.get(i-1));
}
roiResults.setSGross(bgAnalyseResult.s_roi_cts.get(i)); roiResults.setSGross(bgAnalyseResult.s_roi_cts.get(i));
roiResults.setGGross(bgAnalyseResult.g_roi_cts.get(i)); roiResults.setGGross(bgAnalyseResult.g_roi_cts.get(i));
roiResults.setBGross(bgAnalyseResult.d_roi_cts.get(i)); roiResults.setBGross(bgAnalyseResult.d_roi_cts.get(i));
@ -886,12 +901,13 @@ public class PHDFileUtil {
roiResults.setNetErr(bgAnalyseResult.ROI_net_coutns_err.get(i)); roiResults.setNetErr(bgAnalyseResult.ROI_net_coutns_err.get(i));
roiResults.setConc(bgAnalyseResult.ROI_con_uncer.get(i)); roiResults.setConc(bgAnalyseResult.ROI_con_uncer.get(i));
roiResults.setConcErr(bgAnalyseResult.ROI_con_uncer_err.get(i)); roiResults.setConcErr(bgAnalyseResult.ROI_con_uncer_err.get(i));
// roiResults.setMdc(bgAnalyseResult.MDC.get(i)); bgAnalyseResult.MDC.add(0, 0.0);
// if(bgAnalyseResult.ROI_con_uncer.get(i)>bgAnalyseResult.MDC.get(i)) { roiResults.setMdc(bgAnalyseResult.MDC.get(i));
// roiResults.setNidFlag(1); if(bgAnalyseResult.ROI_con_uncer.get(i)>bgAnalyseResult.MDC.get(i)) {
// } else { roiResults.setNidFlag(1);
// roiResults.setNidFlag(0); } else {
// } roiResults.setNidFlag(0);
}
roiResultsSpectrumList.add(roiResults); roiResultsSpectrumList.add(roiResults);
} }
map.put("gammaCalibrationSpectrumList", gammaCalibrationSpectrumList); map.put("gammaCalibrationSpectrumList", gammaCalibrationSpectrumList);

View File

@ -0,0 +1,40 @@
package org.jeecg.common.util;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@Component
public class SSEUtil {
private static Map<String, SseEmitter> sseCache = new ConcurrentHashMap<>();
public SseEmitter subscribe(String id) {
// 超时时间设置为1小时
SseEmitter sseEmitter = new SseEmitter(3600_000L);
sseCache.put(id, sseEmitter);
sseEmitter.onTimeout(() -> sseCache.remove(id));
sseEmitter.onCompletion(() -> System.out.println("完成!!!"));
return sseEmitter;
}
public String push(String id, String content) throws IOException {
SseEmitter sseEmitter = sseCache.get(id);
if (sseEmitter != null) {
sseEmitter.send(content);
}
return "over";
}
public String over(String id) {
SseEmitter sseEmitter = sseCache.get(id);
if (sseEmitter != null) {
sseEmitter.complete();
sseCache.remove(id);
}
return "over";
}
}

View File

@ -1,18 +1,9 @@
package org.jeecg.modules.controller; package org.jeecg.modules.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.ClassUtil;
import org.jeecg.common.util.ExportUtil;
import org.jeecg.modules.base.bizVo.GammaRLR; import org.jeecg.modules.base.bizVo.GammaRLR;
import org.jeecg.modules.base.enums.ExportTemplate;
import org.jeecg.modules.entity.vo.*; import org.jeecg.modules.entity.vo.*;
import org.jeecg.modules.service.IGammaService; import org.jeecg.modules.service.IGammaService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -20,19 +11,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static org.jeecg.modules.base.enums.ExportTemplate.RLR_B;
import static org.jeecg.modules.base.enums.ExportTemplate.RLR_G;
@RestController @RestController
@RequestMapping("gamma") @RequestMapping("gamma")
@ -201,6 +180,11 @@ public class GammaController {
return gammaService.applyDataEnergy(changeData.getM_vCurCentroid(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), changeData.getM_curParam(), changeData.getCurCalName(), changeData.getSampleId(), changeData.getFileName()); return gammaService.applyDataEnergy(changeData.getM_vCurCentroid(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), changeData.getM_curParam(), changeData.getCurCalName(), changeData.getSampleId(), changeData.getFileName());
} }
@PostMapping("saveDataEnergy")
public void saveDataEnergy(@RequestBody ChangeData changeData, HttpServletResponse response) {
gammaService.saveDataEnergy(changeData.getM_vCurCentroid(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), response);
}
@GetMapping("resolutionCalibration") @GetMapping("resolutionCalibration")
@ApiOperation(value = "查看Resolution Calibration数据", notes = "查看Resolution Calibration数据") @ApiOperation(value = "查看Resolution Calibration数据", notes = "查看Resolution Calibration数据")
public Result resolutionCalibration(@RequestParam Integer sampleId, String fileName, String currentText) { public Result resolutionCalibration(@RequestParam Integer sampleId, String fileName, String currentText) {

View File

@ -63,6 +63,8 @@ public interface IGammaService{
Result applyDataEnergy(List<Double> m_vCurCentroid, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, String curCalName, Integer sampleId, String fileName); Result applyDataEnergy(List<Double> m_vCurCentroid, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, String curCalName, Integer sampleId, String fileName);
void saveDataEnergy(List<Double> m_vCurCentroid, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, HttpServletResponse response);
Result resolutionCalibration(Integer sampleId, String fileName, String currentText); Result resolutionCalibration(Integer sampleId, String fileName, String currentText);
Result changeDataResolution(List<Double> m_vCurReso, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, Integer sampleId, String fileName); Result changeDataResolution(List<Double> m_vCurReso, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, Integer sampleId, String fileName);

View File

@ -73,6 +73,8 @@ public class GammaServiceImpl implements IGammaService {
private SpectrumPathProperties spectrumPathProperties; private SpectrumPathProperties spectrumPathProperties;
@Autowired @Autowired
private FTPUtil ftpUtil; private FTPUtil ftpUtil;
@Autowired
private SSEUtil sseUtil;
@Value("${ZeroTime}") @Value("${ZeroTime}")
private String ZeroTimeStr; private String ZeroTimeStr;
@Autowired @Autowired
@ -965,7 +967,7 @@ public class GammaServiceImpl implements IGammaService {
} }
// date of Zero Time // date of Zero Time
Date datetime = DateUtils.parseDate(date + StringPool.SPACE + time); Date datetime = DateUtils.parseDate(date + StringPool.SPACE + time, "yyyy-MM-dd HH:mm:ss");
Date oriDate = DateUtils.parseDate("1970-01-01 00:00:00", "yyyy-MM-dd HH:mm:ss"); Date oriDate = DateUtils.parseDate("1970-01-01 00:00:00", "yyyy-MM-dd HH:mm:ss");
double second = (datetime.getTime()/1000 - oriDate.getTime()/1000) - t - 8*60*60; double second = (datetime.getTime()/1000 - oriDate.getTime()/1000) - t - 8*60*60;
@ -1213,6 +1215,30 @@ public class GammaServiceImpl implements IGammaService {
return result; return result;
} }
@Override
public void saveDataEnergy(List<Double> m_vCurCentroid, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, HttpServletResponse response) {
StringBuffer strBuffer = new StringBuffer();
strBuffer.append("#g_Energy").append("\n");
for (int i=0; i<m_vCurCentroid.size(); i++) {
strBuffer.append(m_vCurEnergy.get(i)).append(" ").append(m_vCurCentroid.get(i)).append(" ").append(m_vCurUncert.get(i)).append("\n");
}
FileOutputStream fos = null;
try {
fos = new FileOutputStream(new File("文件名"));
fos.write(strBuffer.toString().getBytes());
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
fos.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
@Override @Override
public Result resolutionCalibration(Integer sampleId, String fileName, String currentText) { public Result resolutionCalibration(Integer sampleId, String fileName, String currentText) {
Result result = new Result(); Result result = new Result();