metricList2Xml: Create XML for the BSS

View source: R/Class-Metric.R

metricList2XmlR Documentation

Create XML for the BSS

Description

The metricList2Xml function converts a list of SingleValueMetrics or GeneralValueMetric into an XML structure appropriate for submitting to the MUSTANG Backend Storage System (BSS).

Usage

metricList2Xml(metricList)

Arguments

metricList

a list of SingleValueMetric or GeneralValueMetric objects.

Details

Metrics functions return lists of SingleValueMetric or GeneralValueMetric objects. A long metricList may be built up by appending the results of different metrics functions or the same metrics function operating on different seismic signals. The list may only contain a single class (SingleValueMetric cannot be mixed with GeneralValueMetric objects). These metrics can be submitted to the BSS in a standardized XML format. (see SingleValueMetric-class)

Value

A character string with BSS formatted XML is returned.

Author(s)

Jonathan Callahan jonathan@mazamascience.com

Examples

  ## Not run: 
# Open a connection to IRIS DMC webservices
iris <- new("IrisClient")

# Get the waveform
starttime <- as.POSIXct("2012-01-24", tz="GMT")
endtime <- as.POSIXct("2012-01-25", tz="GMT")
st <- getDataselect(iris,"AK","PIN","","BHZ",starttime,endtime)

# Apply a metric and show the results
metricList <- stateOfHealthMetric(st)
metricList <- append(metricList, basicStatsMetric(st))
bssXml <- metricList2Xml(metricList)
  
## End(Not run)

IRISMustangMetrics documentation built on April 28, 2022, 1:06 a.m.