|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.param.ParameterList
org.opensha.commons.data.Site
public class Site
Title: Site
Description: This class hold the information about a geographical site. It has been generalized by extendign a ParameterList so that any site parameters can be contained within this Site object. The Site object is really a specialized collection of parameters associated with a Location object, i.e. latitude and longitude.
Each Parameter within the list represents a site parameter used by an IntensityMeasureRelationship. The constructor will create some default Parameters for previously published relationships (e.g. AS_1997, Campbell_1997, Sadigh_1997, Field_1997, and Abrahamson_2000), but a method will also be provided so that one can add others if so desired.
An IntensityMeasureRalationship object will request whatever Parameter values it needs from the Site object that is passed into the IMR.
Provide methods for setting all site parameters from, for example, Vs30 (authors must approve how this is done)?
Note that the Site class implements NamedObjectAPI. This is usefull for giving a Site a name, such as "Los Angeles".
| Field Summary | |
|---|---|
protected static String |
C
Class name - used for debugging |
protected static boolean |
D
Boolean when set prints out debugging statements |
protected Location |
location
Location of this site |
String |
name
Name of the site. |
static String |
XML_METADATA_LIST_NAME
|
static String |
XML_METADATA_NAME
|
static String |
XML_PARAMS_NAME
|
| Fields inherited from class org.opensha.commons.param.ParameterList |
|---|
constraintNameMap, params |
| Constructor Summary | |
|---|---|
Site()
No-Arg Constructor for the Site object. |
|
Site(Location location)
Constructor for the Site object that sets the location. |
|
Site(Location location,
String name)
Constructor for the Site object that sets the site location and the name. |
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a copy of this list, therefore any changes to the copy cannot affect this original list. |
boolean |
equals(Object obj)
Returns true if all the parameters have the same names and values. |
static Site |
fromXMLMetadata(Element siteEl,
ArrayList<Parameter<?>> paramsToAdd)
|
Location |
getLocation()
Returns the location of this Site. |
String |
getName()
Returns the name of the Site. |
static ArrayList<Site> |
loadSitesFromXML(Element sitesEl,
ArrayList<Parameter<?>> paramsToAdd)
|
void |
setLocation(Location location)
Sets the location of this Site. |
void |
setName(String name)
Sets the name of the Site. |
String |
toString()
Represents the current state of the Site parameters and variables as a String. |
Element |
toXMLMetadata(Element root)
|
static Element |
writeSitesToXML(List<Site> sites,
Element root)
|
| Methods inherited from class org.opensha.commons.param.ParameterList |
|---|
addParameter, addParameterList, clear, compareTo, containsParameter, containsParameter, equalNames, getParameter, getParameter, getParameterListMetadataString, getParameterListMetadataString, getParameterName, getParameterNamesIterator, getParametersIterator, getType, getValue, iterator, removeParameter, removeParameter, replaceParameter, setParamsInListFromXML, setValue, size, updateParameter |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String C
public static String XML_METADATA_NAME
public static String XML_PARAMS_NAME
public static String XML_METADATA_LIST_NAME
protected static final boolean D
public String name
protected Location location
| Constructor Detail |
|---|
public Site()
public Site(Location location)
public Site(Location location,
String name)
location - Site locationname - Site name| Method Detail |
|---|
public void setName(String name)
public String getName()
getName in interface Namedpublic void setLocation(Location location)
public Location getLocation()
public String toString()
toString in class ParameterListpublic boolean equals(Object obj)
ParameterList
equals in class ParameterListpublic Object clone()
Note: Cloning this object then calling equals() would return true. They are different instances, but have the same values. Modifying one would not affect the second. Equal yet disparet.
clone in class ParameterListpublic Element toXMLMetadata(Element root)
toXMLMetadata in interface XMLSaveable
public static Site fromXMLMetadata(Element siteEl,
ArrayList<Parameter<?>> paramsToAdd)
public static Element writeSitesToXML(List<Site> sites,
Element root)
public static ArrayList<Site> loadSitesFromXML(Element sitesEl,
ArrayList<Parameter<?>> paramsToAdd)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||