Package javax.xml.bind

Examples of javax.xml.bind.ValidationEventHandler.handleEvent()


     * The thrown exception will be catched by the unmarshaller.
     */
    public void handleEvent(ValidationEvent event, boolean canRecover ) throws SAXException {
        ValidationEventHandler eventHandler = parent.getEventHandler();

        boolean recover = eventHandler.handleEvent(event);

        // if the handler says "abort", we will not return the object
        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

View Full Code Here


     * The thrown exception will be catched by the unmarshaller.
     */
    public void handleEvent(ValidationEvent event, boolean canRecover ) throws SAXException {
        ValidationEventHandler eventHandler = parent.getEventHandler();

        boolean recover = eventHandler.handleEvent(event);

        // if the handler says "abort", we will not return the object
        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

View Full Code Here

     * The thrown exception will be catched by the unmarshaller.
     */
    public void handleEvent(ValidationEvent event, boolean canRecover ) throws SAXException {
        ValidationEventHandler eventHandler = parent.getEventHandler();

        boolean recover = eventHandler.handleEvent(event);

        // if the handler says "abort", we will not return the object
        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

View Full Code Here

     * The thrown exception will be catched by the unmarshaller.
     */
    public void handleEvent(ValidationEvent event, boolean canRecover ) throws SAXException {
        ValidationEventHandler eventHandler = parent.getEventHandler();

        boolean recover = eventHandler.handleEvent(event);

        // if the handler says "abort", we will not return the object
        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

View Full Code Here

            handler = marshaller.getEventHandler();
        } catch( JAXBException e ) {
            throw new SAXException2(e);
        }

        if(!handler.handleEvent(ve)) {
            if(ve.getLinkedException() instanceof Exception)
                throw new SAXException2((Exception)ve.getLinkedException());
            else
                throw new SAXException2(ve.getMessage());
        }
View Full Code Here

     * The thrown exception will be catched by the unmarshaller.
     */
    public void handleEvent(ValidationEvent event, boolean canRecover ) throws SAXException {
        ValidationEventHandler eventHandler = parent.getEventHandler();

        boolean recover = eventHandler.handleEvent(event);

        // if the handler says "abort", we will not return the object
        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

View Full Code Here

            handler = marshaller.getEventHandler();
        } catch( JAXBException e ) {
            throw new SAXException2(e);
        }

        if(!handler.handleEvent(ve)) {
            if(ve.getLinkedException() instanceof Exception)
                throw new SAXException2((Exception)ve.getLinkedException());
            else
                throw new SAXException2(ve.getMessage());
        }
View Full Code Here

  public void printConversionEvent(Object pObject, String pMsg, Exception pException) throws SAXException {
    ValidationEventHandler handler = getJMMarshaller().getEventHandler();
    if (handler != null) {
      ValidationEventLocator locator = new ValidationEventLocatorImpl(pObject);
      PrintConversionEventImpl event = new PrintConversionEventImpl(ValidationEvent.FATAL_ERROR, pMsg, locator);
      if (handler.handleEvent(event)) {
        return;
      }
    }
    throw new SAXException(pMsg, pException);
  }
View Full Code Here

    try {
      eventHandler = unmarshaller.getEventHandler();
    } catch (JAXBException e) {
      throw new SAXException(e);
    }
    if (eventHandler == null  ||  !eventHandler.handleEvent(pEvent)) {
      String msg = pEvent.getMessage();
      if (pEvent instanceof org.apache.ws.jaxme.impl.ValidationEventImpl) {
        String errorCode = ((org.apache.ws.jaxme.impl.ValidationEventImpl) pEvent).getErrorCode();
        if (errorCode != null) {
          msg = errorCode + ": " + msg;
View Full Code Here

            invalid = true;
            ValidationEventHandler eh = getEventHandler();
            if (eh == null) {
                return true;
            } else {
                return eh.handleEvent(pEvent);
            }
        }
    }

    public boolean validate(Object pObject) throws JAXBException {
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.