Package com.dbxml.labrador.configuration

Examples of com.dbxml.labrador.configuration.Configuration.processChildren()


         Configuration root = new Configuration(doc);

         if ( !root.getName().equals(ELEM_LABRADOR) )
            throw new IOException("Invalid configuration format");

         root.processChildren(new ConfigurationCallback() {
            public void process(Configuration cfg) {
               for ( int j = 0; j < ELEM_NAMES.length; j++ ) {
                  if ( cfg.getName().equals(ELEM_NAMES[j]) ) {
                     Class c = ELEM_CLASSES[j];
                     Object o = constructInstance(cfg, c);
View Full Code Here


   public void setConfig(Configuration config) throws ConfigurationException {
      super.setConfig(config);
      Configuration mimeCfg = config.getChild(MIMEMAPPINGS);
      if ( mimeCfg != null ) {
         mimeCfg.processChildren(MIMEMAPPING, new ConfigurationCallback() {
            public void process(Configuration cfg) {
               String ext = cfg.getAttribute(EXT);
               String type = cfg.getAttribute(TYPE);
               mimeTypes.put(ext, type);
            }
View Full Code Here

         ps = new PrintStream(bos);

         Configuration itemsCfg = config.getChild(ITEMS);
         if ( itemsCfg != null ) {
            final List lst = new ArrayList();
            itemsCfg.processChildren(ITEM, new ConfigurationCallback() {
               public void process(Configuration cfg) {
                  String type = cfg.getAttribute(TYPE);
                  String name = cfg.getAttribute(NAME);
                  if ( type.equals(PATH) )
                     lst.add(new ItemInfo(TYPE_PATH));
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.