out.println(XMLTools.indentXML(companionXML, true)); out.close(); companionUUID = "urn:uuid:" + getUUID( new Location(companion).getName());
private String getOMEXML(String file) throws FormatException, IOException { // generate UUID and add to OME element String uuid = "urn:uuid:" + getUUID(new Location(file).getName()); omeMeta.setUUID(uuid); OMEXMLMetadataRoot root = (OMEXMLMetadataRoot) omeMeta.getRoot(); root.setCreator(FormatTools.CREATOR); String xml; try { xml = service.getOMEXML(omeMeta); } catch (ServiceException se) { throw new FormatException(se); } return xml; }
private String getOMEXML(String file) throws FormatException, IOException { // generate UUID and add to OME element String uuid = "urn:uuid:" + getUUID(new Location(file).getName()); omeMeta.setUUID(uuid); OMEXMLMetadataRoot root = (OMEXMLMetadataRoot) omeMeta.getRoot(); root.setCreator(FormatTools.CREATOR); String xml; try { xml = service.getOMEXML(omeMeta); } catch (ServiceException se) { throw new FormatException(se); } return xml; }
out.println(XMLTools.indentXML(companionXML, true)); out.close(); companionUUID = "urn:uuid:" + getUUID( new Location(companion).getName());
String uuid = "urn:uuid:" + getUUID(filename); omeMeta.setUUIDValue(uuid, series, nextPlane);
String uuid = "urn:uuid:" + getUUID(filename); omeMeta.setUUIDValue(uuid, series, nextPlane);
private String getBinaryOnlyOMEXML( String file, String companion, String companionUUID) throws FormatException, IOException, DependencyException, ServiceException { ServiceFactory factory = new ServiceFactory(); OMEXMLService service = factory.getInstance(OMEXMLService.class); OMEXMLMetadata meta = service.createOMEXMLMetadata(); String uuid = "urn:uuid:" + getUUID(new Location(file).getName()); meta.setUUID(uuid); meta.setBinaryOnlyMetadataFile(new Location(companion).getName()); meta.setBinaryOnlyUUID(companionUUID); OMEXMLMetadataRoot root = (OMEXMLMetadataRoot) meta.getRoot(); root.setCreator(FormatTools.CREATOR); return service.getOMEXML(meta); }
private String getBinaryOnlyOMEXML( String file, String companion, String companionUUID) throws FormatException, IOException, DependencyException, ServiceException { ServiceFactory factory = new ServiceFactory(); OMEXMLService service = factory.getInstance(OMEXMLService.class); OMEXMLMetadata meta = service.createOMEXMLMetadata(); String uuid = "urn:uuid:" + getUUID(new Location(file).getName()); meta.setUUID(uuid); meta.setBinaryOnlyMetadataFile(new Location(companion).getName()); meta.setBinaryOnlyUUID(companionUUID); OMEXMLMetadataRoot root = (OMEXMLMetadataRoot) meta.getRoot(); root.setCreator(FormatTools.CREATOR); return service.getOMEXML(meta); }