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 java.lang.Object

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

Author:
nitingupta

Field Summary
static java.lang.String DATABASE_NAME
           
static DBAccess db
           
static java.lang.String HOST_NAME
           
static boolean timer
           
 
Constructor Summary
Cybershake_OpenSHA_DBApplication()
           
 
Method Summary
 java.util.List<CybershakeSite> getAllSites()
           
 java.util.List<CybershakeSite> getAllSites(int minIndex)
           
static DBAccess getAuthenticatedDBAccess(boolean exitOnCancel)
           
static DBAccess getAuthenticatedDBAccess(boolean exitOnCancel, boolean allowReadOnly)
           
 java.util.ArrayList<CybershakeSite> getSiteListFromFile(java.lang.String fileName)
           
 void insertNewERFForAllSites(ERF2DB erf2db, java.lang.String name, java.lang.String description)
           
 void insertNewERFForSites(java.util.List<CybershakeSite> sites, ERF2DB erf2db, java.lang.String name, java.lang.String description, boolean forceAdd)
           
static void main(java.lang.String[] args)
           
 void putSiteListRupsIntoDB(java.util.ArrayList<CybershakeSite> sites, ERF forecast, int erfId, CybershakeSiteInfo2DB siteDB)
           
 void setSiteInfoObject(CybershakeSiteInfo2DB csSiteDB)
           
 void updateSiteRegionalBounds(java.util.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 java.lang.String HOST_NAME

DATABASE_NAME

public static java.lang.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(java.util.ArrayList<CybershakeSite> sites,
                                  ERF forecast,
                                  int erfId,
                                  CybershakeSiteInfo2DB siteDB)

updateSiteRegionalBounds

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

setSiteInfoObject

public void setSiteInfoObject(CybershakeSiteInfo2DB csSiteDB)

getSiteListFromFile

public java.util.ArrayList<CybershakeSite> getSiteListFromFile(java.lang.String fileName)
                                                        throws java.io.FileNotFoundException,
                                                               java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

getAllSites

public java.util.List<CybershakeSite> getAllSites()

getAllSites

public java.util.List<CybershakeSite> getAllSites(int minIndex)

insertNewERFForSites

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

insertNewERFForAllSites

public void insertNewERFForAllSites(ERF2DB erf2db,
                                    java.lang.String name,
                                    java.lang.String description)

getAuthenticatedDBAccess

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

getAuthenticatedDBAccess

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

main

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