Examples of ValidationEventLocatorImpl


Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

        vel.setNode( scanner.getCurrentLocation() );
        return vel;
    }

    public ValidationEventLocator getLocation(org.xml.sax.Locator location) {
        ValidationEventLocatorImpl vel = new ValidationEventLocatorImpl();

        try {
            vel.setURL( new URL( location.getSystemId() ) );
        } catch( MalformedURLException me ) {
            vel.setURL( null );
        }
        // get the location from the scanner and set it on the locator
        vel.setNode( scanner.getCurrentLocation() );
        return vel;
    }
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);
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

     */
    public ValidationEvent createValidationEvent() {
        return new ValidationEventImpl(
            ValidationEvent.ERROR,
            getMessage(),
            new ValidationEventLocatorImpl( locator ),
            nestedException );
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

    public static void handlePrintConversionException(
        Object caller, Exception e, XMLSerializer serializer ) throws SAXException {
       
        ValidationEvent ve = new PrintConversionEventImpl(
            ValidationEvent.ERROR, e.getMessage(),
            new ValidationEventLocatorImpl(caller) );
        serializer.reportError(ve);
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

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

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

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

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

            try {
                String id = getIdFromObject(idObj);
                reportError( new NotIdentifiableEventImpl(
                    ValidationEvent.ERROR,
                    Messages.DANGLING_IDREF.format(id),
                    new ValidationEventLocatorImpl(idObj) ) );
            } catch (JAXBException e) {
                // this error should have been reported already. just ignore here.
            }
        }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

     */
    public void errorMissingId(Object obj) throws SAXException {
        reportError( new ValidationEventImpl(
            ValidationEvent.ERROR,
            Messages.MISSING_ID.format(obj),
            new ValidationEventLocatorImpl(obj)) );
    }
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
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.