Compare this to opennms-service/src/main/java/org/opennms/netmgt/collectd/Attribute.java
String getNumericValue() {
String val = new String();
if (getValue() == null) {
val = null;
} else {
try {
val = Long.toString(getValue().toLong());
} catch(NumberFormatException e) {
log().warn("Unable to process data received for attribute " + this + " maybe this is not a number? See bug 1473 for more information.");
}
}
if (val == null) {
log().info("No data collected for attribute "+this+". Skipping");
}
return val;
}