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

   
    private void reportMissingObjectError() throws SAXException {
        ValidationEvent ev = new ValidationEventImpl(
            ValidationEvent.ERROR,
            Messages.format(Messages.MISSING_OBJECT),
            new ValidationEventLocatorImpl(target),
            new NullPointerException() );
   
        reportError(ev);
    }
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

    /**
     * Set the appropriate locator information on the supplied
     * ValidationEvent.
     */
    public ValidationEventLocator getLocation( SAXParseException saxException ) {
        return new ValidationEventLocatorImpl(saxException);
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

        return new ValidationEventLocatorImpl(saxException);
    }

    public ValidationEventLocator getLocation(org.xml.sax.Locator location) {
        // copy to take the snapshot of the current values
        return new ValidationEventLocatorImpl(new LocatorImpl(location));
    }
View Full Code Here

Examples of javax.xml.bind.helpers.ValidationEventLocatorImpl

     * Set the appropriate locator information on the supplied
     * ValidationEvent.
     */
    public ValidationEventLocator getLocation( SAXParseException saxException ) {
                                                  
        ValidationEventLocatorImpl vel = new ValidationEventLocatorImpl();
       
        try {
            vel.setURL( new URL( saxException.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
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.