diff --git a/pic-sure-resources/pic-sure-visualization-resource/src/main/java/edu/harvard/hms/dbmi/avillach/resource/visualization/service/VisualizationService.java b/pic-sure-resources/pic-sure-visualization-resource/src/main/java/edu/harvard/hms/dbmi/avillach/resource/visualization/service/VisualizationService.java index 69b53d0b..0b5ef0c6 100644 --- a/pic-sure-resources/pic-sure-visualization-resource/src/main/java/edu/harvard/hms/dbmi/avillach/resource/visualization/service/VisualizationService.java +++ b/pic-sure-resources/pic-sure-visualization-resource/src/main/java/edu/harvard/hms/dbmi/avillach/resource/visualization/service/VisualizationService.java @@ -51,7 +51,7 @@ public class VisualizationService { /** * Handles a query request from the UI. This method is called from the VisualizationResource class. * - * @param query QueryRequest - the query request + * @param query QueryRequest - the query request * @param requestSource String - the request source, Authorized or Open * @return ProcessedCrossCountsResponse */ @@ -82,7 +82,7 @@ public Response handleQuerySync(QueryRequest query, String requestSource) { private Response getProcessedCrossCountResponse(Map> categoryCrossCountsMap, Map> continuousCrossCountsMap) { if ((categoryCrossCountsMap == null || categoryCrossCountsMap.isEmpty()) && (continuousCrossCountsMap == null || continuousCrossCountsMap.isEmpty())) return Response.ok().build(); - ProcessedCrossCountsResponse response = buildProcessedCrossCountsResponse(categoryCrossCountsMap, continuousCrossCountsMap, false, false); + ProcessedCrossCountsResponse response = buildProcessedCrossCountsResponse(categoryCrossCountsMap, continuousCrossCountsMap, false, false, false); return Response.ok(response).build(); } @@ -91,7 +91,7 @@ private Response getProcessedCrossCountResponse(Map * the obfuscation types. If the value was obfuscated the response will be marked as obfuscated so the UI can * display the data accordingly. * - * @param categoryCrossCountsMap - the categorical cross counts + * @param categoryCrossCountsMap - the categorical cross counts * @param continuousCrossCountsMap - the continuous cross counts * @return Response - the processed cross counts response */ @@ -111,7 +111,7 @@ private Response getOpenProcessedCrossCountResponse(Map> - the cleaned categorical data + * @return Map> - the cleaned categorical data */ private Map> cleanCrossCountData(Map> crossCounts) { // remove the obfuscation types from the categorical data @@ -165,12 +165,12 @@ private boolean isObfuscated(Map> crossCounts) { } private ProcessedCrossCountsResponse buildProcessedCrossCountsResponse(Map> categoryCrossCountsMap, - Map> continuousCrossCountsMap, - boolean isObfuscated, boolean isOpenAccess) { + Map> continuousCrossCountsMap, + boolean isCategoricalObfuscated, boolean isContinuousObfuscated, boolean isOpenAccess) { ProcessedCrossCountsResponse response = new ProcessedCrossCountsResponse(); - response.getCategoricalData().addAll(dataProcessingServices.getCategoricalData(categoryCrossCountsMap, isObfuscated, isOpenAccess)); - response.getContinuousData().addAll(dataProcessingServices.getContinuousData(continuousCrossCountsMap, isObfuscated, isOpenAccess)); + response.getCategoricalData().addAll(dataProcessingServices.getCategoricalData(categoryCrossCountsMap, isCategoricalObfuscated, isOpenAccess)); + response.getContinuousData().addAll(dataProcessingServices.getContinuousData(continuousCrossCountsMap, isContinuousObfuscated, isOpenAccess)); return response; } @@ -186,10 +186,9 @@ private Map> getCategoryCrossCountsMap(QueryRequest } /** - * - * @param query QueryRequest + * @param query QueryRequest * @param queryJson Query - * @return Map> - the continuous cross counts + * @return Map> - the continuous cross counts */ private Map> getContinuousCrossCount(QueryRequest query, Query queryJson) { Map> continuousCrossCountsMap; @@ -237,7 +236,8 @@ public Response generateContinuousBin(QueryRequest continuousData) { } logger.info("Continuous data: " + continuousData.getQuery()); - Map> continuousDataMap = mapper.convertValue(continuousData.getQuery(), new TypeReference<>() {}); + Map> continuousDataMap = mapper.convertValue(continuousData.getQuery(), new TypeReference<>() { + }); Map> continuousProcessedData = dataProcessingServices.binContinuousData(continuousDataMap); return Response.ok(continuousProcessedData).build(); }