aurel pestell Messages: 90 Registered: October 2013 Location: Sweden
Does a Resource always boil down to a physical file ?
In my case I have the content of a xml file that is stored in a java String.
Do I really need to save it on the disk and load the Resource from there, that way:
You can load resourse from anything as long as there is a URI handler which knows how to open stream for your "anything". In one of my projects I used mem: protocol and a custom protocol handler to load models from in-memory resourses.
You can use ResourceSet.createResource to create the resource then load
it from a stream.
On 23/02/2016 15:03, aurel pestell wrote:
> Does a Resource always boil down to a physical file ?
> In my case I have the content of a xml file that is stored in a java
> Do I really need to save it on the disk and load the Resource from
> there, that way:
> Resource resource = resourceSet.getResource(fileURI, true);
> or is there a way to avoid saving on the disk ?
> Thank you.