Examples of processChildren()


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

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

   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

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

         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

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

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

            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

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

      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

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

   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

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

         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

Examples of org.apache.xindice.util.Configuration.processChildren()

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

      Configuration colConfig = config.getChild(COLLECTIONS);
      if ( colConfig != null ) {
         colConfig.processChildren(COLLECTION,
            new ConfigurationCallback() {
               public void process(Configuration cfg) throws XindiceException {
                  // check for an existing Collection by name and, if found, skip creating a new Collection
                  // else, create a new child Collection, configure it an add it
                  // if the Collection already exists in our collections list,
View Full Code Here

Examples of org.apache.xindice.util.Configuration.processChildren()

         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.