abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r416512 [1/2] - in /incubator/abdera: java/trunk/core/src/main/java/org/apache/abdera/factory/ java/trunk/core/src/main/java/org/apache/abdera/model/ java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/ java/trunk/example...
Date Thu, 22 Jun 2006 23:34:09 GMT
Author: jmsnell
Date: Thu Jun 22 16:34:07 2006
New Revision: 416512

URL: http://svn.apache.org/viewvc?rev=416512&view=rev
Log:
Several API Refactorings

* Factory, Entry and Source have been refactored to simplify the various
  setContent, setTitle, setRights, setSummary and setSubtitle options.

* The various FOM* impl classes now have simple constructors so that we
  can do things like Entry entry = new FOMEntry(); (uses the default 
  configured Factory.INSTANCE)

* Updated docs, examples and tests to reflect the content and text api
  refactorings

Modified:
    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/Content.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/Source.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Text.java
    incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java
    incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.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/FOMControl.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/FOMDiv.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.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/FOMExtensionElement.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/FOMFeed.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/FOMIRI.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMInReplyTo.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.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/FOMService.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMStringElement.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMTotal.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
    incubator/abdera/site/trunk/docs/gettingstarted.html

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -81,8 +81,12 @@
   
   Service newService(Base parent);
   
+  Workspace newWorkspace();
+  
   Workspace newWorkspace(Element parent);
   
+  Collection newCollection();
+  
   Collection newCollection(Element parent);
   
   Feed newFeed();
@@ -92,25 +96,67 @@
   Entry newEntry();
   
   Entry newEntry(Base parent);
+
+  Category newCategory();
   
   Category newCategory(Element parent);
   
-  Category newCategory(URI scheme, String term, String label, Element parent);
+  Category newCategory(String term);
+  
+  Category newCategory(String term, Element parent);
+  
+  Category newCategory(String term, URI scheme, String label);
+  
+  Category newCategory(String term, URI scheme, String label, Element parent);
+
+  Content newContent();
+  
+  Content newContent(String value);
+  
+  Content newContent(Content.Type type);
   
   Content newContent(Content.Type type, Element parent);
   
-  Content newContent(Content.Type type, MimeType mediaType, Element parent);
+  Content newContent(String value, Content.Type type);
+  
+  Content newContent(Content.Type type, ExtensionElement value);
+
+  Content newContent(String value, Content.Type type, Element parent);
+  
+  Content newContent(ExtensionElement value, Content.Type type, Element parent);  
+  
+  Content newContent(MimeType mediaType);
   
-  Content newTextContent(String value, Element parent);
+  Content newContent(MimeType mediaType, Element parent);
   
-  Content newHtmlContent(String value, Element parent);
+  Content newContent(URI src, MimeType mediaType);
   
-  Content newXhtmlContent(Div value, Element parent);
+  Content newContent(URI src, MimeType mediaType, Element parent);
   
-  Content newXmlContent(MimeType mediaType, URI src, ExtensionElement element, Element parent);
+  Content newContent(ExtensionElement element, MimeType mediaType);
   
-  Content newMediaContent(MimeType mediaType, URI src, DataHandler dataHandler, Element parent);
+  Content newContent(ExtensionElement element, MimeType mediaType, Element parent);
+  
+  Content newContent(DataHandler dataHandler, MimeType mediatype);
+  
+  Content newContent(DataHandler dataHandler, MimeType mediaType, Element parent);
 
+  Content newContent(String value, MimeType mediatype);
+  
+  Content newContent(String value, MimeType mediaType, Element parent);
+  
+  DateTime newPublished();
+  
+  DateTime newPublished(AtomDate dateTime);
+  
+  DateTime newPublished(Date date);
+  
+  DateTime newPublished(String date);
+  
+  DateTime newPublished(Calendar date);
+  
+  DateTime newPublished(long date);  
+  
   DateTime newPublished(Element parent);
   
   DateTime newPublished(AtomDate dateTime, Element parent);
@@ -123,6 +169,18 @@
   
   DateTime newPublished(long date, Element parent);  
   
+  DateTime newUpdated();
+  
+  DateTime newUpdated(AtomDate dateTime);
+  
+  DateTime newUpdated(Date date);
+  
+  DateTime newUpdated(String date);
+  
+  DateTime newUpdated(Calendar date);
+  
+  DateTime newUpdated(long date);
+  
   DateTime newUpdated(Element parent);
   
   DateTime newUpdated(AtomDate dateTime, Element parent);
@@ -147,17 +205,35 @@
   
   DateTime newDateTime(QName qname, long date, Element parent);
   
+  Generator newDefaultGenerator();
+  
   Generator newDefaultGenerator(Element parent);
   
+  Generator newGenerator();
+  
   Generator newGenerator(Element parent);
   
+  Generator newGenerator(URI uri, String version, String value);
+  
   Generator newGenerator(URI uri, String version, String value, Element parent);
   
+  IRI newID();
+  
+  IRI newID(String id) throws URISyntaxException;
+  
+  IRI newID(URI id);
+  
   IRI newID(Element parent);
   
   IRI newID(String id, Element parent) throws URISyntaxException;
   
   IRI newID(URI id, Element parent);
+
+  IRI newIcon();
+  
+  IRI newIcon(String uri) throws URISyntaxException;
+  
+  IRI newIcon(URI uri);
   
   IRI newIcon(Element parent);
 
@@ -165,35 +241,65 @@
   
   IRI newIcon(String URI, Element parent) throws URISyntaxException;
   
+  IRI newLogo();
+  
+  IRI newLogo(String uri) throws URISyntaxException;
+  
+  IRI newLogo(URI uri);
+  
   IRI newLogo(Element parent);
   
   IRI newLogo(URI uri, Element parent);
   
   IRI newLogo(String URI, Element parent) throws URISyntaxException;
+
+  IRI newUri();
+  
+  IRI newUri(URI uri);
+  
+  IRI newUri(String uri) throws URISyntaxException;
   
   IRI newUri(Element parent);
   
   IRI newUri(URI uri, Element parent);
   
-  IRI newUri(String URI, Element parent) throws URISyntaxException;
+  IRI newUri(String uri, Element parent) throws URISyntaxException;
   
   IRI newIRIElement(QName qname, Element parent);
   
   IRI newIRIElement(QName qname, URI uri, Element parent);
   
   IRI newIRIElement(QName qname, String URI, Element parent) throws URISyntaxException;
+
+  Link newLink();
+  
+  Link newLink(String href, String rel, MimeType type, String title, String hreflang, long length) throws URISyntaxException;
+  
+  Link newLink(URI href, String rel, MimeType type, String title, String hreflang, long length);
   
   Link newLink(Element parent);
   
   Link newLink(String href, String rel, MimeType type, String title, String hreflang, long length, Element parent) throws URISyntaxException;
   
   Link newLink(URI href, String rel, MimeType type, String title, String hreflang, long length, Element parent);
+
+  Person newAuthor();
+  
+  Person newAuthor(String name, String email, String uri) throws URISyntaxException;
+  
+  Person newAuthor(String name, String email, URI uri);
   
   Person newAuthor(Element parent);
   
   Person newAuthor(String name, String email, String uri, Element parent) throws URISyntaxException;
   
   Person newAuthor(String name, String email, URI uri, Element parent);  
+
+  Person newContributor();
+
+  Person newContributor(String name, String email, String uri) throws URISyntaxException;
+  
+  Person newContributor(String name, String email, URI uri);  
   
   Person newContributor(Element parent);
 
@@ -207,59 +313,143 @@
   
   Person newPerson(QName qname, String name, String email, URI uri, Element parent);
   
+  Source newSource();
+  
   Source newSource(Element parent);
   
+  Text newText(QName qname, Text.Type type);
+  
   Text newText(QName qname, Text.Type type, Element parent);
   
-  Text newTextTitle(String value, Element parent);
+  Text newTitle();
+  
+  Text newTitle(String value);
+  
+  Text newTitle(Element parent);
+  
+  Text newTitle(Text.Type type);
+  
+  Text newTitle(Text.Type type, Element parent);
+  
+  Text newTitle(String value, Text.Type type);
+  
+  Text newTitle(String value, Text.Type type, Element parent);
+  
+  Text newTitle(Div value);
+  
+  Text newTitle(Div value, Element parent);
+
+  Text newSubtitle();
+
+  Text newSubtitle(String value);
+  
+  Text newSubtitle(Element parent);
+  
+  Text newSubtitle(Text.Type type);
+  
+  Text newSubtitle(Text.Type type, Element parent);
+  
+  Text newSubtitle(String value, Text.Type type);
+  
+  Text newSubtitle(String value, Text.Type type, Element parent);
+  
+  Text newSubtitle(Div value);
+  
+  Text newSubtitle(Div value, Element parent);
+  
+  Text newSummary();
   
-  Text newHtmlTitle(String value, Element parent);
+  Text newSummary(String value);
   
-  Text newXhtmlTitle(Div value, Element parent);
+  Text newSummary(Element parent);
+  
+  Text newSummary(Text.Type type);
+  
+  Text newSummary(Text.Type type, Element parent);
+  
+  Text newSummary(String value, Text.Type type);
+  
+  Text newSummary(String value, Text.Type type, Element parent);
+  
+  Text newSummary(Div value);
+  
+  Text newSummary(Div value, Element parent);
 
-  Text newTextSubtitle(String value, Element parent);
+  Text newRights();
   
-  Text newHtmlSubtitle(String value, Element parent);
+  Text newRights(String value);
   
-  Text newXhtmlSubtitle(Div value, Element parent);
+  Text newRights(Element parent);
   
-  Text newTextSummary(String value, Element parent);
+  Text newRights(Text.Type type);
   
-  Text newHtmlSummary(String value, Element parent);
+  Text newRights(Text.Type type, Element parent);
   
-  Text newXhtmlSummary(Div value, Element parent);
+  Text newRights(String value, Text.Type type);
   
-  Text newTextRights(String value, Element parent);
+  Text newRights(String value, Text.Type type, Element parent);
   
-  Text newHtmlRights(String value, Element parent);
+  Text newRights(Div value);
   
-  Text newXhtmlRights(Div value, Element parent);
+  Text newRights(Div value, Element parent);
+
+  Text newText(QName qname, String value, Text.Type type);
+  
+  Text newText(QName qname, String value, Text.Type type, Element parent);
   
-  Text newTextText(QName qname, String value, Element parent);
+  Text newText(QName qname, Div value);
   
-  Text newHtmlText(QName qname, String value, Element parent);
+  Text newText(QName qname, Div value, Element parent);
+
+  StringElement newName();
   
-  Text newXhtmlText(QName qname, Div value, Element parent);
+  StringElement newName(String value);
   
   StringElement newName(Element parent);
   
   StringElement newName(String value, Element parent);
   
+  StringElement newEmail();
+  
+  StringElement newEmail(String value);
+  
   StringElement newEmail(Element parent);
   
   StringElement newEmail(String value, Element parent);
   
+  StringElement newStringElement(QName qname);
+  
+  StringElement newStringElement(QName qname, String value);
+  
   StringElement newStringElement(QName qname, Base parent);
   
   StringElement newStringElement(QName qname, String value, Base parent);
 
+  ExtensionElement newExtensionElement(QName qname);
+  
   ExtensionElement newExtensionElement(QName qname, Base parent);
   
+  Control newControl();
+  
+  Control newControl(boolean draft);
+  
   Control newControl(Element parent);
   
   Control newControl(boolean draft, Element parent);
   
+  Div newDiv();
+  
   Div newDiv(Base parent);
+
+  InReplyTo newInReplyTo();
+  
+  InReplyTo newInReplyTo(URI ref);
+  
+  InReplyTo newInReplyTo(String ref) throws URISyntaxException;
+  
+  InReplyTo newInReplyTo(URI ref, URI source, URI href, MimeType type);
+  
+  InReplyTo newInReplyTo(String ref, String source, String href, String type) throws URISyntaxException, MimeTypeParseException;
   
   InReplyTo newInReplyTo(Element parent);
   
@@ -270,6 +460,10 @@
   InReplyTo newInReplyTo(URI ref, URI source, URI href, MimeType type, Element parent);
   
   InReplyTo newInReplyTo(String ref, String source, String href, String type, Element parent) throws URISyntaxException, MimeTypeParseException;
+
+  Total newTotal();
+  
+  Total newTotal(int totalResponse);
   
   Total newTotal(Element parent);
   

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -127,6 +127,8 @@
   
   Type getContentType();
   
+  void setContentType(Type type);
+  
   <T extends ExtensionElement> T getValueElement();
   
   <T extends ExtensionElement>void setValueElement(T value);

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -196,204 +196,73 @@
    * Sets the content for this entry
    */
   void setContentElement(Content content);
+
+  Content setContent();
   
   /**
    * Sets the content for this entry as @type="text"
    */
-  Content setContentAsText(String value);
-  
-  /**
-   * Sets the content for this entry as @type="html".
-   * @param value The unescaped HTML string to set as the content
-   * @param baseUri The value of the content element's xml:base. Null if none. 
-   */
-  Content setContentAsHtml(String value, URI baseUri);
+  Content setContent(String value);
 
   /**
-   * Sets the content for this entry as @type="html".
-   * @param value The unescaped HTML string to set as the content
+   * Sets the content for this entry as @type="html"
    */
   Content setContentAsHtml(String value);
-  
-  /**
-   * Sets the content for this entry as @type="html".
-   * @param value The unescaped HTML string to set as the content
-   * @param baseUri The value of the content element's xml:base. Null if none. 
-   * @throws URISyntaxException 
-   */
-  Content setContentAsHtml(String value, String baseUri) throws URISyntaxException;
-  
-  /**
-   * Sets the content for this entry as @type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value A string containing the XHTML.
-   */
-  Content setContentAsXhtml(String value);
-  
-  /**
-   * Sets the content for this entry as @type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value A string containing the XHTML.
-   * @param baseUri The value of the content element's xml:base. Null if none.
-   */
-  Content setContentAsXhtml(String value, URI baseUri);
-  
-  /**
-   * Sets the content for this entry as @type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value A string containing the XHTML.
-   * @param baseUri The value of the content element's xml:base. Null if none.
-   */
-  Content setContentAsXhtml(String value, String baseUri) throws URISyntaxException;
-
-  /**
-   * Sets the content for this entry as @type="xhtml". The value is passed 
-   * in as a parsed org.apache.abdera.model.Div
-   * @param value A Div containing the XHTML
-   */
-  Content setContentAsXhtml(Div value);
-  
-  /**
-   * Sets the content for this entry as @type="xhtml". The value is passed 
-   * in as a parsed org.apache.abdera.model.Div
-   * @param value A Div containing the XHTML
-   * @param baseUri The value of the content element's xml:base. Null if none
-   */
-  Content setContentAsXhtml(Div value, URI baseUri);
 
   /**
-   * Sets the content for this entry as @type="xhtml". The value is passed 
-   * in as a parsed org.apache.abdera.model.Div
-   * @param value A Div containing the XHTML
-   * @param baseUri The value of the content element's xml:base. Null if none
-   */
-  Content setContentAsXhtml(Div value, String baseUri) throws URISyntaxException;
-  
-  /**
-   * Returns the text of the content element
+   * Sets the content for this entry as @type="xhtml"
    */
-  String getContent();
+  Content setContentAsXhtml(String value);
   
   /**
-   * Returns the content type
-   */
-  Content.Type getContentType();
-
-  /**
    * Sets the content for this entry
    */
-  Content setContentAsXml(String value, MimeType type);
+  Content setContent(Content.Type type);
   
   /**
    * Sets the content for this entry
    */
-  Content setContentAsXml(String value, String type) throws MimeTypeParseException;
+  Content setContent(String value, Content.Type type);
   
   /**
    * Sets the content for this entry
    */
-  Content setContentAsXml(String value, MimeType type, URI baseUri);
-
-  /**
-   * Sets the content for this entry
-   */
-  Content setContentAsXml(String value, MimeType type, String baseUri) throws URISyntaxException;
+  Content setContent(ExtensionElement value, Content.Type type);  
   
   /**
    * Sets the content for this entry
-   * @throws MimeTypeParseException 
-   */
-  Content setContentAsXml(String value, String type, URI baseUri) throws MimeTypeParseException;  
-
-  /**
-   * Sets the content for this entry
-   * @throws MimeTypeParseException 
-   */
-  Content setContentAsXml(String value, String type, String baseUri) throws MimeTypeParseException, URISyntaxException;  
-
-  /**
-   * Sets the content for this entry
-   */
-  Content setContentAsXml(ExtensionElement value, MimeType type);
-
-  /**
-   * Sets the content for this entry
    */
-  Content setContentAsXml(ExtensionElement value, String type) throws MimeTypeParseException;
+  Content setContent(MimeType mediaType);
   
   /**
    * Sets the content for this entry
    */
-  Content setContentAsXml(ExtensionElement value, MimeType type, URI baseUri);
-
-  /**
-   * Sets the content for this entry
-   */
-  Content setContentAsXml(ExtensionElement value, MimeType type, String baseUri) throws URISyntaxException;
+  Content setContent(URI src, MimeType mediaType);
   
   /**
    * Sets the content for this entry
-   * @throws MimeTypeParseException 
-   */
-  Content setContentAsXml(ExtensionElement value, String type, URI baseUri) throws MimeTypeParseException;
-
-  /**
-   * Sets the content for this entry
-   * @throws MimeTypeParseException 
    */
-  Content setContentAsXml(ExtensionElement value, String type, String baseUri) throws MimeTypeParseException, URISyntaxException;  
+  Content setContent(ExtensionElement element, MimeType mediaType);
   
   /**
    * Sets the content for this entry
    */
-  Content setContentAsMedia(MimeType type, URI src, DataHandler dataHandler);
-
-  /**
-   * Sets the content for this entry
-   * @throws URISyntaxException 
-   */
-  Content setContentAsMedia(MimeType type, String src, DataHandler dataHandler) throws URISyntaxException;
+  Content setContent(DataHandler dataHandler, MimeType mediatype);
   
   /**
    * Sets the content for this entry
-   * @throws MimeTypeParseException 
-   */
-  Content setContentAsMedia(String type, URI src, DataHandler dataHandler) throws MimeTypeParseException;
-
-  /**
-   * Sets the content for this entry
-   * @throws URISyntaxException 
-   * @throws MimeTypeParseException 
    */
-  Content setContentAsMedia(String type, String src, DataHandler dataHandler) throws MimeTypeParseException, URISyntaxException;
+  Content setContent(String value, MimeType mediatype);
   
   /**
-   * Sets the content for this entry
-   */
-  Content setContentAsMedia(MimeType type, URI src, String value);
-
-  /**
-   * Sets the content for this entry
-   * @throws URISyntaxException 
+   * Returns the text of the content element
    */
-  Content setContentAsMedia(MimeType type, String src, String value) throws URISyntaxException;
+  String getContent();
   
   /**
-   * Sets the content for this entry
-   * @throws MimeTypeParseException 
-   */
-  Content setContentAsMedia(String type, URI src, String value) throws MimeTypeParseException;
-
-  /**
-   * Sets the content for this entry
-   * @throws URISyntaxException 
-   * @throws MimeTypeParseException 
+   * Returns the content type
    */
-  Content setContentAsMedia(String type, String src, String value) throws MimeTypeParseException, URISyntaxException;
-
+  Content.Type getContentType();
   
   /**
    * Lists the complete set of contributors for this entry
@@ -551,80 +420,39 @@
    */
   void setRightsElement(Text text);
   
-  /**
-   * Sets the value of the rights element as type="text"
-   */
-  Text setRightsAsText(String value);
+  Text setRights();
   
   /**
-   * Sets the value of the rights element as type="html"
-   * @param value The string containing the unescaped HTML
+   * Sets the value of the rights as @type="text"
    */
-  Text setRightsAsHtml(String value);
+  Text setRights(String value);
 
   /**
-   * Sets the rights for this entry as @type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
+   * Sets the value of the rights as @type="html"
    */
-  Text setRightsAsXhtml(String value);
+  Text setRightsAsHtml(String value);
   
   /**
-   * Sets the value of the rights element as type="xhtml"
-   * @param value The XHTML Div
+   * Sets the value of the rights as @type="xhtml"
    */
-  Text setRightsAsXhtml(Div value);
-
+  Text setRightsAsXhtml(String value);
   
   /**
-   * Sets the value of the rights element as type="html"
-   * @param value The string containing the unescaped HTML
-   * @param baseUri The content element's xml:base. Null if none
-   */
-  Text setRightsAsHtml(String value, URI baseUri);
-
-  /**
-   * Sets the rights for this entry as @type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
-   * @param baseUri The right element's xml:base. Null if none
+   * Sets the rights
    */
-  Text setRightsAsXhtml(String value, URI baseUri);
+  Text setRights(Text.Type type);
   
   /**
-   * Sets the value of the rights element as type="xhtml"
-   * @param value The XHTML Div
-   * @param baseUri The right element's xml:base. Null if none
+   * Sets the value of the rights
    */
-  Text setRightsAsXhtml(Div value, URI baseUri);
+  Text setRights(String value, Text.Type type);
   
   /**
-   * Sets the value of the rights element as type="html"
-   * @param value The string containing the unescaped HTML
-   * @param baseUri The content element's xml:base. Null if none
-   * @throws URISyntaxException 
+   * Sets the value of the right as @type="xhtml"
    */
-  Text setRightsAsHtml(String value, String baseUri) throws URISyntaxException;
+  Text setRights(Div value);
 
   /**
-   * Sets the rights for this entry as @type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
-   * @param baseUri The right element's xml:base. Null if none
-   */
-  Text setRightsAsXhtml(String value, String baseUri) throws URISyntaxException;
-  
-  /**
-   * Sets the value of the rights element as type="xhtml"
-   * @param value The XHTML Div
-   * @param baseUri The right element's xml:base. Null if none
-   */
-  Text setRightsAsXhtml(Div value, String baseUri) throws URISyntaxException;
-  
-  /**
    * Return the String value of the atom:rights element
    */
   String getRights();
@@ -684,66 +512,37 @@
    */
   void setSummaryElement(Text text);
   
+  Text setSummary();
+  
   /**
-   * Sets the summary of this entry as type="text"
+   * Sets the value of the summary as @type="text"
    */
-  Text setSummaryAsText(String value);
-  
+  Text setSummary(String value);
+
   /**
-   * Sets the summary of this entry as type="html"
+   * Sets the value of the summary as @type="html"
    */
   Text setSummaryAsHtml(String value);
   
   /**
-   * Sets the summary for this entry as type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
+   * Sets the value of the summary as @type="xhtml"
    */
   Text setSummaryAsXhtml(String value);
   
   /**
-   * Sets the summary for this entr as type="xhtml"
-   */
-  Text setSummaryAsXhtml(Div value);
-  
-  /**
-   * Sets the summary of this entry as type="html"
-   */
-  Text setSummaryAsHtml(String value, URI baseUri);
-  
-  /**
-   * Sets the summary for this entry as type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
-   * @param baseUri The summary element's xml:base. Null if none
-   */
-  Text setSummaryAsXhtml(String value, URI baseUri);
-  
-  /**
-   * Sets the summary for this entr as type="xhtml"
-   */
-  Text setSummaryAsXhtml(Div value, URI baseUri);
-    
-  /**
-   * Sets the summary of this entry as type="html"
+   * Sets the summary
    */
-  Text setSummaryAsHtml(String value, String baseUri) throws URISyntaxException;
+  Text setSummary(Text.Type type);
   
   /**
-   * Sets the summary for this entry as type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
-   * @param baseUri The summary element's xml:base. Null if none
+   * Sets the value of the summary
    */
-  Text setSummaryAsXhtml(String value, String baseUri) throws URISyntaxException;
+  Text setSummary(String value, Text.Type type);
   
   /**
-   * Sets the summary for this entr as type="xhtml"
+   * Sets the value of the summary as @type="xhtml"
    */
-  Text setSummaryAsXhtml(Div value, String baseUri) throws URISyntaxException;
+  Text setSummary(Div value);
   
   /**
    * Returns the text string value of this summary
@@ -767,71 +566,37 @@
    */
   void setTitleElement(Text title);
   
+  Text setTitle();
+  
   /**
-   * Sets the value of atom:title as type="text"
+   * Sets the value of the title as @type="text"
    */
-  Text setTitleAsText(String value);
+  Text setTitle(String value);
   
   /**
-   * Sets the value of atom:title as type="html"
+   * Sets the value of the title as @type="html"
    */
   Text setTitleAsHtml(String value);
   
   /**
-   * Sets the title for this entry as type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
+   * Sets the value of the title as @type="xhtml"
    */
   Text setTitleAsXhtml(String value);
   
   /**
-   * Sets the title for this entry as type="xhtml".
-   * @param value The parsed XHTML Div
-   */
-  Text setTitleAsXhtml(Div value);
-  
-  /**
-   * Sets the value of atom:title as type="html"
-   */
-  Text setTitleAsHtml(String value, URI baseUri);
-  
-  /**
-   * Sets the title for this entry as type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
-   * @param baseUri The title element's xml:base. Null if none
-   */
-  Text setTitleAsXhtml(String value, URI baseUri);
-  
-  /**
-   * Sets the title for this entry as type="xhtml".
-   * @param value The parsed XHTML Div
-   * @param baseUri The title element's xml:base. Null if none
-   */
-  Text setTitleAsXhtml(Div value, URI baseUri);
-  
-  /**
-   * Sets the value of atom:title as type="html"
+   * Sets the title
    */
-  Text setTitleAsHtml(String value, String baseUri) throws URISyntaxException;
+  Text setTitle(Text.Type type);
   
   /**
-   * Sets the title for this entry as type="xhtml".  The value is passed in
-   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
-   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
-   * @param value The string containing an unparsed XHTML div
-   * @param baseUri The title element's xml:base. Null if none
+   * Sets the value of the title
    */
-  Text setTitleAsXhtml(String value, String baseUri) throws URISyntaxException;
+  Text setTitle(String value, Text.Type type);
   
   /**
-   * Sets the title for this entry as type="xhtml".
-   * @param value The parsed XHTML Div
-   * @param baseUri The title element's xml:base. Null if none
+   * Sets the value of the title as @type="xhtml"
    */
-  Text setTitleAsXhtml(Div value, String baseUri) throws URISyntaxException;
+  Text setTitle(Div value);
   
   /**
    * Returns the text string value of the title element

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -392,60 +392,39 @@
    */
   void setRightsElement(Text text);
   
-  /**
-   * Sets the text of atom:rights as type="text"
-   */
-  Text setRightsAsText(String value);
-
-  /**
-   * Sets the text of atom:rights as type="html"
-   */
-  Text setRightsAsHtml(String value);
+  Text setRights();
   
   /**
-   * Sets the content of atom:rights as type="xhtml"
+   * Sets the value of the rights as @type="text"
    */
-  Text setRightsAsXhtml(String value);
+  Text setRights(String value);
   
   /**
-   * Sets the content of atom:rights as type="xhtml"
+   * Sets the value of the rights as @type="html"
    */
-  Text setRightsAsXhtml(Div value);
+  Text setRightsAsHtml(String value);
 
   /**
-   * Sets the text of atom:rights as type="html"
+   * Sets the value of the rights as @type="xhtml"
    */
-  Text setRightsAsHtml(String value, URI baseUri);
+  Text setRightsAsXhtml(String value);
   
   /**
-   * Sets the content of atom:rights as type="xhtml"
+   * Sets the rights
    */
-  Text setRightsAsXhtml(String value, URI baseUri);
+  Text setRights(Text.Type type);
   
   /**
-   * Sets the content of atom:rights as type="xhtml"
-   */
-  Text setRightsAsXhtml(Div value, URI baseUri);
-
-  /**
-   * Sets the text of atom:rights as type="html"
-   * @throws URISyntaxException 
+   * Sets the value of the rights
    */
-  Text setRightsAsHtml(String value, String baseUri) throws URISyntaxException;
+  Text setRights(String value, Text.Type type);
   
   /**
-   * Sets the content of atom:rights as type="xhtml"
-   * @throws URISyntaxException 
+   * Sets the value of the rights as @type="xhtml"
    */
-  Text setRightsAsXhtml(String value, String baseUri) throws URISyntaxException;
+  Text setRights(Div value);
   
   /**
-   * Sets the content of atom:rights as type="xhtml"
-   * @throws URISyntaxException 
-   */
-  Text setRightsAsXhtml(Div value, String baseUri) throws URISyntaxException;
-
-  /**
    * Returns the text of atom:rights
    */
   String getRights();
@@ -467,58 +446,37 @@
    */  
   void setSubtitleElement(Text text);
   
-  /**
-   * Sets the value of atom:subtitle as type="text"
-   */
-  Text setSubtitleAsText(String value);
-  
-  /**
-   * Sets the value of atom:subtitle as type="html
-   */
-  Text setSubtitleAsHtml(String value);
+  Text setSubtitle();
   
   /**
-   * Sets the contnt of atom:subtitle as type="xhtml"
+   * Sets the value of the subtitle as @type="text"
    */
-  Text setSubtitleAsXhtml(String value);
-  
-  /**
-   * Sets the content of atom:subtitle as type="xhtml"
-   */
-  Text setSubtitleAsXhtml(Div value);
+  Text setSubtitle(String value);
 
   /**
-   * Sets the value of atom:subtitle as type="html
-   */
-  Text setSubtitleAsHtml(String value, URI baseUri);
-  
-  /**
-   * Sets the contnt of atom:subtitle as type="xhtml"
+   * Sets the value of the subtitle as @type="html"
    */
-  Text setSubtitleAsXhtml(String value, URI baseUri);
-  
+  Text setSubtitleAsHtml(String value);
+
   /**
-   * Sets the content of atom:subtitle as type="xhtml"
+   * Sets the value of the subtitle as @type="xhtml"
    */
-  Text setSubtitleAsXhtml(Div value, URI baseUri);
+  Text setSubtitleAsXhtml(String value);
   
   /**
-   * Sets the value of atom:subtitle as type="html
-   * @throws URISyntaxException 
+   * Sets the subtitle
    */
-  Text setSubtitleAsHtml(String value, String baseUri) throws URISyntaxException;
+  Text setSubtitle(Text.Type type);
   
   /**
-   * Sets the contnt of atom:subtitle as type="xhtml"
-   * @throws URISyntaxException 
+   * Sets the value of the subtitle
    */
-  Text setSubtitleAsXhtml(String value, String baseUri) throws URISyntaxException;
+  Text setSubtitle(String value, Text.Type type);
   
   /**
-   * Sets the content of atom:subtitle as type="xhtml"
-   * @throws URISyntaxException 
+   * Sets the value of the subtitle as @type="xhtml"
    */
-  Text setSubtitleAsXhtml(Div value, String baseUri) throws URISyntaxException;
+  Text setSubtitle(Div value);
   
   /**
    * Returns the text value of atom:subtitle
@@ -542,59 +500,38 @@
    */
   void setTitleElement(Text text);
   
+  Text setTitle();
+  
   /**
-   * Sets the value of atom:title as type="text"
+   * Sets the value of the title as @type="text"
    */
-  Text setTitleAsText(String value);
-  
+  Text setTitle(String value);
+
   /**
-   * Sets the value of atom:title as type="html"
+   * Sets the value of the title as @type="html"
    */
   Text setTitleAsHtml(String value);
   
   /**
-   * Sets the content of atom:title as type="xhtml"
+   * Sets the value of the title as @type="xhtml"
    */
   Text setTitleAsXhtml(String value);
   
   /**
-   * Sets the content of atom:title as type="xhtml"
+   * Sets the title
    */
-  Text setTitleAsXhtml(Div value);
+  Text setTitle(Text.Type type);
   
   /**
-   * Sets the value of atom:title as type="html"
+   * Sets the value of the title
    */
-  Text setTitleAsHtml(String value, URI baseUri);
+  Text setTitle(String value, Text.Type type);
   
   /**
-   * Sets the content of atom:title as type="xhtml"
+   * Sets the value of the title as @type="xhtml"
    */
-  Text setTitleAsXhtml(String value, URI baseUri);
+  Text setTitle(Div value);
   
-  /**
-   * Sets the content of atom:title as type="xhtml"
-   */
-  Text setTitleAsXhtml(Div value, URI baseUri);
-
-  /**
-   * Sets the value of atom:title as type="html"
-   * @throws URISyntaxException 
-   */
-  Text setTitleAsHtml(String value, String baseUri) throws URISyntaxException;
-  
-  /**
-   * Sets the content of atom:title as type="xhtml"
-   * @throws URISyntaxException 
-   */
-  Text setTitleAsXhtml(String value, String baseUri) throws URISyntaxException;
-  
-  /**
-   * Sets the content of atom:title as type="xhtml"
-   * @throws URISyntaxException 
-   */
-  Text setTitleAsXhtml(Div value, String baseUri) throws URISyntaxException;
-
   /**
    * Returns the text of atom:title
    */

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -83,6 +83,8 @@
   
   Type getTextType();
   
+  void setTextType(Type type);
+  
   Div getValueElement();
   
   void setValueElement(Div value);

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java?rev=416512&r1=416511&r2=416512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java (original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java Thu Jun 22 16:34:07 2006
@@ -51,10 +51,10 @@
     // Create the entry to post to the collection
     Entry entry = Factory.INSTANCE.newEntry();
     entry.setId("tag:example.org,2006:foo", false);
-    entry.setTitleAsText("This is the title");
+    entry.setTitle("This is the title");
     entry.setUpdated(new Date());
     entry.addAuthor("James");
-    entry.setContentAsText("This is the content");
+    entry.setContent("This is the content");
     report("The Entry to Post", entry.toString());
     
     // Post the entry. Be sure to grab the resolved HREF of the collection

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java?rev=416512&r1=416511&r2=416512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java (original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java Thu Jun 22 16:34:07 2006
@@ -23,6 +23,7 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
+import org.apache.abdera.model.Text;
 
 
 public class Create {
@@ -33,7 +34,7 @@
     feed.setLanguage("en-US");
     feed.setBaseUri("http://example.org");
     
-    feed.setTitleAsText("Example Feed");
+    feed.setTitle("Example Feed");
     feed.addLink("http://example.org/");
     feed.setUpdated(new Date());
     feed.addAuthor("John Doe");
@@ -42,26 +43,26 @@
     feed.addCategory("example");
     
     Entry entry = feed.insertEntry();
-    entry.setTitleAsText("Atom-Powered Robots Run Amok");
+    entry.setTitle("Atom-Powered Robots Run Amok");
     entry.addLink("http://example.org/2003/12/13/atom03");
     entry.setId("urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a");
     entry.setUpdated(new Date());
-    entry.setSummaryAsText("Some text.");
+    entry.setSummary("Some text.");
     
     Entry entry2 = feed.insertEntry();
-    entry2.setTitleAsText("re: Atom-Powered Robots Run Amok");
+    entry2.setTitle("re: Atom-Powered Robots Run Amok");
     entry2.addLink("/2003/12/13/atom03/1");
     entry2.setId("urn:uuid:1225c695-cfb8-4ebb-aaaa-80cb323feb5b");
     entry2.setUpdated(new Date());
-    entry2.setSummaryAsText("A response");
+    entry2.setSummary("A response");
     entry2.addInReplyTo(entry);
     
     Entry entry3 = feed.addEntry();
-    entry3.setTitleAsXhtml("<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Test</p></div>");
+    entry3.setTitle("<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Test</p></div>", Text.Type.XHTML);
     entry3.addLink("/2003/12/13/atom03/2");
     entry3.setId("HTTP://www.Example.org/foo/../bar", true); // normalizes the id to the value http://www.example.org/bar
     entry3.setUpdated(Calendar.getInstance());
-    entry3.setSummaryAsHtml("<p><a href=\"foo\">Test</a></p>", "http://example.org/site/");
+    entry3.setSummaryAsHtml("<p><a href=\"foo\">Test</a></p>").setBaseUri("http://example.org/site/");
     entry3.setSource(feed.getAsSource());
     
     feed.getDocument().writeTo(System.out);

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java?rev=416512&r1=416511&r2=416512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java Thu Jun 22 16:34:07 2006
@@ -22,7 +22,9 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Category;
+import org.apache.abdera.util.Constants;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
@@ -35,6 +37,36 @@
   implements Category {
 
   private static final long serialVersionUID = -4313042828936786803L;
+  
+  public FOMCategory() {
+    super(Constants.CATEGORY, null, (OMFactory)Factory.INSTANCE);
+  }
+  
+  public FOMCategory(String term) {
+    this();
+    setTerm(term);
+  }
+  
+  public FOMCategory(
+    String term, 
+    URI scheme, 
+    String label) {
+      this();
+      setTerm(term);
+      setScheme(scheme);
+      setLabel(label);
+  }
+  
+  public FOMCategory(
+    String term, 
+    String scheme, 
+    String label) 
+      throws URISyntaxException {
+    this();
+    setTerm(term);
+    setScheme(scheme);
+    setLabel(label);
+  }
   
   public FOMCategory(
     String name,

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java?rev=416512&r1=416511&r2=416512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java Thu Jun 22 16:34:07 2006
@@ -23,7 +23,9 @@
 import javax.activation.MimeType;
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Collection;
+import org.apache.abdera.util.Constants;
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
@@ -38,6 +40,31 @@
 
   private static final long serialVersionUID = -5291734055253987136L;
 
+  public FOMCollection() {
+    super(Constants.COLLECTION, null, (OMFactory)Factory.INSTANCE);
+  }
+  
+  public FOMCollection(
+    String title, 
+    URI href, 
+    String[] accepts) {
+      this();
+      setTitle(title);
+      setHref(href);
+      setAccept(accepts);
+  }
+  
+  public FOMCollection(
+    String title, 
+    String href, 
+    String[] accepts) 
+      throws URISyntaxException {
+    this();
+    setTitle(title);
+    setHref(href);
+    setAccept(accepts);
+  }
+  
   public FOMCollection(
     String name,
     OMNamespace namespace,

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -25,6 +25,7 @@
 import javax.activation.URLDataSource;
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Content;
 import org.apache.abdera.model.Div;
 import org.apache.abdera.model.Element;
@@ -38,7 +39,6 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 
-
 public class FOMContent 
   extends FOMExtensibleElement 
   implements Content {
@@ -46,6 +46,11 @@
   private static final long serialVersionUID = -5499917654824498563L;
   protected Type type = null;
   
+  public FOMContent(Content.Type type) {
+    super(Constants.CONTENT, null, (OMFactory)Factory.INSTANCE);
+    init(type);
+  }
+  
   public FOMContent(
     String name,
     OMNamespace namespace,
@@ -101,12 +106,19 @@
       _setAttributeValue(TYPE, "html");
     else if (Type.XHTML.equals(type))
       _setAttributeValue(TYPE, "xhtml");
+    else {
+      _removeAttribute(TYPE);
+    }
   }
   
   public final Type getContentType() {
     return type;
   }
 
+  public void setContentType(Type type) {
+    init(type);
+  }
+  
   @SuppressWarnings("unchecked")
   public <T extends ExtensionElement> T getValueElement() {
     return (T)this.getFirstElement();

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java?rev=416512&r1=416511&r2=416512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java Thu Jun 22 16:34:07 2006
@@ -19,7 +19,9 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Control;
+import org.apache.abdera.util.Constants;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
@@ -34,6 +36,10 @@
 
   private static final long serialVersionUID = -3816493378953555206L;
 
+  public FOMControl() {
+    super(Constants.CONTROL, null, (OMFactory)Factory.INSTANCE);
+  }
+  
   public FOMControl(
     String name,
     OMNamespace namespace,

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -22,6 +22,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.AtomDate;
 import org.apache.abdera.model.DateTime;
 import org.apache.axiom.om.OMContainer;
@@ -37,6 +38,35 @@
   
   private static final long serialVersionUID = -6611503566172011733L;
 
+  public FOMDateTime(QName qname) {
+    super(qname, null, (OMFactory)Factory.INSTANCE);
+  }
+  
+  public FOMDateTime(QName qname, Date date) {
+    this(qname);
+    setDate(date);
+  }
+  
+  public FOMDateTime(QName qname, Calendar calendar) {
+    this(qname);
+    setCalendar(calendar);
+  }
+  
+  public FOMDateTime(QName qname, String value) {
+    this(qname);
+    setString(value);
+  }
+  
+  public FOMDateTime(QName qname, long time) {
+    this(qname);
+    setTime(time);
+  }
+  
+  public FOMDateTime(QName qname, AtomDate atomDate) {
+    this(qname);
+    setValue(atomDate);
+  }
+  
   public FOMDateTime(
     String name,
     OMNamespace namespace,

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java?rev=416512&r1=416511&r2=416512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java Thu Jun 22 16:34:07 2006
@@ -19,7 +19,9 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Div;
+import org.apache.abdera.util.Constants;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
@@ -33,6 +35,10 @@
 
   private static final long serialVersionUID = -2319449893405850433L;
 
+  public FOMDiv() {
+    super(Constants.DIV, null, (OMFactory)Factory.INSTANCE);
+  }
+  
   public FOMDiv(
     String name,
     OMNamespace namespace,

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?rev=416512&r1=416511&r2=416512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java Thu Jun 22 16:34:07 2006
@@ -65,6 +65,10 @@
 
   private static final long serialVersionUID = 8024257594220911953L;
   
+  public FOMElement(QName qname) {
+    super(qname, null, (OMFactory)Factory.INSTANCE);
+  }
+  
   public FOMElement(
     String name,
     OMNamespace namespace,
@@ -406,7 +410,7 @@
       return null;
     }
     FOMFactory fomfactory = (FOMFactory) factory;
-    Text text = fomfactory.newText(qname, Text.Type.TEXT, null);
+    Text text = fomfactory.newText(qname, Text.Type.TEXT);
     text.setValue(value);
     setTextElement(qname, text, false);
     return text;
@@ -418,7 +422,7 @@
       return null;
     }
     FOMFactory fomfactory = (FOMFactory) factory;
-    Text text = fomfactory.newText(qname, Text.Type.HTML, null);
+    Text text = fomfactory.newText(qname, Text.Type.HTML);
     if (baseUri != null) text.setBaseUri(baseUri);
     text.setValue(value);
     setTextElement(qname, text, false);
@@ -431,7 +435,7 @@
       return null;
     }
     FOMFactory fomfactory = (FOMFactory) factory;
-    Text text = fomfactory.newText(qname, Text.Type.XHTML, null);
+    Text text = fomfactory.newText(qname, Text.Type.XHTML);
     if (baseUri != null) text.setBaseUri(baseUri);
     text.setValue(value);
     setTextElement(qname, text, false);
@@ -444,7 +448,7 @@
       return null;
     }
     FOMFactory fomfactory = (FOMFactory) factory;
-    Text text = fomfactory.newText(qname, Text.Type.XHTML, null);
+    Text text = fomfactory.newText(qname, Text.Type.XHTML);
     if (baseUri != null) text.setBaseUri(baseUri);
     text.setValueElement(value);
     setTextElement(qname, text, false);

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -29,6 +29,7 @@
 import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Category;
 import org.apache.abdera.model.Content;
 import org.apache.abdera.model.Control;
@@ -43,6 +44,7 @@
 import org.apache.abdera.model.Source;
 import org.apache.abdera.model.Text;
 import org.apache.abdera.model.Content.Type;
+import org.apache.abdera.util.Constants;
 import org.apache.abdera.util.URIHelper;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
@@ -58,6 +60,10 @@
 
   private static final long serialVersionUID = 1L;
 
+  public FOMEntry() {
+    super(Constants.ENTRY, null, (OMFactory)Factory.INSTANCE);
+  }
+  
   public FOMEntry(
     String name,
     OMNamespace namespace,
@@ -170,12 +176,12 @@
 
   public Category addCategory(URI scheme, String term, String label) {
     FOMFactory factory = (FOMFactory) this.factory;
-    return factory.newCategory(scheme, term, label, this);
+    return factory.newCategory(term, scheme, label, this);
   }
   
   public Category addCategory(String scheme, String term, String label) throws URISyntaxException {
     FOMFactory factory = (FOMFactory) this.factory;
-    return factory.newCategory(new URI(scheme), term, label, this);    
+    return factory.newCategory(term, new URI(scheme), label, this);    
   }
   
   @SuppressWarnings("unchecked")
@@ -192,236 +198,112 @@
       _removeElement(CONTENT, false);
     }
   }
-
-  public Content setContentAsText(String value) {
-    if (value == null) {
-      setContentElement(null);
-      return null;
-    }
-    FOMFactory fomfactory = (FOMFactory) factory;
-    Content content = fomfactory.newTextContent(value, null);
-    setContentElement(content);
-    return content;
-  }
-
-  public Content setContentAsHtml(String value, URI baseUri) {
-    if (value == null) {
-      setContentElement(null);
-      return null;
-    }
-    FOMFactory fomfactory = (FOMFactory) factory;
-    Content content = fomfactory.newHtmlContent(value, null);
-    if (baseUri != null) content.setBaseUri(baseUri);
-    setContentElement(content);
-    return content;
-  }
   
-  public Content setContentAsXhtml(String value, URI baseUri) {
-    if (value == null) {
-      setContentElement(null);
-      return null;
-    }
-    FOMFactory fomfactory = (FOMFactory) factory;
-    Content content = 
-      (Content) fomfactory.newContent(
-        Content.Type.XHTML, null);
-    if (baseUri != null) content.setBaseUri(baseUri);
-    content.setValue(value);
+  public Content setContent() {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(Content.Type.TEXT);
     setContentElement(content);
     return content;
   }
   
-  public Content setContentAsXhtml(Div value, URI baseUri) {
-    if (value == null) {
-      setContentElement(null);
-      return null;
-    }
-    FOMFactory fomfactory = (FOMFactory) factory;
-    Content content = fomfactory.newXhtmlContent(value, null);
-    if (baseUri != null) content.setBaseUri(baseUri);
+  /**
+   * Sets the content for this entry as @type="text"
+   */
+  public Content setContent(String value) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(value);
     setContentElement(content);
     return content;
   }
-
-  public Content setContentAsXml(
-    String value, 
-    MimeType type, 
-    URI baseUri) {
-      if (value == null) {
-        setContentElement(null);
-        return null;
-      }
-      FOMFactory fomfactory = (FOMFactory) factory;
-      Content content = 
-        (Content) fomfactory.newContent(Content.Type.XML, null);
-      if (type != null) content.setMimeType(type);
-      if (baseUri != null) content.setBaseUri(baseUri);
-      content.setValue(value);
-      setContentElement(content);
-      return content;    
-  }
-
-  public Content setContentAsXml(
-    String value, 
-    String type, 
-    URI baseUri) 
-      throws MimeTypeParseException {
-    return setContentAsXml(
-      value, 
-      (type != null) ? new MimeType(type) : null, 
-       baseUri);
-  }
   
-  public Content setContentAsXml(
-    ExtensionElement value, 
-    MimeType type, 
-    URI baseUri) {
-      if (value == null) {
-        setContentElement(null);
-        return null;
-      }
-      FOMFactory fomfactory = (FOMFactory) factory;
-      Content content = 
-        fomfactory.newXmlContent(
-          type, null, value, null);
-      if (baseUri != null) content.setBaseUri(baseUri);
-      setContentElement(content);
-      return content;    
+  public Content setContentAsHtml(String value) {
+    return setContent(value, Content.Type.HTML);
   }
-
-  public Content setContentAsXml(
-    ExtensionElement value, 
-    String type, 
-    URI baseUri) 
-      throws MimeTypeParseException {
-    return setContentAsXml(
-      value, 
-      (type != null) ? new MimeType(type) : null, 
-      baseUri);
+  
+  public Content setContentAsXhtml(String value) {
+    return setContent(value, Content.Type.XHTML);
   }
-
+  
   /**
    * Sets the content for this entry
    */
-  public Content setContentAsMedia(
-    MimeType type, 
-    URI src, 
-    DataHandler dataHandler) {
-      if (dataHandler == null) {
-        setContentElement(null);
-        return null;
-      }
-      FOMFactory fomfactory = (FOMFactory) factory;
-      Content content = fomfactory.newMediaContent(type, src, dataHandler, null);
-      setContentElement(content);
-      return content;
+  public Content setContent(Content.Type type) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(type);
+    setContentElement(content);
+    return content;
   }
-
+  
   /**
    * Sets the content for this entry
-   * @throws URISyntaxException 
    */
-  public Content setContentAsMedia(
-    MimeType type, 
-    String src, 
-    DataHandler dataHandler) 
-      throws URISyntaxException {
-    return setContentAsMedia(
-      type, (src != null) ? new URI(src):null,
-      dataHandler);
+  public Content setContent(String value, Content.Type type) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(value, type);
+    setContentElement(content);
+    return content;
   }
   
   /**
    * Sets the content for this entry
-   * @throws MimeTypeParseException 
    */
-  public Content setContentAsMedia(
-    String type, 
-    URI src, 
-    DataHandler dataHandler) 
-      throws MimeTypeParseException {
-    return setContentAsMedia(
-      (type != null) ? new MimeType(type) : null, 
-      src,dataHandler);
-  }
-
+  public Content setContent(ExtensionElement value, Content.Type type) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(type, value);
+    setContentElement(content);
+    return content;
+  } 
+  
   /**
    * Sets the content for this entry
-   * @throws URISyntaxException 
-   * @throws MimeTypeParseException 
    */
-  public Content setContentAsMedia(
-    String type, 
-    String src, 
-    DataHandler dataHandler) 
-      throws MimeTypeParseException, URISyntaxException {
-    return setContentAsMedia(
-      (type != null) ? new MimeType(type) : null, 
-      (src != null) ? new URI(src) : null,
-      dataHandler);
+  public Content setContent(MimeType mediaType) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(mediaType);
+    setContentElement(content);
+    return content;
   }
   
   /**
    * Sets the content for this entry
    */
-  public Content setContentAsMedia(
-    MimeType type, 
-    URI src, 
-    String value) {
-      if (value == null) {
-        setContentElement(null);
-        return null;
-      }
-      FOMFactory fomfactory = (FOMFactory) factory;
-      Content content = fomfactory.newMediaContent(type, src, null, null);
-      content.setValue(value);
-      setContentElement(content);
-      return content;
+  public Content setContent(URI src, MimeType mediaType) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(src, mediaType);
+    setContentElement(content);
+    return content;
   }
-
+  
   /**
    * Sets the content for this entry
-   * @throws URISyntaxException 
    */
-  public Content setContentAsMedia(
-    MimeType type, 
-    String src, 
-    String value) 
-      throws URISyntaxException {
-    return setContentAsMedia(
-      type, (src != null) ? new URI(src):null,
-      value);
+  public Content setContent(ExtensionElement element, MimeType mediaType) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(element, mediaType);
+    setContentElement(content);
+    return content;
   }
   
   /**
    * Sets the content for this entry
-   * @throws MimeTypeParseException 
    */
-  public Content setContentAsMedia(
-    String type, 
-    URI src, 
-    String value) 
-      throws MimeTypeParseException {
-    return setContentAsMedia(
-      (type != null) ? new MimeType(type) : null, 
-      src,value);
+  public Content setContent(DataHandler dataHandler, MimeType mediatype) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(dataHandler, mediatype);
+    setContentElement(content);
+    return content;
   }
-
+  
   /**
    * Sets the content for this entry
-   * @throws URISyntaxException 
-   * @throws MimeTypeParseException 
    */
-  public Content setContentAsMedia(
-    String type, 
-    String src, 
-    String value) 
-      throws MimeTypeParseException, URISyntaxException {
-    return setContentAsMedia(
-      (type != null) ? new MimeType(type) : null, 
-      (src != null) ? new URI(src) : null,
-      value);
+  public Content setContent(String value, MimeType mediatype) {
+    FOMFactory factory = (FOMFactory) this.factory;
+    Content content = factory.newContent(value, mediatype);
+    setContentElement(content);
+    return content;
   }
+
   
   public List<Person> getContributors() {
     return _getChildrenAsSet(CONTRIBUTOR);
@@ -688,23 +570,50 @@
   public void setRightsElement(Text text) {
     setTextElement(RIGHTS, text, false);
   }
-
-  public Text setRightsAsText(String value) {
-    return setTextText(RIGHTS, value);
-  }  
   
-  public Text setRightsAsHtml(String value, URI baseUri) {
-    return setHtmlText(RIGHTS, value, baseUri);
+  public Text setRights() {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newRights(Text.Type.TEXT);
+    setRightsElement(text);
+    return text;
   }
   
-  public Text setRightsAsXhtml(String value, URI baseUri) {
-    return setXhtmlText(RIGHTS, value, baseUri);
+  public Text setRights(String value) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newRights(value);
+    setRightsElement(text);
+    return text;
   }
   
-  public Text setRightsAsXhtml(Div value, URI baseUri) {
-    return setXhtmlText(RIGHTS, value, baseUri);
+  public Text setRightsAsHtml(String value) {
+    return setRights(value, Text.Type.HTML);
   }
   
+  public Text setRightsAsXhtml(String value) {
+    return setRights(value, Text.Type.XHTML);
+  }
+  
+  public Text setRights(Text.Type type) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newRights(type);
+    setRightsElement(text);
+    return text;
+  }
+  
+  public Text setRights(String value, Text.Type type) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newRights(value, type);
+    setRightsElement(text);
+    return text;
+  }
+  
+  public Text setRights(Div value) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newRights(value);
+    setRightsElement(text);
+    return text;
+  }
+
   public String getRights() {
     return getText(RIGHTS);
   }
@@ -729,22 +638,49 @@
     setTextElement(SUMMARY, text, false);
   }
   
-  public Text setSummaryAsText(String value) {
-    return setTextText(SUMMARY, value);
-  }  
+  public Text setSummary() {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newSummary(Text.Type.TEXT);
+    setSummaryElement(text);
+    return text;
+  }
   
-  public Text setSummaryAsHtml(String value, URI baseUri) {
-    return setHtmlText(SUMMARY, value, baseUri);
+  public Text setSummary(String value) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newSummary(value);
+    setSummaryElement(text);
+    return text;
   }
   
-  public Text setSummaryAsXhtml(String value, URI baseUri) {
-    return setXhtmlText(SUMMARY, value, baseUri);
+  public Text setSummaryAsHtml(String value) {
+    return setSummary(value, Text.Type.HTML);
   }
   
-  public Text setSummaryAsXhtml(Div value, URI baseUri) {
-    return setXhtmlText(SUMMARY, value, baseUri);
+  public Text setSummaryAsXhtml(String value) {
+    return setSummary(value, Text.Type.XHTML);
   }
-    
+  
+  public Text setSummary(Text.Type type) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newSummary(type);
+    setSummaryElement(text);
+    return text;
+  }
+  
+  public Text setSummary(String value, Text.Type type) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newSummary(value, type);
+    setSummaryElement(text);
+    return text;
+  }
+  
+  public Text setSummary(Div value) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newSummary(value);
+    setSummaryElement(text);
+    return text;
+  }
+  
   public String getSummary() {
     return getText(SUMMARY);
   }
@@ -758,20 +694,47 @@
     setTextElement(TITLE, title, false);
   }
 
-  public Text setTitleAsText(String value) {
-    return setTextText(TITLE, value);
-  }  
+  public Text setTitle() {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newTitle(Text.Type.TEXT);
+    setTitleElement(text);
+    return text;
+  }
   
-  public Text setTitleAsHtml(String value, URI baseUri) {
-    return setHtmlText(TITLE, value, baseUri);
+  public Text setTitle(String value) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newTitle(value);
+    setTitleElement(text);
+    return text;
+  }
+  
+  public Text setTitleAsHtml(String value) {
+    return setTitle(value, Text.Type.HTML);
+  }
+  
+  public Text setTitleAsXhtml(String value) {
+    return setTitle(value, Text.Type.XHTML);
   }
   
-  public Text setTitleAsXhtml(String value, URI baseUri) {
-    return setXhtmlText(TITLE, value, baseUri);
+  public Text setTitle(Text.Type type) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newTitle(type);
+    setTitleElement(text);
+    return text;
   }
   
-  public Text setTitleAsXhtml(Div value, URI baseUri) {
-    return setXhtmlText(TITLE, value, baseUri);
+  public Text setTitle(String value, Text.Type type) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newTitle(value, type);
+    setTitleElement(text);
+    return text;
+  }
+  
+  public Text setTitle(Div value) {
+    FOMFactory factory = (FOMFactory)this.factory;
+    Text text = factory.newTitle(value);
+    setTitleElement(text);
+    return text;
   }
   
   public String getTitle() {
@@ -908,144 +871,6 @@
   public Text.Type getTitleType() {
     Text text = getTitleElement();
     return (text != null) ? text.getTextType() : null;
-  }
-
-  public Content setContentAsHtml(String value, String baseUri) throws URISyntaxException {
-    return setContentAsHtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Content setContentAsXhtml(String value, String baseUri) throws URISyntaxException {
-    return setContentAsXhtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Content setContentAsXhtml(Div value, String baseUri) throws URISyntaxException {
-    return setContentAsXhtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Content setContentAsXml(String value, MimeType type, String baseUri) throws URISyntaxException {
-    return setContentAsXml(value, type, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Content setContentAsXml(String value, String type, String baseUri) throws MimeTypeParseException, URISyntaxException {
-    return setContentAsXml(value, type, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Content setContentAsXml(ExtensionElement value, MimeType type, String baseUri) throws URISyntaxException {
-    return setContentAsXml(value, type, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Content setContentAsXml(ExtensionElement value, String type, String baseUri) throws MimeTypeParseException, URISyntaxException {
-    return setContentAsXml(value, type, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setRightsAsHtml(String value, String baseUri) throws URISyntaxException {
-    return setRightsAsHtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setRightsAsXhtml(String value, String baseUri) throws URISyntaxException {
-    return setRightsAsXhtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setRightsAsXhtml(Div value, String baseUri) throws URISyntaxException {
-    return setRightsAsXhtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setSummaryAsHtml(String value, String baseUri) throws URISyntaxException {
-    return setSummaryAsHtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setSummaryAsXhtml(String value, String baseUri) throws URISyntaxException {
-    return setSummaryAsXhtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setSummaryAsXhtml(Div value, String baseUri) throws URISyntaxException {
-    return setSummaryAsXhtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setTitleAsHtml(String value, String baseUri) throws URISyntaxException {
-    return setTitleAsHtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setTitleAsXhtml(String value, String baseUri) throws URISyntaxException {
-    return setTitleAsXhtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Text setTitleAsXhtml(Div value, String baseUri) throws URISyntaxException {
-    return setTitleAsXhtml(value, (baseUri != null) ? new URI(baseUri): null);
-  }
-
-  public Content setContentAsHtml(String value) {
-    return setContentAsHtml(value, (URI)null);
-  }
-
-  public Content setContentAsXhtml(String value) {
-    return setContentAsXhtml(value, (URI)null);
-  }
-
-  public Content setContentAsXhtml(Div value) {
-    return setContentAsXhtml(value, (URI)null);
-  }
-
-  public Content setContentAsXml(
-    String value, 
-    MimeType type) {
-      return setContentAsXml(value, type, (URI)null);
-  }
-
-  public Content setContentAsXml(
-    String value, 
-    String type) 
-      throws MimeTypeParseException {
-    return setContentAsXml(value, type, (URI)null);
-  }
-
-  public Content setContentAsXml(
-    ExtensionElement value, 
-    MimeType type) {
-      return setContentAsXml(value, type, (URI)null);
-  }
-
-  public Content setContentAsXml(
-    ExtensionElement value, 
-    String type) 
-      throws MimeTypeParseException {
-    return setContentAsXml(value, type, (URI)null);
-  }
-
-  public Text setRightsAsHtml(String value) {
-    return setRightsAsHtml(value, (URI)null);
-  }
-
-  public Text setRightsAsXhtml(String value) {
-    return setRightsAsXhtml(value, (URI)null);
-  }
-
-  public Text setRightsAsXhtml(Div value) {
-    return setRightsAsXhtml(value, (URI)null);
-  }
-
-  public Text setSummaryAsHtml(String value) {
-    return setSummaryAsHtml(value, (URI)null);
-  }
-
-  public Text setSummaryAsXhtml(String value) {
-    return setSummaryAsXhtml(value, (URI)null);
-  }
-
-  public Text setSummaryAsXhtml(Div value) {
-    return setSummaryAsXhtml(value, (URI)null);
-  }
-
-  public Text setTitleAsHtml(String value) {
-    return setTitleAsHtml(value, (URI)null);
-  }
-
-  public Text setTitleAsXhtml(String value) {
-    return setTitleAsXhtml(value, (URI)null);
-  }
-
-  public Text setTitleAsXhtml(Div value) {
-    return setTitleAsXhtml(value, (URI)null);
   }
 
   public void addInReplyTo(InReplyTo replyTo) {

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=416512&r1=416511&r2=416512&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 Thu Jun 22 16:34:07 2006
@@ -23,6 +23,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ExtensibleElement;
 import org.apache.abdera.model.ExtensionElement;
@@ -40,6 +41,10 @@
   extends FOMElement 
   implements ExtensibleElement {
 
+  public FOMExtensibleElement(QName qname) {
+    super(qname, null, (OMFactory)Factory.INSTANCE);
+  }
+  
   public FOMExtensibleElement(
     String name,
     OMNamespace namespace,

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionElement.java?rev=416512&r1=416511&r2=416512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionElement.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensionElement.java Thu Jun 22 16:34:07 2006
@@ -19,6 +19,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.ExtensionElement;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
@@ -33,6 +34,10 @@
 
   private static final long serialVersionUID = -1874496559841783615L;
 
+  public FOMExtensionElement(QName qname) {
+    super(qname, null, (OMFactory)Factory.INSTANCE);
+  }
+  
   public FOMExtensionElement(
     String name,
     OMNamespace namespace,



Mime
View raw message