Creates a new resource, of the appropriate type, and returns it.
It delegates to the resource factory {@link #getResourceFactoryRegistry registry} to determine the {@link Resource.Factory.Registry#getFactory(URI) correct} factory,and then it uses that factory to {@link Resource.Factory#createResource create} the resourceand adds it to the {@link #getResources contents}. If there is no registered factory, null
will be returned; when running within Eclipse, a default XMI factory will be registered, and this will never return null
.
@param uri the URI of the resource to create.
@return a new resource, or
null
if no factory is registered.