Examples of ValidationEventLocatorImpl


Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

        super();
        eventHandler = validationEventHandler;
    }

    public void warning(SAXParseException exception) throws SAXException {
        ValidationEventLocator eventLocator = new ValidationEventLocatorImpl(exception);
        ValidationEvent event = new ValidationEventImpl(ValidationEvent.WARNING, null, eventLocator, exception);
        if (!eventHandler.handleEvent(event)) {
            throw exception;
        }
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

            throw exception;
        }
    }

    public void error(SAXParseException exception) throws SAXException {
        ValidationEventLocator eventLocator = new ValidationEventLocatorImpl(exception);
        ValidationEvent event = new ValidationEventImpl(ValidationEvent.ERROR, null, eventLocator, exception);
        if (!eventHandler.handleEvent(event)) {
            throw exception;
        }
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

            throw exception;
        }
    }

    public void fatalError(SAXParseException exception) throws SAXException {
        ValidationEventLocator eventLocator = new ValidationEventLocatorImpl(exception);
        ValidationEvent event = new ValidationEventImpl(ValidationEvent.FATAL_ERROR, null, eventLocator, exception);
        if (!eventHandler.handleEvent(event)) {
            throw exception;
        }
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

       throw new SAXException(e);
    }
    if (eventHandler == null) {
      throw new SAXParseException(pMsg, getDocumentLocator());
    } else {
      ValidationEventLocator myLocator = new ValidationEventLocatorImpl(getDocumentLocator());
      ValidationEventImpl event = new ValidationEventImpl(pSeverity,
                                                          pErrorCode + ": " + pMsg,
                                                          myLocator);
      event.setErrorCode(pErrorCode);
      eventHandler.handleEvent(event);
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

       throw new SAXException(e);
    }
    if (eventHandler == null) {
      throw new SAXParseException(pMsg, getDocumentLocator(), pException);
    } else {
      ValidationEventLocator myLocator = new ValidationEventLocatorImpl(getDocumentLocator());
      ValidationEventImpl event = new ValidationEventImpl(pSeverity,
                                                          pErrorCode + ": " + pMsg,
                                                          myLocator,
                                                          pException);
      event.setErrorCode(pErrorCode);
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

    }
    private void reportError( String msg, Exception nested, boolean canRecover ) throws SAXException {
        context.handleEvent( new ValidationEventImpl(
            canRecover? ValidationEvent.ERROR : ValidationEvent.FATAL_ERROR,
            msg,
            new ValidationEventLocatorImpl(context.getLocator()),
            nested ), canRecover );
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

            throw (RuntimeException)e;  // don't catch the runtime exception. just let it go.
       
        // wrap it into a ParseConversionEvent and report it
        ParseConversionEvent pce = new ParseConversionEventImpl(
            ValidationEvent.ERROR, e.getMessage(),
            new ValidationEventLocatorImpl(context.getLocator()), e );
        context.handleEvent(pce,true);
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

            //        will be thrown)
            throw (SAXException)e;
       
        ValidationEvent ve = new PrintConversionEventImpl(
            ValidationEvent.ERROR, e.getMessage(),
            new ValidationEventLocatorImpl(caller), e );
        serializer.reportError(ve);
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

            ValidationEvent.ERROR, // maybe it should be a fatal error.
            Messages.format(Messages.ERR_TYPE_MISMATCH,
                getUserFriendlyTypeName(parentObject),
                fieldName,
                getUserFriendlyTypeName(childObject) ),
            new ValidationEventLocatorImpl(parentObject) );
        
        serializer.reportError(ve);
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

       throw new SAXException(e);
    }
    if (eventHandler == null) {
      throw new SAXParseException(pMsg, getDocumentLocator());
    } else {
      ValidationEventLocator myLocator = new ValidationEventLocatorImpl(getDocumentLocator());
      ValidationEventImpl event = new ValidationEventImpl(pSeverity,
                                                          pErrorCode + ": " + pMsg,
                                                          myLocator);
      event.setErrorCode(pErrorCode);
      eventHandler.handleEvent(event);
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.