hu.blackbelt.epsilon.runtime.execution.model.xml.DefaultRuntimeXmlResourceImpl Maven / Gradle / Ivy
package hu.blackbelt.epsilon.runtime.execution.model.xml;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
import java.util.HashMap;
public class DefaultRuntimeXmlResourceImpl extends XMLResourceImpl {
protected boolean useXmiIds = super.useUUIDs();
public DefaultRuntimeXmlResourceImpl() {
super();
setOptimizedOptions();
}
public DefaultRuntimeXmlResourceImpl(URI uri) {
super(uri);
setOptimizedOptions();
}
/*
* TODO: Parameters have to delegate to maven
*/
private void setOptimizedOptions() {
super.setIntrinsicIDToEObjectMap(new HashMap());
this.getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.TRUE);
this.getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, false);
this.getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, new XMLParserPoolImpl(10000, true));
this.getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, new HashMap