Package org.apache.xerces.impl.validation

Examples of org.apache.xerces.impl.validation.ValidationState


     * @throws DatatypeFormatException if the lexical form is not legal
     */
    @Override
    public Object parse(String lexicalForm) throws DatatypeFormatException {
        try {
            ValidationContext context = new ValidationState();
            ValidatedInfo resultInfo = new ValidatedInfo();
            Object result = typeDeclaration.validate(lexicalForm, context, resultInfo);
            return convertValidatedDataValue(resultInfo);
        } catch (InvalidDatatypeValueException e) {
            throw new DatatypeFormatException(lexicalForm, this, "during parse -" + e);
View Full Code Here


@return ValidationContext
*/

private ValidationContext getValidationContext(){

  ValidationState validationState = null;
 
    // create an instance of 'ValidationState' providing the information required for the
    // validation of datatypes id, idref, entity, notation, qname.
    //  application can also provide its own implementation of ValidationContext if required,
    // an implementation of 'ValidationContext' is in 'org.apache.xerces.impl.validation' package.
    validationState = new ValidationState();
   
  // application need to pass validation context while validating string, object or creating simple type (applyFacets)
  // derived by restriction, should set the following information accordingly
     
    //application should provide the namespace support by calling
View Full Code Here

@return ValidationContext
*/

private ValidationContext getValidationContext(){

        ValidationState validationState = null;
       
    // create an instance of 'ValidationState' providing the information required for the
    // validation of datatypes id, idref, entity, notation, qname.
    //  application can also provide its own implementation of ValidationContext if required,
    // an implementation of 'ValidationContext' is in 'org.apache.xerces.impl.validation' package.
    validationState = new ValidationState();
   
        // application need to pass validation context while validating string, object or creating simple type (applyFacets)
        // derived by restriction, should set the following information accordingly
           
    //application should provide the namespace support by calling
View Full Code Here

     * @throws DatatypeFormatException if the lexical form is not legal
     */
    @Override
    public Object parse(String lexicalForm) throws DatatypeFormatException {
        try {
            ValidationContext context = new ValidationState();
            ValidatedInfo resultInfo = new ValidatedInfo();
            Object result = typeDeclaration.validate(lexicalForm, context, resultInfo);
            return convertValidatedDataValue(resultInfo);
        } catch (InvalidDatatypeValueException e) {
            throw new DatatypeFormatException(lexicalForm, this, "during parse -" + e);
View Full Code Here

            return validateByDatatypeJena(lexicalForm, datatype, handler, line, col) ;
       
        // From Jena 2.6.3, XSDDatatype.parse
        XSSimpleType typeDeclaration = (XSSimpleType)datatype.extendedTypeDefinition() ;
        try {
            ValidationContext context = new ValidationState();
            ValidatedInfo resultInfo = new ValidatedInfo();
            Object result = typeDeclaration.validate(lexicalForm, context, resultInfo);
            return true ;
        } catch (InvalidDatatypeValueException e) {
            handler.warning("Lexical form '"+lexicalForm+"' not valid for datatype "+datatype.getURI(), line, col) ;
View Full Code Here

@return ValidationContext
*/

private ValidationContext getValidationContext(){

        ValidationState validationState = null;
       
    // create an instance of 'ValidationState' providing the information required for the
    // validation of datatypes id, idref, entity, notation, qname.
    //  application can also provide its own implementation of ValidationContext if required,
    // an implementation of 'ValidationContext' is in 'org.apache.xerces.impl.validation' package.
    validationState = new ValidationState();
   
        // application need to pass validation context while validating string, object or creating simple type (applyFacets)
        // derived by restriction, should set the following information accordingly
           
    //application should provide the namespace support by calling
View Full Code Here

@return ValidationContext
*/

private ValidationContext getValidationContext(){

        ValidationState validationState = null;
       
    // create an instance of 'ValidationState' providing the information required for the
    // validation of datatypes id, idref, entity, notation, qname.
    //  application can also provide its own implementation of ValidationContext if required,
    // an implementation of 'ValidationContext' is in 'org.apache.xerces.impl.validation' package.
    validationState = new ValidationState();
   
        // application need to pass validation context while validating string, object or creating simple type (applyFacets)
        // derived by restriction, should set the following information accordingly
           
    //application should provide the namespace support by calling
View Full Code Here

@return ValidationContext
*/

private ValidationContext getValidationContext(){

        ValidationState validationState = null;
       
    // create an instance of 'ValidationState' providing the information required for the
    // validation of datatypes id, idref, entity, notation, qname.
    //  application can also provide its own implementation of ValidationContext if required,
    // an implementation of 'ValidationContext' is in 'org.apache.xerces.impl.validation' package.
    validationState = new ValidationState();
   
        // application need to pass validation context while validating string, object or creating simple type (applyFacets)
        // derived by restriction, should set the following information accordingly
           
    //application should provide the namespace support by calling
View Full Code Here

    boolean isValid = false;
    try {
      // SchemaDVFactory / Enumeration Dataype
      XSSimpleType simpleType = SchemaDVFactory.getInstance().getBuiltInType(dataType);
      if (simpleType != null) {
        simpleType.validate(content, new ValidationState(), new ValidatedInfo());
        isValid = true; //Xerces docu is a little weak, we assume it works this way
      } else {
        throw new IllegalArgumentException("Datatype " + dataType + " does not exist!");
      }
    } catch (InvalidDatatypeValueException e) {
View Full Code Here

@return ValidationContext
*/

private ValidationContext getValidationContext(){

        ValidationState validationState = null;
       
    // create an instance of 'ValidationState' providing the information required for the
    // validation of datatypes id, idref, entity, notation, qname.
    //  application can also provide its own implementation of ValidationContext if required,
    // an implementation of 'ValidationContext' is in 'org.apache.xerces.impl.validation' package.
    validationState = new ValidationState();
   
        // application need to pass validation context while validating string, object or creating simple type (applyFacets)
        // derived by restriction, should set the following information accordingly
           
    //application should provide the namespace support by calling
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.validation.ValidationState

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.