org.opensha.commons.data.siteData
Class SiteDataValue<Element>

java.lang.Object
  extended by org.opensha.commons.data.siteData.SiteDataValue<Element>
Type Parameters:
Element -
All Implemented Interfaces:
XMLSaveable

public class SiteDataValue<Element>
extends java.lang.Object
implements XMLSaveable

This represents a single site data value, along with metadata describing it's type and source. It is returned by the SiteDataAPI.getAnnotatedValue method.

Author:
Kevin

Field Summary
static java.lang.String XML_METADATA_NAME
           
 
Constructor Summary
SiteDataValue(java.lang.String dataType, java.lang.String dataMeasurementType, Element value)
           
SiteDataValue(java.lang.String dataType, java.lang.String dataMeasurementType, Element value, java.lang.String sourceName)
           
 
Method Summary
static SiteDataValue<?> fromXMLMetadata(Element dataElem)
           
 java.lang.String getDataMeasurementType()
           
 java.lang.String getDataType()
           
 java.lang.String getSourceName()
           
 Element getValue()
           
 java.lang.String toString()
           
 Element toXMLMetadata(Element root)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_METADATA_NAME

public static final java.lang.String XML_METADATA_NAME
See Also:
Constant Field Values
Constructor Detail

SiteDataValue

public SiteDataValue(java.lang.String dataType,
                     java.lang.String dataMeasurementType,
                     Element value)

SiteDataValue

public SiteDataValue(java.lang.String dataType,
                     java.lang.String dataMeasurementType,
                     Element value,
                     java.lang.String sourceName)
Method Detail

getDataType

public java.lang.String getDataType()

getDataMeasurementType

public java.lang.String getDataMeasurementType()

getValue

public Element getValue()

getSourceName

public java.lang.String getSourceName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toXMLMetadata

public Element toXMLMetadata(Element root)
Specified by:
toXMLMetadata in interface XMLSaveable

fromXMLMetadata

public static SiteDataValue<?> fromXMLMetadata(Element dataElem)