Index: AbstractSitemap.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/src/java/org/apache/cocoon/sitemap/AbstractSitemap.java,v
retrieving revision 1.3
diff -u -r1.3 AbstractSitemap.java
--- AbstractSitemap.java	15 Jan 2002 07:42:02 -0000	1.3
+++ AbstractSitemap.java	22 Jan 2002 14:28:35 -0000
@@ -33,6 +33,7 @@
 import org.apache.cocoon.selection.Selector;
 import org.apache.cocoon.serialization.Serializer;
 import org.apache.cocoon.transformation.Transformer;
+import org.apache.cocoon.processing.adapting.Adapter;
 import org.apache.cocoon.util.ClassUtils;
 
 import java.io.IOException;
@@ -74,6 +75,7 @@
     protected SitemapComponentSelector actions;
     protected SitemapComponentSelector matchers;
     protected SitemapComponentSelector selectors;
+    protected SitemapComponentSelector adapters;
 
     /**
      * Set the role manager
@@ -116,6 +118,7 @@
             this.actions = new SitemapComponentSelector();
             this.matchers = new SitemapComponentSelector();
             this.selectors = new SitemapComponentSelector();
+            this.adapters = new SitemapComponentSelector();
 
             // Set Parent Sitemap Selectors
             try {
@@ -126,6 +129,7 @@
                 this.actions.setParentSelector((SitemapComponentSelector) this.manager.lookup(Action.ROLE + "Selector"));
                 this.matchers.setParentSelector((SitemapComponentSelector) this.manager.lookup(Matcher.ROLE + "Selector"));
                 this.selectors.setParentSelector((SitemapComponentSelector) this.manager.lookup(Selector.ROLE + "Selector"));
+                this.adapters.setParentSelector((SitemapComponentSelector) this.manager.lookup(Adapter.ROLE + "Selector"));
             } catch (ComponentException ce) {
                 /* we are ignoring those exceptions.  We just want
                  * to ensure that the selectors get initialized
@@ -141,6 +145,7 @@
             this.setupSelector(this.actions);
             this.setupSelector(this.matchers);
             this.setupSelector(this.selectors);
+            this.setupSelector(this.adapters);
 
             // Add the Selectors
             this.manager.addComponentInstance(Generator.ROLE + "Selector", this.generators);
@@ -150,6 +155,7 @@
             this.manager.addComponentInstance(Action.ROLE + "Selector", this.actions);
             this.manager.addComponentInstance(Matcher.ROLE + "Selector", this.matchers);
             this.manager.addComponentInstance(Selector.ROLE + "Selector", this.selectors);
+            this.manager.addComponentInstance(Adapter.ROLE + "Selector", this.adapters);
         } catch (Exception e) {
             getLogger().error("cannot obtain the Component", e);
             throw new ComponentException("cannot obtain the URLFactory", e);
@@ -242,6 +248,9 @@
                 case Sitemap.SELECTOR:
                     this.selectors.addComponent(hint, clazz, configuration);
                     break;
+                case Sitemap.ADAPTER:
+					this.adapters.addComponent(hint, clazz, configuration);
+					break;
             }
     }
 
@@ -411,6 +420,9 @@
         }
         if (this.selectors != null) {
             manager.release((Component)this.selectors);
+        }
+        if (this.adapters != null) {
+			manager.release((Component)this.adapters);
         }
     }
 
