Examples of ValidationEventLocatorImpl


Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

        String id = obj.____jaxb____getId();
        if(id==null) {
            reportError( new NotIdentifiableEventImpl(
                ValidationEvent.ERROR,
                Messages.format(Messages.ERR_NOT_IDENTIFIABLE),
                new ValidationEventLocatorImpl(obj) ) );
        }
        return id;
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

        for( Iterator itr=idReferencedObjects.iterator(); itr.hasNext(); ) {
            IdentifiableObject o = (IdentifiableObject)itr.next();
            reportError( new NotIdentifiableEventImpl(
                ValidationEvent.ERROR,
                Messages.format(Messages.ERR_DANGLING_IDREF,o.____jaxb____getId()),
                new ValidationEventLocatorImpl(o) ) );
        }
       
        // clear the garbage
        idReferencedObjects.clear();
        objectsWithId.clear();
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

   
    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.ValidationEventLocatorImpl

            reportEvent(
                source,               
                new NotIdentifiableEventImpl(
                    ValidationEvent.ERROR,
                    Messages.format( Messages.ID_NOT_FOUND, e.getKey() ),
                    new ValidationEventLocatorImpl( source ) ) );
        }
       
        IDREFs.clear();
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

    public void reportEvent(ValidatableObject source, String formattedMessage) throws AbortSerializationException {
        reportEvent(
            source,
            new ValidationEventImpl( ValidationEvent.ERROR,
                                     formattedMessage,
                                     new ValidationEventLocatorImpl(source) ) );
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

    public void reportEvent(ValidatableObject source, Exception nestedException ) throws AbortSerializationException {
        reportEvent(
            source,
            new ValidationEventImpl( ValidationEvent.ERROR,
                                     nestedException.toString(),
                                     new ValidationEventLocatorImpl(source),
                                     nestedException ) );
    }
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
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.