oos.writeObject(ontoSpreadState);
oos.close();
output.close();
return iterations.add(output);
} catch (IOException e) {
throw new OntoSpreadModelException(e,"Writing iteration "+current);
}
// OntoSpreadXMLState xmlSerializer = OntoSpreadStateXMLSerializer.asXML(ontoSpreadState);
// Document document = OntoSpreadXMLStateXMLBind.getInstance().serializeOntoSpreadXMLState(xmlSerializer);
// return iterations.add(DOMToString.print(document));
}