Package org.apache.commons.digester

Examples of org.apache.commons.digester.Digester.addRule()


        digester.addCallMethod("*/dict/false", "addFalseValue");
        digester.addCallMethod("*/dict/date", "addDateValue", 0);

        // rules for arrays
        digester.addRule("*/dict/array", new SetNextAndPopRule("addChild"));
        digester.addRule("*/dict/array", new ObjectCreateRule(ArrayNode.class));
        digester.addSetNext("*/dict/array", "addList");

        digester.addRule("*/array/array", new ObjectCreateRule(ArrayNode.class));
        digester.addSetNext("*/array/array", "addList");

View Full Code Here


        // rules for arrays
        digester.addRule("*/dict/array", new SetNextAndPopRule("addChild"));
        digester.addRule("*/dict/array", new ObjectCreateRule(ArrayNode.class));
        digester.addSetNext("*/dict/array", "addList");

        digester.addRule("*/array/array", new ObjectCreateRule(ArrayNode.class));
        digester.addSetNext("*/array/array", "addList");

        digester.addCallMethod("*/array/string", "addValue", 0);
        digester.addCallMethod("*/array/data", "addDataValue", 0);
        digester.addCallMethod("*/array/integer", "addIntegerValue", 0);
View Full Code Here

                            "org.apache.catalina.LifecycleListener");

        digester.addObjectCreate("Server/Service/Connector",
                                 "org.apache.coyote.tomcat5.CoyoteConnector",
                                 "className");
        digester.addRule("Server/Service/Connector",
                         new SetAllPropertiesRule());
        digester.addSetNext("Server/Service/Connector",
                            "addConnector",
                            "org.apache.catalina.Connector");
View Full Code Here

        digester.addRuleSet(new ContextRuleSet("Server/Service/Engine/Host/"));
        digester.addRuleSet(new ClusterRuleSet("Server/Service/Engine/Host/Cluster/"));
        digester.addRuleSet(new NamingRuleSet("Server/Service/Engine/Host/Context/"));

        // When the 'engine' is found, set the parentClassLoader.
        digester.addRule("Server/Service/Engine",
                         new SetParentClassLoaderRule(parentClassLoader));

        long t2=System.currentTimeMillis();
        log.debug("Digester for server.xml created " + ( t2-t1 ));
        return (digester);
View Full Code Here

                            "org.apache.catalina.LifecycleListener");

        digester.addObjectCreate("Server/Service/Connector",
                                 "org.apache.coyote.tomcat5.CoyoteConnector",
                                 "className");
        digester.addRule("Server/Service/Connector",
                         new SetAllPropertiesRule());
        digester.addSetNext("Server/Service/Connector",
                            "addConnector",
                            "org.apache.catalina.Connector");
View Full Code Here

        digester.addRuleSet(new NamingRuleSet("Server/Service/Engine/Host/DefaultContext/"));
        digester.addRuleSet(new ContextRuleSet("Server/Service/Engine/Host/"));
        digester.addRuleSet(new NamingRuleSet("Server/Service/Engine/Host/Context/"));

        // When the 'engine' is found, set the parentClassLoader.
        digester.addRule("Server/Service/Engine",
                         new SetParentClassLoaderRule(digester,
                                                      parentClassLoader));

        long t2=System.currentTimeMillis();
        log.debug("Digester for server.xml created " + ( t2-t1 ));
View Full Code Here

   public static Digester getDigester( Config oConfig, ResourceLoader oResourceLoader )
   {
      Digester oDigester = createBasicDigester( oConfig );

      // include config rules
      oDigester.addRule( XML.Config_IncludeConfig.PATTERN, new IncludeConfigRule( oConfig, oResourceLoader ) );

      return oDigester;
   }

   public static Digester createBasicDigester( Config oConfig )
View Full Code Here

      {
         JavaClassPathRule oJavaClassPathRule = new JavaClassPathRule( oConfig.getJavaClassPath() );

         {
            JavaClassPathRule.AddCompiledDirRule oAddCompiledDirRule = oJavaClassPathRule.createAddCompiledDirRule();
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory.PATTERN,                 oAddCompiledDirRule );
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory_Directory.PATTERN,       oAddCompiledDirRule.createParamDirRule() );
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory_PackagePrefix.PATTERN,   oAddCompiledDirRule.createParamPackageNamePrefixRule() );
         }
      }
View Full Code Here

         JavaClassPathRule oJavaClassPathRule = new JavaClassPathRule( oConfig.getJavaClassPath() );

         {
            JavaClassPathRule.AddCompiledDirRule oAddCompiledDirRule = oJavaClassPathRule.createAddCompiledDirRule();
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory.PATTERN,                 oAddCompiledDirRule );
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory_Directory.PATTERN,       oAddCompiledDirRule.createParamDirRule() );
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory_PackagePrefix.PATTERN,   oAddCompiledDirRule.createParamPackageNamePrefixRule() );
         }
      }

      // model-defs config rules
View Full Code Here

         {
            JavaClassPathRule.AddCompiledDirRule oAddCompiledDirRule = oJavaClassPathRule.createAddCompiledDirRule();
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory.PATTERN,                 oAddCompiledDirRule );
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory_Directory.PATTERN,       oAddCompiledDirRule.createParamDirRule() );
            oDigester.addRule( XML.Config_JavaClassPath_CompiledDirectory_PackagePrefix.PATTERN,   oAddCompiledDirRule.createParamPackageNamePrefixRule() );
         }
      }

      // model-defs config rules
      {
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.