example.createProgram(controller);
for (SerializationFormat serializationFormat : Arrays.asList(DOT, TXT)) {
String outFileName = example.getClass().getName() + "."
+ serializationFormat.name().toLowerCase();
PrintStream output = new PrintStream(new FileOutputStream(new File(outDir, outFileName)));
new ModelSerializer(serializationFormat, new XStream()).write(workspace, output);
}
LibraryRepository repository = new LibraryRepository(outDir,
new ModelSerializer(XML, new XStream()));
for (Project project : workspace.getProjects()) {
repository.save(project);
}
}
}