private String presentations(SkysailResponse<List<?>> skysailResponse) { Set<String> mediaTypes = new HashSet<String>(); List<ConverterHelper> registeredConverters = Engine.getInstance().getRegisteredConverters(); for (ConverterHelper ch : registeredConverters) { List<VariantInfo> variants = ch.getVariants(skysailResponse.getClass()); if (variants == null) { continue; } for (VariantInfo variantInfo : variants) { mediaTypes.add(variantInfo.getMediaType().getSubType()); } } StringBuilder sb = new StringBuilder(); sb.append("<ul>\n"); for (String mediaType : mediaTypes) { sb.append("<li><a href='?media=").append(mediaType).append("'>"); sb.append(mediaType).append("</a></li>\n"); } // sb.append("<li><a href='?media=json'>Json</a></li>\n"); sb.append("</ul>\n"); return sb.toString(); }