1 17 package org.eclipse.emf.ecore.xmi.impl; 18 19 20 import org.eclipse.emf.common.util.URI; 21 import org.eclipse.emf.ecore.resource.Resource; 22 import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 23 import org.eclipse.emf.ecore.xmi.XMLResource; 24 25 26 public class EcoreResourceFactoryImpl extends ResourceFactoryImpl 27 { 28 31 public EcoreResourceFactoryImpl() 32 { 33 super(); 34 } 35 36 public Resource createResource(URI uri) 37 { 38 XMLResourceImpl result = new XMIResourceImpl(uri); 39 result.setEncoding("UTF-8"); 40 41 result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 42 result.getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer (80)); 43 return result; 44 } 45 } 46 | Popular Tags |