@Override
public void processEndElement() throws ParseException {
if (rating == null && average == null) {
throw new ParseException(
CoreErrorDomain.ERR.valueOrAverageRequired);
}
if (rating != null) {
if (min != null && rating < min || max != null && rating > max) {
throw new ParseException(
CoreErrorDomain.ERR.invalidValueRatingAttribute);
}
}
if (average != null) {
if (min != null && average < min || max != null && average > max) {
throw new ParseException(
CoreErrorDomain.ERR.invalidAverageRatingAttribute);
}
}
}