@ServiceProvider(service = WorkspacePersistenceProvider.class, position = 10000)
public class DhnsPersistenceProvider implements WorkspacePersistenceProvider {
public void writeXML(XMLStreamWriter writer, Workspace workspace) {
DhnsGraphController graphController = Lookup.getDefault().lookup(DhnsGraphController.class);
Dhns dhns = (Dhns) graphController.getModel(workspace);
DHNSSerializer serializer = new DHNSSerializer();
try {
serializer.writeDhns(writer, dhns);
} catch (XMLStreamException ex) {
throw new RuntimeException(ex);