*/
// TODO: refactor EOModelHelper to provide a similar method without loading
// all entity files in memory... here we simply copied stuff from EOModelHelper
public Map loadModeIndex(String path) throws Exception {
ResourceLocator locator = new ResourceLocator();
locator.setSkipClasspath(false);
locator.setSkipCurrentDirectory(false);
locator.setSkipHomeDirectory(true);
locator.setSkipAbsolutePath(false);
if (!path.endsWith(".eomodeld")) {
path += ".eomodeld";
}
URL base = locator.findDirectoryResource(path);
if (base == null) {
throw new FileNotFoundException("Can't find EOModel: " + path);
}
Parser plistParser = new Parser();