org.opensha.sha.gui.controls
Class GenerateHazusControlPanelForSingleMultipleIMRs

java.lang.Object
  extended by org.opensha.commons.gui.ControlPanel
      extended by org.opensha.sha.gui.controls.GenerateHazusControlPanelForSingleMultipleIMRs
All Implemented Interfaces:
Runnable, Named

public class GenerateHazusControlPanelForSingleMultipleIMRs
extends ControlPanel
implements Runnable

Title: GenerateHazusControlPanelForSingleMultipleIMRs

Description: This class generates the ShapeFiles for the Hazus for the selected Scenario.

Version:
1.0
Author:
: Ned Field, Nitin Gupta and Vipin Gupta

Field Summary
static String NAME
           
 
Constructor Summary
GenerateHazusControlPanelForSingleMultipleIMRs(Component parent, ScenarioShakeMapApp api)
          Class constructor.
 
Method Summary
 void doinit()
          This method will be called the first time the control panel is displayed.
 void generateShapeFilesForHazus()
          Creates the dataset to generate the shape files that goes as input to Hazus.
 Window getComponent()
           
 String getIMT_Metadata()
           
 void getRegionAndMapType()
          This function sets the Gridded region Sites and the type of plot user wants to see IML@Prob or Prob@IML and it value.
 Object getXYZ_DataForPGA()
           
 Object getXYZ_DataForPGV()
           
 Object getXYZ_DataForSA_03()
           
 Object getXYZ_DataForSA_10()
           
 boolean isGenerateShapeFilesForHazus()
           
 void run()
          thread method
 void runToGenerateShapeFilesAndMaps()
          This method creates the shapefiles data for Hazus and scenario shake maps for the same data.
 void setGenerateShapeFilesForHazus(boolean generateHazusShapeFiles)
          Function accepts true if user wants to generate the hazus shapefiles.
 
Methods inherited from class org.opensha.commons.gui.ControlPanel
getName, init, isInitialized, showControlPanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

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

GenerateHazusControlPanelForSingleMultipleIMRs

public GenerateHazusControlPanelForSingleMultipleIMRs(Component parent,
                                                      ScenarioShakeMapApp api)
Class constructor. This will generate the shapefiles for the input to the Hazus

Parameters:
parent - : parent frame on which to show this control panel
api - : Instance of the application using this control panel
Method Detail

doinit

public void doinit()
Description copied from class: ControlPanel
This method will be called the first time the control panel is displayed. All setup should be in this method and not in the constructor, so that the apps can start quickly.

Specified by:
doinit in class ControlPanel

getIMT_Metadata

public String getIMT_Metadata()
Returns:
the metadata for the IMT GUI if this control panel is selected

getXYZ_DataForSA_03

public Object getXYZ_DataForSA_03()
Returns:
the XYZ data set for the SA-0.3sec if calculation are to be done local machine, else the String to the object file on the server.

getXYZ_DataForSA_10

public Object getXYZ_DataForSA_10()
Returns:
the XYZ data set for the SA-1.0sec if calculation are to be done local machine, else the String to the object file on the server.

getXYZ_DataForPGA

public Object getXYZ_DataForPGA()
Returns:
the XYZ data set for the PGA if calculation are to be done local machine, else the String to the object file on the server.

getXYZ_DataForPGV

public Object getXYZ_DataForPGV()
Returns:
the XYZ data set for the PGV if calculation are to be done local machine, else the String to the object file on the server.

run

public void run()
thread method

Specified by:
run in interface Runnable

runToGenerateShapeFilesAndMaps

public void runToGenerateShapeFilesAndMaps()
This method creates the shapefiles data for Hazus and scenario shake maps for the same data.


generateShapeFilesForHazus

public void generateShapeFilesForHazus()
                                throws ParameterException
Creates the dataset to generate the shape files that goes as input to Hazus.

Throws:
ParameterException

setGenerateShapeFilesForHazus

public void setGenerateShapeFilesForHazus(boolean generateHazusShapeFiles)
Function accepts true if user wants to generate the hazus shapefiles. On setting to false it does not generate the hazus shape files. User has to explicitly set to false if he does not want to generate the shapefiles for hazus once he has pressed button to generate the shape files for hazus which sets this generateHazusShapeFiles to true. This function has to be explicitly have to be called with false in order not to generate the shape files.

Parameters:
generateHazusShapeFiles -

getRegionAndMapType

public void getRegionAndMapType()
This function sets the Gridded region Sites and the type of plot user wants to see IML@Prob or Prob@IML and it value.


isGenerateShapeFilesForHazus

public boolean isGenerateShapeFilesForHazus()
Returns:
if the generate shape files for Hazus being done. If returns then files for hazus will be generated else if returns false then files are not being generated.

getComponent

public Window getComponent()
Specified by:
getComponent in class ControlPanel