public class RawDataEvent extends DataEvent
DataEvent untouched and use it as an escape pod
to stuff bad/good weather information into it.| Modifier and Type | Field and Description |
|---|---|
private Double |
raw
The raw measurement.
|
private ConvertToPhysical |
rawconvert
An instance to convert raw readings into physically meaningful values.
|
private NumberFormat |
rawformat
A formatter for the raw measurements.
|
private static long |
serialVersionUID |
private NumberFormat |
sigformat
A formatter for the raw deviation.
|
private Double |
sigma
The sigma of the individual measurement.
|
localHost, sourceNamesource| Constructor and Description |
|---|
RawDataEvent(DataEvent source)
Constructs the raw data event from a single data event.
|
RawDataEvent(Object src)
Constructs a raw data event specifiying only the source.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
formatPhysical(Double meas)
Formats a physical reading according to the
rawconvert rule. |
protected String |
formatRaw(Double meas)
Formats a raw reading according to the
rawformat rule. |
protected String |
getDateString()
Returns the date of the measurement and, if set, the measurement value
converted to clear/bad, depending on its Boolean value.
|
String |
getFormattedPhysical()
Returns the physical quantity formatted to its converter's format.
|
String |
getFormattedPhysicalDeviation()
Returns the physical quantity formatted to its converter's format.
|
String |
getFormattedRaw()
Returns the raw reading as a string, formatted according to the
raw formatter.
|
String |
getFormattedRawDeviation()
Returns the raw reading sigma as a string, formatted according to the
raw formatter.
|
double |
getPhysical()
Returns the measurement as a physical meaningful quantity.
|
double |
getPhysicalDeviation()
Returns the error of the measurement in physical quantities.
|
double |
getRaw()
Returns the measurement as a primitive double.
|
ConvertToPhysical |
getRawConvert()
Retrieves the conversion class to transform raw measurements into
physically meaningful quantities.
|
double |
getRawDeviation()
Returns the error of the measurement.
|
NumberFormat |
getRawFormat()
gets the raw-data formatter.
|
protected String |
getRawString()
Returns the raw measures, if possible with the error and both in their
representation as physical quantities.
|
NumberFormat |
getSigmaFormat()
gets the raw-data formatter.
|
void |
setRaw(double rw)
Sets the measurement of this data event as a primitive double.
|
void |
setRawConvert(ConvertToPhysical conv)
Sets the conversion class to transform raw measurements into physically
meaningful quantities.
|
void |
setRawDeviation(double sig)
Sets the error of the measurement.
|
void |
setRawFormat(NumberFormat forraw)
Sets the raw-data formatter.
|
void |
setSigmaFormat(NumberFormat forraw)
Sets the raw-data formatter.
|
String |
toString()
Returns a string representation of this raw data event.
|
getMeasurement, getTimeOfMeasure, isValid, setMeasurement, setTimeOfMeasure, setValidgetHost, getSourceName, setSourceNamegetSourceprivate static final long serialVersionUID
private Double raw
private Double sigma
private ConvertToPhysical rawconvert
private NumberFormat rawformat
private NumberFormat sigformat
public RawDataEvent(Object src)
public RawDataEvent(DataEvent source)
rawconvert and the decimal formatters
rawformat and sigformat are only pointer-copied and
not cloned.public void setRawFormat(NumberFormat forraw)
public NumberFormat getRawFormat()
public void setSigmaFormat(NumberFormat forraw)
public NumberFormat getSigmaFormat()
public void setRawConvert(ConvertToPhysical conv)
public ConvertToPhysical getRawConvert()
public void setRaw(double rw)
public double getRaw()
public String getFormattedRaw()
public double getPhysical()
rawconvert conversion object has been set. If conversion
fails for some reason, nan is returned.public String getFormattedPhysical()
public void setRawDeviation(double sig)
public double getRawDeviation()
public String getFormattedRawDeviation()
public double getPhysicalDeviation()
rawconvert conversion object has been set. If conversion
fails for some reason, nan is returned.public String getFormattedPhysicalDeviation()
public String toString()
protected String getDateString()
protected String getRawString()
protected String formatRaw(Double meas)
rawformat rule. If
the measurement is NaN or null, nan is included in the string.formatPhysical(java.lang.Double)protected String formatPhysical(Double meas)
rawconvert rule. If
the measurement is NaN or null, the empty string is returned.meas - The raw measurement value.formatRaw(java.lang.Double)