Beispiel #1
0
 public FileLoaderResults loadFile(Entity entity, String filename, String loaderAlias) {
   File file = new File(filename);
   log.debug("Loading file " + file.getAbsolutePath());
   if (!file.isFile() || !file.canRead()) {
     log.error("Input file is not available.");
     throw new RuntimeException("Input file " + filename + " is not readable.");
   }
   loader = FileLoaderFactory.getFileLoader(Context.getApplicationContext(), loaderAlias);
   loader.setLoaderAlias(loaderAlias);
   loader.setEntityLoaderManager(entityLoaderMgr);
   loader.init();
   return loader.parseFile(entity, file);
 }