code: public static void writeMapToXML(final Map<URI, Set<URI>> m, final File outputFile) throws IOException {
          if (m == null) {
              return;
          }
          final Properties prop = new Properties();
          for (final Map.Entry<URI, Set<URI>> entry: m.entrySet()) {
              final URI key = entry.getKey();
              final String value = StringUtils.join(entry.getValue(), COMMA);
              prop.setProperty(key.getPath(), value);
          }
          try (OutputStream os = new FileOutputStream(outputFile)) {
              prop.storeToXML(os, null);
          } catch (final IOException e) {
              throw new IOException("Failed to write subject scheme graph: " + e.getMessage(), e);
          }
      }
docs: Write map of sets to a file.
  
  <p>The serialization format is XML properties format where values are comma
  separated lists.</p>
  
  @param m map to serialize
  @param outputFile output filename, relative to temporary directory