I am facing a problem by getting org.eclipse.emf.ecore.resource.Resource. from org.eclipse.emf.ecore.resource.ResourceSet by calling getResource(URI uri, boolean loadOnDemand) method of ResourceSet.
The problem is actually , this method takes "file" as an input, but I want to get Resource by giving "String" as a input.
For better understanding here is the code snippet.
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
public static void main(String args[]){
ResourceSet set = new ResourceSetImpl();
Resource resource = set.getResource(URI.createURI("c:/users/input/inputFile.txt"),
true);
}
I have a String as a input but this api takes only file..so is there any other api who takes String as a input and get the Resource????
I also do not want to make file.