class ContentNegotiationHandler {

    protected ToClientConverter getToClientConverter(Resource repositoryResource, String targetMimeType){
        final String clientType = ClientTypeHelper.extractClientType(targetMimeType);
        if(targetMimeType != null && clientType == null) throw new NotAcceptableException();
        return resourceConverterProvider.getToClientConverter(
                repositoryResource.getResourceType(),
                clientType);
    }

}