Package com.dbxml.util

Examples of com.dbxml.util.Configuration.processChildren()


   public Map getNamespaceMap() {
      if ( nsMap == null ) {
         Configuration nsCfg = config.getChild(NAMESPACES, true);
         nsMap = new TreeMap();
         nsCfg.processChildren(NAMESPACE, new ConfigurationCallback() {
            public void process(Configuration cfg) {
               String prefix = cfg.getAttribute(PREFIX);
               String uri = cfg.getAttribute(URI);
               nsMap.put(prefix, uri);
            }
View Full Code Here


            driverConfig.setClassName(className);

            final Map propsMap = driverConfig.getProperties();
            Configuration propsCfg = cfg.getChild(PROPERTIES);
            if ( propsCfg != null ) {
               propsCfg.processChildren(PROPERTY, new ConfigurationCallback() {
                  public void process(Configuration pcfg) {
                     propsMap.put(pcfg.getAttribute(NAME), pcfg.getAttribute(VALUE));
                  }
               });
            }
View Full Code Here

      final Map helpMap = new HashMap();
      final List catList = new ArrayList();

      setProperties(cfg);

      cfg.processChildren(CATEGORY, new ConfigurationCallback() {
         public void process(Configuration cc) {
            String name = cc.getAttribute(NAME);
            lastCatName[0] = name;
            String desc = cc.getAttribute(DESCRIPTION);
            catList.add(StringUtilities.leftJustify(name, 15) + " " + desc);
View Full Code Here

   public void setConfig(Configuration config) throws dbXMLException {
      this.config = config;

      Configuration colConfig = config.getChild(COLLECTIONS);
      if ( colConfig != null ) {
         colConfig.processChildren(COLLECTION,
            new ConfigurationCallback() {
               public void process(Configuration cfg) throws dbXMLException {
                  Collection col = new Collection((Collection)CollectionManager.this);
                  col.setConfig(cfg);
                  collections.put(col.getName(), col);
View Full Code Here

         final String name = collection.getName();
         boolean dropped = collection.drop();
         if ( dropped ) {
            collections.remove(name);
            Configuration colConfig = config.getChild(COLLECTIONS);
            colConfig.processChildren(COLLECTION,
               new ConfigurationCallback() {
                  public void process(Configuration cfg) {
                     try {
                        if ( cfg.getAttribute(NAME).equals(name) )
                           cfg.delete();
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.