java/dbloader/src/main/java/be/bosa/dt/best/dbloader/Main.java
/**
	 * Load data into Postgis database
	 * 
	 * @param dbstr JDBC string
	 * @param xmlPath path of BeST XML files
	 * @return true upon success
	 */
Load data into Postgis database

@param dbstr JDBC string
@param xmlPath path of BeST XML files
@return true upon success
Load data into Postgis database @param dbstr JDBC string @param xmlPath path of BeST XML files @return true upon success
private static boolean loadPostgis(String dbstr, Path xmlPath) {
		PostGisLoader loader = null;
		if (dbstr.contains("postg") || dbstr.contains("pgsql")) {
			try {
				loader = new PostGisLoader(dbstr);
			} catch (Exception ex) {
				LOG.severe("Database loader count not be initialized");
				return false;
				}
		} else {
			LOG.severe("Database type not supported");
			return false;
		}
		try {
			loader.loadData(xmlPath);
		} catch (ClassNotFoundException | SQLException e) {
			LOG.log(Level.SEVERE, "Failed", e);
			return false;
		}
		return true;
	}
private static boolean loadPostgis ( String dbstr , Path xmlPath ) { PostGisLoader loader = null ; if ( dbstr . contains ( "postg" ) || dbstr . contains ( "pgsql" ) ) { try { loader = new PostGisLoader ( dbstr ) ; } catch ( Exception ex ) { LOG . severe ( "Database loader count not be initialized" ) ; return false ; } } else { LOG . severe ( "Database type not supported" ) ; return false ; } try { loader . loadData ( xmlPath ) ; } catch ( ClassNotFoundException | SQLException e ) { LOG . log ( Level . SEVERE , "Failed" , e ) ; return false ; } return true ; }
Load data into Postgis database
Load data into Postgis database