private List<String> loadSqlDataFile( ServletContext servletContext, Dbms dbms, String appPath, String filePath, String filePrefix) throws FileNotFoundException, IOException { // --- find out which dbms data file to load String file = checkFilePath(filePath, filePrefix, DatabaseType.lookup(dbms).toString()); // --- load the sql data return Lib.text.load(servletContext, appPath, file, Jeeves.ENCODING); }
/** * @param dbms * @return * @throws FileNotFoundException * @throws IOException */ private List<String> loadSchemaFile( ServletContext servletContext, Dbms dbms, String appPath, String filePath, String filePrefix) // FIXME : // use // resource // dir // instead // of // appPath throws FileNotFoundException, IOException { // --- find out which dbms schema to load String file = checkFilePath(filePath, filePrefix, DatabaseType.lookup(dbms).toString()); if (Log.isDebugEnabled(Geonet.DB)) Log.debug(Geonet.DB, " Loading script:" + file); // --- load the dbms schema return Lib.text.load(servletContext, appPath, file); }