From 90fc71334d86ec97438900e149b62d7d10ba56d2 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 7 Feb 2024 14:53:50 -0700 Subject: [PATCH 1/5] add type to usage --- .../java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java b/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java index 01f5cd4..d54ba53 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java @@ -387,12 +387,14 @@ class ServiceUtil { final String id; final String label; + final Gmm.Type type; final ArrayList<String> supportedImts; final Constraints constraints; Value(Gmm gmm) { this.id = gmm.name(); this.label = gmm.toString(); + this.type = gmm.type(); this.supportedImts = supportedImts(gmm.supportedImts()); this.constraints = gmm.constraints(); } -- GitLab From bc9ab4b181a1d6b09db29280796eb1a2f633c3c4 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 8 Feb 2024 10:43:46 -0700 Subject: [PATCH 2/5] update lib dep --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8217be6..ed4f053 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ micronautRxVersion = 2.1.1 nodePluginVersion = 3.0.1 nodeVersion = 16.3.0 nshmFaultSectionsTag = v0.1 -nshmpLibVersion = 1.4.9 +nshmpLibVersion = 1.4.12 nshmpUtilsJavaVersion = 0.4.0 shadowVersion = 7.1.2 spotbugsVersion = 4.7.0 -- GitLab From 3db073157f30b23dddc261c3d0f5bd96073cbfc9 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 8 Feb 2024 10:43:56 -0700 Subject: [PATCH 3/5] set group type --- .../usgs/earthquake/nshmp/www/gmm/ServiceUtil.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java b/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java index d54ba53..d8a094e 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java @@ -43,6 +43,7 @@ import gov.usgs.earthquake.nshmp.gmm.Gmm; import gov.usgs.earthquake.nshmp.gmm.GmmInput; import gov.usgs.earthquake.nshmp.gmm.GmmInput.Constraints; import gov.usgs.earthquake.nshmp.gmm.GmmInput.Field; +import gov.usgs.earthquake.nshmp.model.TectonicSetting; import gov.usgs.earthquake.nshmp.gmm.Imt; import gov.usgs.earthquake.nshmp.www.ResponseBody; import gov.usgs.earthquake.nshmp.www.ResponseMetadata; @@ -437,11 +438,21 @@ class ServiceUtil { final String id; final String label; final List<Gmm> data; + final String type; Value(Gmm.Group group) { this.id = group.name(); this.label = group.toString(); this.data = group.gmms(); + + if (group.toString().contains("Active Volcanic (HI)")) { + this.type = TectonicSetting.VOLCANIC.name(); + } else { + this.type = group.gmms().stream() + .map(gmm -> gmm.type().name()) + .findFirst() + .orElseThrow(); + } } } } -- GitLab From cb56ce61de757e28275a7e913b0b86629cf4a836 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 8 Feb 2024 10:51:10 -0700 Subject: [PATCH 4/5] add group type --- .../gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java b/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java index d8a094e..4d6df1a 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java @@ -43,8 +43,8 @@ import gov.usgs.earthquake.nshmp.gmm.Gmm; import gov.usgs.earthquake.nshmp.gmm.GmmInput; import gov.usgs.earthquake.nshmp.gmm.GmmInput.Constraints; import gov.usgs.earthquake.nshmp.gmm.GmmInput.Field; -import gov.usgs.earthquake.nshmp.model.TectonicSetting; import gov.usgs.earthquake.nshmp.gmm.Imt; +import gov.usgs.earthquake.nshmp.model.TectonicSetting; import gov.usgs.earthquake.nshmp.www.ResponseBody; import gov.usgs.earthquake.nshmp.www.ResponseMetadata; import gov.usgs.earthquake.nshmp.www.WsUtils; @@ -449,9 +449,9 @@ class ServiceUtil { this.type = TectonicSetting.VOLCANIC.name(); } else { this.type = group.gmms().stream() - .map(gmm -> gmm.type().name()) - .findFirst() - .orElseThrow(); + .map(gmm -> gmm.type().name()) + .findFirst() + .orElseThrow(); } } } -- GitLab From f82cd87849c2e8e3c86ce362689104e8ff9475c3 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Fri, 9 Feb 2024 09:49:25 -0700 Subject: [PATCH 5/5] update lib deps --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ed4f053..26eadda 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ micronautRxVersion = 2.1.1 nodePluginVersion = 3.0.1 nodeVersion = 16.3.0 nshmFaultSectionsTag = v0.1 -nshmpLibVersion = 1.4.12 +nshmpLibVersion = 1.4.13 nshmpUtilsJavaVersion = 0.4.0 shadowVersion = 7.1.2 spotbugsVersion = 4.7.0 -- GitLab