use of loci.formats.gui.XMLWindow in project bioformats by openmicroscopy.
the class DisplayHandler method displayOMEXML.
/**
* Displays OME-XML metadata in a tree in its own window.
*/
public XMLWindow displayOMEXML() throws FormatException, IOException {
if (!options.isShowOMEXML())
return null;
XMLWindow metaWindow = null;
metaWindow = new XMLWindow("OME Metadata - " + process.getIdName());
Exception exc = null;
try {
ServiceFactory factory = new ServiceFactory();
OMEXMLService service = factory.getInstance(OMEXMLService.class);
metaWindow.setXML(service.getOMEXML(process.getOMEMetadata()));
WindowTools.placeWindow(metaWindow);
metaWindow.setVisible(true);
} catch (DependencyException e) {
exc = e;
} catch (ServiceException e) {
exc = e;
} catch (ParserConfigurationException e) {
exc = e;
} catch (SAXException e) {
exc = e;
}
if (exc != null)
throw new FormatException(exc);
// save reference to OME-XML window
xmlWindow = metaWindow;
return metaWindow;
}
Aggregations