org.opensha.refFaultParamDb.dao.db
Class FaultSectionVer2_DB_DAO

java.lang.Object
  extended by org.opensha.refFaultParamDb.dao.db.FaultSectionVer2_DB_DAO

public class FaultSectionVer2_DB_DAO
extends Object

Title: FaultSectionVer2_DB_DAO.java

Description: This class interacts with Fault Section table in CA Ref Fault Param Database.

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
not attributable

Field Summary
static String ASEISMIC_SLIP_FACTOR_EST
           
static String AVE_DIP_EST
           
static String AVE_LONG_TERM_SLIP_RATE_EST
           
static String AVE_LOWER_DEPTH_EST
           
static String AVE_RAKE_EST
           
static String AVE_UPPER_DEPTH_EST
           
static String COMMENTS
           
static String CONNECTOR_FLAG
           
static String CONNECTOR_FLAG_DEFAULT
           
static String CONNECTOR_FLAG_NO
           
static String CONNECTOR_FLAG_YES
           
static String CONTRIBUTOR_ID
           
static String DIP_DIRECTION
           
static String ENTRY_DATE
           
static String FAULT_TRACE
           
static String FAULT_ZONE_POLYGON
           
static BorderType POLYGON_BORDER_TYPE
           
static String QFAULT_ID
           
static String SECTION_ID
           
static String SECTION_NAME
           
static String SECTION_SOURCE_ID
           
static String SEQUENCE_NAME
           
static String SHORT_NAME
           
static String TABLE_NAME
           
 
Constructor Summary
FaultSectionVer2_DB_DAO(DB_AccessAPI dbAccess)
           
 
Method Summary
 int addFaultSection(FaultSectionData faultSection)
          Add a new fault section to the database
 ArrayList<FaultSectionData> getAllFaultSections()
          Get all the fault sections from the database
 ArrayList<FaultSectionSummary> getAllFaultSectionsSummary()
           
 FaultSectionData getFaultSection(int faultSectionId)
          Get the fault section based on fault section Id
 FaultSectionSummary getFaultSectionSummary(int faultSectionId)
           
 FaultSectionSummary getFaultSectionSummary(String faultSectionName)
           
static FaultTrace getFaultTrace(String sectionName, double upperDepth, ArrayList<oracle.spatial.geometry.JGeometry> geometries)
           
 HashMap<Integer,EstimateInstances> getSlipRateEstimates()
          Return the HashMap containing section Id and the corresponding Slip rate estimate
static void main(String[] args)
           
 void removeFaultSection(int faultSectionId)
          Remove the fault section from th database
 void setDB_Connection(DB_AccessAPI dbAccess)
          Set the database connection
 void update(FaultSectionData faultSection)
          Update the fault section in the database
 void updateDipDirection(int faultSectionId, float dipDirection)
          Update Dip direction in database
 void updateZonePolygon(int faultSectionId, Region polygon)
           
 
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

SEQUENCE_NAME

public static final String SEQUENCE_NAME
See Also:
Constant Field Values

SECTION_ID

public static final String SECTION_ID
See Also:
Constant Field Values

AVE_LONG_TERM_SLIP_RATE_EST

public static final String AVE_LONG_TERM_SLIP_RATE_EST
See Also:
Constant Field Values

AVE_DIP_EST

public static final String AVE_DIP_EST
See Also:
Constant Field Values

AVE_RAKE_EST

public static final String AVE_RAKE_EST
See Also:
Constant Field Values

AVE_UPPER_DEPTH_EST

public static final String AVE_UPPER_DEPTH_EST
See Also:
Constant Field Values

AVE_LOWER_DEPTH_EST

public static final String AVE_LOWER_DEPTH_EST
See Also:
Constant Field Values

CONTRIBUTOR_ID

public static final String CONTRIBUTOR_ID
See Also:
Constant Field Values

SECTION_NAME

public static final String SECTION_NAME
See Also:
Constant Field Values

SHORT_NAME

public static final String SHORT_NAME
See Also:
Constant Field Values

ENTRY_DATE

public static final String ENTRY_DATE
See Also:
Constant Field Values

COMMENTS

public static final String COMMENTS
See Also:
Constant Field Values

FAULT_TRACE

public static final String FAULT_TRACE
See Also:
Constant Field Values

ASEISMIC_SLIP_FACTOR_EST

public static final String ASEISMIC_SLIP_FACTOR_EST
See Also:
Constant Field Values

DIP_DIRECTION

public static final String DIP_DIRECTION
See Also:
Constant Field Values

SECTION_SOURCE_ID

public static final String SECTION_SOURCE_ID
See Also:
Constant Field Values

QFAULT_ID

public static final String QFAULT_ID
See Also:
Constant Field Values

CONNECTOR_FLAG

public static final String CONNECTOR_FLAG
See Also:
Constant Field Values

CONNECTOR_FLAG_YES

public static final String CONNECTOR_FLAG_YES
See Also:
Constant Field Values

CONNECTOR_FLAG_NO

public static final String CONNECTOR_FLAG_NO
See Also:
Constant Field Values

CONNECTOR_FLAG_DEFAULT

public static final String CONNECTOR_FLAG_DEFAULT
See Also:
Constant Field Values

FAULT_ZONE_POLYGON

public static final String FAULT_ZONE_POLYGON
See Also:
Constant Field Values

POLYGON_BORDER_TYPE

public static final BorderType POLYGON_BORDER_TYPE
Constructor Detail

FaultSectionVer2_DB_DAO

public FaultSectionVer2_DB_DAO(DB_AccessAPI dbAccess)
Method Detail

setDB_Connection

public void setDB_Connection(DB_AccessAPI dbAccess)
Set the database connection

Parameters:
dbAccess -

addFaultSection

public int addFaultSection(FaultSectionData faultSection)
Add a new fault section to the database

Parameters:
faultSection -
Returns:

update

public void update(FaultSectionData faultSection)
Update the fault section in the database

Parameters:
faultSection -

updateDipDirection

public void updateDipDirection(int faultSectionId,
                               float dipDirection)
Update Dip direction in database

Parameters:
faultSectionId -
dipDirection -

updateZonePolygon

public void updateZonePolygon(int faultSectionId,
                              Region polygon)

getFaultSection

public FaultSectionData getFaultSection(int faultSectionId)
Get the fault section based on fault section Id

Parameters:
faultSectionId -
Returns:

getAllFaultSections

public ArrayList<FaultSectionData> getAllFaultSections()
Get all the fault sections from the database

Returns:

getAllFaultSectionsSummary

public ArrayList<FaultSectionSummary> getAllFaultSectionsSummary()

getFaultSectionSummary

public FaultSectionSummary getFaultSectionSummary(int faultSectionId)

getFaultSectionSummary

public FaultSectionSummary getFaultSectionSummary(String faultSectionName)

getSlipRateEstimates

public HashMap<Integer,EstimateInstances> getSlipRateEstimates()
Return the HashMap containing section Id and the corresponding Slip rate estimate

Returns:

getFaultTrace

public static FaultTrace getFaultTrace(String sectionName,
                                       double upperDepth,
                                       ArrayList<oracle.spatial.geometry.JGeometry> geometries)

removeFaultSection

public void removeFaultSection(int faultSectionId)
Remove the fault section from th database

Parameters:
faultSectionId -

main

public static void main(String[] args)