abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r420598 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/factory/ core/src/main/java/org/apache/abdera/model/ examples/src/main/java/org/apache/abdera/examples/simple/ extensions/src/main/java/org/apache/abdera/ext/th...
Date Mon, 10 Jul 2006 18:14:11 GMT
Author: jmsnell
Date: Mon Jul 10 11:14:09 2006
New Revision: 420598

URL: http://svn.apache.org/viewvc?rev=420598&view=rev
Log:
Eliminating the StringElement and ExtensionElement interfaces.
All elements now support a getText/setText method for retrieving the text content of the element with markup stripped
There is a registerExtension method on Factory that allows impl classes to be associated with implementation classes 
dynamically (e.g. without requiring static registration)

Removed:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensionElement.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/StringElement.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionElement.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMStringElement.java
Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Category.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Service.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Text.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Workspace.java
    incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/TextFilterExample.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadExtensionFactory.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/Total.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMInReplyTo.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMTotal.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionFactory.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java Mon Jul 10 11:14:09 2006
@@ -20,8 +20,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.model.Base;
-import org.apache.abdera.model.ExtensionElement;
-
+import org.apache.abdera.model.Element;
 
 /**
  * @author James M Snell (jasnell@us.ibm.com)
@@ -70,6 +69,6 @@
    * @param factory the Factory
    * @return ExtensionElement The created ExtensionElement
    */
-  <T extends ExtensionElement>T newExtensionElement(QName qname, Base parent, Factory factory);
+  <T extends Element>T newExtensionElement(QName qname, Base parent, Factory factory);
 
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java Mon Jul 10 11:14:09 2006
@@ -37,7 +37,7 @@
 import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Entry;
-import org.apache.abdera.model.ExtensionElement;
+
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Generator;
 import org.apache.abdera.model.IRI;
@@ -45,7 +45,6 @@
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Service;
 import org.apache.abdera.model.Source;
-import org.apache.abdera.model.StringElement;
 import org.apache.abdera.model.Text;
 import org.apache.abdera.model.Workspace;
 import org.apache.abdera.parser.Parser;
@@ -116,11 +115,11 @@
   
   Content newContent(String value, Content.Type type);
   
-  Content newContent(Content.Type type, ExtensionElement value);
+  Content newContent(Element value, Content.Type type);
 
   Content newContent(String value, Content.Type type, Element parent);
   
-  Content newContent(ExtensionElement value, Content.Type type, Element parent);  
+  Content newContent(Element value, Content.Type type, Element parent);  
   
   Content newContent(MimeType mediaType);
   
@@ -130,9 +129,9 @@
   
   Content newContent(URI src, MimeType mediaType, Element parent);
   
-  Content newContent(ExtensionElement element, MimeType mediaType);
+  Content newContent(Element element, MimeType mediaType);
   
-  Content newContent(ExtensionElement element, MimeType mediaType, Element parent);
+  Content newContent(Element element, MimeType mediaType, Element parent);
   
   Content newContent(DataHandler dataHandler, MimeType mediatype);
   
@@ -398,33 +397,33 @@
   
   Text newText(QName qname, Div value, Element parent);
 
-  StringElement newName();
+  Element newName();
   
-  StringElement newName(String value);
+  Element newName(String value);
   
-  StringElement newName(Element parent);
+  Element newName(Element parent);
   
-  StringElement newName(String value, Element parent);
+  Element newName(String value, Element parent);
   
-  StringElement newEmail();
+  Element newEmail();
   
-  StringElement newEmail(String value);
+  Element newEmail(String value);
   
-  StringElement newEmail(Element parent);
+  Element newEmail(Element parent);
   
-  StringElement newEmail(String value, Element parent);
+  Element newEmail(String value, Element parent);
   
-  StringElement newStringElement(QName qname);
+  Element newElement(QName qname);
   
-  StringElement newStringElement(QName qname, String value);
+  Element newElement(QName qname, String value);
   
-  StringElement newStringElement(QName qname, Base parent);
+  Element newElement(QName qname, Base parent);
   
-  StringElement newStringElement(QName qname, String value, Base parent);
+  Element newElement(QName qname, String value, Base parent);
 
-  ExtensionElement newExtensionElement(QName qname);
+  Element newExtensionElement(QName qname);
   
-  ExtensionElement newExtensionElement(QName qname, Base parent);
+  Element newExtensionElement(QName qname, Base parent);
   
   Control newControl();
   
@@ -438,7 +437,7 @@
   
   Div newDiv(Base parent);
 
-  void registerAsSimpleExtension(QName qname);
+  <T extends Base>void registerExtension(QName qname, Class impl);
   
   <T extends Base>void registerAlternative(Class<T> base, Class<? extends T> alternative);
   

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Category.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Category.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Category.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Category.java Mon Jul 10 11:14:09 2006
@@ -43,7 +43,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Category 
-  extends ExtensibleElement, StringElement {
+  extends ExtensibleElement {
 
   /**
    * RFC4287: The "term" attribute is a string that identifies the 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java Mon Jul 10 11:14:09 2006
@@ -46,7 +46,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Collection 
-  extends ExtensibleElement, ExtensionElement {
+  extends ExtensibleElement {
 
   /**
    * APP Draft-08: The app:collection element MUST contain a "title" 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java Mon Jul 10 11:14:09 2006
@@ -100,7 +100,7 @@
  * 
  * @author James M Snell (jasnell@us.ibm.com)
  */
-public interface Content extends StringElement {
+public interface Content extends Element {
 
   public enum Type { 
     TEXT, HTML, XHTML, XML, MEDIA;
@@ -129,9 +129,9 @@
   
   void setContentType(Type type);
   
-  <T extends ExtensionElement> T getValueElement();
+  <T extends Element> T getValueElement();
   
-  <T extends ExtensionElement>void setValueElement(T value);
+  <T extends Element>void setValueElement(T value);
 
   /**
    * RFC4287: On the atom:content element, the value of the "type" 
@@ -223,7 +223,11 @@
    * @throws UnsupportedOperationException if type = text, html, xhtml, or any application/*+xml, or text/* type
    */
   void setDataHandler(DataHandler dataHandler);
-
+  
+  String getValue();
+  
+  void setValue(String value);
+  
   String getWrappedValue();
   
   void setWrappedValue(String wrappedValue);

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java Mon Jul 10 11:14:09 2006
@@ -57,8 +57,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Control 
-  extends ExtensionElement, 
-          ExtensibleElement {
+  extends ExtensibleElement {
   
   /**
    * <p>Returns true if the entry should <i>not</i> be made publicly visible.</p>

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java Mon Jul 10 11:14:09 2006
@@ -27,7 +27,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface DateTime 
-  extends  ExtensionElement {
+  extends  Element {
   
   /**
    * Returns the content value of the element as an AtomDate object 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java Mon Jul 10 11:14:09 2006
@@ -23,8 +23,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Div 
-  extends ExtensibleElement, 
-          StringElement {
+  extends ExtensibleElement {
 
   /**
    * Returns the array of class attribute values on the div
@@ -56,4 +55,7 @@
    */
   void setXhtmlClass(String[] classes);
   
+  String getValue();
+  
+  void setValue(String value);
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java Mon Jul 10 11:14:09 2006
@@ -47,6 +47,8 @@
   
   <T extends Element>T getFirstChild(QName qname);  
   
+  QName getQName();
+  
   /**
    * Returns the value of this elements <code>xml:lang</code> attribute or 
    * null if <code>xml:lang</code> is undefined.
@@ -121,4 +123,7 @@
    */
   void discard();
   
+  String getText();
+  
+  void setText(String text);
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java Mon Jul 10 11:14:09 2006
@@ -105,7 +105,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Entry 
-  extends ExtensibleElement, ExtensionElement {
+  extends ExtensibleElement {
 
   /**
    * Returns the first author listed for the entry
@@ -227,7 +227,7 @@
   /**
    * Sets the content for this entry
    */
-  Content setContent(ExtensionElement value, Content.Type type);  
+  Content setContent(Element value, Content.Type type);  
   
   /**
    * Sets the content for this entry
@@ -242,7 +242,7 @@
   /**
    * Sets the content for this entry
    */
-  Content setContent(ExtensionElement element, MimeType mediaType);
+  Content setContent(Element element, MimeType mediaType);
   
   /**
    * Sets the content for this entry

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java Mon Jul 10 11:14:09 2006
@@ -29,39 +29,39 @@
   /**
    * Returns the complete set of extension elements
    */
-  List<ExtensionElement> getExtensions();
+  List<Element> getExtensions();
   
   /**
    * Returns the complete set of extension elements using the specified 
    * XML Namespace URI
    */
-  List<ExtensionElement> getExtensions(String uri);
+  List<Element> getExtensions(String uri);
   
   /**
    * Returns the complete set of extension elements using the specified
    * XML qualified name
    */
-  <T extends ExtensionElement>List<T> getExtensions(QName qname);
+  <T extends Element>List<T> getExtensions(QName qname);
   
   /**
    * Returns the first extension element with the XML qualified name
    */
-  <T extends ExtensionElement>T getExtension(QName qname);
+  <T extends Element>T getExtension(QName qname);
   
   /**
    * Adds an individual extension element
    */
-  void addExtension(ExtensionElement extension);
+  void addExtension(Element extension);
 
   /**
    * Adds an individual extension element
    */
-  <T extends ExtensionElement>T addExtension(QName qname);
+  <T extends Element>T addExtension(QName qname);
   
   /**
    * Adds an individual extension element
    */
-  <T extends ExtensionElement>T addExtension(
+  <T extends Element>T addExtension(
     String namespace, 
     String localPart,
     String prefix);
@@ -69,14 +69,14 @@
   /**
    * Adds a simple extension (text content only)
    */
-  StringElement addSimpleExtension(
+  Element addSimpleExtension(
     QName qname, 
     String value);
   
   /**
    * Adds a simple extension (text content only)
    */
-  StringElement addSimpleExtension(
+  Element addSimpleExtension(
     String namespace, 
     String localPart, 
     String prefix, 
@@ -95,10 +95,10 @@
   /**
    * Adds a list of extensions
    */
-  void addExtensions(List<ExtensionElement> extensions);
+  void addExtensions(List<Element> extensions);
   
   /**
    * Find an extension by Class rather than QName
    */
-  <T extends ExtensionElement> T getExtension(Class<T> _class);
+  <T extends Element> T getExtension(Class<T> _class);
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java Mon Jul 10 11:14:09 2006
@@ -45,7 +45,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Generator 
-  extends StringElement {
+  extends Element {
 
   /**
    *  The atom:generator element MAY have a "uri" attribute whose value

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java Mon Jul 10 11:14:09 2006
@@ -27,7 +27,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface IRI 
-  extends  ExtensionElement {
+  extends  Element {
   
   /**
    * Returns the value of the element as a java.net.URI 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java Mon Jul 10 11:14:09 2006
@@ -49,7 +49,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Link 
-  extends ExtensibleElement, StringElement {
+  extends ExtensibleElement {
 
   public static final String REL_ALTERNATE = "alternate";
   public static final String REL_CURRENT = "current";

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java Mon Jul 10 11:14:09 2006
@@ -41,28 +41,28 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Person 
-  extends ExtensibleElement, ExtensionElement {
+  extends ExtensibleElement, Element {
 
   /**
    * The "atom:name" element's content conveys a human-readable name for
    * the person.  The content of atom:name is Language-Sensitive.  Person
    * constructs MUST contain exactly one "atom:name" element.
    */
-  StringElement getNameElement();
+  Element getNameElement();
   
   /**
    * The "atom:name" element's content conveys a human-readable name for
    * the person.  The content of atom:name is Language-Sensitive.  Person
    * constructs MUST contain exactly one "atom:name" element.
    */
-  void setNameElement(StringElement element);
+  void setNameElement(Element element);
   
   /**
    * The "atom:name" element's content conveys a human-readable name for
    * the person.  The content of atom:name is Language-Sensitive.  Person
    * constructs MUST contain exactly one "atom:name" element.
    */
-  StringElement setName(String name);
+  Element setName(String name);
   
   /**
    * The "atom:name" element's content conveys a human-readable name for
@@ -77,7 +77,7 @@
    * atom:email element, but MUST NOT contain more than one.  Its content
    * MUST conform to the "addr-spec" production in [RFC2822].
    */
-  StringElement getEmailElement();
+  Element getEmailElement();
   
   /**
    * The "atom:email" element's content conveys an e-mail address
@@ -85,7 +85,7 @@
    * atom:email element, but MUST NOT contain more than one.  Its content
    * MUST conform to the "addr-spec" production in [RFC2822].
    */
-  void setEmailElement(StringElement element);
+  void setEmailElement(Element element);
   
   /**
    * The "atom:email" element's content conveys an e-mail address
@@ -93,7 +93,7 @@
    * atom:email element, but MUST NOT contain more than one.  Its content
    * MUST conform to the "addr-spec" production in [RFC2822].
    */
-  StringElement setEmail(String email);
+  Element setEmail(String email);
   
   /**
    * The "atom:email" element's content conveys an e-mail address

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Service.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Service.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Service.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Service.java Mon Jul 10 11:14:09 2006
@@ -42,7 +42,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Service
-  extends ExtensibleElement, ExtensionElement {
+  extends ExtensibleElement {
 
   /**
    * Return the complete set of workspaces

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java Mon Jul 10 11:14:09 2006
@@ -70,7 +70,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Source 
-  extends ExtensibleElement, ExtensionElement {
+  extends ExtensibleElement {
   /**
    * Returns the first author listed for the entry
    */

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Text.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Text.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Text.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Text.java Mon Jul 10 11:14:09 2006
@@ -58,7 +58,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Text 
-  extends StringElement {
+  extends Element {
 
   public static enum Type { 
     TEXT, HTML, XHTML;
@@ -88,6 +88,10 @@
   Div getValueElement();
   
   void setValueElement(Div value);
+  
+  String getValue();
+  
+  void setValue(String value);
   
   String getWrappedValue();
   

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Workspace.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Workspace.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Workspace.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Workspace.java Mon Jul 10 11:14:09 2006
@@ -44,7 +44,7 @@
  * @author James M Snell (jasnell@us.ibm.com)
  */
 public interface Workspace 
-  extends ExtensibleElement, ExtensionElement {
+  extends ExtensibleElement {
 
   /**
    * APP Draft-08: The app:workspace element MUST contain a "title" 

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/TextFilterExample.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/TextFilterExample.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/TextFilterExample.java (original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/TextFilterExample.java Mon Jul 10 11:14:09 2006
@@ -27,7 +27,6 @@
 import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Entry;
-import org.apache.abdera.model.ExtensionElement;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.parser.Parser;
 import org.apache.abdera.parser.ParserOptions;
@@ -41,8 +40,7 @@
     TextFilter filter = new TextFilter() {
       @Override
       public String filterText(String text, Element element) {
-        ExtensionElement ee = (ExtensionElement) element;
-        QName qname = ee.getQName();
+        QName qname = element.getQName();
         Base elparent = element.getParentElement();
         if (Constants.NAME.equals(qname)) {
           text = "Jane Doe";

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java Mon Jul 10 11:14:09 2006
@@ -23,7 +23,7 @@
 import javax.activation.MimeType;
 import javax.activation.MimeTypeParseException;
 
-import org.apache.abdera.model.ExtensionElement;
+import org.apache.abdera.model.Element;
 
 /**
  * Provides an interface for the Atom Threading Extension in-reply-to
@@ -31,7 +31,7 @@
  * a response to another resource.
  */
 public interface InReplyTo 
-  extends ExtensionElement {
+  extends Element {
   
   /**
    * Returns the persistent and universally unique identifier of the 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadExtensionFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadExtensionFactory.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadExtensionFactory.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadExtensionFactory.java Mon Jul 10 11:14:09 2006
@@ -24,7 +24,7 @@
 import org.apache.abdera.factory.ExtensionFactory;
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Base;
-import org.apache.abdera.model.ExtensionElement;
+import org.apache.abdera.model.Element;
 import org.apache.abdera.parser.stax.FOMExtensionFactory;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMFactory;
@@ -43,7 +43,7 @@
   }
 
   @SuppressWarnings("unchecked")
-  public <T extends ExtensionElement> T newExtensionElement(
+  public <T extends Element> T newExtensionElement(
     QName qname,
     Base parent, 
     Factory factory) {
@@ -61,7 +61,7 @@
   }
 
   @SuppressWarnings("unchecked")
-  public <T extends ExtensionElement> T newExtensionElement(
+  public <T extends Element> T newExtensionElement(
     QName qname,
     Base parent, 
     Factory factory, 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/Total.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/Total.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/Total.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/Total.java Mon Jul 10 11:14:09 2006
@@ -1,12 +1,12 @@
 package org.apache.abdera.ext.thread;
 
-import org.apache.abdera.model.ExtensionElement;
+import org.apache.abdera.model.Element;
 
 /**
  * Provides an interface for the Atom Threading Extension total
  * element.
  */
-public interface Total extends ExtensionElement {
+public interface Total extends Element {
 
   int getValue();
   

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMInReplyTo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMInReplyTo.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMInReplyTo.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMInReplyTo.java Mon Jul 10 11:14:09 2006
@@ -27,7 +27,7 @@
 import org.apache.abdera.ext.thread.InReplyTo;
 import org.apache.abdera.ext.thread.ThreadConstants;
 import org.apache.abdera.factory.Factory;
-import org.apache.abdera.parser.stax.FOMExtensionElement;
+import org.apache.abdera.parser.stax.FOMElement;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
@@ -36,7 +36,7 @@
 
 
 public class FOMInReplyTo 
-  extends FOMExtensionElement 
+  extends FOMElement 
   implements InReplyTo {
 
   private static final long serialVersionUID = 7805672826003392693L;

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMTotal.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMTotal.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMTotal.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/impl/FOMTotal.java Mon Jul 10 11:14:09 2006
@@ -5,14 +5,14 @@
 import org.apache.abdera.ext.thread.ThreadConstants;
 import org.apache.abdera.ext.thread.Total;
 import org.apache.abdera.factory.Factory;
-import org.apache.abdera.parser.stax.FOMExtensionElement;
+import org.apache.abdera.parser.stax.FOMElement;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
-public class FOMTotal extends FOMExtensionElement implements Total {
+public class FOMTotal extends FOMElement implements Total {
 
   private static final long serialVersionUID = 241599118592917827L;
 

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java Mon Jul 10 11:14:09 2006
@@ -334,7 +334,7 @@
     QName qname = parser.getName();
     element = fomfactory.createElement(qname, parent, this);
     if (element == null) {
-      element = new FOMExtensionElement(qname, parent, fomfactory, this);
+      element = new FOMElement(qname, parent, fomfactory, this);
     }
     if (element != null) {
       this.processNamespaceData(element);

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java Mon Jul 10 11:14:09 2006
@@ -29,7 +29,6 @@
 import org.apache.abdera.model.Content;
 import org.apache.abdera.model.Div;
 import org.apache.abdera.model.Element;
-import org.apache.abdera.model.ExtensionElement;
 import org.apache.abdera.util.Constants;
 import org.apache.axiom.attachments.DataHandlerUtils;
 import org.apache.axiom.om.OMContainer;
@@ -120,11 +119,11 @@
   }
   
   @SuppressWarnings("unchecked")
-  public <T extends ExtensionElement> T getValueElement() {
+  public <T extends Element> T getValueElement() {
     return (T)this.getFirstElement();
   }
 
-  public <T extends ExtensionElement> void setValueElement(T value) {
+  public <T extends Element> void setValueElement(T value) {
     if (value != null) {
       if (this.getFirstElement() != null)
         this.getFirstElement().discard();
@@ -212,7 +211,6 @@
     } else if (Type.HTML.equals(type)) {
       val = getText();
     } else if (Type.XHTML.equals(type)) {
-      //val = this.getFirstChildWithName(Constants.DIV).toString();
       val = ((FOMDiv)this.getFirstChildWithName(Constants.DIV)).getInternalValue();
     } else if (Type.XML.equals(type)) {
       val = this.getFirstElement().toString();
@@ -222,15 +220,20 @@
     return val;
   }
 
+  public void setText(String value) {
+    init(Content.Type.TEXT);
+    super.setText(value);
+  }
+  
   public void setValue(String value) {
     if (value != null) setSrc((URI)null);
     if (value != null) {
       if (Type.TEXT.equals(type)) {
         _removeAllChildren();
-        setText(value); 
+        super.setText(value); 
       } else if (Type.HTML.equals(type)) {
         _removeAllChildren();
-        setText(value);
+        super.setText(value);
       } else if (Type.XHTML.equals(type)) {
         URI baseUri = null;
         try {
@@ -246,11 +249,11 @@
           baseUri = getResolvedBaseUri();
         } catch (Exception e) {}
         Element element = _parse(value, baseUri);
-        if (element != null && element instanceof ExtensionElement)
-          setValueElement((ExtensionElement)element);
+        if (element != null)
+          setValueElement(element);
       } else if (Type.MEDIA.equals(type)) {
         _removeAllChildren();
-        setText(value);
+        super.setText(value);
       }
     } else {
       _removeAllChildren();
@@ -261,7 +264,7 @@
     if (Type.XHTML.equals(type)) {
       return this.getFirstChildWithName(Constants.DIV).toString();
     } else {
-      return getValue();
+      return getText();
     }
   }
 
@@ -275,7 +278,7 @@
       if (element != null && element instanceof Div)
         setValueElement((Div)element);
     } else {
-      setValue(wrappedValue);
+      setText(wrappedValue);
     }
   }
 

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java Mon Jul 10 11:14:09 2006
@@ -33,7 +33,7 @@
 
 
 public class FOMDateTime 
-  extends FOMExtensionElement 
+  extends FOMElement 
   implements DateTime {
   
   private static final long serialVersionUID = -6611503566172011733L;

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java Mon Jul 10 11:14:09 2006
@@ -35,8 +35,8 @@
 import org.apache.abdera.model.Control;
 import org.apache.abdera.model.DateTime;
 import org.apache.abdera.model.Div;
+import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Entry;
-import org.apache.abdera.model.ExtensionElement;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.IRI;
 import org.apache.abdera.model.Link;
@@ -247,9 +247,9 @@
   /**
    * Sets the content for this entry
    */
-  public Content setContent(ExtensionElement value, Content.Type type) {
+  public Content setContent(Element value, Content.Type type) {
     FOMFactory factory = (FOMFactory) this.factory;
-    Content content = factory.newContent(type, value);
+    Content content = factory.newContent(value, type);
     setContentElement(content);
     return content;
   } 
@@ -277,9 +277,9 @@
   /**
    * Sets the content for this entry
    */
-  public Content setContent(ExtensionElement element, MimeType mediaType) {
+  public Content setContent(Element element, MimeType mediaType) {
     FOMFactory factory = (FOMFactory) this.factory;
-    Content content = factory.newContent(element, mediaType);
+    Content content = factory.newContent(mediaType, element);
     setContentElement(content);
     return content;
   }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java Mon Jul 10 11:14:09 2006
@@ -26,8 +26,6 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ExtensibleElement;
-import org.apache.abdera.model.ExtensionElement;
-import org.apache.abdera.model.StringElement;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
@@ -76,34 +74,36 @@
     List<E> set = new ArrayList<E>();
     for (Iterator i = getChildren();i.hasNext();) {
       OMNode e = (OMNode) i.next();
-      if (e instanceof ExtensionElement &&
-          !((OMElement)e).getQName().getNamespaceURI().equals(
-            this.getQName().getNamespaceURI())) {
-        set.add((E) e);
+      if (e instanceof Element) {
+        Element el = (Element) e;
+        QName qname = el.getQName();
+        if (!(qname.getNamespaceURI().equals(getQName().getNamespaceURI()))) {
+          set.add((E)e);
+        }
       }
     }
     return set;
   }
   
-  public List<ExtensionElement> getExtensions() {
+  public List<Element> getExtensions() {
     return _getExtensionChildrenAsList();
   }
 
-  public List<ExtensionElement> getExtensions(String uri) {
-    List<ExtensionElement> matching = new ArrayList<ExtensionElement>();
+  public List<Element> getExtensions(String uri) {
+    List<Element> matching = new ArrayList<Element>();
     for (Iterator i = this.getChildElements(); i.hasNext();) {
       OMElement e = (OMElement) i.next();
       if ((uri == null)?
             e.getQName().getNamespaceURI() == null: 
             e.getQName().getNamespaceURI().equals(uri)) {
-        matching.add((ExtensionElement) e);
+        matching.add((Element) e);
       }
     }
     return matching;
   }
 
   @SuppressWarnings("unchecked")
-  public <T extends ExtensionElement>List<T> getExtensions(QName qname) {
+  public <T extends Element>List<T> getExtensions(QName qname) {
     List<T> matching = new ArrayList<T>();
     for (Iterator i = this.getChildrenWithName(qname); i.hasNext();) {
       matching.add((T) i.next());
@@ -112,31 +112,31 @@
   }
 
   @SuppressWarnings("unchecked")
-  public <T extends ExtensionElement>T getExtension(QName qname) {
+  public <T extends Element>T getExtension(QName qname) {
     return (T) this.getFirstChildWithName(qname);
   }
   
-  public void addExtension(ExtensionElement extension) {
+  public void addExtension(Element extension) {
     addChild((OMElement)extension);
   }
   
   @SuppressWarnings("unchecked")
-  public <T extends ExtensionElement>T addExtension(QName qname) {
+  public <T extends Element>T addExtension(QName qname) {
     FOMFactory fomfactory = (FOMFactory) factory;
     return (T)fomfactory.newExtensionElement(qname, this);
   }
   
   @SuppressWarnings("unchecked")
-  public <T extends ExtensionElement>T addExtension(String namespace, String localpart, String prefix) {
+  public <T extends Element>T addExtension(String namespace, String localpart, String prefix) {
     return (T)addExtension(new QName(namespace, localpart, prefix));
   }
 
-  public StringElement addSimpleExtension(QName qname, String value) {
+  public Element addSimpleExtension(QName qname, String value) {
     FOMFactory fomfactory = (FOMFactory) factory;
-    return fomfactory.newStringElement(qname, value, this);
+    return fomfactory.newElement(qname, value, this);
   }
   
-  public StringElement addSimpleExtension(
+  public Element addSimpleExtension(
     String namespace, 
     String localPart, 
     String prefix, 
@@ -150,8 +150,8 @@
   }
   
   public String getSimpleExtension(QName qname) {
-    StringElement el  = getExtension(qname);
-    return el.getValue();
+    Element el  = getExtension(qname);
+    return el.getText();
   }
   
   public String getSimpleExtension(
@@ -165,8 +165,8 @@
           prefix));
   }
   
-  public void addExtensions(List<ExtensionElement> extensions) {
-    for (ExtensionElement e : extensions) {
+  public void addExtensions(List<Element> extensions) {
+    for (Element e : extensions) {
       addExtension(e);
     }
   }
@@ -176,10 +176,10 @@
    * having to pass in it's QName
    */ 
   @SuppressWarnings("unchecked")
-  public <T extends ExtensionElement> T getExtension(Class<T> _class) {
+  public <T extends Element> T getExtension(Class<T> _class) {
     T t = null;
-    List<ExtensionElement> extensions = getExtensions();
-    for (ExtensionElement ext : extensions) {
+    List<Element> extensions = getExtensions();
+    for (Element ext : extensions) {
       if (_class.isAssignableFrom(ext.getClass())) {
         t = (T)ext;
         break;

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionFactory.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionFactory.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionFactory.java Mon Jul 10 11:14:09 2006
@@ -22,13 +22,13 @@
 import org.apache.abdera.factory.ExtensionFactory;
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Base;
-import org.apache.abdera.model.ExtensionElement;
+import org.apache.abdera.model.Element;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
 
 public interface FOMExtensionFactory extends ExtensionFactory {
 
-  public <T extends ExtensionElement>T newExtensionElement(
+  public <T extends Element>T newExtensionElement(
     QName qname,
     Base parent,
     Factory factory,

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java Mon Jul 10 11:14:09 2006
@@ -19,7 +19,6 @@
  
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
@@ -44,7 +43,6 @@
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.ExtensibleElement;
-import org.apache.abdera.model.ExtensionElement;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Generator;
 import org.apache.abdera.model.IRI;
@@ -52,7 +50,6 @@
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Service;
 import org.apache.abdera.model.Source;
-import org.apache.abdera.model.StringElement;
 import org.apache.abdera.model.Text;
 import org.apache.abdera.model.Workspace;
 import org.apache.abdera.model.Content.Type;
@@ -67,7 +64,6 @@
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory;
 
-
 public class FOMFactory 
   extends OMLinkedListImplFactory 
   implements Factory, Constants {
@@ -95,15 +91,15 @@
     qclasses.put(UPDATED, FOMDateTime.class);
     qclasses.put(WORKSPACE, FOMWorkspace.class);
     qclasses.put(COLLECTION, FOMCollection.class);
-    qclasses.put(NAME, FOMStringElement.class);
-    qclasses.put(EMAIL, FOMStringElement.class);
+    qclasses.put(NAME, FOMElement.class);
+    qclasses.put(EMAIL, FOMElement.class);
     qclasses.put(URI, FOMIRI.class);
     qclasses.put(CONTROL, FOMControl.class);
     qclasses.put(DIV, FOMDiv.class);
   }
   
-  private List<QName> simpleExtensions = null;
   private Map<Class,Class> alternatives = null;
+  private Map<QName,Class> extensions = null;
   
   public Parser newParser() {
     return new FOMParser();
@@ -305,11 +301,11 @@
     return content;
   }
   
-  public Content newContent(Content.Type type, ExtensionElement value) {
+  public Content newContent(Element value, Content.Type type) {
     return newContent(value, type, null);
   }
   
-  public Content newContent(ExtensionElement value, Content.Type type, Element parent) {
+  public Content newContent(Element value, Content.Type type, Element parent) {
     Content content = newContent(type, parent);
     content.setValueElement(value);
     return content;
@@ -349,13 +345,13 @@
   }
 
   public Content newContent(
-    ExtensionElement value, 
+    Element value,
     MimeType mediaType) {
       return newContent(value, mediaType, null);
   }
   
   public Content newContent(
-    ExtensionElement value, 
+    Element value, 
     MimeType mediaType, 
     Element parent) {
       Content content = 
@@ -463,7 +459,7 @@
     Element parent) {
       Generator generator = newGenerator(parent);
       generator.setVersion(Version.VERSION);
-      generator.setValue(Version.APP_NAME);
+      generator.setText(Version.APP_NAME);
       try {
         generator.setUri(Version.URI);
       } catch (Exception e) {}
@@ -497,7 +493,7 @@
     if (version != null)
       generator.setVersion(version);
     if (value != null)
-      generator.setValue(value);
+      generator.setText(value);
     return generator;
   }
 
@@ -780,88 +776,86 @@
       return text;
   }
 
-  public StringElement newStringElement(
-    QName qname,
-    OMContainer parent,
-    OMXMLParserWrapper parserWrapper) {
-      return _newInstance(FOMStringElement.class, qname, parent, parserWrapper);
+  public Element newElement(QName qname) {
+    return newElement(qname, (Element)null);
   }
   
-  public StringElement newStringElement(QName qname) {
-    return newStringElement(qname, (Element)null);
+  public Element newElement(QName qname, String value) {
+    return newElement(qname, value, null);
   }
   
-  public StringElement newStringElement(QName qname, String value) {
-    return newStringElement(qname, value, null);
-  }
-  
-  public StringElement newStringElement(
+  public Element newElement(
     QName qname, 
     Base parent) {
-      return _newInstance(FOMStringElement.class, qname, (OMContainer)parent);
+      return _newInstance(FOMElement.class, qname, (OMContainer)parent);
   }
   
-  public StringElement newStringElement(
+  public Element newElement(
     QName qname, 
     String value,
     Base parent) {
-    StringElement el = newStringElement(qname, parent);
+    Element el = newElement(qname, parent);
     if (value != null)
-      el.setValue(value);
+      el.setText(value);
     return el;
   }
 
-  public ExtensionElement newExtensionElement(QName qname) {
+  public Element newExtensionElement(QName qname) {
     return newExtensionElement(qname, (Base)null);
   }
   
-  public ExtensionElement newExtensionElement(
+  public Element newExtensionElement(
     QName qname, 
     Base parent) {
     return newExtensionElement(qname, (OMContainer)parent);
   }
   
-  private ExtensionElement newExtensionElement(
+  private Element newExtensionElement(
     QName qname, 
     OMContainer parent) {
       return newExtensionElement(qname, parent, null);
   }
 
-  public ExtensionElement newExtensionElement(
+  @SuppressWarnings("unchecked")
+  public Element newExtensionElement(
     QName qname,
     OMContainer parent,
     OMXMLParserWrapper parserWrapper) {
-    ExtensionElement element = null;
-    if (!isSimpleExtension(qname)) {
-      List<ExtensionFactory> factories = 
-        org.apache.abdera.util.ServiceUtil.loadExtensionFactories();
-      if (factories != null) {
-        for (ExtensionFactory factory : factories) {
-          if (factory instanceof FOMExtensionFactory &&
-              factory.handlesNamespace(qname.getNamespaceURI())) {
-              if (parserWrapper != null) {
-                element = ((FOMExtensionFactory)factory).newExtensionElement(
-                  qname, (Base)parent, this, parserWrapper);
-              } else {
-                element = ((FOMExtensionFactory)factory).newExtensionElement(
-                  qname, (Base)parent, this); 
-              }
-          }
+    Element element = null;
+    List<ExtensionFactory> factories = 
+      org.apache.abdera.util.ServiceUtil.loadExtensionFactories();
+    Class _class = getExtensionClass(qname);
+    if (_class == null && factories != null) {
+      for (ExtensionFactory factory : factories) {
+        if (factory instanceof FOMExtensionFactory &&
+            factory.handlesNamespace(qname.getNamespaceURI())) {
+            if (parserWrapper != null) {
+              element = ((FOMExtensionFactory)factory).newExtensionElement(
+                qname, (Base)parent, this, parserWrapper);
+            } else {
+              element = ((FOMExtensionFactory)factory).newExtensionElement(
+                qname, (Base)parent, this); 
+            }
         }
       }
-      if (element == null) {
-        if (parserWrapper != null) {
-          element = _newInstance(FOMExtensionElement.class, qname, (OMContainer)parent, parserWrapper);
-        } else {
-          element = _newInstance(FOMExtensionElement.class, qname, (OMContainer)parent);
-        }
+    }
+    if (_class == null) _class = FOMElement.class;
+    if (element == null) {
+      if (parserWrapper != null) {
+        element = (Element) _newInstance(_class, qname, (OMContainer)parent, parserWrapper);
+      } else {
+        element = (Element) _newInstance(_class, qname, (OMContainer)parent);
       }
-    } else {
-      element = newStringElement(qname, (Base) parent);
     }
     return element;
   }
   
+  @SuppressWarnings("unchecked")
+  private Class<Base> getExtensionClass(QName qname) {
+    return (extensions != null && extensions.containsKey(qname)) ? 
+      extensions.get(qname) : null;
+  }
+  
   public Control newControl() {
     return newControl((Element)null);
   }
@@ -1290,36 +1284,36 @@
       return newText(Constants.RIGHTS, value, parent);
   }
 
-  public StringElement newName() {
+  public Element newName() {
     return newName((Element)null);
   }
   
-  public StringElement newName(String value) {
+  public Element newName(String value) {
     return newName(value, null);
   }
   
-  public StringElement newName(Element parent) {
-    return newStringElement(Constants.NAME, parent);
+  public Element newName(Element parent) {
+    return newElement(Constants.NAME, parent);
   }
 
-  public StringElement newName(String value, Element parent) {
-    return newStringElement(Constants.NAME, value, parent);
+  public Element newName(String value, Element parent) {
+    return newElement(Constants.NAME, value, parent);
   }
 
-  public StringElement newEmail() {
+  public Element newEmail() {
     return newEmail((Element)null);
   }
   
-  public StringElement newEmail(String value) {
+  public Element newEmail(String value) {
     return newEmail(value, null);
   }
   
-  public StringElement newEmail(Element parent) {
-    return newStringElement(Constants.EMAIL, parent);
+  public Element newEmail(Element parent) {
+    return newElement(Constants.EMAIL, parent);
   }
 
-  public StringElement newEmail(String value, Element parent) {
-    return newStringElement(Constants.EMAIL, value, parent);
+  public Element newEmail(String value, Element parent) {
+    return newElement(Constants.EMAIL, value, parent);
   }
 
   public Control newControl(boolean draft, Element parent) {
@@ -1350,6 +1344,8 @@
       return _newInstance(FOMElement.class, qname, parent, parserWrapper);
   }
 
+  
+  
   private boolean isContent(QName qname) {
     return CONTENT.equals(qname);
   }
@@ -1387,12 +1383,7 @@
         }
       } else if (parent instanceof ExtensibleElement || 
                  parent instanceof Document) {
-        if (isSimpleExtension(qname)) {
-          element = (OMElement) _newInstance(
-            FOMStringElement.class, qname.getLocalPart(), namespace, parent);
-        } else {
-          element = (OMElement) newExtensionElement(qname, parent);
-        }
+        element = (OMElement) newExtensionElement(qname, parent);
       }
       return element;
     }
@@ -1414,27 +1405,16 @@
         element = (OMElement) _newInstance(qclasses.get(qname), qname, parent, builder);
       }
     } else if (parent instanceof ExtensibleElement || parent instanceof Document) {
-      if (isSimpleExtension(qname)) {
-        element = (OMElement) newStringElement(qname, parent, builder);
-      } else {
-        element = (OMElement) newExtensionElement(qname, parent, builder);
-      }
+      element = (OMElement) newExtensionElement(qname, parent, builder);
     }
     return element;
   }
 
-  public void registerAsSimpleExtension(QName qname) {
-    if (simpleExtensions == null) 
-      simpleExtensions = new ArrayList<QName>();
-    if (!simpleExtensions.contains(qname)) simpleExtensions.add(qname);
-  }
-    
-  public boolean isSimpleExtension(QName qname) {
-    if (simpleExtensions == null) 
-      simpleExtensions = new ArrayList<QName>();
-    return simpleExtensions.contains(qname);
+  public void registerExtension(QName qname, Class impl) {
+    if (extensions == null) extensions = new HashMap<QName,Class>();
+    extensions.put(qname, impl);
   }
-
+  
   @SuppressWarnings("unchecked")
   public <T extends Base>void registerAlternative(Class<T> base, Class<? extends T> extension) {
     if (!base.isAssignableFrom(extension))

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java Mon Jul 10 11:14:09 2006
@@ -33,7 +33,7 @@
 
 
 public class FOMGenerator 
-  extends FOMStringElement 
+  extends FOMElement 
   implements Generator {
   
   private static final long serialVersionUID = -8441971633807437976L;
@@ -47,7 +47,7 @@
     String version, 
     URI uri) {
       this();
-      setValue(value);
+      setText(value);
       setVersion(version);
       setUri(uri);
   }
@@ -58,7 +58,7 @@
     String uri) 
       throws URISyntaxException {
     this();
-    setValue(value);
+    setText(value);
     setVersion(version);
     setUri(uri);
   }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java Mon Jul 10 11:14:09 2006
@@ -23,9 +23,9 @@
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
+import org.apache.abdera.model.Element;
 import org.apache.abdera.model.IRI;
 import org.apache.abdera.model.Person;
-import org.apache.abdera.model.StringElement;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
@@ -33,7 +33,6 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
-
 public class FOMPerson
   extends FOMExtensibleElement 
   implements Person {
@@ -102,21 +101,21 @@
     done = false;
   }
 
-  public StringElement getNameElement() {
-    return (StringElement)getFirstChildWithName(NAME);
+  public Element getNameElement() {
+    return (Element)getFirstChildWithName(NAME);
   }
 
-  public void setNameElement(StringElement element) {
+  public void setNameElement(Element element) {
     if (element != null)
       _setChild(NAME, (OMElement)element);
     else 
       _removeElement(NAME, false);
   }
 
-  public StringElement setName(String name) {
+  public Element setName(String name) {
     if (name != null) {
       FOMFactory fomfactory = (FOMFactory) factory;
-      StringElement el = fomfactory.newName(name, null);
+      Element el = fomfactory.newName(name, null);
       _setChild(NAME, (OMElement)el);
       return el;
     } else {
@@ -126,25 +125,25 @@
   }
   
   public String getName() {
-    StringElement name = getNameElement();
-    return (name != null) ? name.getValue() : null;
+    Element name = getNameElement();
+    return (name != null) ? name.getText() : null;
   }
 
-  public StringElement getEmailElement() {
-    return (StringElement)getFirstChildWithName(EMAIL);
+  public Element getEmailElement() {
+    return (Element)getFirstChildWithName(EMAIL);
   }
 
-  public void setEmailElement(StringElement element) {
+  public void setEmailElement(Element element) {
     if (element != null)
       _setChild(EMAIL, (OMElement)element);
     else 
       _removeElement(EMAIL, false);
   }
 
-  public StringElement setEmail(String email) {
+  public Element setEmail(String email) {
     if (email != null) {
       FOMFactory fomfactory = (FOMFactory) factory;
-      StringElement el = fomfactory.newEmail(email, null);
+      Element el = fomfactory.newEmail(email, null);
       _setChild(EMAIL, (OMElement)el);
       return el;
     } else {
@@ -154,8 +153,8 @@
   }
   
   public String getEmail() {
-    StringElement email = getEmailElement();
-    return (email != null) ? email.getValue() : null;
+    Element email = getEmailElement();
+    return (email != null) ? email.getText() : null;
   }
 
   public IRI getUriElement() {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java Mon Jul 10 11:14:09 2006
@@ -123,12 +123,17 @@
     return val;
   }
 
+  public void setText(String value) {
+    init(Text.Type.TEXT);
+    super.setText(value);
+  }
+  
   public void setValue(String value) {
     if (value != null) {
       if (Type.TEXT.equals(type)) {
-        setText(value);
+        super.setText(value);
       } else if (Type.HTML.equals(type)) {
-        setText(value);
+        super.setText(value);
       } else if (Type.XHTML.equals(type)) {
         URI baseUri = null;
         try {

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java (original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java Mon Jul 10 11:14:09 2006
@@ -47,7 +47,6 @@
 import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Entry;
-import org.apache.abdera.model.ExtensionElement;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Generator;
 import org.apache.abdera.model.IRI;
@@ -55,7 +54,6 @@
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Service;
 import org.apache.abdera.model.Source;
-import org.apache.abdera.model.StringElement;
 import org.apache.abdera.model.Text;
 import org.apache.abdera.model.Workspace;
 import org.apache.abdera.parser.Parser;
@@ -220,8 +218,7 @@
     TextFilter filter = new TextFilter() {
       @Override
       public String filterText(String text, Element parent) {
-        ExtensionElement ee = (ExtensionElement) parent;
-        QName qname = ee.getQName();
+        QName qname = parent.getQName();
         Base elparent = parent.getParentElement();
         if (Constants.NAME.equals(qname)) {
           text = "Jane Doe";
@@ -354,22 +351,22 @@
     assertEquals(dateTime.getDate(), now);
     Generator generator = factory.newDefaultGenerator();
     assertNotNull(generator);
-    assertEquals(generator.getValue(), Version.APP_NAME);
+    assertEquals(generator.getText(), Version.APP_NAME);
     assertEquals(generator.getVersion(), Version.VERSION);
     assertEquals(generator.getUri().toString(), Version.URI);
     Div div = factory.newDiv();
     assertNotNull(div);
     Document doc = factory.newDocument();
     assertNotNull(doc);
-    StringElement el = factory.newEmail();
+    Element el = factory.newEmail();
     assertNotNull(el);
     el = factory.newEmail("a");
-    assertEquals(el.getValue(), "a");
+    assertEquals(el.getText(), "a");
     Entry entry = factory.newEntry();
     assertNotNull(entry);
     entry = factory.newEntry();
     assertNotNull(entry);
-    ExtensionElement ee = factory.newExtensionElement(new QName("urn:foo", "bar", "b"));
+    Element ee = factory.newExtensionElement(new QName("urn:foo", "bar", "b"));
     assertNotNull(ee);
     assertEquals(ee.getQName(), new QName("urn:foo", "bar", "b"));
     Feed feed = factory.newFeed();
@@ -378,7 +375,7 @@
     assertNotNull(generator);
     generator = factory.newGenerator(new URI(Version.URI), Version.VERSION, Version.APP_NAME);
     assertNotNull(generator);
-    assertEquals(generator.getValue(), Version.APP_NAME);
+    assertEquals(generator.getText(), Version.APP_NAME);
     assertEquals(generator.getVersion(), Version.VERSION);
     assertEquals(generator.getUri().toString(), Version.URI);
     content = factory.newContent("a", Content.Type.HTML);
@@ -452,7 +449,7 @@
     el = factory.newName();
     assertNotNull(el);
     el = factory.newName("a");
-    assertEquals(el.getValue(), "a");
+    assertEquals(el.getText(), "a");
     Parser parser = factory.newParser();
     assertNotNull(parser);
     Person person = factory.newPerson(Constants.AUTHOR, null);
@@ -485,13 +482,13 @@
     assertNotNull(service);
     Source source = factory.newSource();
     assertNotNull(source);
-    el = factory.newStringElement(Constants.NAME);
+    el = factory.newElement(Constants.NAME);
     assertNotNull(el);
     assertEquals(el.getQName(), Constants.NAME);
-    el = factory.newStringElement(Constants.NAME, "a");
+    el = factory.newElement(Constants.NAME, "a");
     assertNotNull(el);
     assertEquals(el.getQName(), Constants.NAME);
-    assertEquals(el.getValue(), "a");
+    assertEquals(el.getText(), "a");
     text = factory.newText(Constants.TITLE, Text.Type.TEXT);
     assertNotNull(text);
     assertEquals(text.getTextType(), Text.Type.TEXT);
@@ -538,7 +535,7 @@
     Workspace workspace = factory.newWorkspace();
     assertNotNull(workspace);
     div = factory.newDiv();
-    content = factory.newContent(Content.Type.XHTML, div);
+    content = factory.newContent(div, Content.Type.XHTML);
     assertNotNull(content);
     assertEquals(content.getContentType(), Content.Type.XHTML);
     assertNotNull(content.getValueElement());
@@ -569,10 +566,6 @@
     assertNotNull(text);
     assertEquals(text.getTextType(), Text.Type.XHTML);
     assertEquals(text.getValueElement(), div);
-    QName qname = new QName("urn:foo", "bar");
-    factory.registerAsSimpleExtension(qname);
-    el = (StringElement) factory.newExtensionElement(qname);
-    assertEquals(el.getQName(), qname);
   }
   
   public void testRoundtrip() throws Exception {

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java (original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedParserTest.java Mon Jul 10 11:14:09 2006
@@ -48,7 +48,7 @@
     Feed feed = (Feed) doc.getRoot();
     Entry entry = feed.getEntries().get(0);
     Person person = entry.getAuthor();
-    assertEquals(person.getEmailElement().getValue(), "me@example.com");
+    assertEquals(person.getEmail(), "me@example.com");
   }
   
   public void testEntryAuthorName() throws Exception {
@@ -56,7 +56,7 @@
     Feed feed = (Feed) doc.getRoot();
     Entry entry = feed.getEntries().get(0);
     Person person = entry.getAuthor();
-    assertEquals(person.getNameElement().getValue(), "Example author");    
+    assertEquals(person.getName(), "Example author");    
   }
   
   public void testEntryContentBase64() throws Exception {

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java?rev=420598&r1=420597&r2=420598&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java (original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java Mon Jul 10 11:14:09 2006
@@ -42,7 +42,6 @@
 import org.apache.abdera.model.Link;
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Source;
-import org.apache.abdera.model.StringElement;
 import org.apache.abdera.model.Text;
 import org.apache.abdera.parser.Parser;
 import org.apache.axiom.om.OMElement;
@@ -108,11 +107,9 @@
     assertEquals(dt.getTime(), cdt.getTime());
     Person person = feed.getAuthor();
     assertNotNull(person);
-    StringElement name = person.getNameElement();
-    assertNotNull(name);
-    assertEquals(name.getValue(), "John Doe");
-    assertNull(person.getEmailElement());
-    assertNull(person.getUriElement());
+    assertEquals(person.getName(), "John Doe");
+    assertNull(person.getEmail());
+    assertNull(person.getUri());
     IRI id = feed.getIdElement();
     assertNotNull(id);
     assertEquals(id.getValue(), new URI("urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6"));
@@ -203,8 +200,8 @@
     Generator generator = feed.getGenerator();
     assertEquals(generator.getUri(), new URI("http://www.example.com/"));
     assertEquals(generator.getVersion(), "1.0");
-    assertNotNull(generator.getValue());
-    assertEquals(generator.getValue().trim(), "Example Toolkit");
+    assertNotNull(generator.getText());
+    assertEquals(generator.getText().trim(), "Example Toolkit");
     List<Entry> entries = feed.getEntries();
     assertNotNull(entries);
     assertEquals(entries.size(), 1);
@@ -238,10 +235,8 @@
       assertNotNull(entry.getPublishedElement());
       Person person = entry.getAuthor();
       assertNotNull(person);
-      assertNotNull(person.getNameElement());
-      assertEquals(person.getNameElement().getValue(),"Mark Pilgrim");
-      assertNotNull(person.getEmailElement());
-      assertEquals(person.getEmailElement().getValue(), "f8dy@example.com");
+      assertEquals(person.getName(),"Mark Pilgrim");
+      assertEquals(person.getEmail(), "f8dy@example.com");
       assertNotNull(person.getUriElement());
       assertEquals(person.getUriElement().getValue(), new URI("http://example.org/"));
       List<Person> contributors = entry.getContributors();
@@ -306,8 +301,7 @@
     assertNotNull(entry.getSummaryElement());
     assertEquals(entry.getSummaryElement().getTextType(), Text.Type.TEXT);
     assertNotNull(entry.getAuthor());
-    assertNotNull(entry.getAuthor().getNameElement());
-    assertEquals(entry.getAuthor().getNameElement().getValue(), "John Doe");
+    assertEquals(entry.getAuthor().getName(), "John Doe");
   }
   
   public static void testSection2InfosetAttrOrder() throws Exception {
@@ -943,7 +937,7 @@
     List<Person> contr = feed.getContributors();
     for (Person person : contr) {
       try {
-        new URI(person.getEmailElement().getValue()); 
+        new URI(person.getEmail()); 
       } catch (Exception e) {
         assertTrue(e instanceof URISyntaxException);
       }
@@ -961,7 +955,7 @@
     List<Person> contr = feed.getContributors();
     for (Person person : contr) {
       try {
-        new URI(person.getEmailElement().getValue()); 
+        new URI(person.getEmail()); 
       } catch (Exception e) {
         assertTrue(e instanceof URISyntaxException);
       }
@@ -978,7 +972,7 @@
     assertNotNull(feed);
     List<Person> contr = feed.getContributors();
     for (Person person : contr) {
-      new URI(person.getEmailElement().getValue()); 
+      new URI(person.getEmail()); 
     }
   }
 
@@ -993,7 +987,7 @@
     List<Person> contr = feed.getContributors();
     for (Person person : contr) {
       try {
-        new URI(person.getEmailElement().getValue());
+        new URI(person.getEmail());
       } catch (Exception e) {
         assertTrue(e instanceof URISyntaxException);
       }



Mime
View raw message