class CatalogRest {

    @GET
    @Path("{catalogId}/records/{recordId}")
    @Produces(MediaType.APPLICATION_JSON)
    @RolesAllowed("user")
    @ApiOperation("Retrieves the Catalog record by its ID.")
    @ResourceId(type = ValueType.PATH, value = "recordId")
    public Response getRecord(@PathParam("catalogId") String catalogId,
                       @PathParam("recordId") String recordId) {
        try {
            Record record = catalogManager.getRecord(vf.createIRI(catalogId), vf.createIRI(recordId),
                    factoryRegistry.getFactoryOfType(Record.class).get()).orElseThrow(() ->
                    ErrorUtils.sendError("Record " + recordId + " could not be found", Response.Status.NOT_FOUND));
            return Response.ok(modelToSkolemizedJsonld(removeContext(record.getModel()), transformer,
                    bNodeService)).build();
        } catch (IllegalArgumentException ex) {
            throw ErrorUtils.sendError(ex, ex.getMessage(), Response.Status.BAD_REQUEST);
        } catch (MobiException ex) {
            throw ErrorUtils.sendError(ex, ex.getMessage(), Response.Status.INTERNAL_SERVER_ERROR);
        }
    }

}