Examples of ValidationEventImpl


Examples of javax.xml.bind.helpers.ValidationEventImpl

    public void handleError(Exception e,boolean canRecover) throws SAXException {
        handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,e.getMessage(),locator.getLocation(),e),canRecover);
    }

    public void handleError(String msg) {
        handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,msg,locator.getLocation()));
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventImpl

    /**
     * Called when there's no corresponding ID value.
     */
    public void errorUnresolvedIDREF(Object bean, String idref, LocatorEx loc) throws SAXException {
        handleEvent( new ValidationEventImpl(
            ValidationEvent.ERROR,
            Messages.UNRESOLVED_IDREF.format(idref),
            loc.getLocation()), true );
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventImpl

    }
    private void reportError( String msg, boolean canRecover ) throws SAXException {
        reportError( msg, null, canRecover );
    }
    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.ValidationEventImpl

     * Reports that the type of an object in a property is unexpected. 
     */
    public static void handleTypeMismatchError( XMLSerializer serializer,
            Object parentObject, String fieldName, Object childObject ) throws AbortSerializationException {
       
         ValidationEvent ve = new ValidationEventImpl(
            ValidationEvent.ERROR, // maybe it should be a fatal error.
            Messages.format(Messages.ERR_TYPE_MISMATCH,
                getUserFriendlyTypeName(parentObject),
                fieldName,
                getUserFriendlyTypeName(childObject) ),
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventImpl

        //     sax exception, dom locators keep a reference to their DOMScanner
        //     and call back to figure out where the error occurred.
        ValidationEventLocator vel =
            locator.getLocation( saxException );

        ValidationEventImpl ve =
            new ValidationEventImpl( severity, saxException.getMessage(), vel  );

        Exception e = saxException.getException();
        if( e != null ) {
            ve.setLinkedException( e );
        } else {
            ve.setLinkedException( saxException );
        }
       
        // call the client's event handler.
        host.handleEvent( ve, severity!=ValidationEvent.FATAL_ERROR );
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventImpl

            error(e);
        }
    }
   
    private void error( SAXException e ) throws SAXException {
        context.handleEvent(new ValidationEventImpl(
            ValidationEvent.ERROR,
            e.getMessage(),
            new ValidationEventLocatorImpl(context.getLocator()),
            e
        ), false);
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventImpl

    public void handleError(Exception e) throws SAXException {
        handleError(e,true);
    }

    public void handleError(Exception e,boolean canRecover) throws SAXException {
        handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,e.getMessage(),locator.getLocation(),e),canRecover);
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventImpl

    public void handleError(Exception e,boolean canRecover) throws SAXException {
        handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,e.getMessage(),locator.getLocation(),e),canRecover);
    }

    public void handleError(String msg) {
        handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,msg,locator.getLocation()));
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventImpl

    /**
     * Called when there's no corresponding ID value.
     */
    public void errorUnresolvedIDREF(Object bean, String idref, LocatorEx loc) throws SAXException {
        handleEvent( new ValidationEventImpl(
            ValidationEvent.ERROR,
            Messages.UNRESOLVED_IDREF.format(idref),
            loc.getLocation()), true );
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventImpl

     * Reports that the type of an object in a property is unexpected.
     */
    public static void handleTypeMismatchError( XMLSerializer serializer,
            Object parentObject, String fieldName, Object childObject ) throws SAXException {

         ValidationEvent ve = new ValidationEventImpl(
            ValidationEvent.ERROR, // maybe it should be a fatal error.
             Messages.TYPE_MISMATCH.format(
                getTypeName(parentObject),
                fieldName,
                getTypeName(childObject) ),
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.