Added getMetric() method to Document class.