/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  The ASF licenses this file to You
* under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.  For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/
package org.apache.abdera.factory;

import javax.xml.namespace.QName;

import org.apache.abdera.model.Base;
import org.apache.abdera.model.Element;

import java.util.List;

/**
 * Extension Factories are used to provide a means of dynamically resolving
 * builders for namespaced extension elements
 * 
 * There are four ways of supporting extension elements.
 * 
 * 1. Implement your own Factory (hard)
 * 2. Subclass the default Axiom-based Factory (also somewhat difficult)
 * 3. Implement and register an ExtensionFactory (wonderfully simple)
 * 4. Use the Feed Object Model's dynamic support for extensions (also very simple)
 * 
 * Registering an Extension Factory requires generally nothing more than 
 * implementing ExtensionFactory and then creating the file 
 * META-INF/services/org.apache.abdera.factory.ExtensionFactory and listing
 * the class names of each ExtensionFactory you wish to register.
 * 
 * Note that at this time, ExtensionFactories are specific to the parser 
 * implementation used.  That is, if you're using the default StAX-based 
 * FOMParser and FOMFactory implementation, your ExtensionFactores will 
 * need to also implement FOMExtensionFactory.
 */
public interface ExtensionFactory {

  /**
   * Returns true if this extension factory handles the specified namespace
   */
  boolean handlesNamespace(String namespace);

  /**
   * Returns the Namespace URIs handled by this Extension Factory.
   *
   * @return A List of Namespace URIs Supported by this Extension
   */
  List<String> getNamespaces();

  /**
   * Called by the Factory implementaton to create an instance of the 
   * extension element.  If parent is not null, the new element will 
   * be automatically added as a child of the parent.
   * 
   * @param qname the QName of the extension element
   * @param parent the Parent of the extension element
   * @param factory the Factory
   * @return ExtensionElement The created ExtensionElement
   */
  <T extends Element>T newExtensionElement(QName qname, Base parent, Factory factory);

}

@@ -993,16 +993,25 @@
 %0A%0A/**%0A *
+ %3Cp%3E%0A *  
  Extensi
@@ -1078,16 +1078,18 @@
 lving%0A *
+  
  builder
@@ -1127,20 +1127,30 @@
 ents%0A * 
-%0A * 
+%3C/p%3E%0A *%0A * %3Cp%3E
 There ar
@@ -1194,24 +1194,28 @@
 lements.
+%3C/p%3E
 %0A * %0A * 
 1. Imple
@@ -1210,11 +1210,22 @@
 %0A * 
-1. 
+%3Col%3E%0A *   %3Cli%3E
 Impl
@@ -1257,15 +1257,23 @@
 ard)
-%0A * 2. 
+%3C/li%3E%0A *   %3Cli%3E
 Subc
@@ -1338,15 +1338,23 @@
 ult)
-%0A * 3. 
+%3C/li%3E%0A *   %3Cli%3E
 Impl
@@ -1416,15 +1416,23 @@
 ple)
-%0A * 4. 
+%3C/li%3E%0A *   %3Cli%3E
 Use 
@@ -1504,23 +1504,46 @@
  simple)
-%0A * %0A *
+%3C/li%3E%0A * %3C/ol%3E%0A * %0A * %3Cp%3E%0A *  
  Registe
@@ -1604,24 +1604,26 @@
 ore than %0A *
+  
  implementin
@@ -1671,16 +1671,18 @@
 file %0A *
+  
  META-IN
@@ -1749,16 +1749,18 @@
 sting%0A *
+  
  the cla
@@ -1818,19 +1818,36 @@
 ter.%0A * 
-%0A *
+%3C/p%3E%0A * %0A * %3Cp%3E%0A *  
  Note th
@@ -1912,16 +1912,18 @@
 rser %0A *
+  
  impleme
@@ -1988,16 +1988,18 @@
 ased %0A *
+  
  FOMPars
@@ -2063,16 +2063,18 @@
 will %0A *
+  
  need to
@@ -2110,16 +2110,24 @@
 actory.%0A
+ * %3C/p%3E%0A
  */%0Apubl

Clean up the javadocs for ExtensionFactory.