Representation representation = null;
if (variant.getMediaType() == MediaType.APPLICATION_XML) {
representation = new WriterRepresentation(MediaType.APPLICATION_XML) {
public void write(Writer writer) throws IOException {
CrawlJobModel model = makeDataModel();
model.put("heapReport", getEngine().heapReportData());
XmlMarshaller.marshalDocument(writer, "job", model);
}
};
} else {
representation = new WriterRepresentation(MediaType.TEXT_HTML) {