Skip to content

Commit

Permalink
changed the way visits are counted
Browse files Browse the repository at this point in the history
  • Loading branch information
seinecle committed Nov 30, 2022
1 parent 7dc7694 commit 8f2983e
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 13 deletions.
Expand Up @@ -70,7 +70,6 @@ public ConverterBean() {
sessionBean = new SessionBean();
}
sessionBean.setFunction("networkconverter");
sessionBean.sendFunctionPageReport();
}

@PostConstruct
Expand Down Expand Up @@ -101,13 +100,12 @@ public void upload() {
}

public String handleFileUpload(FileUploadEvent event) {
System.out.println("we are in handleFileUpload");
sessionBean.sendFunctionPageReport();
String success = sessionBean.getLocaleBundle().getString("general.nouns.success");
String is_uploaded = sessionBean.getLocaleBundle().getString("general.verb.is_uploaded");
FacesMessage message = new FacesMessage(success, event.getFile().getFileName() + " " + is_uploaded + ".");
FacesContext.getCurrentInstance().addMessage(null, message);
uploadedFile = event.getFile();
// System.out.println("file: " + uploadedFile.getFileName());
try {
is = uploadedFile.getInputStream();
} catch (IOException ex) {
Expand Down
Expand Up @@ -119,7 +119,6 @@ public CowoBean() {
sessionBean = new SessionBean();
}
sessionBean.setFunction("cowo");
sessionBean.sendFunctionPageReport();

}

Expand All @@ -144,6 +143,7 @@ public String getReport() {

public String runAnalysis() {
try {
sessionBean.sendFunctionPageReport();
service.create(sessionBean.getLocaleBundle().getString("general.message.starting_analysis"));
DataFormatConverter dataFormatConverter = new DataFormatConverter();
mapOfLines = dataFormatConverter.convertToMapOfLines(inputData.getBulkData(), inputData.getDataInSheets(), inputData.getSelectedSheetName(), inputData.getSelectedColumnIndex(), inputData.getHasHeaders());
Expand Down
Expand Up @@ -96,7 +96,6 @@ public GazeBean() {
sessionBean = new SessionBean();
}
sessionBean.setFunction("gaze");
sessionBean.sendFunctionPageReport();
}

public String getOption() {
Expand All @@ -113,6 +112,7 @@ public void onTabChange(String sheetName) {

public String runCoocAnalysis() {
try {
sessionBean.sendFunctionPageReport();
service.create(sessionBean.getLocaleBundle().getString("general.message.starting_analysis"));
List<SheetModel> dataInSheets = inputData.getDataInSheets();
SheetModel sheetWithData = null;
Expand Down Expand Up @@ -165,6 +165,7 @@ public String runCoocAnalysis() {

public String runSimAnalysis(String sourceColIndex, String sheetName) {
try {
sessionBean.sendFunctionPageReport();
service.create(sessionBean.getLocaleBundle().getString("general.message.starting_analysis"));
List<SheetModel> dataInSheets = inputData.getDataInSheets();
SheetModel sheetWithData = null;
Expand Down
Expand Up @@ -71,7 +71,6 @@ public LinkPredictionBean() {
sessionBean = new SessionBean();
}
sessionBean.setFunction("linkprediction");
sessionBean.sendFunctionPageReport();
}

@PostConstruct
Expand Down Expand Up @@ -103,13 +102,11 @@ public void upload() {

public String handleFileUpload(FileUploadEvent event) throws IOException, URISyntaxException {
success = false;
System.out.println("we are in handleFileUpload");
String successMsg = sessionBean.getLocaleBundle().getString("general.nouns.success");
String is_uploaded = sessionBean.getLocaleBundle().getString("general.verb.is_uploaded");
FacesMessage message = new FacesMessage(successMsg, event.getFile().getFileName() + " " + is_uploaded + ".");
FacesContext.getCurrentInstance().addMessage(null, message);
uploadedFile = event.getFile();
System.out.println("file: " + uploadedFile.getFileName());
try {
is = uploadedFile.getInputStream();
} catch (IOException ex) {
Expand All @@ -125,6 +122,7 @@ public Integer showPredictions() {
System.out.println("no file found for link prediction");
return 0;
}
sessionBean.sendFunctionPageReport();
HttpRequest request;
HttpClient client = HttpClient.newHttpClient();
Set<CompletableFuture> futures = new HashSet();
Expand Down Expand Up @@ -164,7 +162,7 @@ public Integer showPredictions() {
List<String> orderedListOfPredictions = predictions.keySet().stream().sorted().collect(Collectors.toList());

topPredictions = new ArrayList();

for (String predictionKey : orderedListOfPredictions) {
JsonObject predictionJson = predictions.getJsonObject(predictionKey);
Prediction prediction = new Prediction();
Expand Down
Expand Up @@ -78,7 +78,6 @@ public OrganicBean() {
sessionBean = new SessionBean();
}
sessionBean.setFunction("organic");
sessionBean.sendFunctionPageReport();
}

public Integer getProgress() {
Expand Down Expand Up @@ -106,6 +105,7 @@ public String runAnalysis() {
if (selectedLanguage == null || selectedLanguage.isEmpty()) {
selectedLanguage = "en";
}
sessionBean.sendFunctionPageReport();
service.create(sessionBean.getLocaleBundle().getString("general.message.starting_analysis"));

DataFormatConverter dataFormatConverter = new DataFormatConverter();
Expand Down
Expand Up @@ -83,7 +83,6 @@ public PdfMatcherBean() {
void init() {
sessionId = Faces.getSessionId();
sessionBean.setFunction("pdfmatcher");
sessionBean.sendFunctionPageReport();
results = new HashMap();
}

Expand All @@ -103,6 +102,7 @@ public void cancel() {
}

public String runAnalysis() throws URISyntaxException {
sessionBean.sendFunctionPageReport();
service.create(sessionBean.getLocaleBundle().getString("general.message.starting_analysis"));
List<SheetModel> dataInSheets = inputData.getDataInSheets();
HttpRequest request;
Expand Down
Expand Up @@ -102,7 +102,6 @@ public TopicsBean() {
sessionBean = new SessionBean();
}
sessionBean.setFunction("topics");
sessionBean.sendFunctionPageReport();
}

public Integer getProgress() {
Expand All @@ -126,6 +125,7 @@ public String getReport() {

public String runAnalysis() {
try {
sessionBean.sendFunctionPageReport();
service.create(sessionBean.getLocaleBundle().getString("general.message.starting_analysis"));
DataFormatConverter dataFormatConverter = new DataFormatConverter();
mapOfLines = dataFormatConverter.convertToMapOfLines(inputData.getBulkData(), inputData.getDataInSheets(), inputData.getSelectedSheetName(), inputData.getSelectedColumnIndex(), inputData.getHasHeaders());
Expand Down
Expand Up @@ -88,7 +88,6 @@ public UmigonBean() {
@PostConstruct
private void init() {
sessionBean.setFunction("umigon");
sessionBean.sendFunctionPageReport();
String positive_tone = sessionBean.getLocaleBundle().getString("general.nouns.sentiment_positive");
String negative_tone = sessionBean.getLocaleBundle().getString("general.nouns.sentiment_negative");
String neutral_tone = sessionBean.getLocaleBundle().getString("general.nouns.sentiment_neutral");
Expand Down Expand Up @@ -123,6 +122,7 @@ public String runAnalysis() {
if (selectedLanguage == null || selectedLanguage.isEmpty()) {
selectedLanguage = "en";
}
sessionBean.sendFunctionPageReport();
tempResults = new ConcurrentHashMap(maxCapacity + 1);
filteredDocuments = new ArrayList(maxCapacity + 1);
service.create(sessionBean.getLocaleBundle().getString("general.message.starting_analysis"));
Expand Down
Binary file not shown.

0 comments on commit 8f2983e

Please sign in to comment.