Package javax.xml.bind

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


/*      */   public void handleEvent(ValidationEvent event, boolean canRecover)
/*      */     throws SAXException
/*      */   {
/*  594 */     ValidationEventHandler eventHandler = this.parent.getEventHandler();
/*      */
/*  596 */     boolean recover = eventHandler.handleEvent(event);
/*      */
/*  600 */     if (!recover) this.aborted = true;
/*      */
/*  602 */     if ((!canRecover) || (!recover))
/*  603 */       throw new SAXParseException2(event.getMessage(), this.locator, new UnmarshalException(event.getMessage(), event.getLinkedException()));
View Full Code Here


/*  233 */       handler = this.marshaller.getEventHandler();
/*      */     } catch (JAXBException e) {
/*  235 */       throw new SAXException2(e);
/*      */     }
/*      */
/*  238 */     if (!handler.handleEvent(ve)) {
/*  239 */       if ((ve.getLinkedException() instanceof Exception)) {
/*  240 */         throw new SAXException2((Exception)ve.getLinkedException());
/*      */       }
/*  242 */       throw new SAXException2(ve.getMessage());
/*      */     }
View Full Code Here

      ValidationEventLocator myLocator = new ValidationEventLocatorImpl(getDocumentLocator());
      ValidationEventImpl event = new ValidationEventImpl(pSeverity,
                                                          pErrorCode + ": " + pMsg,
                                                          myLocator);
      event.setErrorCode(pErrorCode);
      eventHandler.handleEvent(event);
    }
  }

  protected void validationEvent(int pSeverity, String pMsg, String pErrorCode,
                                   Exception pException)
View Full Code Here

      ValidationEventImpl event = new ValidationEventImpl(pSeverity,
                                                          pErrorCode + ": " + pMsg,
                                                          myLocator,
                                                          pException);
      event.setErrorCode(pErrorCode);
      eventHandler.handleEvent(event);
    }
  }

  public void processingInstruction(String pTarget, String pData)
      throws SAXException {
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

     * 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

            handler = owner.getEventHandler();
        } catch( JAXBException e ) {
            throw new AbortSerializationException(e);
        }
       
        if(!handler.handleEvent(ve))
            throw new AbortSerializationException(ve.getMessage());
    }
   
   
    // TODO: probably we should have WrappedSAXException here,
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.