Skip to content

Commit

Permalink
Merge pull request #386 from tanvi029/mlayer-api-upd
Browse files Browse the repository at this point in the history
itemCreatedAt field added in mlayer dataset related APIs
  • Loading branch information
Gokul-KG authored Oct 4, 2024
2 parents 921cc94 + 14b276b commit f5bd11c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 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,7 @@ public class Constants {
+ ":{\"includes\": "
+ "[\"type\",\"id\",\"label\",\"accessPolicy\",\"tags\",\"instance\","
+ "\"provider\", \"resourceServerRegURL\",\"description\" ,\"cosURL\", "
+ "\"cos\", \"resourceGroup\", \"resourceType\"]},\"size\": 10000}";
+ "\"cos\", \"resourceGroup\", \"resourceType\", \"itemCreatedAt\"]},\"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 +146,7 @@ public class Constants {
+ "[\"iudx:Provider\",\"iudx:COS\"]}}]}}]}},\"_source\":"
+ "{\"includes\":[\"type\",\"id\",\"label\",\"accessPolicy\","
+ "\"tags\",\"instance\",\"provider\",\"resourceServerRegURL\","
+ "\"description\",\"cosURL\",\"cos\",\"resourceGroup\"]},"
+ "\"description\",\"cosURL\",\"cos\",\"resourceGroup\", \"itemCreatedAt\"]},"
+ "\"size\":10000}";
public static final String GET_MLAYER_DATASET =
"{\"query\":{\"bool\":{\"should\":[{\"bool\":{\"must\":[{\"match\":{\"id.keyword\":\"$1\"}}"
Expand All @@ -161,7 +161,7 @@ public class Constants {
+ " \"dataSample\","
+ " \"dataDescriptor\", \"@context\", \"dataQualityFile\", \"dataSampleFile\","
+ " \"resourceType\", \"resourceServerRegURL\",\"resourceType\","
+ "\"location\", \"iudxResourceAPIs\"]},\"size\": 10000}";
+ "\"location\", \"iudxResourceAPIs\", \"itemCreatedAt\"]},\"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 @@ -221,6 +221,9 @@ public void onSuccess(Response response) {
if (record.containsKey("location")) {
dataset.put("location", record.getJsonObject("location"));
}
if (record.containsKey("itemCreatedAt")) {
dataset.put("itemCreatedAt", record.getString("itemCreatedAt"));
}
}

if (itemType.equals("iudx:COS")) {
Expand Down

0 comments on commit f5bd11c

Please sign in to comment.