Package com.buschmais.jqassistant.core.model.api.rule

Examples of com.buschmais.jqassistant.core.model.api.rule.AbstractExecutable


        this.executableBeginTime = System.currentTimeMillis();
    }

    private void endExecutable() throws ReportWriterException {
        if (result != null) {
            final AbstractExecutable executable = result.getExecutable();
            final String elementName;
            if (executable instanceof Concept) {
                elementName = "concept";
            } else if (executable instanceof Constraint) {
                elementName = "constraint";
            } else {
                throw new ReportWriterException("Cannot write report for unsupported executable " + executable);
            }
            final List<String> columnNames = result.getColumnNames();
            run(new XmlOperation() {
                @Override
                public void run() throws XMLStreamException {
                    xmlStreamWriter.writeStartElement(elementName);
                    xmlStreamWriter.writeAttribute("id", executable.getId());
                    xmlStreamWriter.writeStartElement("description");
                    xmlStreamWriter.writeCharacters(executable.getDescription());
                    xmlStreamWriter.writeEndElement(); //description
                    if (!result.isEmpty()) {
                        xmlStreamWriter.writeStartElement("result");
                        xmlStreamWriter.writeStartElement("columns");
                        xmlStreamWriter.writeAttribute("count", Integer.toString(columnNames.size()));
View Full Code Here


    private void verifyConstraintViolations(InMemoryReportWriter inMemoryReportWriter) throws MojoFailureException {
        List<Result<Constraint>> constraintViolations = inMemoryReportWriter.getConstraintViolations();
        int violations = 0;
        for (Result<Constraint> constraintViolation : constraintViolations) {
            if (!constraintViolation.isEmpty()) {
                AbstractExecutable constraint = constraintViolation.getExecutable();
                getLog().error(constraint.getId() + ": " + constraint.getDescription());
                for (Map<String, Object> columns : constraintViolation.getRows()) {
                    StringBuilder message = new StringBuilder();
                    for (Map.Entry<String, Object> entry : columns.entrySet()) {
                        if (message.length() > 0) {
                            message.append(", ");
View Full Code Here

TOP

Related Classes of com.buschmais.jqassistant.core.model.api.rule.AbstractExecutable

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.