if (logger.isDebugEnabled())
{
logger.debug("Registering resource factories");
}
final ResourceSet resourceSet = new EMXProxyResolvingResourceSet();
final Map extensionToFactoryMap = resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap();
// - we need to perform these registrations in order to load a UML2 model into EMF
// see: http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E/uml2-home/faq.html#6
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI, UML2Package.eINSTANCE);
extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, UML2Resource.Factory.INSTANCE);
// if IBM's metamodel jars are on the classpath, we can register the
// package factories
registerOptionalRsmMetamodels(resourceSet.getPackageRegistry());
// - populate the load options
final Map loadOptions = this.getLoadOptions();
loadOptions.put(UML2Resource.OPTION_DISABLE_NOTIFY, Boolean.FALSE);
loadOptions.put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);