org.opensha.sha.cybershake.db
Class Cybershake_OpenSHA_DBApplication

java.lang.Object
  extended by org.opensha.sha.cybershake.db.Cybershake_OpenSHA_DBApplication

public class Cybershake_OpenSHA_DBApplication
extends Object

Main application to put the Cybershake locations and Earthquake Rupture Forecast information in the database.

Author:
nitingupta

Field Summary
static String DATABASE_NAME
           
static DBAccess db
           
static String HOST_NAME
           
static boolean timer
           
 
Constructor Summary
Cybershake_OpenSHA_DBApplication()
           
 
Method Summary
 List<CybershakeSite> getAllSites()
           
 List<CybershakeSite> getAllSites(int minIndex)
           
static DBAccess getAuthenticatedDBAccess(boolean exitOnCancel)
           
static DBAccess getAuthenticatedDBAccess(boolean exitOnCancel, boolean allowReadOnly)
           
 ArrayList<CybershakeSite> getSiteListFromFile(String fileName)
           
 void insertNewERFForAllSites(ERF2DB erf2db, String name, String description)
           
 void insertNewERFForSites(List<CybershakeSite> sites, ERF2DB erf2db, String name, String description, boolean forceAdd)
           
static void main(String[] args)
           
 void putSiteListRupsIntoDB(ArrayList<CybershakeSite> sites, ERF forecast, int erfId, CybershakeSiteInfo2DB siteDB)
           
 void setSiteInfoObject(CybershakeSiteInfo2DB csSiteDB)
           
 void updateSiteRegionalBounds(ArrayList<CybershakeSite> sites, ERF forecast, int erfId, CybershakeSiteInfo2DB siteDB)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOST_NAME

public static String HOST_NAME

DATABASE_NAME

public static String DATABASE_NAME

db

public static final DBAccess db

timer

public static boolean timer
Constructor Detail

Cybershake_OpenSHA_DBApplication

public Cybershake_OpenSHA_DBApplication()
Method Detail

putSiteListRupsIntoDB

public void putSiteListRupsIntoDB(ArrayList<CybershakeSite> sites,
                                  ERF forecast,
                                  int erfId,
                                  CybershakeSiteInfo2DB siteDB)

updateSiteRegionalBounds

public void updateSiteRegionalBounds(ArrayList<CybershakeSite> sites,
                                     ERF forecast,
                                     int erfId,
                                     CybershakeSiteInfo2DB siteDB)

setSiteInfoObject

public void setSiteInfoObject(CybershakeSiteInfo2DB csSiteDB)

getSiteListFromFile

public ArrayList<CybershakeSite> getSiteListFromFile(String fileName)
                                              throws FileNotFoundException,
                                                     IOException
Throws:
FileNotFoundException
IOException

getAllSites

public List<CybershakeSite> getAllSites()

getAllSites

public List<CybershakeSite> getAllSites(int minIndex)

insertNewERFForSites

public void insertNewERFForSites(List<CybershakeSite> sites,
                                 ERF2DB erf2db,
                                 String name,
                                 String description,
                                 boolean forceAdd)

insertNewERFForAllSites

public void insertNewERFForAllSites(ERF2DB erf2db,
                                    String name,
                                    String description)

getAuthenticatedDBAccess

public static DBAccess getAuthenticatedDBAccess(boolean exitOnCancel,
                                                boolean allowReadOnly)
                                         throws IOException
Throws:
IOException

getAuthenticatedDBAccess

public static DBAccess getAuthenticatedDBAccess(boolean exitOnCancel)
                                         throws IOException
Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Parameters:
args -
Throws:
IOException