Right got it. You have to
Resource resource = resourceSet.getResource(uri, true);
not create it. Thanks for the help :)