Package our.apache.commons.digester

Examples of our.apache.commons.digester.Digester


            throws IOException, SAXException {
        // Create the digester
        // @todo ought this digester use our repackaged parser?
        // I have used our repackaged parser to get it to work for now...
        // This will probably have to be changed as part of VBM:2003022702.
        Digester digester = new MarinerDigester(new SAXParser());
        digester.addObjectCreate("parent", ParentConf.class);
        digester.addObjectCreate("parent/enabled", EnabledConf.class);
        digester.addSetProperties("parent/enabled", "property", "property");
        digester.addSetNext("parent/enabled", "setEnabled");
       
        // Parse the document using the digester.
        ByteArrayInputStream stream = new ByteArrayInputStream(
                document.getBytes());
        InputSource source = new InputSource(stream);
        ParentConf parent = (ParentConf) digester.parse(source);
       
        assertNotNull(parent);
        return parent;
    }
View Full Code Here


  /* (non-Javadoc)
   * @see com.volantis.vdp.configuration.IConfiguration#read()
   */
  public void read() throws ConfigurationException {
    SCSRuleSet rule = new SCSRuleSet();
    Digester digester = new Digester();
    digester.setValidating(false);
    rule.addRuleInstaces(digester);
    File input = new File(path + File.separatorChar + filename);
    try {
      configuration = (SCSBean) digester.parse(input);
      this.timestamp = (new Date()).getTime();

    } catch (IOException e) {
      String msg = "IOException in configuration reading: "
          + e.getMessage();
View Full Code Here

  /* (non-Javadoc)
   * @see com.volantis.vdp.configuration.IConfiguration#read()
   */
  public void read() throws ConfigurationException{
    SPSRuleSet rule = new SPSRuleSet();
    Digester digester = new Digester();
        digester.setValidating( false );
    rule.addRuleInstaces(digester);
    File input = new File(path + File.separatorChar + filename);
    try {
      configuration = (SPSBean) digester.parse(input);
      this.timestamp = (new Date()).getTime();
     
    } catch (IOException e) {
      String msg = "IOException in configuration reading: " + e.getMessage();
      throw new ConfigurationException(msg, e);
View Full Code Here

TOP

Related Classes of our.apache.commons.digester.Digester

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.