private XmlName getMessage(MessageType type, XmlConstraint constraint) { XmlName message = null; switch (type) { case ERROR: message = constraint.getError(); break; case WARN: message = constraint.getWarning(); break; case INFO: message = constraint.getInfo(); break; default: break; } return message; }
protected void collectErrorsWarnsInfos() { XmlConclusion conclusion = result.getConclusion(); List<XmlConstraint> constraints = result.getConstraint(); for (XmlConstraint xmlConstraint : constraints) { XmlName error = xmlConstraint.getError(); if (error != null) { conclusion.getErrors().add(error); } XmlName warning = xmlConstraint.getWarning(); if (warning != null) { conclusion.getWarnings().add(warning); } XmlName info = xmlConstraint.getInfo(); if (info != null) { conclusion.getInfos().add(info); } } }