Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-ws
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-ws
Commits
04b4804e
Commit
04b4804e
authored
1 year ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Plain Diff
Merge branch 'type' into 'main'
Add GMM Type Closes
#69
See merge request
!221
parents
b2a6a85f
f82cd878
No related branches found
No related tags found
1 merge request
!221
Add GMM Type
Pipeline
#386180
passed
1 year ago
Stage: build
Stage: trigger
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gradle.properties
+1
-1
1 addition, 1 deletion
gradle.properties
src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java
+13
-0
13 additions, 0 deletions
...n/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java
with
14 additions
and
1 deletion
gradle.properties
+
1
−
1
View file @
04b4804e
...
...
@@ -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.
13
nshmpUtilsJavaVersion
=
0.4.0
shadowVersion
=
7.1.2
spotbugsVersion
=
4.7.0
...
...
This diff is collapsed.
Click to expand it.
src/main/java/gov/usgs/earthquake/nshmp/www/gmm/ServiceUtil.java
+
13
−
0
View file @
04b4804e
...
...
@@ -44,6 +44,7 @@ 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.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
;
...
...
@@ -387,12 +388,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
();
}
...
...
@@ -435,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
();
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment