resourceProperty.add(numberOfFailedRequestsDocument);
resourceProperty.addChangeListener(mowsMetricsCapability);
resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.SERVICETIME);
ServiceTimeDocument serviceTimeDocument = ServiceTimeDocument.Factory.newInstance();
DurationMetric serviceTimeMetric = serviceTimeDocument.addNewServiceTime();
GDurationBuilder builder = new GDurationBuilder(+1, 1, 2, 3, 4, 5, 6, new BigDecimal("0.789"));
serviceTimeMetric.setGDurationValue(builder.toGDuration());
serviceTimeMetric.setDuration(builder.toGDuration());
resourceProperty.add(serviceTimeDocument);
resourceProperty.addChangeListener(mowsMetricsCapability);
resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.MAXRESPONSETIME);
MaxResponseTimeDocument maxResponseTimeDocument = MaxResponseTimeDocument.Factory.newInstance();
DurationMetric maxRespDurationMetric = maxResponseTimeDocument.addNewMaxResponseTime();
maxRespDurationMetric.setGDurationValue(builder.toGDuration());
maxRespDurationMetric.setDuration(builder.toGDuration());
resourceProperty.add(maxResponseTimeDocument);
resourceProperty.addChangeListener(mowsMetricsCapability);
resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTRESPONSETIME);
LastResponseTimeDocument lastResponseTimeDocument = LastResponseTimeDocument.Factory.newInstance();
DurationMetric lastRespDurationMetric = lastResponseTimeDocument.addNewLastResponseTime();
lastRespDurationMetric.setGDurationValue(builder.toGDuration());
lastRespDurationMetric.setDuration(builder.toGDuration());
resourceProperty.add(lastResponseTimeDocument);
resourceProperty.addChangeListener(mowsMetricsCapability);
}
catch (Exception e)
{