From 4bad488c581d4096eaccf7514087a831fad1455c Mon Sep 17 00:00:00 2001 From: anomnaco Date: Wed, 11 Sep 2024 12:34:50 -0400 Subject: [PATCH] Queries pull data from properties --- .../oss/cass_stac/service/ItemService.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/datastax/oss/cass_stac/service/ItemService.java b/src/main/java/com/datastax/oss/cass_stac/service/ItemService.java index f81f284..b2ba50e 100644 --- a/src/main/java/com/datastax/oss/cass_stac/service/ItemService.java +++ b/src/main/java/com/datastax/oss/cass_stac/service/ItemService.java @@ -283,10 +283,10 @@ public Map parseDatetime(String datetime) { result.put("maxDate", datetime); result.put("maxOffsetDate", datetime); } - logger.info(result.get("minDate").toString()); - logger.info(result.get("minOffsetDate").toString()); - logger.info(result.get("maxDate").toString()); - logger.info(result.get("maxOffsetDate").toString()); + //logger.info(result.get("minDate").toString()); + //logger.info(result.get("minOffsetDate").toString()); + //logger.info(result.get("maxDate").toString()); + //logger.info(result.get("maxOffsetDate").toString()); return result; } @@ -315,8 +315,8 @@ else if (ids != null) { return null; }).filter(Objects::nonNull).toList()); } - logger.info(partitions.toString()); - logger.info(String.valueOf(partitions.size())); + //logger.info(partitions.toString()); + //logger.info(String.valueOf(partitions.size())); return partitions.stream().distinct().toList(); } @@ -337,12 +337,12 @@ private List fetchItemsForPartition(String partitionId, dbQuery = dbQuery.and(Criteria.where("datetime").lte(maxDate)) .and(Criteria.where("datetime").gte(minDate)); - logger.info("dbQuery.toString()"); - logger.info(dbQuery.toString()); + //logger.info("dbQuery.toString()"); + //logger.info(dbQuery.toString()); itemPage = cassandraTemplate.select(dbQuery, Item.class); - logger.info("itemPage.toString()"); - logger.info(itemPage.toString()); + //logger.info("itemPage.toString()"); + //logger.info(itemPage.toString()); return itemPage; @@ -366,12 +366,12 @@ private CompletableFuture> fetchItemsForPartitionAsync(String partiti dbQuery = dbQuery.and(Criteria.where("datetime").lte(maxDate)) .and(Criteria.where("datetime").gte(minDate)); - logger.info("dbQuery.toString()"); - logger.info(dbQuery.toString()); + //logger.info("dbQuery.toString()"); + //logger.info(dbQuery.toString()); itemPage = cassandraTemplate.select(dbQuery, Item.class); - logger.info("itemPage.toString()"); - logger.info(itemPage.toString()); + //logger.info("itemPage.toString()"); + //logger.info(itemPage.toString()); return CompletableFuture.completedFuture(itemPage); @@ -455,7 +455,7 @@ public ItemCollection search(List bbox, Map additionalAttributes; JsonNode attributes; try { - attributes = objectMapper.readValue(_item.getAdditional_attributes(), JsonNode.class).get("properties"); + attributes = objectMapper.readValue(_item.getProperties(), JsonNode.class); } catch (JsonProcessingException e) { throw new RuntimeException(e); }