org.opensha.commons.data.siteData.impl
Class USGSBayAreaBasinDepth

java.lang.Object
  extended by org.opensha.commons.data.siteData.AbstractSiteData<java.lang.Double>
      extended by org.opensha.commons.data.siteData.impl.USGSBayAreaBasinDepth
All Implemented Interfaces:
Named, ServletEnabledSiteData<java.lang.Double>, SiteData<java.lang.Double>, XMLSaveable

public class USGSBayAreaBasinDepth
extends AbstractSiteData<java.lang.Double>


Field Summary
static java.lang.String DEPTH_1_0_FILE
           
static java.lang.String DEPTH_2_5_FILE
           
static double gridSpacing
           
static double minLat
           
static double minLon
           
static java.lang.String NAME
           
static java.lang.String SERVLET_1_0_URL
           
static java.lang.String SERVLET_2_5_URL
           
static java.lang.String SHORT_NAME
           
 
Fields inherited from class org.opensha.commons.data.siteData.AbstractSiteData
maxBasinDoubleParam, maxVs30Param, minBasinDoubleParam, minVs30Param, PARAM_MAX_BASIN_DEPTH_DOUBLE_DEFAULT, PARAM_MAX_BASIN_DEPTH_DOUBLE_MAX, PARAM_MAX_BASIN_DEPTH_DOUBLE_MIN, PARAM_MAX_BASIN_DEPTH_DOUBLE_NAME, PARAM_MAX_BASIN_INFO, PARAM_MAX_VS30_DEFAULT, PARAM_MAX_VS30_INFO, PARAM_MAX_VS30_MAX, PARAM_MAX_VS30_MIN, PARAM_MAX_VS30_NAME, PARAM_MIN_BASIN_DEPTH_DOUBLE_DEFAULT, PARAM_MIN_BASIN_DEPTH_DOUBLE_MAX, PARAM_MIN_BASIN_DEPTH_DOUBLE_MIN, PARAM_MIN_BASIN_DEPTH_DOUBLE_NAME, PARAM_MIN_BASIN_INFO, PARAM_MIN_VS30_DEFAULT, PARAM_MIN_VS30_INFO, PARAM_MIN_VS30_MAX, PARAM_MIN_VS30_MIN, PARAM_MIN_VS30_NAME, paramEdit, paramList, serverParamsList
 
Fields inherited from interface org.opensha.commons.data.siteData.SiteData
TYPE_DEPTH_TO_1_0, TYPE_DEPTH_TO_2_5, TYPE_ELEVATION, TYPE_FLAG_INFERRED, TYPE_FLAG_MEASURED, TYPE_TOPOGRAPHIC_SLOPE, TYPE_VS30, TYPE_WILLS_CLASS, XML_METADATA_NAME
 
Constructor Summary
USGSBayAreaBasinDepth(java.lang.String type)
           
USGSBayAreaBasinDepth(java.lang.String type, boolean useServlet)
           
USGSBayAreaBasinDepth(java.lang.String type, java.lang.String dataFile)
           
USGSBayAreaBasinDepth(java.lang.String type, java.lang.String dataFile, boolean useServlet)
           
 
Method Summary
protected  Element addXMLParameters(Element paramsEl)
          If your SiteData provider has data that needs to be saved in order to be recreated from XML, then override this method.
static USGSBayAreaBasinDepth fromXMLParams(Element paramsElem)
           
 Region getApplicableRegion()
          This gives the applicable region for this data set.
 Location getClosestDataLocation(Location loc)
          Get the location of the closest data point
 java.lang.String getDataMeasurementType()
          Get the measurement type for this data, such as "Measured" or "Inferred"
 java.lang.String getDataType()
          Get the data type of this dataset
 java.lang.String getMetadata()
          Returns the metadata for this dataset.
 java.lang.String getName()
          Returns the name of this object
 double getResolution()
          This gives the resolution of the dataset in degrees, or 0 for infinite resolution.
 java.lang.String getShortName()
          Get the short name of this dataset
 java.lang.Double getValue(Location loc)
          Get the value at the closest location
 java.util.ArrayList<java.lang.Double> getValues(LocationList locs)
          Returns a list of the values at each location.
 boolean isValueValid(java.lang.Double val)
          Returns true if the value is valid, and not NaN, N/A, or equivelant for the data type
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.opensha.commons.data.siteData.AbstractSiteData
certifyMinMaxBasinDepth, certifyMinMaxVs30, fromXMLMetadata, getAdjustableParameterList, getAnnotatedValue, getAnnotatedValues, getParameterListEditor, getServerSideParams, hasDataForLocation, initDefaultBasinParams, initDefaultVS30Params, initParamListEditor, toXMLMetadata, toXMLMetadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

SHORT_NAME

public static final java.lang.String SHORT_NAME
See Also:
Constant Field Values

minLat

public static final double minLat
See Also:
Constant Field Values

minLon

public static final double minLon
See Also:
Constant Field Values

gridSpacing

public static final double gridSpacing
See Also:
Constant Field Values

DEPTH_2_5_FILE

public static final java.lang.String DEPTH_2_5_FILE
See Also:
Constant Field Values

DEPTH_1_0_FILE

public static final java.lang.String DEPTH_1_0_FILE
See Also:
Constant Field Values

SERVLET_2_5_URL

public static final java.lang.String SERVLET_2_5_URL

SERVLET_1_0_URL

public static final java.lang.String SERVLET_1_0_URL
Constructor Detail

USGSBayAreaBasinDepth

public USGSBayAreaBasinDepth(java.lang.String type)
                      throws java.io.IOException
Throws:
java.io.IOException

USGSBayAreaBasinDepth

public USGSBayAreaBasinDepth(java.lang.String type,
                             java.lang.String dataFile)
                      throws java.io.IOException
Throws:
java.io.IOException

USGSBayAreaBasinDepth

public USGSBayAreaBasinDepth(java.lang.String type,
                             boolean useServlet)
                      throws java.io.IOException
Throws:
java.io.IOException

USGSBayAreaBasinDepth

public USGSBayAreaBasinDepth(java.lang.String type,
                             java.lang.String dataFile,
                             boolean useServlet)
                      throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getApplicableRegion

public Region getApplicableRegion()
Description copied from interface: SiteData
This gives the applicable region for this data set.

Returns:
Region

getClosestDataLocation

public Location getClosestDataLocation(Location loc)
Description copied from interface: SiteData
Get the location of the closest data point

Returns:

getName

public java.lang.String getName()
Description copied from interface: Named
Returns the name of this object


getShortName

public java.lang.String getShortName()
Description copied from interface: SiteData
Get the short name of this dataset

Returns:

getMetadata

public java.lang.String getMetadata()
Description copied from interface: SiteData
Returns the metadata for this dataset.

Returns:

getResolution

public double getResolution()
Description copied from interface: SiteData
This gives the resolution of the dataset in degrees, or 0 for infinite resolution. We could possibly add a 'units' field to allow for resolution in KM

Returns:

getDataType

public java.lang.String getDataType()
Description copied from interface: SiteData
Get the data type of this dataset

Returns:

getDataMeasurementType

public java.lang.String getDataMeasurementType()
Description copied from interface: SiteData
Get the measurement type for this data, such as "Measured" or "Inferred"

Returns:

getValue

public java.lang.Double getValue(Location loc)
                          throws java.io.IOException
Description copied from interface: SiteData
Get the value at the closest location

Returns:
Throws:
java.io.IOException

getValues

public java.util.ArrayList<java.lang.Double> getValues(LocationList locs)
                                                throws java.io.IOException
Description copied from class: AbstractSiteData
Returns a list of the values at each location. This should be overridden if there is a more efficient way of accessing the data, like through a servlet where you can request all of the values at once.

Specified by:
getValues in interface SiteData<java.lang.Double>
Overrides:
getValues in class AbstractSiteData<java.lang.Double>
Returns:
Throws:
java.io.IOException

isValueValid

public boolean isValueValid(java.lang.Double val)
Description copied from interface: SiteData
Returns true if the value is valid, and not NaN, N/A, or equivelant for the data type

Returns:

addXMLParameters

protected Element addXMLParameters(Element paramsEl)
Description copied from class: AbstractSiteData
If your SiteData provider has data that needs to be saved in order to be recreated from XML, then override this method.

Overrides:
addXMLParameters in class AbstractSiteData<java.lang.Double>
Returns:

fromXMLParams

public static USGSBayAreaBasinDepth fromXMLParams(Element paramsElem)
                                           throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)