Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
27451557
Commit
27451557
authored
3 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
Rename, add service methods
parent
82390c1f
No related branches found
No related tags found
2 merge requests
!552
Production Release | nshmp-haz
,
!548
Resolves: Web service(s) for source model mining
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/gov/usgs/earthquake/nshmp/www/SourceLogicTreesController.java
+51
-0
51 additions, 0 deletions
...usgs/earthquake/nshmp/www/SourceLogicTreesController.java
with
51 additions
and
0 deletions
src/main/java/gov/usgs/earthquake/nshmp/www/SourceTreesController.java
→
src/main/java/gov/usgs/earthquake/nshmp/www/Source
Logic
TreesController.java
+
51
−
0
View file @
27451557
...
...
@@ -2,30 +2,50 @@ package gov.usgs.earthquake.nshmp.www;
import
javax.inject.Inject
;
import
gov.usgs.earthquake.nshmp.www.services.SourceTreesService
;
import
gov.usgs.earthquake.nshmp.www.services.SourceLogicTreesService
;
import
io.micronaut.http.HttpRequest
;
import
io.micronaut.http.HttpResponse
;
import
io.micronaut.http.annotation.Controller
;
import
io.micronaut.http.annotation.Get
;
import
io.micronaut.http.annotation.PathVariable
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.responses.ApiResponse
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
@Tag
(
name
=
"Source Model Trees"
,
description
=
""
)
name
=
"Source Logic Trees"
,
description
=
"NSHM source logic trees service"
)
@Controller
(
"/trees"
)
public
class
SourceTreesController
{
public
class
Source
Logic
TreesController
{
@Inject
private
NshmpMicronautServlet
servlet
;
@Operation
()
@ApiResponse
()
@Operation
(
description
=
"Returns the tectonic setting to source logic trees in the NSHM"
,
operationId
=
"trees_doGetMetadata"
,
summary
=
"Hazard model source logic trees"
)
@ApiResponse
(
description
=
"Source logic trees metadata"
,
responseCode
=
"200"
)
@Get
public
HttpResponse
<
String
>
doGetMetadata
(
HttpRequest
<?>
request
)
{
return
SourceTreesService
.
handleDoGetMetadata
(
request
);
return
Source
Logic
TreesService
.
handleDoGetMetadata
(
request
);
}
/**
* @param id Source tree id
*/
@Operation
(
description
=
"Returns the source logic tree for an id"
,
operationId
=
"trees_goGetTrees"
,
summary
=
"Get NSHM source logic tree"
)
@ApiResponse
(
description
=
"NSHM source logic tree"
,
responseCode
=
"200"
)
@Get
(
uri
=
"/{id}"
)
public
HttpResponse
<
String
>
doGetTrees
(
HttpRequest
<?>
request
,
@PathVariable
int
id
)
{
return
SourceLogicTreesService
.
handleDoGetTrees
(
request
,
id
);
}
}
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