org.opensha.sha.cybershake.db
Class HazardCurve2DB

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

public class HazardCurve2DB
extends Object


Field Summary
static String TABLE_NAME
           
 
Constructor Summary
HazardCurve2DB(DBAccess dbaccess)
           
 
Method Summary
 boolean deleteCurvesForDatasetID(int datasetID)
           
 boolean deleteCurvesForDatasetID(int datasetID, int siteTypeID)
           
 boolean deleteHazardCurve(int curveID)
           
 int deleteHazardCurveID(int curveID)
           
 int deleteHazardCurvePoints(int curveID)
           
 ArrayList<Integer> getAllHazardCurveIDs(int runID, int imTypeID)
           
 ArrayList<Integer> getAllHazardCurveIDs(int erfID, int rupVarScenarioID, int sgtVarID, int velModelID, int imTypeID)
           
 ArrayList<Integer> getAllHazardCurveIDsForDataset(int datasetID, int imTypeID)
           
 ArrayList<Integer> getAllHazardCurveIDsForSite(int siteID, int erfID, int rupVarScenarioID, int sgtVarID, int velModelID)
           
 ArrayList<CybershakeHazardCurveRecord> getAllHazardCurveRecords()
           
 Date getDateForCurve(int hcID)
           
 DiscretizedFunc getHazardCurve(int id)
           
 int getHazardCurveID(int runID, int imTypeID)
           
 int getHazardCurveID(int runID, int datasetID, int imTypeID)
           
 int getHazardCurveID(int siteID, int erfID, int rupVarScenarioID, int sgtVarID, int velModelID, int imTypeID)
           
 ArrayList<CybershakeHazardCurveRecord> getHazardCurveRecordsForDataset(int datasetID)
           
 ArrayList<CybershakeHazardCurveRecord> getHazardCurveRecordsForRun(int runID)
           
 ArrayList<CybershakeHazardCurveRecord> getHazardCurveRecordsForSite(int siteID)
           
 CybershakeIM getIMForCurve(int curveID)
           
 CybershakeIM getIMFromID(int imTypeID)
           
 int getIMTypeIDForCurve(int curveID)
           
 int getNumHazardCurvePoints(int curveID)
           
 int getSiteIDFromCurveID(int hcID)
           
 int getSiteTypeForCurve(CybershakeHazardCurveRecord record)
           
 int getSiteTypeForCurve(CybershakeHazardCurveRecord record, ArrayList<CybershakeRun> runs, ArrayList<CybershakeSite> sites)
           
 ArrayList<CybershakeIM> getSupportedIMs(int runID)
           
 ArrayList<CybershakeIM> getSupportedIMs(int siteID, int erfID, int rupVarID, int sgtVariation, int velModelID)
           
 void insertHazardCurve(CybershakeRun run, int imTypeID, DiscretizedFunc hazardFunc)
           
 void insertHazardCurve(int runID, int imTypeID, DiscretizedFunc hazardFunc, int datasetID)
           
 void insertHazardCurvePoints(int id, DiscretizedFunc hazardFunc)
           
static void main(String[] args)
           
 void replaceHazardCurve(int curveID, DiscretizedFunc hazardFunc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_NAME

public static final String TABLE_NAME
See Also:
Constant Field Values
Constructor Detail

HazardCurve2DB

public HazardCurve2DB(DBAccess dbaccess)
Method Detail

getAllHazardCurveIDs

public ArrayList<Integer> getAllHazardCurveIDs(int erfID,
                                               int rupVarScenarioID,
                                               int sgtVarID,
                                               int velModelID,
                                               int imTypeID)

getHazardCurveRecordsForSite

public ArrayList<CybershakeHazardCurveRecord> getHazardCurveRecordsForSite(int siteID)

getHazardCurveRecordsForRun

public ArrayList<CybershakeHazardCurveRecord> getHazardCurveRecordsForRun(int runID)

getHazardCurveRecordsForDataset

public ArrayList<CybershakeHazardCurveRecord> getHazardCurveRecordsForDataset(int datasetID)

getAllHazardCurveRecords

public ArrayList<CybershakeHazardCurveRecord> getAllHazardCurveRecords()

getAllHazardCurveIDsForDataset

public ArrayList<Integer> getAllHazardCurveIDsForDataset(int datasetID,
                                                         int imTypeID)

getAllHazardCurveIDs

public ArrayList<Integer> getAllHazardCurveIDs(int runID,
                                               int imTypeID)

getAllHazardCurveIDsForSite

public ArrayList<Integer> getAllHazardCurveIDsForSite(int siteID,
                                                      int erfID,
                                                      int rupVarScenarioID,
                                                      int sgtVarID,
                                                      int velModelID)

getNumHazardCurvePoints

public int getNumHazardCurvePoints(int curveID)

getHazardCurveID

public int getHazardCurveID(int runID,
                            int imTypeID)

getHazardCurveID

public int getHazardCurveID(int runID,
                            int datasetID,
                            int imTypeID)

getHazardCurveID

public int getHazardCurveID(int siteID,
                            int erfID,
                            int rupVarScenarioID,
                            int sgtVarID,
                            int velModelID,
                            int imTypeID)

getSiteIDFromCurveID

public int getSiteIDFromCurveID(int hcID)

getDateForCurve

public Date getDateForCurve(int hcID)

getHazardCurve

public DiscretizedFunc getHazardCurve(int id)

insertHazardCurve

public void insertHazardCurve(CybershakeRun run,
                              int imTypeID,
                              DiscretizedFunc hazardFunc)

insertHazardCurve

public void insertHazardCurve(int runID,
                              int imTypeID,
                              DiscretizedFunc hazardFunc,
                              int datasetID)

deleteHazardCurve

public boolean deleteHazardCurve(int curveID)

deleteCurvesForDatasetID

public boolean deleteCurvesForDatasetID(int datasetID)

deleteCurvesForDatasetID

public boolean deleteCurvesForDatasetID(int datasetID,
                                        int siteTypeID)

getSiteTypeForCurve

public int getSiteTypeForCurve(CybershakeHazardCurveRecord record)

getSiteTypeForCurve

public int getSiteTypeForCurve(CybershakeHazardCurveRecord record,
                               ArrayList<CybershakeRun> runs,
                               ArrayList<CybershakeSite> sites)

deleteHazardCurveID

public int deleteHazardCurveID(int curveID)

deleteHazardCurvePoints

public int deleteHazardCurvePoints(int curveID)

replaceHazardCurve

public void replaceHazardCurve(int curveID,
                               DiscretizedFunc hazardFunc)

insertHazardCurvePoints

public void insertHazardCurvePoints(int id,
                                    DiscretizedFunc hazardFunc)

getIMTypeIDForCurve

public int getIMTypeIDForCurve(int curveID)

getIMForCurve

public CybershakeIM getIMForCurve(int curveID)

getIMFromID

public CybershakeIM getIMFromID(int imTypeID)

getSupportedIMs

public ArrayList<CybershakeIM> getSupportedIMs(int runID)
Returns:
the supported SA Period as list of strings.

getSupportedIMs

public ArrayList<CybershakeIM> getSupportedIMs(int siteID,
                                               int erfID,
                                               int rupVarID,
                                               int sgtVariation,
                                               int velModelID)
Returns:
the supported SA Period as list of strings.

main

public static void main(String[] args)