/** * Returns a property for a tag with a RATIONAL value. If rawOutput is true, returns a property * with type RATIONAL. Otherwise, returns a property with type STRING, and the text representation * of the Rational value as a floating-point ratio. */ protected Property addRationalProperty(String name, Rational r, boolean rawOutput) { Property prop = null; if (!rawOutput) { prop = new Property(name, PropertyType.STRING, _format.format(r.toDouble())); } if (prop == null) { prop = new Property(name, PropertyType.RATIONAL, r); } return prop; }