Examples of JDOHandler


Examples of org.apache.jdo.impl.model.jdo.xml.JDOHandler

        }
        else {
            // resource exists => parse it
            // Store all pc classes specified in this resource in this
            // JDOModel instance => pass this to the handler
            JDOHandler handler = new JDOHandlerImpl(this);
            JDOParser parser = new JDOParser(handler);
            try {
                if (debug)
                    xmlLogger.debug("  XML " + resource +  //NOI18N
                                    " found, start parsing ..."); //NOI18N
                parser.parse(new InputSource(new InputStreamReader(stream)));
            }
            catch (SAXException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            catch (ParserConfigurationException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            catch (IOException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            finally {
                try { stream.close(); }
                catch (IOException ex) {
                    // ignore close exception, stream will be nullified anyway
                }
            }
            stream = null;
           
            // post process loaded JDOClasses
            Collection newJDOClasses = handler.handledJDOClasses();
            if (debug)
                xmlLogger.debug("  XML " + resource + //NOI18N
                                " has JDO metadata for class(es) " + //NOI18N
                                newJDOClasses);
            for (Iterator i = newJDOClasses.iterator(); i.hasNext();) {
View Full Code Here

Examples of org.apache.jdo.impl.model.jdo.xml.JDOHandler

        }
        else {
            // resource exists => parse it
            // Store all pc classes specified in this resource in this
            // JDOModel instance => pass this to the handler
            JDOHandler handler = new JDOHandlerImpl(this);
            JDOParser parser = new JDOParser(handler);
            try {
                if (debug)
                    xmlLogger.debug("  XML " + resource +  //NOI18N
                                    " found, start parsing ..."); //NOI18N
                parser.parse(new InputSource(new InputStreamReader(stream)));
            }
            catch (SAXException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            catch (ParserConfigurationException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            catch (IOException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            finally {
                try { stream.close(); }
                catch (IOException ex) {
                    // ignore close exception, stream will be nullified anyway
                }
            }
            stream = null;
           
            // post process loaded JDOClasses
            Collection newJDOClasses = handler.handledJDOClasses();
            if (debug)
                xmlLogger.debug("  XML " + resource + //NOI18N
                                " has JDO metadata for class(es) " + //NOI18N
                                newJDOClasses);
            for (Iterator i = newJDOClasses.iterator(); i.hasNext();) {
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.