Examples of ValidatorException


Examples of org.apache.any23.validator.ValidatorException

    public DocumentReport getValidatedDOM(boolean applyFix) throws IOException, ValidatorException {
        final URI dURI;
        try {
            dURI = new URI(documentURI);
        } catch (URISyntaxException urise) {
            throw new ValidatorException("Error while performing validation, invalid document URI.", urise);
        }
        Validator validator = new DefaultValidator();
        Document document = getDOM();
        return new DocumentReport( validator.validate(dURI, document, applyFix), document );
    }
View Full Code Here

Examples of org.apache.cocoon.components.validation.ValidatorException

            }

            /* If still we didn't find any parser, simply die of natural death */
            if (parser == null) {
                String message = "Unsupported grammar language" + grammar;
                throw new ValidatorException(message);
            }

            /* Somehow we have a schema parser, check it supports the gramar */
            String languages[] = parser.getSupportedGrammars();
            for (int x = 0; x < languages.length; x++) {
                if (! language.equals(languages[x])) continue;
                /* Hah! language supported, go ahead and parse now */
                Schema schema = this.getSchema(parser, source, language);
                return schema.createValidator(errorHandler);
            }

            /* Something really odd going on, this should never happen */
            String message = "Schema parser " + parser.getClass().getName() +
                             " does not support grammar " + grammar;
            throw new ValidatorException(message);

        } finally {
            if (parser != null) this.releaseParser(parser);
        }
    }
View Full Code Here

Examples of org.apache.commons.validator.ValidatorException

        {
            final String parentId = componentId.substring(0, index);
            UIComponent parent = context.getViewRoot().findComponent(parentId);
            if (parent == null)
            {
                throw new ValidatorException("No component with id: " + parentId + " could be found on view!");
            }
            final String restOfId = componentId.substring(index + 1, componentId.length());
            component = findComponent(context, parent, restOfId);
        }
        return component;
View Full Code Here

Examples of org.apache.tapestry.valid.ValidatorException

            throws ValidatorException
    {
        Number value = (Number) object;

        if (value.doubleValue() > _max)
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.TOO_LARGE);
    }
View Full Code Here

Examples of org.jrest4guice.rest.exception.ValidatorException

              .getAnnotation(ResourceBundle.class).value());
        ClassValidator validator = new ClassValidator(modelClass, rb);
        InvalidValue[] invalidValues = validator
            .getInvalidValues(value);
        if (invalidValues != null && invalidValues.length > 0) {
          throw new ValidatorException(invalidValues);
        }
      }

      // 添加当前参数
      params.add(value);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.