Search in sources :

Example 1 with XmlError

use of org.apache.xmlbeans.XmlError in project knime-core by knime.

the class NodeDescription212Proxy method validate.

/**
 * Validate against the XML Schema. If violations are found they are reported via the logger as coding problems.
 *
 * @return <code>true</code> if the document is valid, <code>false</code> otherwise
 */
protected final boolean validate() {
    // this method has default visibility so that we can use it in testcases
    XmlOptions options = new XmlOptions(OPTIONS);
    List<XmlError> errors = new ArrayList<XmlError>();
    options.setErrorListener(errors);
    boolean valid = m_document.validate(options);
    if (!valid) {
        logger.coding("Node description of '" + m_document.getKnimeNode().getName() + "' does not conform to the Schema. Violations follow.");
        for (XmlError err : errors) {
            logger.coding(err.toString());
        }
    }
    return valid;
}
Also used : XmlOptions(org.apache.xmlbeans.XmlOptions) ArrayList(java.util.ArrayList) XmlError(org.apache.xmlbeans.XmlError)

Example 2 with XmlError

use of org.apache.xmlbeans.XmlError in project knime-core by knime.

the class NodeDescription210Proxy method validate.

/**
 * Validate against the XML Schema. If violations are found they are reported via the logger as coding problems.
 *
 * @return <code>true</code> if the document is valid, <code>false</code> otherwise
 */
protected final boolean validate() {
    // this method has default visibility so that we can use it in testcases
    XmlOptions options = new XmlOptions(OPTIONS);
    List<XmlError> errors = new ArrayList<XmlError>();
    options.setErrorListener(errors);
    boolean valid = m_document.validate(options);
    if (!valid) {
        logger.coding("Node description of '" + m_document.getKnimeNode().getName() + "' does not conform to the Schema. Violations follow.");
        for (XmlError err : errors) {
            logger.coding(err.toString());
        }
    }
    return valid;
}
Also used : XmlOptions(org.apache.xmlbeans.XmlOptions) ArrayList(java.util.ArrayList) XmlError(org.apache.xmlbeans.XmlError)

Example 3 with XmlError

use of org.apache.xmlbeans.XmlError in project knime-core by knime.

the class NodeDescription27Proxy method validate.

/**
 * Validate against the XML Schema. If violations are found they are reported via the logger as coding problems.
 *
 * @return <code>true</code> if the document is valid, <code>false</code> otherwise
 */
protected final boolean validate() {
    // this method has default visibility so that we can use it in testcases
    XmlOptions options = new XmlOptions(OPTIONS);
    List<XmlError> errors = new ArrayList<XmlError>();
    options.setErrorListener(errors);
    boolean valid = m_document.validate(options);
    if (!valid) {
        logger.coding(// .getName()
        "Node description of '" + m_document.getKnimeNode() + "' does not conform to the Schema. Violations follow.");
        for (XmlError err : errors) {
            logger.coding(err.toString());
        }
    }
    return valid;
}
Also used : XmlOptions(org.apache.xmlbeans.XmlOptions) ArrayList(java.util.ArrayList) XmlError(org.apache.xmlbeans.XmlError)

Example 4 with XmlError

use of org.apache.xmlbeans.XmlError in project knime-core by knime.

the class NodeDescription31Proxy method validate.

/**
 * Validate against the XML Schema. If violations are found they are reported via the logger as coding problems.
 *
 * @return <code>true</code> if the document is valid, <code>false</code> otherwise
 */
protected final boolean validate() {
    // this method has default visibility so that we can use it in testcases
    XmlOptions options = new XmlOptions(OPTIONS);
    List<XmlError> errors = new ArrayList<XmlError>();
    options.setErrorListener(errors);
    boolean valid = m_document.validate(options);
    if (!valid) {
        logger.coding("Node description of '" + m_document.getKnimeNode().getName() + "' does not conform to the Schema. Violations follow.");
        for (XmlError err : errors) {
            logger.coding(err.toString());
        }
    }
    return valid;
}
Also used : XmlOptions(org.apache.xmlbeans.XmlOptions) ArrayList(java.util.ArrayList) XmlError(org.apache.xmlbeans.XmlError)

Example 5 with XmlError

use of org.apache.xmlbeans.XmlError in project knime-core by knime.

the class NodeDescription13Proxy method validate.

/**
 * Validate against the XML Schema. If violations are found they are reported via the logger as coding problems.
 *
 * @return <code>true</code> if the document is valid, <code>false</code> otherwise
 */
final boolean validate() {
    // this method has default visibility so that we can use it in testcases
    XmlOptions options = new XmlOptions(OPTIONS);
    List<XmlError> errors = new ArrayList<XmlError>();
    options.setErrorListener(errors);
    boolean valid = m_document.validate(options);
    if (!valid) {
        logger.coding("Node description of '" + m_document.getKnimeNode().getName() + "' does not conform to the Schema. Violations follow.");
        for (XmlError err : errors) {
            logger.coding(err.toString());
        }
    }
    return valid;
}
Also used : XmlOptions(org.apache.xmlbeans.XmlOptions) ArrayList(java.util.ArrayList) XmlError(org.apache.xmlbeans.XmlError)

Aggregations

ArrayList (java.util.ArrayList)7 XmlError (org.apache.xmlbeans.XmlError)7 XmlOptions (org.apache.xmlbeans.XmlOptions)7 TreeMap (java.util.TreeMap)1