} else if (exportType.startsWith("XMI") || exportType.startsWith("UML2")) {
// Perform XMI Light 2 XMI Transformation
StringWriter writer = new StringWriter ();
XMLUtility.streamToXML(result, new BufferedWriter(writer));
StringBuffer buf = writer.getBuffer();
XMLUtility xmlUtil = new XMLUtility ();
BufferedReader sourceReader = new BufferedReader(new StringReader(buf.toString()));
String transformationUri = null;
if (exportType.startsWith("XMI"))
transformationUri = UMTMain.resource_dir + UMTMain.getResourceName("transformation.xmilight2xmi");
else if (exportType.startsWith("UML2"))
transformationUri = UMTMain.resource_dir + UMTMain.getResourceName("transformation.xmilight2uml2");
BufferedReader transformationReader = null;
try {
transformationReader = new BufferedReader (new FileReader(transformationUri));
} catch (FileNotFoundException fex) {
System.out.println ("VariabilityManager::startResolving:" + fex);
}
if (transformationReader != null) {
writer = new StringWriter ();
xmlUtil.transform(sourceReader, transformationReader, new BufferedWriter(writer));
buf = writer.getBuffer();
}
if (storeModel) {
VariabilityManager.storeTextModel(result, buf, exportType);
}