Skip to content

Commit

Permalink
Merge pull request #393 from tanvi029/check-fix
Browse files Browse the repository at this point in the history
checkstyle-fixed
  • Loading branch information
Gokul-KG authored Nov 7, 2024
2 parents 6f35882 + a0113e8 commit e3f00bd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
9 changes: 6 additions & 3 deletions src/main/java/iudx/catalogue/server/database/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ public class Constants {
+ ":{\"includes\": "
+ "[\"type\",\"id\",\"label\",\"accessPolicy\",\"tags\",\"instance\","
+ "\"provider\", \"resourceServerRegURL\",\"description\" ,\"cosURL\", "
+ "\"cos\", \"resourceGroup\", \"resourceType\", \"itemCreatedAt\",\"icon_base64\"]},\"size\": 10000}";
+ "\"cos\", \"resourceGroup\", \"resourceType\", \"itemCreatedAt\","
+ "\"icon_base64\"]},\"size\": 10000}";
public static final String GET_ALL_DATASETS_BY_RS_GRP =
"{\"size\":10000,\"query\":{\"bool\":{\"must\":[{\"bool\":{\"should\":[{\"match\":"
+ "{\"type.keyword\":\"iudx:ResourceGroup\"}}]}}]}}}";
Expand All @@ -146,7 +147,8 @@ public class Constants {
+ "[\"iudx:Provider\",\"iudx:COS\"]}}]}}]}},\"_source\":"
+ "{\"includes\":[\"type\",\"id\",\"label\",\"accessPolicy\","
+ "\"tags\",\"instance\",\"provider\",\"resourceServerRegURL\","
+ "\"description\",\"cosURL\",\"cos\",\"resourceGroup\", \"itemCreatedAt\", \"icon_base64\"]},"
+ "\"description\",\"cosURL\",\"cos\",\"resourceGroup\", "
+ "\"itemCreatedAt\", \"icon_base64\"]},"
+ "\"size\":10000}";
public static final String GET_MLAYER_DATASET =
"{\"query\":{\"bool\":{\"should\":[{\"bool\":{\"must\":[{\"match\":{\"id.keyword\":\"$1\"}}"
Expand All @@ -161,7 +163,8 @@ public class Constants {
+ " \"dataSample\","
+ " \"dataDescriptor\", \"@context\", \"dataQualityFile\", \"dataSampleFile\","
+ " \"resourceType\", \"resourceServerRegURL\",\"resourceType\","
+ "\"location\", \"iudxResourceAPIs\", \"itemCreatedAt\",\"nsdi\", \"icon_base64\"]},\"size\": 10000}";
+ "\"location\", \"iudxResourceAPIs\", \"itemCreatedAt\",\"nsdi\", "
+ "\"icon_base64\"]},\"size\": 10000}";
public static final String RESOURCE_ACCESSPOLICY_COUNT =
"{\"size\": 0,\"aggs\":{\"results\":{\"terms\":{\"field\":\"resourceGroup.keyword\","
+ "\"size\":10000},\"aggs\":{\"access_policies\":{\"terms\":{\"field\":"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void onSuccess(Response response) {
provider
.put(ID, record.getString(ID))
.put(DESCRIPTION_ATTR, record.getString(DESCRIPTION_ATTR))
.put(ICON_BASE64,record.getString(ICON_BASE64));
.put(ICON_BASE64, record.getString(ICON_BASE64));
dataset.put("resourceServerRegURL", record.getString("resourceServerRegURL"));
dataset.put(PROVIDER, provider);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ private void gettingAllDatasets(String query, Promise<JsonObject> datasetResult)
datasetResult.handle(Future.failedFuture(VALIDATION_FAILURE_MSG));
}
if (itemType.equals(ITEM_TYPE_PROVIDER)) {
JsonObject newJson = new JsonObject().put(PROVIDER_DES, record.getString(DESCRIPTION_ATTR))
JsonObject newJson = new JsonObject().put(PROVIDER_DES,
record.getString(DESCRIPTION_ATTR))
.put(ICON_BASE64, record.getString(ICON_BASE64));
providerDescription.put(record.getString(ID), newJson);
rsUrl.put(
Expand All @@ -307,12 +308,15 @@ private void gettingAllDatasets(String query, Promise<JsonObject> datasetResult)
String itemType = Util.getItemType(record);
if (itemType.equals(ITEM_TYPE_RESOURCE_GROUP)) {
resourceGroupHits++;
providerDescription.getJsonObject(record.getString(PROVIDER)).getString(ICON_BASE64);
providerDescription.getJsonObject(record.getString(PROVIDER))
.getString(ICON_BASE64);
record.put(
PROVIDER_DES,
providerDescription.getJsonObject(record.getString(PROVIDER)).getString(PROVIDER_DES));
providerDescription.getJsonObject(record.getString(PROVIDER))
.getString(PROVIDER_DES));
record.put(
ICON_BASE64, providerDescription.getJsonObject(record.getString(PROVIDER)).getString(ICON_BASE64));
ICON_BASE64, providerDescription.getJsonObject(record.getString(PROVIDER))
.getString(ICON_BASE64));
record.put("resourceServerRegURL", rsUrl.getString(record.getString(PROVIDER)));
record.put(
"cosURL",
Expand Down

0 comments on commit e3f00bd

Please sign in to comment.