org.opensha.refFaultParamDb.gui.view
Class DeformationModelFileWriter

java.lang.Object
  extended by org.opensha.refFaultParamDb.gui.view.DeformationModelFileWriter
All Implemented Interfaces:
Runnable

public class DeformationModelFileWriter
extends Object
implements Runnable

Author:
vipingupta

Constructor Summary
DeformationModelFileWriter(DB_AccessAPI dbConnection)
           
 
Method Summary
 String getFormatStringForDeformationModel()
          File format for writing fault sections in a deformation model file.
 String getStringForDeformationModel(FaultSectionPrefData faultSectionPrefData)
          Get String for faultSectionPrefData ( including slip rate and aseismic slip factor)
 void run()
           
 void writeForDeformationModel(FaultSectionPrefData faultSectionPrefData, FileWriter fw)
          Write FaultSectionPrefData to the file.
 void writeForDeformationModel(int deformationModelId, File file, boolean createExcelSheet)
          Write FaultSectionPrefData to file.
 void writeForDeformationModel(int deformationModelId, int faultSectionId, FileWriter fw)
          Write FaultSectionPrefData to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeformationModelFileWriter

public DeformationModelFileWriter(DB_AccessAPI dbConnection)
Method Detail

writeForDeformationModel

public void writeForDeformationModel(int deformationModelId,
                                     File file,
                                     boolean createExcelSheet)
Write FaultSectionPrefData to file.

Parameters:
faultSectionIds - array of faultsection Ids It creates an excel sheet as well if createExcelSheet is set as true. Excel sheet format is as requested by Ray Weldon in his email on June 26, 2007 at 1:39 PM
file -

run

public void run()
Specified by:
run in interface Runnable

writeForDeformationModel

public void writeForDeformationModel(int deformationModelId,
                                     int faultSectionId,
                                     FileWriter fw)
Write FaultSectionPrefData to the file. It does not contain slip rate and aseismic slip factor

Parameters:
faultSectionId - Fault section Id for which data needs to be written to file
fw -

writeForDeformationModel

public void writeForDeformationModel(FaultSectionPrefData faultSectionPrefData,
                                     FileWriter fw)
Write FaultSectionPrefData to the file. It also contains slip rate and aseismic slip factor

Parameters:
faultSectionPrefData -
fw -

getStringForDeformationModel

public String getStringForDeformationModel(FaultSectionPrefData faultSectionPrefData)
Get String for faultSectionPrefData ( including slip rate and aseismic slip factor)

Parameters:
faultSectionPrefData -
Returns:

getFormatStringForDeformationModel

public String getFormatStringForDeformationModel()
File format for writing fault sections in a deformation model file. Fault sections within a deformation model have slip rate and aseismic slip factor as well

Returns: