class CalculatorResource extends AlpineResource {

    @GET
    @Path("/cvss")
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Returns the CVSS base score, impact sub-score and exploitability sub-score",
            response = Score.class
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    public Response getCvssScores(
            @ApiParam(value = "A valid CVSSv2 or CVSSv3 vector", required = true)
            @QueryParam("vector") String vector) {
        try {
            final Cvss cvss = Cvss.fromVector(vector);
            final Score score = cvss.calculateScore();
            return Response.ok(score).build();
        } catch (NullPointerException e) {
            final String invalidVector = "An invalid CVSSv2 or CVSSv3 vector submitted.";
            return Response.status(Response.Status.BAD_REQUEST).entity(invalidVector).build();
        }
    }

    @GET
    @Path("/owasp")
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(
            value = "Returns the OWASP Risk Rating likelihood score, technical impact score and business impact score",
            response = us.springett.owasp.riskrating.Score.class
    )
    @ApiResponses(value = {
            @ApiResponse(code = 401, message = "Unauthorized")
    })
    public Response getOwaspRRScores(
            @ApiParam(value = "A valid OWASP Risk Rating vector", required = true)
            @QueryParam("vector") String vector) {<FILL_FUNCTION_BODY>}

}

        try {
            final OwaspRiskRating owaspRiskRating = OwaspRiskRating.fromVector(vector);
            final us.springett.owasp.riskrating.Score score = owaspRiskRating.calculateScore();
            return Response.ok(score).build();
        } catch (IllegalArgumentException | MissingFactorException e) {
            return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build();
        }
    
<no_super_class>