public Collection<Utterance> call(final AnalysisRequest request) {
        ClientResponse response = null;
        try {
            response = service.type(MediaType.APPLICATION_JSON)
                              .accept(MediaType.APPLICATION_JSON)
                              .post(ClientResponse.class, request);
            return response.getEntity(new GenericType<Collection<Utterance>>() {});
        }
        finally {
            // belt and braces
            if (response != null) {
                //noinspection OverlyBroadCatchBlock
                try { response.close(); }
                catch (final Throwable ignored) { /* do nothing */ }
            }
        }
    }
public Collection < Utterance > call ( final AnalysisRequest request ) { ClientResponse response = null ; try { response = service . type ( MediaType . APPLICATION_JSON ) . accept ( MediaType . APPLICATION_JSON ) . post ( ClientResponse . class , request ) ; return response . getEntity ( new GenericType < Collection < Utterance > > ( ) { } ) ; } finally { if ( response != null ) { try { response . close ( ) ; } catch ( final Throwable ignored ) { } } } }
Call the webservice with some request to analyse for SNOMED CT codes - this method can be used repeatedly on the
same SnomedClient instance.
@param request request to analyse
@return object graph containing all the analysis output