abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r601147 [1/3] - in /incubator/abdera/java/trunk: build/ client/src/main/java/org/apache/abdera/protocol/client/ contrib/rss/src/main/java/org/apache/abdera/contrib/rss/ core/src/main/java/org/apache/abdera/factory/ core/src/main/java/org/ap...
Date Tue, 04 Dec 2007 23:23:42 GMT
Author: jmsnell
Date: Tue Dec  4 15:23:33 2007
New Revision: 601147

URL: http://svn.apache.org/viewvc?rev=601147&view=rev
Log:
Update many apis to enable chainable method calls.  This is an extensive update.

Modified:
    incubator/abdera/java/trunk/build/build.xml
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssCategory.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssDateTime.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGenerator.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssImage.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssPerson.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssText.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssUriElement.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.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/filter/ListParseFilter.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ParseFilter.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/AtomDate.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Attribute.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Base.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Categories.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/Comment.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/DateTimeWrapper.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/Document.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/ElementWrapper.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/ExtensibleElementWrapper.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Feed.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/IRIElement.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/PersonWrapper.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ProcessingInstruction.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/core/src/main/java/org/apache/abdera/parser/Parser.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/ParserOptions.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractExtensionFactory.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParserOptions.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractWriter.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractWriterOptions.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/filter/AbstractListParseFilter.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/filter/AbstractParseFilter.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/writer/Writer.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/writer/WriterOptions.java
    incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/Query.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMAttribute.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategories.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/FOMComment.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/FOMDocument.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/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/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/FOMProcessingInstruction.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/FOMText.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/error/Error.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/EncryptionOptions.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/SecurityOptions.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/SignatureOptions.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/xmlsec/XmlEncryptionOptions.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/xmlsec/XmlSecurityOptions.java
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/xmlsec/XmlSignatureOptions.java

Modified: incubator/abdera/java/trunk/build/build.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/build/build.xml?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/build/build.xml (original)
+++ incubator/abdera/java/trunk/build/build.xml Tue Dec  4 15:23:33 2007
@@ -415,7 +415,7 @@
   </target>
 
   <target name="clean">
-    <delete dir="${work}" />
+<!--    <delete dir="${work}" />
     <delete dir="${test}" />
     <delete dir="${dist}" />
     <delete dir="${dependencies.work}" />
@@ -424,7 +424,7 @@
     <delete>
       <fileset dir="${basedir}" includes="*.zip" />
       <fileset dir="${basedir}" includes="*.md5" />
-    </delete>
+    </delete>-->
   </target>
 
   <target name="dist" depends="clean,build,test,docs">

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java (original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java Tue Dec  4 15:23:33 2007
@@ -351,8 +351,9 @@
   /**
    * Configure the client to use preemptive authentication (HTTP Basic Authentication only)
    */
-  public void usePreemptiveAuthentication(boolean val) {
+  public AbderaClient usePreemptiveAuthentication(boolean val) {
     client.getParams().setAuthenticationPreemptive(val);
+    return this;
   }
   
   private boolean useCache(
@@ -507,7 +508,7 @@
     return MethodHelper.createDefaultRequestOptions();
   }
   
-  public void addCredentials(
+  public AbderaClient addCredentials(
     String target,
     String realm,
     String scheme,
@@ -528,18 +529,21 @@
         (scheme != null) ? scheme : AuthScope.ANY_SCHEME);
     client.getState().setCredentials(
       scope, credentials);
+    return this;
   }
 
-  public void setAuthenticationSchemeDefaults() {
+  public AbderaClient setAuthenticationSchemeDefaults() {
     List authPrefs = AuthPolicy.getDefaultAuthPrefs();
     client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
+    return this;
   }
   
-  public void setAuthenticationSchemePriority(String... scheme) {
+  public AbderaClient setAuthenticationSchemePriority(String... scheme) {
     List authPrefs = java.util.Arrays.asList(scheme);
     client.getParams().setParameter(
       AuthPolicy.AUTH_SCHEME_PRIORITY, 
       authPrefs);
+    return this;
   }
   
   public List getAuthenticationSchemePriority() {
@@ -558,19 +562,21 @@
    *   closure of all HTTP connections in the connection pool.
    * </blockquote>
    */
-  public void teardown() {
+  public AbderaClient teardown() {
     ((MultiThreadedHttpConnectionManager)
       client.getHttpConnectionManager()).shutdown();
+    return this;
   }
 
   /**
    * Set the maximum number of connections allowed for a single host
    */
-  public void setMaxConnectionsPerHost(int max) {
+  public AbderaClient setMaxConnectionsPerHost(int max) {
     Map<HostConfiguration,Integer> m = new HashMap<HostConfiguration,Integer>();
     m.put(HostConfiguration.ANY_HOST_CONFIGURATION, max);
     client.getHttpConnectionManager().getParams().setParameter(
       HttpConnectionManagerParams.MAX_HOST_CONNECTIONS, m);
+    return this;
   }
   
   /**
@@ -590,9 +596,10 @@
   /**
    * Return the maximum number of connections allowed for the client
    */
-  public void setMaxConnectionsTotal(int max) {
+  public AbderaClient setMaxConnectionsTotal(int max) {
     client.getHttpConnectionManager().getParams().setIntParameter(
       HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS, max);
+    return this;
   }
   
   /**
@@ -607,26 +614,28 @@
   /**
    * Configure the client to use the specified proxy
    */
-  public void setProxy(
+  public AbderaClient setProxy(
     String host, 
     int port) {
       client.getHostConfiguration().setProxy(host, port);
+      return this;
   }
   
   /**
    * Specify the auth credentials for the proxy server
    */
-  public void setProxyCredentials(
+  public AbderaClient setProxyCredentials(
       String host,
       int port,
       Credentials credentials) {
     setProxyCredentials(host,port,null,null,credentials);
+    return this;
   }
   
   /**
    * Specify the auth credentials for the proxy server
    */
-  public void setProxyCredentials(
+  public AbderaClient setProxyCredentials(
     String host,
     int port,
     String realm,
@@ -642,23 +651,25 @@
           scheme != null ? scheme : AuthScope.ANY_SCHEME);
       client.getState().setProxyCredentials(
         scope, credentials);
+      return this;
   }
   
   /**
    * Manually add cookies
    */
-  public void addCookie(
+  public AbderaClient addCookie(
     String domain, 
     String name, 
     String value) {
       Cookie cookie = new Cookie(domain,name,value);
       client.getState().addCookie(cookie);
+      return this;
   }
   
   /**
    * Manually add cookies
    */
-  public void addCookie(
+  public AbderaClient addCookie(
     String domain, 
     String name, 
     String value, 
@@ -667,12 +678,13 @@
     boolean secure) {
       Cookie cookie = new Cookie(domain,name,value,path,expires,secure);
       client.getState().addCookie(cookie);
+      return this;
   }  
 
   /**
    * Manually add cookies
    */
-  public void addCookie(
+  public AbderaClient addCookie(
     String domain, 
     String name, 
     String value, 
@@ -681,20 +693,23 @@
     boolean secure) {
       Cookie cookie = new Cookie(domain,name,value,path,maxAge,secure);
       client.getState().addCookie(cookie);
+      return this;
   }  
 
   /**
    * Manually add cookies
    */
-  public void addCookies(Cookie cookie) {
+  public AbderaClient addCookies(Cookie cookie) {
     client.getState().addCookie(cookie);
+    return this;
   }
   
   /**
    * Manually add cookies
    */
-  public void addCookies(Cookie... cookies) {
+  public AbderaClient addCookies(Cookie... cookies) {
     client.getState().addCookies(cookies);
+    return this;
   }
   
   /**
@@ -731,7 +746,26 @@
   /**
    * Clear the cookies
    */
-  public void clearCookies() {
+  public AbderaClient clearCookies() {
     client.getState().clearCookies();
+    return this;
+  }
+  
+  public AbderaClient setConnectionTimeout(long timeout) {
+    client.getParams().setConnectionManagerTimeout(timeout);
+    return this;
+  }
+  
+  public AbderaClient setSocketTimeout(int timeout) {
+    client.getParams().setSoTimeout(timeout);
+    return this;
+  }
+  
+  public long getConnectionTimeout() {
+    return client.getParams().getConnectionManagerTimeout();
+  }
+  
+  public int getSocketTimeout() {
+    return client.getParams().getSoTimeout();
   }
 }

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java (original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java Tue Dec  4 15:23:33 2007
@@ -112,46 +112,47 @@
   /**
    * True if the local client cache should be used
    */
-  public void setUseLocalCache(boolean use_cache) {
+  public RequestOptions setUseLocalCache(boolean use_cache) {
     this.noLocalCache = !use_cache;
+    return this;
   }
   
   /**
    * Set the value of the HTTP Content-Type header
    */
-  public void setContentType(String value) {
-    setHeader("Content-Type", value);
+  public RequestOptions setContentType(String value) {
+    return setHeader("Content-Type", value);
   }
   
-  public void setContentLocation(String iri) {
-    setHeader("Content-Location", iri);
+  public RequestOptions setContentLocation(String iri) {
+    return setHeader("Content-Location", iri);
   }
   
   /**
    * Set the value of the HTTP Content-Type header
    */
-  public void setContentType(MimeType value) {
-    setHeader("Content-Type", value.toString());
+  public RequestOptions setContentType(MimeType value) {
+    return setHeader("Content-Type", value.toString());
   }
   
   /**
    * Set the value of the HTTP Authorization header
    */
-  public void setAuthorization(String auth) {
-    setHeader("Authorization", auth);
+  public RequestOptions setAuthorization(String auth) {
+    return setHeader("Authorization", auth);
   }
   
   /**
    * Set the value of a header using proper encoding of non-ascii characters
    */
-  public void setEncodedHeader(String header, String charset, String value) {
-    setHeader(header, EncodingUtil.encode(value,charset));
+  public RequestOptions setEncodedHeader(String header, String charset, String value) {
+    return setHeader(header, EncodingUtil.encode(value,charset));
   }
   
   /**
    * Set the values of a header using proper encoding of non-ascii characters
    */
-  public void setEncodedHeader(String header, String charset, String... values) {
+  public RequestOptions setEncodedHeader(String header, String charset, String... values) {
     if (values != null && values.length > 0) {
       for (int n = 0; n < values.length; n++) {
         values[n] = EncodingUtil.encode(values[n], charset);
@@ -160,36 +161,36 @@
     } else {
       removeHeaders(header);
     }
+    return this;
   }
   
   /**
    * Set the value of the specified HTTP header
    */
-  public void setHeader(String header, String value) {
-    if (value != null)
-      setHeader(header, new String[] {value});
-    else
+  public RequestOptions setHeader(String header, String value) {
+    return value != null ?
+      setHeader(header, new String[] {value}) :
       removeHeaders(header);
   }
 
   /**
    * Set the value of the specified HTTP header
    */
-  public void setHeader(String header, String... values) {
+  public RequestOptions setHeader(String header, String... values) {
     if (values != null && values.length > 0) {
       getHeaders().put(header, new String[] {combine(values)});
     } else {
       removeHeaders(header);
     }
+    return this;
   }
   
   /**
    * Set the date value of the specified HTTP header
    */
-  public void setDateHeader(String header, Date value) {
-    if (value != null) 
-      setHeader(header, DateUtil.formatDate(value));
-    else 
+  public RequestOptions setDateHeader(String header, Date value) {
+    return value != null ?
+      setHeader(header, DateUtil.formatDate(value)) :
       removeHeaders(header);
   }
   
@@ -197,16 +198,16 @@
    * Similar to setEncodedHeader, but allows for multiple instances of the
    * specified header
    */
-  public void addEncodedHeader(String header, String charset, String value) {
-    addHeader(header, EncodingUtil.encode(value, charset));
+  public RequestOptions addEncodedHeader(String header, String charset, String value) {
+    return addHeader(header, EncodingUtil.encode(value, charset));
   }
   
   /**
    * Similar to setEncodedHeader, but allows for multiple instances of the
    * specified header
    */
-  public void addEncodedHeader(String header, String charset, String... values) {
-    if (values == null || values.length == 0) return;
+  public RequestOptions addEncodedHeader(String header, String charset, String... values) {
+    if (values == null || values.length == 0) return this;
     for (int n = 0; n < values.length; n++) {
       values[n] = EncodingUtil.encode(values[n], charset);
     }
@@ -218,21 +219,23 @@
     } else {
       setHeader(header, new String[] {value});
     }
+    return this;
   }
   
   /**
    * Similar to setHeader but allows for multiple instances of the specified header
    */
-  public void addHeader(String header, String value) {
+  public RequestOptions addHeader(String header, String value) {
     if (value != null)
       addHeader(header, new String[] {value});
+    return this;
   }
   
   /**
    * Similar to setHeader but allows for multiple instances of the specified header
    */
-  public void addHeader(String header, String... values) {
-    if (values == null || values.length == 0) return;
+  public RequestOptions addHeader(String header, String... values) {
+    if (values == null || values.length == 0) return this;
     List<String> list = Arrays.asList(getHeaders().get(header));
     String value = combine(values);
     if (list != null) {
@@ -241,14 +244,15 @@
     } else {
       setHeader(header, new String[] {value});
     }
+    return this;
   }
 
   /**
    * Similar to setDateHeader but allows for multiple instances of the specified header
    */
-  public void addDateHeader(String header, Date value) {
-    if (value == null) return;
-    addHeader(header, DateUtil.formatDate(value));
+  public RequestOptions addDateHeader(String header, Date value) {
+    if (value == null) return this;
+    return addHeader(header, DateUtil.formatDate(value));
   }
   
   /**
@@ -289,152 +293,154 @@
   /**
    * Sets the value of the HTTP If-Match header
    */
-  public void setIfMatch(String entity_tag) {
-    setIfMatch(new EntityTag(entity_tag));
+  public RequestOptions setIfMatch(String entity_tag) {
+    return setIfMatch(new EntityTag(entity_tag));
   }
   
   /**
    * Sets the value of the HTTP If-Match header
    */
-  public void setIfMatch(EntityTag entity_tag) {
-    setHeader("If-Match", entity_tag.toString());
+  public RequestOptions setIfMatch(EntityTag entity_tag) {
+    return setHeader("If-Match", entity_tag.toString());
   }
   
   /**
    * Sets the value of the HTTP If-Match header
    */
-  public void setIfMatch(EntityTag... entity_tags) {
-    setHeader("If-Match", EntityTag.toString(entity_tags));
+  public RequestOptions setIfMatch(EntityTag... entity_tags) {
+    return setHeader("If-Match", EntityTag.toString(entity_tags));
   }
   
   /**
    * Sets the value of the HTTP If-Match header
    */
-  public void setIfMatch(String... entity_tags) {
-    setHeader("If-Match", EntityTag.toString(entity_tags));
+  public RequestOptions setIfMatch(String... entity_tags) {
+    return setHeader("If-Match", EntityTag.toString(entity_tags));
   }
   
   /**
    * Sets the value of the HTTP If-None-Match header
    */
-  public void setIfNoneMatch(String entity_tag) {
-    setIfNoneMatch(new EntityTag(entity_tag));
+  public RequestOptions setIfNoneMatch(String entity_tag) {
+    return setIfNoneMatch(new EntityTag(entity_tag));
   }
   
   /**
    * Sets the value of the HTTP If-None-Match header
    */
-  public void setIfNoneMatch(EntityTag entity_tag) {
-    setHeader("If-None-Match", entity_tag.toString());
+  public RequestOptions setIfNoneMatch(EntityTag entity_tag) {
+    return setHeader("If-None-Match", entity_tag.toString());
   }
   
   /**
    * Sets the value of the HTTP If-None-Match header
    */
-  public void setIfNoneMatch(EntityTag... entity_tags) {
-    setHeader("If-None-Match", EntityTag.toString(entity_tags));
+  public RequestOptions setIfNoneMatch(EntityTag... entity_tags) {
+    return setHeader("If-None-Match", EntityTag.toString(entity_tags));
   }
   
   /**
    * Sets the value of the HTTP If-None-Match header
    */
-  public void setIfNoneMatch(String... entity_tags) {
-    setHeader("If-None-Match", EntityTag.toString(entity_tags));
+  public RequestOptions setIfNoneMatch(String... entity_tags) {
+    return setHeader("If-None-Match", EntityTag.toString(entity_tags));
   }
   
   /**
    * Sets the value of the HTTP If-Modified-Since header
    */
-  public void setIfModifiedSince(Date date) {
-    setDateHeader("If-Modified-Since", date);
+  public RequestOptions setIfModifiedSince(Date date) {
+    return setDateHeader("If-Modified-Since", date);
   }
   
   /**
    * Sets the value of the HTTP If-Unmodified-Since header
    */
-  public void setIfUnmodifiedSince(Date date) {
-    setDateHeader("If-Unmodified-Since", date);
+  public RequestOptions setIfUnmodifiedSince(Date date) {
+    return setDateHeader("If-Unmodified-Since", date);
   }
   
   /**
    * Sets the value of the HTTP Accept header
    */
-  public void setAccept(String accept) {
-    setAccept(new String[] {accept});
+  public RequestOptions setAccept(String accept) {
+    return setAccept(new String[] {accept});
   }
   
   /**
    * Sets the value of the HTTP Accept header
    */
-  public void setAccept(String... accept) {
-    setHeader("Accept", combine(accept));
+  public RequestOptions setAccept(String... accept) {
+    return setHeader("Accept", combine(accept));
   }
   
   /**
    * Sets the value of the HTTP Accept-Language header
    */
-  public void setAcceptLanguage(String accept) {
-    setAcceptLanguage(new String[] {accept});
+  public RequestOptions setAcceptLanguage(String accept) {
+    return setAcceptLanguage(new String[] {accept});
   }
   
   /**
    * Sets the value of the HTTP Accept-Language header
    */
-  public void setAcceptLanguage(String... accept) {
-    setHeader("Accept-Language", combine(accept));
+  public RequestOptions setAcceptLanguage(String... accept) {
+    return setHeader("Accept-Language", combine(accept));
   }
   
   /**
    * Sets the value of the HTTP Accept-Charset header
    */
-  public void setAcceptCharset(String accept) {
-    setAcceptCharset(new String[] {accept});
+  public RequestOptions setAcceptCharset(String accept) {
+    return setAcceptCharset(new String[] {accept});
   }
   
   /**
    * Sets the value of the HTTP Accept-Charset header
    */
-  public void setAcceptCharset(String... accept) {
-    setHeader("Accept-Charset", combine(accept));
+  public RequestOptions setAcceptCharset(String... accept) {
+    return setHeader("Accept-Charset", combine(accept));
   }
   
   /**
    * Sets the value of the HTTP Accept-Encoding header
    */
-  public void setAcceptEncoding(String accept) {
-    setAcceptEncoding(new String[] {accept});
+  public RequestOptions setAcceptEncoding(String accept) {
+    return setAcceptEncoding(new String[] {accept});
   }
   
   /**
    * Sets the value of the HTTP Accept-Encoding header
    */
-  public void setAcceptEncoding(String... accept) {
-    setHeader("Accept-Encoding", combine(accept));
+  public RequestOptions setAcceptEncoding(String... accept) {
+    return setHeader("Accept-Encoding", combine(accept));
   }
   
   /**
    * Sets the value of the Atom Publishing Protocol Slug header
    */
-  public void setSlug(String slug) {
+  public RequestOptions setSlug(String slug) {
     if (slug.indexOf((char)10) > -1 ||
         slug.indexOf((char)13) > -1)
       throw new IllegalArgumentException(
         Messages.get("SLUG.BAD.CHARACTERS"));
-    setHeader("Slug", Escaping.encode(slug,Profile.ASCIISANSCRLF));
+    return setHeader("Slug", Escaping.encode(slug,Profile.ASCIISANSCRLF));
   }
   
   /**
    * Sets the value of the HTTP Cache-Control header
    */
-  public void setCacheControl(String cc) {
+  public RequestOptions setCacheControl(String cc) {
     CacheControlUtil.parseCacheControl(cc, this);
+    return this;
   }
   
   /**
    * Remove the specified HTTP header
    */
-  public void removeHeaders(String name) {
+  public RequestOptions removeHeaders(String name) {
     getHeaders().remove(name);
+    return this;
   }
  
   /**
@@ -454,8 +460,9 @@
   /**
    * Configure the AbderaClient Side cache to revalidate when using Authorization
    */
-  public void setRevalidateWithAuth(boolean revalidateAuth) {
+  public RequestOptions setRevalidateWithAuth(boolean revalidateAuth) {
     this.revalidateAuth= revalidateAuth;
+    return this;
   }
   
   /**
@@ -468,15 +475,17 @@
   /**
    * Set whether the request should use chunked encoding.
    */
-  public void setUseChunked(boolean useChunked) {
+  public RequestOptions setUseChunked(boolean useChunked) {
     this.useChunked = useChunked;
+    return this;
   }
 
   /**
    * Set whether the request should use the X-HTTP-Method-Override option
    */
-  public void setUsePostOverride(boolean useOverride) {
+  public RequestOptions setUsePostOverride(boolean useOverride) {
     this.usePostOverride = useOverride;
+    return this;
   }
   
   /**
@@ -489,8 +498,9 @@
   /**
    * Set whether or not to throw a RequestExeption on 4xx responses
    */
-  public void set4xxRequestException(boolean v) {
+  public RequestOptions set4xxRequestException(boolean v) {
     this.requestException4xx = v;
+    return this;
   }
   
   /**
@@ -503,8 +513,9 @@
   /**
    * Set whether or not to throw a RequestExeption on 5xx responses
    */
-  public void set5xxRequestException(boolean v) {
+  public RequestOptions set5xxRequestException(boolean v) {
     this.requestException5xx = v;
+    return this;
   }
   
   /**
@@ -518,8 +529,9 @@
    * Set whether or not to use the HTTP Expect-Continue mechanism
    * (enabled by default)
    */
-  public void setUseExpectContinue(boolean useExpect) {
+  public RequestOptions setUseExpectContinue(boolean useExpect) {
     this.useExpectContinue = useExpect;
+    return this;
   }
   
   /**
@@ -543,7 +555,8 @@
    * This only has an effect when putting a Document that has an
    * ETag or Last-Modified date present
    */
-  public void setConditionalPut(boolean conditional) {
+  public RequestOptions setConditionalPut(boolean conditional) {
     this.useConditional = conditional;
+    return this;
   }
 }

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssCategory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssCategory.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssCategory.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssCategory.java Tue Dec  4 15:23:33 2007
@@ -25,6 +25,7 @@
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Category;
 import org.apache.abdera.model.Element;
+import org.apache.abdera.model.ExtensibleElement;
 import org.apache.abdera.model.ExtensibleElementWrapper;
 
 public class RssCategory 
@@ -52,19 +53,19 @@
     return getText();
   }
 
-  public void setLabel(String label) {
+  public Category setLabel(String label) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setScheme(String scheme) {
+  public Category setScheme(String scheme) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setTerm(String term) {
+  public Category setTerm(String term) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addExtension(Element extension) {
+  public <T extends ExtensibleElement>T addExtension(Element extension) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java Tue Dec  4 15:23:33 2007
@@ -528,7 +528,7 @@
     return lang;
   }
 
-  public void setLanguage(String language) {  
+  public <T extends Element>T setLanguage(String language) {  
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java Tue Dec  4 15:23:33 2007
@@ -71,31 +71,31 @@
     return getText();
   }
 
-  public void setContentType(Type type) {
+  public Content setContentType(Type type) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setDataHandler(DataHandler dataHandler) {
+  public Content setDataHandler(DataHandler dataHandler) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setMimeType(String type){
+  public Content setMimeType(String type){
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setSrc(String src) {
+  public Content setSrc(String src) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setValue(String value) {
+  public Content setValue(String value) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public <T extends Element> void setValueElement(T value) {
+  public <T extends Element> Content setValueElement(T value) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setWrappedValue(String wrappedValue) {
+  public Content setWrappedValue(String wrappedValue) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssDateTime.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssDateTime.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssDateTime.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssDateTime.java Tue Dec  4 15:23:33 2007
@@ -79,27 +79,27 @@
   }
 
   @Override
-  public void setCalendar(Calendar date) {
+  public DateTime setCalendar(Calendar date) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
   @Override
-  public void setDate(Date date) {
+  public DateTime setDate(Date date) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
   @Override
-  public void setString(String date) {
+  public DateTime setString(String date) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
   @Override
-  public void setTime(long date) {
+  public DateTime setTime(long date) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
   @Override
-  public void setValue(AtomDate dateTime) {
+  public DateTime setValue(AtomDate dateTime) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java Tue Dec  4 15:23:33 2007
@@ -25,6 +25,7 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Element;
+import org.apache.abdera.model.ExtensibleElement;
 import org.apache.abdera.model.ExtensibleElementWrapper;
 import org.apache.abdera.model.Link;
 
@@ -75,31 +76,31 @@
     return null;
   }
 
-  public void setHref(String href) {
+  public Link setHref(String href) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setHrefLang(String lang) {
+  public Link setHrefLang(String lang) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setLength(long length) {
+  public Link setLength(long length) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setMimeType(String type) {
+  public Link setMimeType(String type) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setRel(String rel) {
+  public Link setRel(String rel) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setTitle(String title) {
+  public Link setTitle(String title) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addExtension(Element extension) {
+  public <T extends ExtensibleElement>T addExtension(Element extension) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java Tue Dec  4 15:23:33 2007
@@ -31,6 +31,7 @@
 import org.apache.abdera.model.Div;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Entry;
+import org.apache.abdera.model.ExtensibleElement;
 import org.apache.abdera.model.ExtensibleElementWrapper;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Generator;
@@ -60,8 +61,9 @@
     return c;
   }
 
-  public void addEntry(Entry entry) {
+  public Feed addEntry(Entry entry) {
     getChannel().addEntry(entry);
+    return this;
   }
 
   public Entry addEntry() {
@@ -80,28 +82,33 @@
     return getChannel().getEntry(id);
   }
 
-  public void insertEntry(Entry entry) {
+  public Feed insertEntry(Entry entry) {
     getChannel().insertEntry(entry);
+    return this;
   }
 
   public Entry insertEntry() {
     return getChannel().insertEntry();
   }
 
-  public void sortEntries(Comparator<Entry> comparator) {
+  public Feed sortEntries(Comparator<Entry> comparator) {
     getChannel().sortEntries(comparator);
+    return this;
   }
 
-  public void sortEntriesByEdited(boolean new_first) {
+  public Feed sortEntriesByEdited(boolean new_first) {
     getChannel().sortEntriesByEdited(new_first);
+    return this;
   }
 
-  public void sortEntriesByUpdated(boolean new_first) {
+  public Feed sortEntriesByUpdated(boolean new_first) {
     getChannel().sortEntriesByUpdated(new_first);
+    return this;
   }
 
-  public void addAuthor(Person person) {
+  public <T extends Source>T addAuthor(Person person) {
     getChannel().addAuthor(person);
+    return (T)this;
   }
 
   public Person addAuthor(String name) {
@@ -112,8 +119,9 @@
     return getChannel().addAuthor(name,email,iri);
   }
 
-  public void addCategory(Category category) {
+  public <T extends Source>T addCategory(Category category) {
     getChannel().addCategory(category);
+    return (T)this;
   }
 
   public Category addCategory(String term) {
@@ -124,7 +132,7 @@
     return getChannel().addCategory(scheme, term, label);
   }
 
-  public void addContributor(Person person) {
+  public <T extends Source>T addContributor(Person person) {
     throw new UnsupportedOperationException("Contributor's are not supported");
   }
 
@@ -136,8 +144,9 @@
     throw new UnsupportedOperationException("Contributor's are not supported");
   }
 
-  public void addLink(Link link) {
+  public <T extends Source>T addLink(Link link) {
     getChannel().addLink(link);
+    return (T)this;
   }
 
   public Link addLink(String href) {
@@ -314,12 +323,13 @@
     return getChannel().newId();
   }
 
-  public void setCollection(Collection collection) {
+  public <T extends Source>T setCollection(Collection collection) {
     throw new UnsupportedOperationException("Collection is not supported");
   }
 
-  public void setGenerator(Generator generator) {
+  public <T extends Source>T setGenerator(Generator generator) {
     getChannel().setGenerator(generator);
+    return (T)this;
   }
 
   public Generator setGenerator(String iri, String version, String value) {
@@ -330,8 +340,9 @@
     return getChannel().setIcon(iri);
   }
 
-  public void setIconElement(IRIElement iri) {
+  public <T extends Source>T setIconElement(IRIElement iri) {
     getChannel().setIconElement(iri);
+    return (T)this;
   }
 
   public IRIElement setId(String id) {
@@ -342,16 +353,18 @@
     return getChannel().setId(id,normalize);
   }
 
-  public void setIdElement(IRIElement id) {
+  public <T extends Source>T setIdElement(IRIElement id) {
     getChannel().setIdElement(id);
+    return (T)this;
   }
 
   public IRIElement setLogo(String iri) {
     return getChannel().setLogo(iri);
   }
 
-  public void setLogoElement(IRIElement iri) {
+  public <T extends Source>T setLogoElement(IRIElement iri) {
     getChannel().setLogoElement(iri);
+    return (T)this;
   }
 
   public Text setRights(String value) {
@@ -374,8 +387,9 @@
     return getChannel().setRightsAsXhtml(value);
   }
 
-  public void setRightsElement(Text text) {
+  public <T extends Source>T setRightsElement(Text text) {
     getChannel().setRightsElement(text);
+    return (T)this;
   }
 
   public Text setSubtitle(String value) {
@@ -398,8 +412,9 @@
     return getChannel().setSubtitleAsXhtml(value);
   }
 
-  public void setSubtitleElement(Text text) {
+  public <T extends Source>T setSubtitleElement(Text text) {
     getChannel().setSubtitleElement(text);
+    return (T)this;
   }
 
   public Text setTitle(String value) {
@@ -422,8 +437,9 @@
     return getChannel().setTitleAsXhtml(value);
   }
 
-  public void setTitleElement(Text text) {
+  public <T extends Source>T setTitleElement(Text text) {
     getChannel().setTitleElement(text);
+    return (T)this;
   }
 
   public DateTime setUpdated(Date value) {
@@ -434,12 +450,14 @@
     return getChannel().setUpdated(value);
   }
 
-  public void setUpdatedElement(DateTime dateTime) {
+  public <T extends Source>T setUpdatedElement(DateTime dateTime) {
     getChannel().setUpdatedElement(dateTime);
+    return (T)this;
   }
 
-  public void addExtension(Element extension) {
+  public <T extends ExtensibleElement>T addExtension(Element extension) {
     getChannel().addExtension(extension);
+    return (T)this;
   }
 
   public <T extends Element> T addExtension(QName qname) {
@@ -509,28 +527,34 @@
     return getChannel().getLanguage();
   }
 
-  public void removeAttribute(QName qname) {
+  public <T extends Element>T removeAttribute(QName qname) {
     getChannel().removeAttribute(qname);
+    return (T)this;
   }
 
-  public void setAttributeValue(String name, String value) {
+  public <T extends Element>T setAttributeValue(String name, String value) {
     getChannel().setAttributeValue(name, value);
+    return (T)this;
   }
 
-  public void setAttributeValue(QName qname, String value) {
+  public <T extends Element>T setAttributeValue(QName qname, String value) {
     getChannel().setAttributeValue(qname, value);
+    return (T)this;
   }
 
-  public void setBaseUri(IRI base) {
+  public <T extends Element>T setBaseUri(IRI base) {
     //throw new UnsupportedOperationException("Setting the base uri with xml:base is not supported");
+    return (T)this;
   }
 
-  public void setBaseUri(String base) {
+  public <T extends Element>T setBaseUri(String base) {
     //throw new UnsupportedOperationException("Setting the base uri with xml:base is not supported");
+    return (T)this;
   }
 
-  public void setLanguage(String language) {
+  public <T extends Element>T setLanguage(String language) {
     getChannel().setLanguage(language);
+    return (T)this;
   }
 
   public String getVersion() {

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGenerator.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGenerator.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGenerator.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGenerator.java Tue Dec  4 15:23:33 2007
@@ -49,11 +49,11 @@
     return null;
   }
 
-  public void setUri(String uri) {
+  public Generator setUri(String uri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setVersion(String version) {
+  public Generator setVersion(String version) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java Tue Dec  4 15:23:33 2007
@@ -25,6 +25,7 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Element;
+import org.apache.abdera.model.ExtensibleElement;
 import org.apache.abdera.model.ExtensibleElementWrapper;
 import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.model.Link;
@@ -50,11 +51,11 @@
     return (t != null) ? new IRI(t) : null;
   }
 
-  public void setNormalizedValue(String iri) {
+  public IRIElement setNormalizedValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setValue(String iri) {
+  public IRIElement setValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
   
@@ -93,31 +94,31 @@
     return null;
   }
 
-  public void setHref(String href) {
+  public Link setHref(String href) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setHrefLang(String lang) {
+  public Link setHrefLang(String lang) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setLength(long length) {
+  public Link setLength(long length) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setMimeType(String type) {
+  public Link setMimeType(String type) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setRel(String rel) {
+  public Link setRel(String rel) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setTitle(String title) {
+  public Link setTitle(String title) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addExtension(Element extension) {
+  public <T extends ExtensibleElement>T addExtension(Element extension) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssImage.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssImage.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssImage.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssImage.java Tue Dec  4 15:23:33 2007
@@ -55,11 +55,11 @@
     return (iri != null) ? iri.getValue() : null;
   }
 
-  public void setNormalizedValue(String iri) {
+  public IRIElement setNormalizedValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setValue(String iri) {
+  public IRIElement setValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java Tue Dec  4 15:23:33 2007
@@ -59,7 +59,7 @@
     super(factory, qname);
   }
 
-  public void addAuthor(Person person) {
+  public Entry addAuthor(Person person) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -71,7 +71,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addCategory(Category category) {
+  public Entry addCategory(Category category) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -83,7 +83,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addContributor(Person person) {
+  public Entry addContributor(Person person) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -95,7 +95,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addLink(Link link) {
+  public Entry addLink(Link link) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -451,15 +451,15 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setContentElement(Content content) {
+  public Entry setContentElement(Content content) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setControl(Control control) {
+  public Entry setControl(Control control) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setDraft(boolean draft) {
+  public Entry setDraft(boolean draft) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -483,7 +483,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setIdElement(IRIElement id) {
+  public Entry setIdElement(IRIElement id) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -495,7 +495,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setPublishedElement(DateTime dateTime) {
+  public Entry setPublishedElement(DateTime dateTime) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -519,11 +519,11 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setRightsElement(Text text) {
+  public Entry setRightsElement(Text text) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setSource(Source source) {
+  public Entry setSource(Source source) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -547,7 +547,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setSummaryElement(Text text) {
+  public Entry setSummaryElement(Text text) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -571,7 +571,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setTitleElement(Text title) {
+  public Entry setTitleElement(Text title) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -583,7 +583,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setUpdatedElement(DateTime updated) {
+  public Entry setUpdatedElement(DateTime updated) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -601,11 +601,11 @@
     return (about != null) ? new IRI(about) : null;
   }
 
-  public void setNormalizedValue(String iri) {
+  public IRIElement setNormalizedValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setValue(String iri) {
+  public IRIElement setValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 }

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java Tue Dec  4 15:23:33 2007
@@ -74,27 +74,27 @@
     return null;
   }
 
-  public void setHref(String href) {
+  public Link setHref(String href) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setHrefLang(String lang) {
+  public Link setHrefLang(String lang) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setLength(long length) {
+  public Link setLength(long length) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setMimeType(String type) {
+  public Link setMimeType(String type) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setRel(String rel) {
+  public Link setRel(String rel) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setTitle(String title) {
+  public Link setTitle(String title) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssPerson.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssPerson.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssPerson.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssPerson.java Tue Dec  4 15:23:33 2007
@@ -97,7 +97,7 @@
   }
 
   @Override
-  public void setEmailElement(Element element) {
+  public Person setEmailElement(Element element) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -107,7 +107,7 @@
   }
 
   @Override
-  public void setNameElement(Element element) {
+  public Person setNameElement(Element element) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -117,7 +117,7 @@
   }
 
   @Override
-  public void setUriElement(IRIElement element) {
+  public Person setUriElement(IRIElement element) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java Tue Dec  4 15:23:33 2007
@@ -55,7 +55,7 @@
     self = new RssLink(factory,qname);
   }
 
-  public void addAuthor(Person person) {
+  public <T extends Source>T addAuthor(Person person) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -67,7 +67,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addCategory(Category category) {
+  public <T extends Source>T addCategory(Category category) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -79,7 +79,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addContributor(Person person) {
+  public <T extends Source>T addContributor(Person person) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -91,7 +91,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void addLink(Link link) {
+  public <T extends Source>T addLink(Link link) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -255,11 +255,11 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setCollection(Collection collection) {
+  public <T extends Source>T setCollection(Collection collection) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setGenerator(Generator generator) {
+  public <T extends Source>T setGenerator(Generator generator) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -271,7 +271,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setIconElement(IRIElement iri) {
+  public <T extends Source>T setIconElement(IRIElement iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -283,7 +283,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setIdElement(IRIElement id) {
+  public <T extends Source>T setIdElement(IRIElement id) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -291,7 +291,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setLogoElement(IRIElement iri) {
+  public <T extends Source>T setLogoElement(IRIElement iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -315,7 +315,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setRightsElement(Text text) {
+  public <T extends Source>T setRightsElement(Text text) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -339,7 +339,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setSubtitleElement(Text text) {
+  public <T extends Source>T setSubtitleElement(Text text) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -359,7 +359,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setTitleElement(Text text) {
+  public <T extends Source>T setTitleElement(Text text) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -371,7 +371,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setUpdatedElement(DateTime dateTime) {
+  public <T extends Source>T setUpdatedElement(DateTime dateTime) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssText.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssText.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssText.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssText.java Tue Dec  4 15:23:33 2007
@@ -53,19 +53,19 @@
     return getValue();
   }
 
-  public void setTextType(Type type) {
+  public Text setTextType(Type type) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setValue(String value) {
+  public Text setValue(String value) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setValueElement(Div value) {
+  public Text setValueElement(Div value) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setWrappedValue(String wrappedValue) {
+  public Text setWrappedValue(String wrappedValue) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssUriElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssUriElement.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssUriElement.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssUriElement.java Tue Dec  4 15:23:33 2007
@@ -43,11 +43,11 @@
     return new IRI(getText());
   }
 
-  public void setNormalizedValue(String iri) {
+  public IRIElement setNormalizedValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setValue(String iri) {
+  public IRIElement setValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.java Tue Dec  4 15:23:33 2007
@@ -77,9 +77,10 @@
     return false;
   }
   
-  public void addFactory(ExtensionFactory factory) {
+  public ExtensionFactoryMap addFactory(ExtensionFactory factory) {
     if (!factories.contains(factory))
       factories.add(factory);
+    return this;
   }
 
   public <T extends Base> String getMimeType(T base) {

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=601147&r1=601146&r2=601147&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 Tue Dec  4 15:23:33 2007
@@ -612,7 +612,7 @@
    * Registers an extension factory for this Factory instance only
    * @param extensionFactory An ExtensionFactory instance 
    */
-  void registerExtension(ExtensionFactory extensionFactory);
+  Factory registerExtension(ExtensionFactory extensionFactory);
     
   /**
    * Create a new Categories element. The app:categories element is introduced

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ListParseFilter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ListParseFilter.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ListParseFilter.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ListParseFilter.java Tue Dec  4 15:23:33 2007
@@ -28,7 +28,7 @@
   /**
    * Add an element QName to the parse filter
    */
-  void add(QName qname);
+  ListParseFilter add(QName qname);
 
   /**
    * Returns true if the given qname has been added to the filter
@@ -38,7 +38,7 @@
   /**
    * Adds an attribute to the parse filter
    */
-  void add(QName parent, QName attribute);
+  ListParseFilter add(QName parent, QName attribute);
 
   /**
    * Returns true if the given attribute has been added to the filter

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ParseFilter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ParseFilter.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ParseFilter.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/filter/ParseFilter.java Tue Dec  4 15:23:33 2007
@@ -64,15 +64,15 @@
   /**
    * True if the parser should ignore comments
    */
-  void setIgnoreComments(boolean ignore);
+  ParseFilter setIgnoreComments(boolean ignore);
   
   /**
    * True if the parser should ignore insignificant whitespace
    */
-  void setIgnoreWhitespace(boolean ignore);
+  ParseFilter setIgnoreWhitespace(boolean ignore);
   
   /**
    * True if the parser should ignore processing instructions
    */
-  void setIgnoreProcessingInstructions(boolean ignore);
+  ParseFilter setIgnoreProcessingInstructions(boolean ignore);
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/AtomDate.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/AtomDate.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/AtomDate.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/AtomDate.java Tue Dec  4 15:23:33 2007
@@ -122,32 +122,36 @@
    * Sets the value of the Atom date using the serialized string form
    * @param value The serialized string form of the date 
    */
-  public void setValue(String value) {
+  public AtomDate setValue(String value) {
     this.value = parse(value);
+    return this;
   }
 
   /**
    * Sets the value of the Atom date using java.util.Date
    * @param date A java.util.Date
    */
-  public void setValue(Date date) {
+  public AtomDate setValue(Date date) {
     this.value = date;
+    return this;
   }
 
   /**
    * Sets the value of the Atom date using java.util.Calendar
    * @param calendar a java.util.Calendar
    */
-  public void setValue(Calendar calendar) {
+  public AtomDate setValue(Calendar calendar) {
     this.value = calendar.getTime();
+    return this;
   }
   
   /**
    * Sets the value of the Atom date using the number of milliseconds since January 1, 1970, 00:00:00 GMT
    * @param timestamp The number of milliseconds since January 1, 1970, 00:00:00 GMT
    */
-  public void setValue(long timestamp) {
+  public AtomDate setValue(long timestamp) {
     this.value = new Date(timestamp);
+    return this;
   }
   
   /**

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Attribute.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Attribute.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Attribute.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Attribute.java Tue Dec  4 15:23:33 2007
@@ -47,7 +47,7 @@
    * 
    * @param text The attribute value
    */
-  void setText(String text);
+  Attribute setText(String text);
   
   /**
    * The Abdera Factory

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Base.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Base.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Base.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Base.java Tue Dec  4 15:23:33 2007
@@ -147,7 +147,7 @@
    * Add an XML comment to this Base
    * @param value The text value of the comment
    */
-  void addComment(String value);
+  <T extends Base>T addComment(String value);
   
   /**
    * Ensure that the underlying streams are fully parsed.
@@ -156,6 +156,6 @@
    * that the underlying stream is fully consumed, only that
    * that particular element has been completely parsed.
    */
-  void complete();
+  <T extends Base>T complete();
   
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Categories.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Categories.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Categories.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Categories.java Tue Dec  4 15:23:33 2007
@@ -47,7 +47,7 @@
    * Sets the value of the href attribute.
    * @param href The location of an Atompub Categories Document
    */
-  void setHref(String href);
+  Categories setHref(String href);
   
   /**
    * If an app:categories element is marked as fixed, then the set of atom:category
@@ -63,7 +63,7 @@
    * false, the fixed attribute will be removed from the app:categories element.
    * @param fixed True if the app:categories listing is fixed
    */
-  void setFixed(boolean fixed);
+  Categories setFixed(boolean fixed);
   
   /**
    * The app:categories element may specify a default scheme attribute for listed
@@ -76,7 +76,7 @@
    * Sets the default scheme for this listing of categories 
    * @param scheme The default scheme used for this listing of categories
    */
-  void setScheme(String scheme);
+  Categories setScheme(String scheme);
 
   /**
    * Lists the complete set of categories
@@ -110,7 +110,7 @@
    * Add an atom:category to the listing
    * @param category The atom:category to add to the listing
    */
-  void addCategory(Category category);
+  Categories addCategory(Category category);
 
   /**
    * Create and add an atom:category to the listing

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=601147&r1=601146&r2=601147&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 Tue Dec  4 15:23:33 2007
@@ -56,7 +56,7 @@
    * MUST have a "term" attribute.
    * @param term The string value of the term attribute
    */
-  void setTerm(String term);
+  Category setTerm(String term);
   
   /**
    * RFC4287: The "scheme" attribute is an IRI that identifies a 
@@ -72,7 +72,7 @@
    * attribute.
    * @param scheme The IRI of the scheme
    */
-  void setScheme(String scheme);
+  Category setScheme(String scheme);
  
   /**
    * RFC4287: The "label" attribute provides a human-readable label 
@@ -94,6 +94,6 @@
    * "label" attribute.
    * @param label The value of the human-readable label
    */
-  void setLabel(String label);
+  Category setLabel(String label);
   
 }

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=601147&r1=601146&r2=601147&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 Tue Dec  4 15:23:33 2007
@@ -100,7 +100,7 @@
    * @param href The value of href attribute
    * @throws IRISyntaxException if the href attribute is malformed 
    */
-  void setHref(String href);
+  Collection setHref(String href);
   
   /**
    * Returns the listing of media-ranges allowed for this collection
@@ -114,7 +114,7 @@
    * @param mediaRanges a listing of media-ranges 
    * @throws MimeTypeParseException 
    */
-  void setAccept(String... mediaRanges);
+  Collection setAccept(String... mediaRanges);
   
   /**
    * Returns true if the collection accepts the given media-type
@@ -138,28 +138,28 @@
    * Sets the appropriate accept element to indicate that entries are accepted
    * (equivalent to calling setAccept("application/atom+xml;type=entry");)
    */
-  void setAcceptsEntry();
+  Collection setAcceptsEntry();
   
   /**
    * Sets the collection so that nothing is accepted
    * (equivalent to calling setAccept(""); )
    */
-  void setAcceptsNothing();
+  Collection setAcceptsNothing();
   
   /**
    * Adds a new accept element to the collection
    */
-  void addAccepts(String mediaRange);
+  Collection addAccepts(String mediaRange);
   
   /**
    * Adds new accept elements to the collection
    */
-  void addAccepts(String... mediaRanges);
+  Collection addAccepts(String... mediaRanges);
   
   /**
    * Same as setAcceptsEntry except the existing accepts are not discarded
    */
-  void addAcceptsEntry();
+  Collection addAcceptsEntry();
   
   /**
    * Returns true if the collection accepts the given media-type
@@ -191,7 +191,7 @@
    * Add the app:categories element to the collection
    * @param categories The app:categories element 
    */
-  void addCategories(Categories categories);
+  Collection addCategories(Categories categories);
   
   /**
    * Add a listing of categories to the collection

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Comment.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Comment.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Comment.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Comment.java Tue Dec  4 15:23:33 2007
@@ -41,7 +41,7 @@
   /**
    * The text of this comment node
    */
-  void setText(String text);
+  Comment setText(String text);
   
   /**
    * The Abdera Factory

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=601147&r1=601146&r2=601147&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 Tue Dec  4 15:23:33 2007
@@ -139,7 +139,7 @@
    * Set the Content Type
    * @param type The Content Type
    */
-  void setContentType(Type type);
+  Content setContentType(Type type);
   
   /**
    * Return the value element or null if type="text", type="html" or type is 
@@ -154,7 +154,7 @@
    * set to type="application/xml"
    * @param value The element to set
    */
-  <T extends Element>void setValueElement(T value);
+  <T extends Element>Content setValueElement(T value);
 
   /**
    * RFC4287: On the atom:content element, the value of the "type" 
@@ -178,7 +178,7 @@
    * @param type The media type 
    * @throws MimeTypeParseException if the media type is malformed 
    */
-  void setMimeType(String type);
+  Content setMimeType(String type);
 
   /**
    * <p>RFC4287: atom:content MAY have a "src" attribute, whose value MUST 
@@ -216,7 +216,7 @@
    * @param src The IRI to use as the src attribute value for the content
    * @throws IRISyntaxException if the src value is malformed
    */
-  void setSrc(String src);
+  Content setSrc(String src);
   
   /**
    * Attempts to Base64 decode the string value of the content element.
@@ -231,7 +231,7 @@
    * @param dataHandler The DataHandler for the binary content requiring Base64 encoding 
    * @throws UnsupportedOperationException if type = text, html, xhtml, or any application/*+xml, or text/* type
    */
-  void setDataHandler(DataHandler dataHandler);
+  Content setDataHandler(DataHandler dataHandler);
   
   /**
    * Returns the string value of this atom:content element
@@ -243,7 +243,7 @@
    * Set the string value of the atom:content element
    * @param value The string value
    */
-  void setValue(String value);
+  Content setValue(String value);
   
   /**
    * Return the string value of the atom:content element with the enclosing 
@@ -256,5 +256,5 @@
    * Set the string value of the atom:content with the enclosing div tag
    * @param wrappedValue The string value with the wrapping div tag
    */
-  void setWrappedValue(String wrappedValue);
+  Content 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=601147&r1=601146&r2=601147&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 Tue Dec  4 15:23:33 2007
@@ -81,7 +81,7 @@
    * 
    * @param draft true if app:draft should be set to "yes"
    */
-  void setDraft(boolean draft);
+  Control setDraft(boolean draft);
   
   /**
    * <p>Removes the draft setting completely from the control element.</p>
@@ -92,6 +92,6 @@
    * If the "pub:draft" element is missing then the value MUST be 
    * understood to be "no".  The pub:draft element MAY be ignored.</p>
    */
-  void unsetDraft();
+  Control unsetDraft();
   
 }

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=601147&r1=601146&r2=601147&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 Tue Dec  4 15:23:33 2007
@@ -63,29 +63,29 @@
    * Sets the content value of the element
    * @param dateTime the Atom Date value
    */
-  void setValue(AtomDate dateTime);
+  DateTime setValue(AtomDate dateTime);
   
   /**
    * Sets the content value of the element
    * @param date The java.util.Date value
    */
-  void setDate(Date date);
+  DateTime setDate(Date date);
   
   /**
    * Sets the content value of the element
    * @param date The java.util.Calendar value
    */
-  void setCalendar(Calendar date);
+  DateTime setCalendar(Calendar date);
   
   /**
    * Sets the content value of the element
    * @param date the number of milliseconds since January 1, 1970, 00:00:00 GMT
    */
-  void setTime(long date);
+  DateTime setTime(long date);
   
   /**
    * Sets the content value of the element
    * @param date The serialized string value
    */
-  void setString(String date);
+  DateTime setString(String date);
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTimeWrapper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTimeWrapper.java?rev=601147&r1=601146&r2=601147&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTimeWrapper.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTimeWrapper.java Tue Dec  4 15:23:33 2007
@@ -49,36 +49,41 @@
     return value;
   }
 
-  public void setValue(AtomDate dateTime) {
+  public DateTime setValue(AtomDate dateTime) {
     if (dateTime != null)
       setText(dateTime.getValue());
     else 
       setText("");
+    return this;
   }
 
-  public void setDate(Date date) {
+  public DateTime setDate(Date date) {
     if (date != null)
       setText(AtomDate.valueOf(date).getValue());
     else 
       setText("");
+    return this;
   }
 
-  public void setCalendar(Calendar date) {
+  public DateTime setCalendar(Calendar date) {
     if (date != null)
       setText(AtomDate.valueOf(date).getValue());
     else 
       setText("");
+    return this;
   }
 
-  public void setTime(long date) {
+  public DateTime setTime(long date) {
     setText(AtomDate.valueOf(date).getValue());
+    return this;
   }
 
-  public void setString(String date) {
+  public DateTime setString(String date) {
     if (date != null)
       setText(AtomDate.valueOf(date).getValue());
     else 
       setText("");
+    return this;
   }
 
   public Date getDate() {

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=601147&r1=601146&r2=601147&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 Tue Dec  4 15:23:33 2007
@@ -45,19 +45,19 @@
    * Sets the value of the div element's id attribute
    * @param id The value of the id attribute
    */
-  void setId(String id);
+  Div setId(String id);
   
   /**
    * Set the value of the div element's title attribute
    * @param title The value of the title attribute
    */
-  void setTitle(String title);
+  Div setTitle(String title);
   
   /**
    * Sets the array of class attribute values on the div
    * @param classes A listing of class attribute values
    */
-  void setXhtmlClass(String[] classes);
+  Div setXhtmlClass(String[] classes);
   
   /**
    * Returns the value of the div element



Mime
View raw message