WaterLocations.java [src/WaterLocations] Revision: default  Date:
package WaterLocations;

/**
 * Last Updated: 20-November-2018
 * @author robert, Tyler Wible
 * @since April-2017
 */
public class WaterLocations {
    
    /**
     * Initializes a data source based on the provided database name
     * @param database  the name of the water locations source desired (CDSN, STORET, USGS)
     * @return a WaterLocationsInterface for the appropriate data source, or null
     */    
    public static WaterLocationsInterface getNewWaterLocationsInterface(String database){
        WaterLocationsInterface locationsSource = null;
        
        if (database.equalsIgnoreCase("CDSN")) {
            locationsSource = new WaterLocations_CDSN();
        }else if (database.equalsIgnoreCase("CDWR")) {
            locationsSource = new WaterLocations_CDWR();
        } else if (database.equalsIgnoreCase("STORET")) {
            locationsSource = new WaterLocations_WqDataPortal();
        } else if (database.equalsIgnoreCase("USGS")) {
            locationsSource = new WaterLocations_USGS();
        }
        
        return locationsSource;
    }
}