org.opensha.sha.cybershake.db
Interface ERF2DBAPI

All Known Implementing Classes:
ERF2DB, MeanUCERF2_ToDB, NSHMP2002_ToDB

public interface ERF2DBAPI


Method Summary
 void deleteRupture(int erfID, int srcID, int rupID)
          Deletes a rupture
 java.util.ArrayList<CybershakeERF> getAllERFs()
          Get a list of all ERFs in the database
 int getInserted_ERF_ID(java.lang.String erfName)
          Retrives the id of the ERF from the table ERF_IDs for the corresponding ERF_Name.
 double getRuptureProb(int erfId, int sourceId, int rupId)
          Retrives the rupture probability
 int getSourceIDFromName(int erfID, java.lang.String name)
          Returns the ID for a given rupture name
 int insertERFId(java.lang.String erfName, java.lang.String erfDesc)
          Inserts ERF name and description in table ERF_IDs
 void insertERFParams(int erfId, java.lang.String attrName, java.lang.String attrVal, java.lang.String attrType, java.lang.String attrUnits)
          Inserts the ERF parameters info in the table "ERF_Metadata"
 void insertERFRuptureInfo(int erfId, int sourceId, int ruptureId, java.lang.String sourceName, java.lang.String sourcetype, double magnitude, double probability, double gridSpacing, double surfaceStartLat, double surfaceStartLon, double surfaceStartDepth, double surfaceEndLat, double surfaceEndLon, double surfaceEndDepth, int numRows, int numCols, int numPoints)
          Inserts source rupture information for the ERF in table "Ruptures"
 void insertSrcRupInDB(ERF forecast, int erfID, int sourceID, int rupID)
          Insert the specified rupture from the given forecast
 

Method Detail

getAllERFs

java.util.ArrayList<CybershakeERF> getAllERFs()
Get a list of all ERFs in the database

Returns:

insertERFParams

void insertERFParams(int erfId,
                     java.lang.String attrName,
                     java.lang.String attrVal,
                     java.lang.String attrType,
                     java.lang.String attrUnits)
Inserts the ERF parameters info in the table "ERF_Metadata"

Parameters:
erfName -
attrName -
attrVal -

insertERFId

int insertERFId(java.lang.String erfName,
                java.lang.String erfDesc)
Inserts ERF name and description in table ERF_IDs

Parameters:
erfName -
erfDesc -
Returns:

insertERFRuptureInfo

void insertERFRuptureInfo(int erfId,
                          int sourceId,
                          int ruptureId,
                          java.lang.String sourceName,
                          java.lang.String sourcetype,
                          double magnitude,
                          double probability,
                          double gridSpacing,
                          double surfaceStartLat,
                          double surfaceStartLon,
                          double surfaceStartDepth,
                          double surfaceEndLat,
                          double surfaceEndLon,
                          double surfaceEndDepth,
                          int numRows,
                          int numCols,
                          int numPoints)
Inserts source rupture information for the ERF in table "Ruptures"

Parameters:
erfName -
sourceId -
ruptureId -
sourceName -
sourcetype -
magnitude -
probability -
gridSpacing -
numRows -
numCols -
numPoints -

getInserted_ERF_ID

int getInserted_ERF_ID(java.lang.String erfName)
Retrives the id of the ERF from the table ERF_IDs for the corresponding ERF_Name.

Parameters:
erfName -
Returns:

getRuptureProb

double getRuptureProb(int erfId,
                      int sourceId,
                      int rupId)
Retrives the rupture probability

Parameters:
erfId -
sourceId -
rupId -
Returns:

insertSrcRupInDB

void insertSrcRupInDB(ERF forecast,
                      int erfID,
                      int sourceID,
                      int rupID)
Insert the specified rupture from the given forecast

Parameters:
forecast -
erfID -
sourceID -
rupID -

deleteRupture

void deleteRupture(int erfID,
                   int srcID,
                   int rupID)
Deletes a rupture

Parameters:
erfID -
srcID -
rupID -

getSourceIDFromName

int getSourceIDFromName(int erfID,
                        java.lang.String name)
Returns the ID for a given rupture name

Parameters:
erfID -
name -
Returns: