class TransformationService extends BaseTransformationService {

    @RequestMapping(value = "/dictionary", method = GET, produces = APPLICATION_OCTET_STREAM_VALUE)
    @ApiOperation(value = "Get current dictionary (as serialized object).")
    @Timed
    public StreamingResponseBody getDictionary() {
        return outputStream -> {
            // Serialize it to output
            LOG.debug("Returning DQ dictionaries");
            TdqCategories result = TdqCategoriesFactory.createFullTdqCategories();
            try (ObjectOutputStream oos = new ObjectOutputStream(new GZIPOutputStream(outputStream))) {
                oos.writeObject(result);
            }
        };
    }

}