/** * Process notification of the end of the document being reached. * * @exception SAXException if a parsing error is to be reported */ @Override public void endDocument() throws SAXException { if (saxLog.isDebugEnabled()) { if (getCount() > 1) { saxLog.debug("endDocument(): " + getCount() + " elements left"); } else { saxLog.debug("endDocument()"); } } // Fire "finish" events for all defined rules for (Rule rule : getRules().rules()) { try { rule.finish(); } catch (Exception e) { log.error("Finish event threw exception", e); throw createSAXException(e); } catch (Error e) { log.error("Finish event threw error", e); throw e; } } // Perform final cleanup clear(); }
/** * <p>Parse the XML document at the specified URL using the configured * <code>RuleSet</code>, registering catalogs with nested chains and * commands as they are encountered. Use this method <strong>only</strong> * if you have included one or more <code>factory</code> elements in your * configuration resource.</p> * * @param url <code>URL</code> of the XML document to be parsed * * @exception Exception if a parsing error occurs */ public void parse(URL url) throws Exception { // Prepare our Digester instance Digester digester = getDigester(); digester.clear(); // Parse the configuration document digester.parse(url); }
digester.clear(); digester.push(getFacesConfig()); InputSource source = new InputSource(getResource().toExternalForm());
/** * <p>Parse the XML document at the specified URL, using the configured * <code>RuleSet</code>, registering top level commands into the specified * {@link Catalog}. Use this method <strong>only</strong> if you have * <strong>NOT</strong> included any <code>factory</code> element in your * configuration resource, and wish to supply the catalog explictly.</p> * * @param catalog {@link Catalog} into which configured chains are * to be registered * @param url <code>URL</code> of the XML document to be parsed * * @exception Exception if a parsing error occurs * * @deprecated Use parse(URL) on a configuration resource with "factory" * element(s) embedded */ public void parse(Catalog catalog, URL url) throws Exception { // Prepare our Digester instance Digester digester = getDigester(); digester.clear(); digester.push(catalog); // Parse the configuration document digester.parse(url); }
/** * Process notification of the end of the document being reached. * * @exception SAXException if a parsing error is to be reported */ public void endDocument() throws SAXException { if (saxLog.isDebugEnabled()) { if (getCount() > 1) { saxLog.debug("endDocument(): " + getCount() + " elements left"); } else { saxLog.debug("endDocument()"); } } // Fire "finish" events for all defined rules for (Rule rule : getRules().rules()) { try { rule.finish(); } catch (Exception e) { log.error("Finish event threw exception", e); throw createSAXException(e); } catch (Error e) { log.error("Finish event threw error", e); throw e; } } // Perform final cleanup clear(); }
this.digester.clear(); if (initialValue != null) { this.digester.push(initialValue);
digester.clear(); digester.push(getDialogs()); InputSource source = new InputSource(getResource().toExternalForm());
/** * <p>Parse the configuration resource identified by the <code>resource</code> * property, storing resulting information in the <code>Map</code> specified * by the <code>dialogs</code> property.</p> * * @exception IOException if an input/output error occurs * @exception SAXException if an XML parsing error occurs */ public void parse() throws IOException, SAXException { Map metadata = new HashMap(); Digester digester = digester(); digester.clear(); digester.push(metadata); digester.parse(getResource()); parseDialogs(metadata); }
digester.push(config); } else { digester.clear(); digester.push(config);
"I/O Error reading definitions.", e); } finally { digester.clear();
"I/O Error reading definitions.", e); } finally { digester.clear();
/** * <p>Parse the specified JavaServer Faces configuration resource, causing * the appropriate JSF artifacts to be registered with the mock object * hierarchy.</p> * * @param url <code>URL</code> of the configuration resource to parse * * @exception IOException if an input/output error occurs * @exception SAXException if a parsing error occurs */ public void parse(URL url) throws IOException, SAXException { // Acquire and configure the Digester instance we will use Digester digester = digester(); ApplicationFactory factory = (ApplicationFactory) FactoryFinder .getFactory(FactoryFinder.APPLICATION_FACTORY); Application application = factory.getApplication(); digester.push(application); // Perform the required parsing try { digester.parse(url); } finally { digester.clear(); } }
/** * <p>Parse the specified JavaServer Faces configuration resource, causing * the appropriate JSF artifacts to be registered with the mock object * hierarchy.</p> * * @param url <code>URL</code> of the configuration resource to parse * * @exception IOException if an input/output error occurs * @exception SAXException if a parsing error occurs */ public void parse(URL url) throws IOException, SAXException { // Acquire and configure the Digester instance we will use Digester digester = digester(); ApplicationFactory factory = (ApplicationFactory) FactoryFinder .getFactory(FactoryFinder.APPLICATION_FACTORY); Application application = factory.getApplication(); digester.push(application); // Perform the required parsing try { digester.parse(url); } finally { digester.clear(); } }
digester.clear();