switch (formatCode) {
case FMT_RATIONAL:
String[] rationalParts = property.split("/", 2);
if (rationalParts.length == 2) {
try{
Rational rational = new Rational((long) Float.parseFloat(rationalParts[0]), (long) Float.parseFloat(rationalParts[1]));
directory.setRational(tagType, rational);
} catch (NumberFormatException ex) {
directory.addError(String.format("Unable to parse XMP property %s as a Rational.", propName));
}
} else {