Package org.exist.validation

Examples of org.exist.validation.ValidationReportItem


        final AttributesImpl attribs = new AttributesImpl();

        // iterate validation report items, write message
        final List<ValidationReportItem> cr = report.getValidationReportItemList();
        for (final Iterator<ValidationReportItem> iter = cr.iterator(); iter.hasNext();) {
            final ValidationReportItem vri = iter.next();

            // construct attributes
            attribs.addAttribute("", "level", "level", "CDATA", vri.getTypeText());
            attribs.addAttribute("", "line", "line", "CDATA", Integer.toString(vri.getLineNumber()));
            attribs.addAttribute("", "column", "column", "CDATA", Integer.toString(vri.getColumnNumber()));

            if (vri.getRepeat() > 1) {
                attribs.addAttribute("", "repeat", "repeat", "CDATA", Integer.toString(vri.getRepeat()));
            }

            // write message
            builder.startElement("", "message", "message", attribs);
            builder.characters(vri.getMessage());
            builder.endElement();

            // Reuse attributes
            attribs.clear();
        }
View Full Code Here

TOP

Related Classes of org.exist.validation.ValidationReportItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.