|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.sha.cybershake.db.SiteInfo2DB
public class SiteInfo2DB
| Constructor Summary | |
|---|---|
SiteInfo2DB(DBAccess dbaccess)
|
|
| Method Summary | |
|---|---|
int |
deleteRegionsForSite(int siteId)
|
int |
deleteRupturesForSite(int siteId)
|
int |
deleteSiteRecord(int siteId)
|
ArrayList<String> |
getAllSites()
|
ArrayList<CybershakeSite> |
getAllSitesFromDB()
Gets all CybershakeSite's from the Database |
LocationList |
getAllSitesLocation()
|
ArrayList<Integer> |
getERFsForSite(int siteID)
|
Location |
getLocationForSite(String site)
|
ArrayList<Integer> |
getRupIdsForSite(int siteID,
int erf_id,
int srcId)
|
ArrayList<Integer> |
getRupIdsForSite(String siteShortName,
int erf_id,
int srcId)
|
double |
getSiteCutoffDistance(int siteID)
Returns the site id of the cybershake site for the corresponding cybershake_short_site_name |
double |
getSiteCutoffDistance(String cybershakeShortSiteName)
Returns the site id of the cybershake site for the corresponding cybershake_short_site_name |
CybershakeSite |
getSiteFromDB(int siteID)
Gets a CybershakeSite from the Database |
CybershakeSite |
getSiteFromDB(String shortName)
Gets a CybershakeSite from the Database |
int |
getSiteId(double lat,
double lon)
Returns the site id the cybershake site with given lat and lon |
int |
getSiteId(String cybershakeShortSiteName)
Returns the site id of the cybershake site for the corresponding cybershake_short_site_name |
ArrayList<CybershakeSiteType> |
getSiteTypes()
|
ArrayList<Integer> |
getSrcIdsForSite(int siteID,
int erf_id)
|
ArrayList<Integer> |
getSrcIdsForSite(String siteShortName,
int erf_id)
|
void |
getSrcIfoForSite(int siteID,
int erf_id,
ArrayList<Integer> ids)
|
void |
getSrcIfoForSite(String siteShortName,
int erf_id,
ArrayList<Integer> ids)
|
void |
insertSite_RuptureInfo(int siteId,
int erfId,
int sourceId,
int ruptureId,
double cutOffDistance)
Inserts the rupture ids that correspond to a given site within given cutoff distance inside the table CyberShake_Site_Ruptures |
void |
insertSite_RuptureInfoList(int siteId,
int erfId,
int sourceId,
ArrayList<Integer> ruptureId,
double cutOffDistance)
Inserts thelist of rupture ids that correspond to a given site within given cutoff distance inside the table Site_Ruptures. |
int |
insertSite(String siteName,
String siteShortName,
double lat,
double lon)
Inserts the new site in the database table CyberShake_Sites |
void |
insertSiteRegionalBounds(int siteId,
int erfId,
double cutOffDistance,
double maxLat,
int maxLatSrcId,
int maxLatRupId,
double minLat,
int minLatSrcId,
int minLatRupId,
double maxLon,
int maxLonSrcId,
int maxLonRupId,
double minLon,
int minLonSrcId,
int minLonRupId)
Inserts the regional bounds (min/max lat/lon) for all cybershake sites in table CyberShake_Site_Regions |
boolean |
isRupInDB(int erfID,
int sourceID,
int rupID)
Find out if the given rupture is already in the database |
boolean |
isSiteRupInDB(int erfID,
int sourceID,
int rupID,
int siteID)
Find out if the given rupture is already in the database |
static void |
main(String[] args)
tester main function |
void |
setSiteLongName(int siteID,
String longName)
|
void |
setSiteType(int siteID,
int typeID)
|
void |
updateSiteRegionalBounds(int siteId,
int erfId,
double cutOffDistance,
double maxLat,
int maxLatSrcId,
int maxLatRupId,
double minLat,
int minLatSrcId,
int minLatRupId,
double maxLon,
int maxLonSrcId,
int maxLonRupId,
double minLon,
int minLonSrcId,
int minLonRupId)
Inserts the regional bounds (min/max lat/lon) for all cybershake sites in table CyberShake_Site_Regions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SiteInfo2DB(DBAccess dbaccess)
| Method Detail |
|---|
public int insertSite(String siteName,
String siteShortName,
double lat,
double lon)
insertSite in interface SiteInfo2DBAPIsiteName - siteShortName - lat - lon -
public void setSiteType(int siteID,
int typeID)
public void setSiteLongName(int siteID,
String longName)
public int getSiteId(String cybershakeShortSiteName)
getSiteId in interface SiteInfo2DBAPIcybershakeShortSiteName -
public double getSiteCutoffDistance(String cybershakeShortSiteName)
cybershakeShortSiteName -
public double getSiteCutoffDistance(int siteID)
cybershakeShortSiteName -
public int getSiteId(double lat,
double lon)
getSiteId in interface SiteInfo2DBAPIlat - lon -
public void insertSiteRegionalBounds(int siteId,
int erfId,
double cutOffDistance,
double maxLat,
int maxLatSrcId,
int maxLatRupId,
double minLat,
int minLatSrcId,
int minLatRupId,
double maxLon,
int maxLonSrcId,
int maxLonRupId,
double minLon,
int minLonSrcId,
int minLonRupId)
insertSiteRegionalBounds in interface SiteInfo2DBAPIsiteId - erfId - cutOffDistance - maxLat - maxLatSrcId - maxLatRupId - minLat - minLatSrcId - minLatRupId - maxLon - maxLonSrcId - maxLonRupId - minLon - minLonSrcId - minLonRupId -
public void updateSiteRegionalBounds(int siteId,
int erfId,
double cutOffDistance,
double maxLat,
int maxLatSrcId,
int maxLatRupId,
double minLat,
int minLatSrcId,
int minLatRupId,
double maxLon,
int maxLonSrcId,
int maxLonRupId,
double minLon,
int minLonSrcId,
int minLonRupId)
updateSiteRegionalBounds in interface SiteInfo2DBAPIsiteId - erfId - cutOffDistance - maxLat - maxLatSrcId - maxLatRupId - minLat - minLatSrcId - minLatRupId - maxLon - maxLonSrcId - maxLonRupId - minLon - minLonSrcId - minLonRupId -
public void insertSite_RuptureInfo(int siteId,
int erfId,
int sourceId,
int ruptureId,
double cutOffDistance)
insertSite_RuptureInfo in interface SiteInfo2DBAPIsiteId - erfId - sourceId - ruptureId - cutoffDistance -
public void insertSite_RuptureInfoList(int siteId,
int erfId,
int sourceId,
ArrayList<Integer> ruptureId,
double cutOffDistance)
SiteInfo2DBAPI
insertSite_RuptureInfoList in interface SiteInfo2DBAPIruptureId - - list of Rupture IDs
public boolean isRupInDB(int erfID,
int sourceID,
int rupID)
isRupInDB in interface SiteInfo2DBAPIerfID - sourceID - rupID -
public boolean isSiteRupInDB(int erfID,
int sourceID,
int rupID,
int siteID)
isSiteRupInDB in interface SiteInfo2DBAPIerfID - sourceID - rupID - siteID -
public LocationList getAllSitesLocation()
getAllSitesLocation in interface SiteInfo2DBAPIpublic ArrayList<String> getAllSites()
getAllSites in interface SiteInfo2DBAPI
public ArrayList<Integer> getRupIdsForSite(String siteShortName,
int erf_id,
int srcId)
getRupIdsForSite in interface SiteInfo2DBAPIsiteShortName - srcId -
public ArrayList<Integer> getRupIdsForSite(int siteID,
int erf_id,
int srcId)
getRupIdsForSite in interface SiteInfo2DBAPIsiteShortName - srcId -
public void getSrcIfoForSite(String siteShortName,
int erf_id,
ArrayList<Integer> ids)
siteShortName - short site name as in database for Cybershake site
public void getSrcIfoForSite(int siteID,
int erf_id,
ArrayList<Integer> ids)
siteShortName - short site name as in database for Cybershake site
public ArrayList<Integer> getSrcIdsForSite(String siteShortName,
int erf_id)
getSrcIdsForSite in interface SiteInfo2DBAPIsiteShortName - short site name as in database for Cybershake site
public ArrayList<Integer> getSrcIdsForSite(int siteID,
int erf_id)
getSrcIdsForSite in interface SiteInfo2DBAPIsiteShortName - short site name as in database for Cybershake site
public Location getLocationForSite(String site)
getLocationForSite in interface SiteInfo2DBAPIsite -
public CybershakeSite getSiteFromDB(String shortName)
getSiteFromDB in interface SiteInfo2DBAPIshortName -
public CybershakeSite getSiteFromDB(int siteID)
getSiteFromDB in interface SiteInfo2DBAPIshortName -
public ArrayList<CybershakeSite> getAllSitesFromDB()
getAllSitesFromDB in interface SiteInfo2DBAPIpublic ArrayList<CybershakeSiteType> getSiteTypes()
public ArrayList<Integer> getERFsForSite(int siteID)
public int deleteRupturesForSite(int siteId)
public int deleteRegionsForSite(int siteId)
public int deleteSiteRecord(int siteId)
public static void main(String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||