Package org.sintef.umt.transformer

Examples of org.sintef.umt.transformer.XMLUtility


        } 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);
            }
View Full Code Here

TOP

Related Classes of org.sintef.umt.transformer.XMLUtility

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.