Skip to content
Snippets Groups Projects
Commit 27451557 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Rename, add service methods

parent 82390c1f
No related branches found
No related tags found
2 merge requests!552Production Release | nshmp-haz,!548Resolves: Web service(s) for source model mining
......@@ -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 SourceLogicTreesController {
@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 SourceLogicTreesService.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);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment