/** * Returns the application's content negotiation service or create a new * one. * * @return The content negotiation service. */ public org.restlet.service.ConnegService getConnegService() { org.restlet.service.ConnegService result = null; result = getApplication().getConnegService(); if (result == null) { result = new org.restlet.service.ConnegService(); } return result; }
variantList.add(new Variant(MediaType.APPLICATION_JSON)); Variant variant = application.getConnegService().getPreferredVariant(variantList, request, application.getMetadataService());
metadataService = new MetadataService(); } else { connegService = app.getConnegService(); metadataService = app.getMetadataService();