Package javax.xml.bind

Examples of javax.xml.bind.ValidationEventLocator


                    break;
            }
            message.append("Validation ").append(severity);
            File pluginJarFile = new File(pluginJarFileUrl.getPath());
            message.append(" while parsing [").append(pluginJarFile.getName()).append(":").append(PLUGIN_DESCRIPTOR_PATH).append("]");
            ValidationEventLocator locator = event.getLocator();
            message.append(" at line ").append(locator.getLineNumber());
            message.append(", column ").append(locator.getColumnNumber());
            message.append(": ").append(event.getMessage());

            // Now write the message to the log at an appropriate level.
            switch(event.getSeverity()) {
                case ValidationEvent.WARNING:
View Full Code Here


                    break;
            }
            message.append("Validation ").append(severity);
            File pluginJarFile = new File(pluginJarFileUrl.getPath());
            message.append(" while parsing [").append(pluginJarFile.getName()).append(":").append(PLUGIN_DESCRIPTOR_PATH).append("]");
            ValidationEventLocator locator = event.getLocator();
            message.append(" at line ").append(locator.getLineNumber());
            message.append(", column ").append(locator.getColumnNumber());
            message.append(": ").append(event.getMessage());

            // Now write the message to the log at an appropriate level.
            switch(event.getSeverity()) {
                case ValidationEvent.WARNING:
View Full Code Here

                {
                    public boolean handleEvent(ValidationEvent ve)
                    {
                        if (ve.getSeverity() != ValidationEvent.WARNING)
                        {
                            ValidationEventLocator vel = ve.getLocator();
                            log.error("Line:Col[" + vel.getLineNumber() + ":"
                                    + vel.getColumnNumber() + "]:"
                                    + ve.getMessage());
                            return false;
                        }
                        return true;
                    }
View Full Code Here

                    new ValidationEventHandler() {
                        // allow unmarshalling to continue even if there are errors
                        public boolean handleEvent(ValidationEvent ve) {
                            // ignore warnings
                            if (ve.getSeverity() != ValidationEvent.WARNING) {
                                ValidationEventLocator vel = ve.getLocator();
                                System.out.println("Line:Col[" + vel.getLineNumber() +
                                    ":" + vel.getColumnNumber() +
                                    "]:" + ve.getMessage());
                            }
                            return true;
                        }
                    }
View Full Code Here

                u.setEventHandler(
                   
                    new ValidationEventHandler() {
                        public boolean handleEvent(ValidationEvent ve) {
                            if (ve.getSeverity() != ValidationEvent.WARNING) {
                                ValidationEventLocator vel = ve.getLocator();
                                System.out.println("Line:Col[" + vel.getLineNumber() +
                                    ":" + vel.getColumnNumber() +
                                    "]:" + ve.getMessage());
                            }
                            return true;
                        }
                    }
View Full Code Here

                u.setEventHandler(
                   
                    new ValidationEventHandler() {
                        public boolean handleEvent(ValidationEvent ve) {
                            if (ve.getSeverity() != ValidationEvent.WARNING) {
                                ValidationEventLocator vel = ve.getLocator();
                                System.out.println("Line:Col[" + vel.getLineNumber() +
                                    ":" + vel.getColumnNumber() +
                                    "]:" + ve.getMessage());
                            }
                            return true;
                        }
                    }
View Full Code Here

                u.setEventHandler(
                   
                    new ValidationEventHandler() {
                        public boolean handleEvent(ValidationEvent ve) {
                            if (ve.getSeverity() != ValidationEvent.WARNING) {
                                ValidationEventLocator vel = ve.getLocator();
                                System.out.println("Line:Col[" + vel.getLineNumber() +
                                    ":" + vel.getColumnNumber() +
                                    "]:" + ve.getMessage());
                            }
                            return true;
                        }
                    }
View Full Code Here

                u.setEventHandler(
                   
                    new ValidationEventHandler() {
                        public boolean handleEvent(ValidationEvent ve) {
                            if (ve.getSeverity() != ValidationEvent.WARNING) {
                                ValidationEventLocator vel = ve.getLocator();
                                System.out.println("Line:Col[" + vel.getLineNumber() +
                                    ":" + vel.getColumnNumber() +
                                    "]:" + ve.getMessage());
                            }
                            return true;
                        }
                    }
View Full Code Here

                u.setEventHandler(
                   
                    new ValidationEventHandler() {
                        public boolean handleEvent(ValidationEvent ve) {
                            if (ve.getSeverity() != ValidationEvent.WARNING) {
                                ValidationEventLocator vel = ve.getLocator();
                                System.out.println("Line:Col[" + vel.getLineNumber() +
                                    ":" + vel.getColumnNumber() +
                                    "]:" + ve.getMessage());
                            }
                            return true;
                        }
                    }
View Full Code Here

       throw new SAXException(e);
    }
    if (eventHandler == null) {
      throw new SAXParseException(pMsg, getDocumentLocator());
    } else {
      ValidationEventLocator myLocator = new ValidationEventLocatorImpl(getDocumentLocator());
      ValidationEventImpl event = new ValidationEventImpl(pSeverity,
                                                          pErrorCode + ": " + pMsg,
                                                          myLocator);
      event.setErrorCode(pErrorCode);
      eventHandler.handleEvent(event);
View Full Code Here

TOP

Related Classes of javax.xml.bind.ValidationEventLocator

Copyright © 2018 www.massapicom. 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.