Package org.enhydra.jawe.base.xpdlvalidator

Examples of org.enhydra.jawe.base.xpdlvalidator.ValidationError


        }
        Iterator it = errors.iterator();
        while (it.hasNext()) {
            Object el = it.next();
            if (el instanceof ValidationError) {
                ValidationError err = (ValidationError) el;

                // determine whether error or warning
                String color = "yellow";
                String icon = "warning_icon.gif";
                if (XMLValidationError.TYPE_ERROR.equals(err.getType())) {
                    color = "red";
                    icon = "error_icon.gif";
                    hasError = true;
                } else if (XMLValidationError.TYPE_WARNING.equals(err.getType())) {
                    hasWarning = true;
                }
                XMLElement element = Utils.getLocation(err.getElement());

                // determine error message
                String errorId = err.getId();
                String error = ResourceManager.getLanguageDependentString(errorId);
                if (error == null) {
                    error = errorId;
                }

                // determine error type, element type and name
                String errorType = ResourceManager.getLanguageDependentString(err.getType() + "TypeKey");
                String elementType = ResourceManager.getLanguageDependentString(element.toName() + "Key");
                String name = "";
                if (element instanceof XMLComplexElement) {
                    XMLElement idEl = (XMLElement) ((XMLComplexElement) element).get("Name");
                    name = (idEl != null) ? idEl.toValue() : "";
View Full Code Here


        int selected = table.getSelectedRow();
        if (selected >= 0 && errorList.size() > selected) {
            Object el = errorList.get(selected);
            if (el instanceof ValidationError) {
                // get error
                ValidationError err = (ValidationError) el;
                element = Utils.getLocation(err.getElement());
            }
        }
        return element;
    }
View Full Code Here

                String error = (String) obj;
                if (!error.equals(ResourceManager.getLanguageDependentString("ERROR_NO_ERROR"))) {
                    checkValidity = false;
                }
            } else {
                ValidationError error = (ValidationError) obj;
                if (!"WARNING".equals(error.getType())) {
                    checkValidity = false;
                }
            }
        }
View Full Code Here

        List existingErrors = new ArrayList();
        xpdlValidator.validateElement(el, existingErrors, fullCheck);
        List verrors = new ArrayList();
        for (int i = 0; i < existingErrors.size(); i++) {
            ValidationError verr = new ValidationError((XMLValidationError) existingErrors.get(i));
            verrors.add(verr);
        }
        existingErrors.clear();
        boolean isValid = verrors.size() == 0;
View Full Code Here

TOP

Related Classes of org.enhydra.jawe.base.xpdlvalidator.ValidationError

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.