}
String metadataXml = this.getMetadataText(uuid, catalogUri);
this.getSearchResult().setCurrentMetadataXmlInView(metadataXml);
this.setNavigationOutcome(NAV_RESULTS2VIEWDETAILS);
MetadataDocument document = new MetadataDocument();
Schema schema = document.prepareForView(context,metadataXml);
if ((detailsPanelGroup != null) && (schema != null)) {
setResourceUrl(schema.getMeaning().getResourceUrl());
// check for a configured XSLT to generate the details page,
// otherwise, generate the details page from the defined schema
String htmlFragment = "";
if (schema.getDetailsXslt().length() > 0) {
try {
MessageBroker broker = this.extractMessageBroker();
htmlFragment = Val.chkStr(document.transformDetails(metadataXml,schema.getDetailsXslt(),broker));
} catch (TransformerException e) {
htmlFragment = "";
LOG.log(Level.SEVERE,"Cannot transform metadata details: "+schema.getDetailsXslt(),e);
}
}
if ((htmlFragment != null) && (htmlFragment.length() > 0)) {
HtmlOutputText component = new HtmlOutputText();
component.setId("xsltBasedDetails");
component.setValue(htmlFragment);
component.setEscape(false);
detailsPanelGroup.getChildren().add(component);
} else {
UiContext uiContext = new UiContext();
schema.appendDetailSections(uiContext,detailsPanelGroup);
}
}
}