abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r588831 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/ core/src/main/java/org/apache/abdera/factory/ core/src/main/java/org/apache/abdera/filter/ core/src/main/java/org/apache/abdera/model/ core/src/main/java/org/a...
Date Sat, 27 Oct 2007 00:52:15 GMT
Author: jmsnell
Date: Fri Oct 26 17:52:11 2007
New Revision: 588831

URL: http://svn.apache.org/viewvc?rev=588831&view=rev
Log:
Various javadoc and api improvements. This is mainly javadoc, but includes improvements such as 
making AtomDate serializable and cloneable, and allowing the parser and writer to use ReadableByteChannel
and WritableByteChannel.

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactoryMap.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/DateTimeWrapper.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/ExtensibleElementWrapper.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/TextValue.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/util/AbderaConfiguration.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.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/AbstractWriter.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/xpath/XPath.java
    incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java Fri Oct 26 17:52:11 2007
@@ -32,7 +32,7 @@
 import org.apache.abdera.xpath.XPath;
 
 /**
- * A top level entry point for Abdera that provides access to various
+ * The top level entry point for Abdera that provides access to various
  * subcomponents.  Upon creation, this class will attempt to create 
  * singleton instances of each of the various subcomponents components.
  * These instances may be retrieved using the appropriate get___ methods.
@@ -40,7 +40,7 @@
  * new___ methods. 
  * 
  * Instances of the Abdera object, and it's direct children (Parser,
- * Factory, XPath, etc) are Thread safe.  Because of the dynamic configuration
+ * Factory, XPath, etc) are Threadsafe.  Because of the dynamic configuration
  * model Abdera uses, creating a new instance of the Abdera object can be
  * time consuming.  It is, therefore, a good idea for applications to create
  * only a single static instance of the Abdera object (see the Abdera.getInstance()
@@ -58,12 +58,10 @@
   private static Abdera instance;
   
   /**
-   * Get a static instance of the Abdera object
+   * Get a static instance of the Abdera object.
    */
   public static synchronized Abdera getInstance() {
-    if (instance == null) {
-      instance = new Abdera();
-    }
+    if (instance == null) instance = new Abdera();
     return instance;
   }
   
@@ -108,6 +106,7 @@
   /**
    * Create a new Entry instance.  This is a convenience shortcut for
    * <code>abdera.getFactory().newEntry()</code>
+   * @return A newly created entry element
    */
   public Entry newEntry() {
     return getFactory().newEntry();
@@ -116,6 +115,7 @@
   /**
    * Create a new Service instance.  This is a convenience shortcut for
    * <code>abdera.getFactory().newService()</code>
+   * @return A newly created service element
    */
   public Service newService() {
     return getFactory().newService();
@@ -124,6 +124,7 @@
   /**
    * Create a new Categories instance.  This is a convenience shortcut
    * for <code>abdera.getFactory().newCategories()</code>
+   * @return A newly created categories element
    */
   public Categories newCategories() {
     return getFactory().newCategories();
@@ -131,6 +132,8 @@
   
   /**
    * Return the Abdera Configuration used to initialize this instance
+   * 
+   * @return The Abdera configuration
    */
   public AbderaConfiguration getConfiguration() {
     return config;
@@ -138,6 +141,8 @@
   
   /**
    * Return the singleton instance of org.apache.abdera.factory.Factory
+   * 
+   * @return The factory instance
    */
   public Factory getFactory() {
     return factory;
@@ -145,6 +150,8 @@
   
   /**
    * Return the singleton instance of org.apache.abdera.parser.Parser
+   * 
+   * @return The parser instance
    */
   public Parser getParser() {
     return parser;
@@ -152,27 +159,40 @@
   
   /**
    * Return the singleton instance of org.apache.abdera.xpath.XPath
+   * 
+   * @return The XPath instance
    */
   public XPath getXPath() {
     return xpath;
   }
   
   /**
-   * Return the singleton instance of org.apache.abdera.parser.ParserFactory
+   * Return the singleton instance of org.apache.abdera.parser.ParserFactory.
+   * The Parser Factory is used to acquire alternative parser implementation
+   * instances.
+   * 
+   * @return The ParserFactory instance
    */
   public ParserFactory getParserFactory() {
     return parserFactory;
   }
   
   /**
-   * Return the singleton instance of org.apache.abdera.writer.WriterFactory
+   * Return the singleton instance of org.apache.abdera.writer.WriterFactory.
+   * The Writer Factory is used to acquire alternative writer implementation
+   * instances.
+   * 
+   * @return The WriterFactory instance
    */
   public WriterFactory getWriterFactory() {
     return writerFactory;
   }
   
   /**
-   * Return the singleton instance of org.apache.abdera.writer.Writer
+   * Return the singleton instance of the default org.apache.abdera.writer.Writer
+   * implementation.
+   * 
+   * @return The default writer implementation
    */
   public Writer getWriter() {
     return writer;
@@ -180,6 +200,8 @@
   
   /**
    * Return a new instance of org.apache.abdera.factory.Factory
+   * 
+   * @return A new factory instance
    */
   private Factory newFactory() {
     return ServiceUtil.newFactoryInstance(this);
@@ -187,6 +209,8 @@
     
   /**
    * Return a new instance of org.apache.abdera.parser.Parser
+   * 
+   * @return A new parser instance
    */
   private Parser newParser() {
     return ServiceUtil.newParserInstance(this);
@@ -194,6 +218,8 @@
     
   /**
    * Return a new instance of org.apache.abdera.xpath.XPath
+   * 
+   * @return A new XPath instance
    */
   private XPath newXPath() {
     try {
@@ -205,6 +231,8 @@
     
   /**
    * Return a new instance of org.apache.abdera.parser.ParserFactory
+   * 
+   * @return A new ParserFactory instance
    */
   private ParserFactory newParserFactory() {
     try {
@@ -216,6 +244,8 @@
     
   /**
    * Return a new instance of org.apache.abdera.writer.WriterFactory
+   * 
+   * @return A new WriterFactory instance
    */
   private WriterFactory newWriterFactory() {
     try {
@@ -226,7 +256,9 @@
   }
     
   /**
-   * Return a new instance of org.apache.abdera.writer.Writer
+   * Return a new instance of the default org.apache.abdera.writer.Writer
+   * 
+   * @return A new default writer implementation instance
    */
   private Writer newWriter() {
     try {
@@ -240,6 +272,8 @@
   
   /**
    * Return a new Factory instance using a non-shared Abdera object
+   * 
+   * @return A new factory instance
    */
   public static Factory getNewFactory() {
     return (new Abdera()).newFactory();
@@ -247,6 +281,8 @@
 
   /**
    * Return a new Parser instance using a non-shared Abdera object
+   * 
+   * @return A new parser instance
    */
   public static Parser getNewParser() {
     return (new Abdera()).newParser();
@@ -254,6 +290,8 @@
   
   /**
    * Return a new XPath instance using a non-shared Abdera object
+   * 
+   * @return A new XPath instance
    */
   public static XPath getNewXPath() {
     return (new Abdera()).newXPath();
@@ -261,6 +299,8 @@
 
   /**
    * Return a new ParserFactory instance using a non-shared Abdera object
+   * 
+   * @return A new ParserFactory instance
    */
   public static ParserFactory getNewParserFactory() {
     return (new Abdera()).newParserFactory();
@@ -268,13 +308,17 @@
   
   /**
    * Return a new WriterFactory instance using a non-shared Abdera object
+   * 
+   * @return A new WriterFactory instance
    */
   public static WriterFactory getNewWriterFactory() {
     return (new Abdera()).newWriterFactory();
   }
 
   /**
-   * Return a new instance of the default Writer using a non-shared Abdera object 
+   * Return a new instance of the default Writer using a non-shared Abdera object
+   * 
+   *  @return A new default writer implementation instance
    */
   public static Writer getNewWriter() {
     return (new Abdera()).newWriter();

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/ExtensionFactory.java Fri Oct 26 17:52:11 2007
@@ -37,16 +37,20 @@
  * 
  * <p>
  *   Registering an Extension Factory requires generally nothing more than 
- *   implementing ExtensionFactory and then creating the file 
+ *   implementing ExtensionFactory and then creating a file called 
  *   META-INF/services/org.apache.abdera.factory.ExtensionFactory and listing
  *   the class names of each ExtensionFactory you wish to register.
  * </p>
- * 
+ *
+ * <p>ExtensionFactory implementations are assumed to be threadsafe</p>
  */
 public interface ExtensionFactory {
 
   /**
    * Returns true if this extension factory handles the specified namespace
+   * 
+   * @param namespace The XML namespace of the extension
+   * @return True if the namespace is supported by the ExtensionFactory
    */
   boolean handlesNamespace(String namespace);
 
@@ -58,13 +62,21 @@
   String[] getNamespaces();
 
   /**
-   * Retrieve an ElementWrapper for the specified Element or return
-   * the parameter itself if a wrapper could not be retrieved
+   * Abdera's support for static extensions is based on a simple delegation
+   * model.  Static extension interfaces wrap the dynamic extension
+   * API. ExtensionFactory's are handed the internal dynamic element 
+   * instance and are expected to hand back an object wrapper.  
+   * 
+   * @param internal The Abdera element that needs to be wrapped
+   * @return The wrapper element
    */
   <T extends  Element>T getElementWrapper(Element internal);
   
   /**
    * Retrieve the mime type for the element
+   * 
+   * @param base An Abdera object
+   * @return A MIME media type for the object
    */
   <T extends Base>String getMimeType(T base);
 }

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -27,6 +27,11 @@
 import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Element;
 
+/**
+ * A utility implementation of ExtensionFactory used internally by Abdera.
+ * It maintains the collection ExtensionFactory instances discovered on 
+ * the classpath and a cache of Internal-Wrapper mappings.
+ */
 public class ExtensionFactoryMap 
   implements ExtensionFactory {
 

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -19,6 +19,9 @@
 
 import javax.xml.namespace.QName;
 
+/**
+ * A ParseFilter that is based on an internal collection of QName's.
+ */
 public interface ListParseFilter 
   extends ParseFilter {
 

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -17,6 +17,8 @@
 */
 package org.apache.abdera.filter;
 
+import java.io.Serializable;
+
 import javax.xml.namespace.QName;
 
 /**
@@ -24,8 +26,13 @@
  * within a parsed document.  They are set via the ParserOptions.setParseFilter
  * method.
  */
-public interface ParseFilter extends Cloneable {
+public interface ParseFilter 
+  extends Cloneable, 
+          Serializable {
   
+  /**
+   * Clone this ParseFilter
+   */
   Object clone() throws CloneNotSupportedException;
 
   /**

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -17,6 +17,7 @@
 */
 package org.apache.abdera.model;
 
+import java.io.Serializable;
 import java.text.ParsePosition;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
@@ -64,15 +65,24 @@
  *  </pre>
  *  
  */
-public final class AtomDate {
+public final class AtomDate
+  implements Cloneable, 
+             Serializable {
+
+  private static final long serialVersionUID = -7062139688635877771L;
 
   private Date value = null;
   
-  public AtomDate() {}
+  /**
+   * Create an AtomDate using the current date and time
+   */
+  public AtomDate() {
+    this(new Date());
+  }
   
   /**
    * Create an AtomDate using the serialized string format (e.g. 2003-12-13T18:30:02Z).
-   * @param value The serialized date/time value
+   * @param value The serialized RFC3339 date/time value
    */
   public AtomDate(String value) { 
     this(parse(value));
@@ -173,6 +183,13 @@
     return getValue();
   }
   
+  @Override public int hashCode() {
+    final int prime = 31;
+    int result = 1;
+    result = prime * result + ((value == null) ? 0 : value.hashCode());
+    return result;
+  }
+
   @Override
   public boolean equals(Object obj) {
     boolean answer = false;
@@ -190,6 +207,15 @@
       answer = (this.value.equals(d));
     }
     return answer;
+  }
+  
+  @Override
+  public Object clone() {
+    try {
+      return super.clone();
+    } catch (CloneNotSupportedException e) {
+      throw new RuntimeException(e);
+    }
   }
   
   /**

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -23,22 +23,29 @@
 
 /**
  * An attribute. Returned by the Abdera XPath implementation
- * when querying for Attribute nodes
+ * when querying for Attribute nodes.
  */
 public interface Attribute {
 
   /**
-   * The QName of the attribute
+   * Get the QName of the attribute
+   * 
+   * @return The attribute QName
    */
   QName getQName();
   
   /**
-   * The text value of the attribute
+   * Return the text value of the attribute
+   * 
+   * @return The attribute value
    */
   String getText();
   
   /**
-   * The text value of the attribute
+   * Set the text value of the attribute. The value will be automatically 
+   * escaped for proper serialization to XML
+   * 
+   * @param text The attribute value
    */
   void setText(String text);
   

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -26,7 +26,7 @@
 
 /**
  * The Base interface provides the basis for the Feed Object Model API and 
- * defines the operations common to both the Element and Document APIs.
+ * defines the operations common to both the Element and Document interfaces.
  * 
  * Classes implementing Base MUST NOT be assumed to be thread safe.  Developers
  * wishing to allow multiple threads to perform concurrent modifications to a
@@ -35,39 +35,55 @@
 public interface Base 
   extends Cloneable {
 
+  /**
+   * Get the default WriterOptions for this object
+   */
   WriterOptions getDefaultWriterOptions();
   
   /**
    * Serializes the model component out to the specified stream
+   * @param out The target output stream
+   * @param options The WriterOptions to use
    */
   void writeTo(OutputStream out, WriterOptions options) throws IOException;
   
   /**
    * Serializes the model component out to the specified java.io.Writer
+   * @param out The target output writer
+   * @param options The WriterOptions to use
    */
   void writeTo(Writer out, WriterOptions options) throws IOException;
   
   /**
-   * Serializes the model component out to the specified stream using the 
-   * given abdera writer
+   * Serializes the model component out to the specified stream using the given Abdera writer
+   * @param writer The Abdera writer to use
+   * @param out The target output stream
    */
   void writeTo(org.apache.abdera.writer.Writer writer, OutputStream out) throws IOException;
   
   /**
    * Serializes the model component out to the specified java.io.Writer using the 
-   * given abdera writer
+   * given Abdera writer
+   * @param writer The Abdera writer to use
+   * @param out The target output writer
    */
   void writeTo(org.apache.abdera.writer.Writer writer, Writer out) throws IOException;
   
   /**
    * Serializes the model component out to the specified stream using the 
    * given abdera writer
+   * @param writer The Abdera writer to use
+   * @param out The target output stream
+   * @param options The WriterOptions to use
    */
   void writeTo(org.apache.abdera.writer.Writer writer, OutputStream out, WriterOptions options) throws IOException;
   
   /**
    * Serializes the model component out to the specified java.io.Writer using the 
    * given abdera writer
+   * @param writer The Abdera writer to use
+   * @param out The target output writer
+   * @param options The WriterOptions to use
    */
   void writeTo(org.apache.abdera.writer.Writer writer, Writer out, WriterOptions options) throws IOException;
   
@@ -90,7 +106,7 @@
   
   /**
    * Get the Factory used to create this Base
-   * @return The Factory used to create this Base
+   * @return The Factory used to create this object
    */
   Factory getFactory();
   

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -31,23 +31,21 @@
   extends ExtensibleElement {
 
   /**
-   * The app:categories element can have an href attribute whose value MUST 
-   * point to an APP Category Document.
+   * When contained within an app:collection element, the app:categories element 
+   * can have an href attribute whose value MUST point to an Atompub Categories Document.
    * @return The href attribute value
-   * @throws IRISyntaxException if the IRI in the underlying attribute value is malformed
    */
   IRI getHref();
   
   /**
    * Returns the value of the href attribute resolved against the in-scope Base URI
    * @return The fully resolved href attribute value
-   * @throws URISyntaxException if the IRI in the underlying attribute value is malformed
    */
   IRI getResolvedHref();
   
   /**
    * Sets the value of the href attribute.
-   * @throws URISyntaxException if the IRI specified is malformed
+   * @param href The location of an Atompub Categories Document
    */
   void setHref(String href);
   
@@ -71,14 +69,12 @@
    * The app:categories element may specify a default scheme attribute for listed
    * atom:category elements that do not have their own scheme attribute. 
    * @return The scheme IRI
-   * @throws IRISyntaxException if the IRI in the scheme attribute is malformed
    */
   IRI getScheme();
   
   /**
    * Sets the default scheme for this listing of categories 
    * @param scheme The default scheme used for this listing of categories
-   * @throws IRISyntaxException if the IRI provided is malformed
    */
   void setScheme(String scheme);
 
@@ -92,14 +88,12 @@
    * Lists the complete set of categories that use the specified scheme
    * @param scheme The IRI of an atom:category scheme
    * @return A listing of atom:category elements that use the specified scheme
-   * @throws IRISyntaxException if the scheme provided is malformed 
    */
   List<Category> getCategories(String scheme);
   
   /**
    * Returns a copy of the complete set of categories with the scheme attribute set
    * @return A listing of atom:category elements using the default scheme specified by the app:categories scheme attribute
-   * @throws IRISyntaxException if the values of the scheme attributes are malformed  
    */
   List<Category> getCategoriesWithScheme();
 
@@ -109,7 +103,6 @@
    * scheme attribute inherit the scheme attribute of the parent)
    * @param scheme A scheme IRI
    * @return A listing of atom:category elements
-   * @throws IRISyntaxException  if the scheme provided is malformed
    */
   List<Category> getCategoriesWithScheme(String scheme);
   
@@ -132,7 +125,6 @@
    * @param term The string term
    * @param label The human readable label for the category
    * @return The newly created atom:category
-   * @throws IRISyntaxException if the scheme provided is malformed
    */
   Category addCategory(String scheme, String term, String label);
     
@@ -141,7 +133,6 @@
    * specified term
    * @param term The term to look for
    * @return True if the term is found
-   * @throws IRISyntaxException if the Scheme IRI of any of the scheme attributes is malformed
    */
   boolean contains(String term);
   
@@ -151,7 +142,6 @@
    * @param term The term to look for
    * @param scheme The IRI scheme 
    * @return True if the term and scheme are found
-   * @throws IRISyntaxException if the Scheme IRI of any of the scheme attributes is malformed
    */
   boolean contains(String term, String scheme);
   
@@ -159,5 +149,6 @@
    * Returns true if the href attribute is set
    */
   boolean isOutOfLine();
+  
 }
 

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -63,7 +63,6 @@
    * categorization scheme.  Category elements MAY have a "scheme" 
    * attribute.
    * @return The IRI value of the scheme attribute
-   * @throws IRISyntaxException if the scheme IRI is malformed
    */
   IRI getScheme();
 
@@ -72,7 +71,6 @@
    * categorization scheme.  Category elements MAY have a "scheme" 
    * attribute.
    * @param scheme The IRI of the scheme
-   * @throws URISyntaxException if the scheme provided is malformed
    */
   void setScheme(String scheme);
  

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -184,7 +184,6 @@
    * Add an app:categories element that links to an external Category Document
    * @param href The IRI of the external Category Document
    * @return The newly created app:categories element
-   * @throws IRISyntaxException if the href value is malformed
    */
   Categories addCategories(String href);
   
@@ -200,7 +199,6 @@
    * @param fixed True if the listing of categories should be fixed
    * @param scheme The default IRI scheme for the categories listing
    * @return The newly created app:categories element
-   * @throws IRISyntaxException if the scheme value if malformed
    */
   Categories addCategories(List<Category> categories, boolean fixed, String scheme);
   

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -21,7 +21,10 @@
 
 /**
  * A comment. Returned by the Abdera XPath implementation when querying for
- * comment nodes (e.g. xpath.selectNodes("//comment()"); ...)
+ * comment nodes (e.g. xpath.selectNodes("//comment()"); ...).  Most applications
+ * should never have much of a reason to use this interface.  It is provided
+ * primarily to avoid application from having to deal directly with the underlying
+ * parser implementation
  */
 public interface Comment {
 

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -24,6 +24,10 @@
 
 import org.apache.abdera.factory.Factory;
 
+/**
+ * An ElementWrapper implementation that can serve as the basis for 
+ * Atom Date Construct based extensions.
+ */
 public abstract class DateTimeWrapper 
   extends ElementWrapper 
   implements DateTime {

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java Fri Oct 26 17:52:11 2007
@@ -161,8 +161,14 @@
    */
   void setSlug(String slug);
   
+  /**
+   * Return true if insignificant whitespace must be preserved
+   */
   boolean getMustPreserveWhitespace();
-  
+
+  /**
+   * Set to true to preserve insignificant whitespace
+   */
   void setMustPreserveWhitespace(boolean preserve);
   
   /**

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java Fri Oct 26 17:52:11 2007
@@ -25,13 +25,15 @@
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 import org.apache.abdera.i18n.lang.Lang;
 
 /**
  * Root interface for all elements in the Feed Object Model
  */
 public interface Element 
-  extends Base {
+  extends Base, 
+          Iterable<Element> {
   
   /**
    * Return this Element's parent element or document
@@ -222,11 +224,23 @@
    */
   void declareNS(String uri, String prefix);
   
+  /**
+   * Return a map listing the xml namespaces declared for this element
+   */
   Map<String,String> getNamespaces();
   
+  /**
+   * Return a listing of this elements child elements
+   */
   <T extends Element>List<T> getElements();
   
+  /**
+   * Return true if insignificant whitespace must be preserved
+   */
   boolean getMustPreserveWhitespace();
   
+  /**
+   * Set to true to preserve insignificant whitespace
+   */
   void setMustPreserveWhitespace(boolean preserve);
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java Fri Oct 26 17:52:11 2007
@@ -20,6 +20,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.Writer;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -32,6 +33,9 @@
 import org.apache.abdera.i18n.lang.Lang;
 import org.apache.abdera.writer.WriterOptions;
 
+/**
+ * Base implementation used for static extensions.
+ */
 public abstract class ElementWrapper 
   implements Element {
 
@@ -266,5 +270,9 @@
   
   public void complete() {
     internal.complete();
+  }
+  
+  public Iterator<Element> iterator() {
+    return internal.iterator();
   }
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElementWrapper.java Fri Oct 26 17:52:11 2007
@@ -23,6 +23,10 @@
 
 import org.apache.abdera.factory.Factory;
 
+/**
+ * ElementWrapper implementation that implements the ExtensibleElement interface.
+ * This should be used to create static extension elements that support extensions
+ */
 public abstract class ExtensibleElementWrapper 
   extends ElementWrapper 
   implements ExtensibleElement {

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/PersonWrapper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/PersonWrapper.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/PersonWrapper.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/PersonWrapper.java Fri Oct 26 17:52:11 2007
@@ -23,6 +23,10 @@
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.util.Constants;
 
+/**
+ * ElementWrapper implementation that implements the Person interface. Used to
+ * create static extensions based on the Atom Person Construct
+ */
 public abstract class PersonWrapper 
   extends ExtensibleElementWrapper
   implements Person, Constants {

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ProcessingInstruction.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ProcessingInstruction.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ProcessingInstruction.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ProcessingInstruction.java Fri Oct 26 17:52:11 2007
@@ -21,7 +21,9 @@
 
 /**
  * A processing instruction. Returned by the Abdera XPath implementation when querying for
- * PI nodes (e.g. xpath.selectNodes("//processing-instruction()"); ...)
+ * PI nodes (e.g. xpath.selectNodes("//processing-instruction()"); ...). There should
+ * be very little reason for applications to use this.  It is provided to keep applications
+ * from having to deal with the underlying parser implementation
  */
 public interface ProcessingInstruction {
 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/TextValue.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/TextValue.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/TextValue.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/TextValue.java Fri Oct 26 17:52:11 2007
@@ -23,7 +23,9 @@
 
 /**
  * A text value. Returned by the Abdera XPath implementation when querying for
- * text nodes (e.g. xpath.selectNodes("//text()"); ...)
+ * text nodes (e.g. xpath.selectNodes("//text()"); ...). There should be very
+ * little reason why an application would use this.  It is provided to keep
+ * applications from having to deal directly with the underlying parser impl
  */
 public interface TextValue {
 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/parser/Parser.java Fri Oct 26 17:52:11 2007
@@ -19,8 +19,8 @@
 
 import java.io.InputStream;
 import java.io.Reader;
+import java.nio.channels.ReadableByteChannel;
 
-import org.apache.abdera.i18n.iri.IRISyntaxException;
 import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Element;
 
@@ -44,7 +44,6 @@
    * @param base The Base URI of the document
    * @return The parsed Abdera Document
    * @throws ParseException if the parse failed
-   * @throws IRISyntaxException if the Base URI is malformed
    */
   <T extends Element>Document<T> parse(
     InputStream in, 
@@ -59,7 +58,6 @@
    * @param options The Parse options
    * @return The parsed Abdera Document
    * @throws ParseException if the parse failed
-   * @throws IRISyntaxException if the Base URI is malformed
    */
   <T extends Element>Document<T> parse(
     InputStream in, 
@@ -77,7 +75,6 @@
    * @param options The Parse Options
    * @return The parsed Abdera Document
    * @throws ParseException if the parse failed
-   * @throws IRISyntaxException if the Base URI is malformed
    */
   <T extends Element>Document<T> parse(
     InputStream in, 
@@ -90,7 +87,6 @@
    * @param in The Reader to parse
    * @return The parsed Abdera Document
    * @throws ParseException if the parse failed
-   * @throws IRISyntaxException if the Base URI is malformed
    */
   <T extends Element>Document<T> parse(
       Reader in) 
@@ -102,7 +98,6 @@
    * @param base The Base URI
    * @return The parsed Abdera Document
    * @throws ParseException if the parse failed
-   * @throws IRISyntaxException if the Base URI is malformed
    */
   <T extends Element>Document<T> parse(
     Reader in, 
@@ -115,7 +110,6 @@
    * @param options The Parse Options
    * @return The parsed Abdera Document
    * @throws ParseException if the parse failed
-   * @throws IRISyntaxException if the Base URI is malformed
    */
   <T extends Element>Document<T> parse(
     Reader in, 
@@ -133,13 +127,64 @@
    * @param options The Parse Options
    * @return The parsed Abdera Document
    * @throws ParseException if the parse failed
-   * @throws IRISyntaxException if the Base URI is malformed
    */
   <T extends Element>Document<T> parse(
     Reader in, 
     String base, 
     ParserOptions options) 
       throws ParseException;
+
+  /**
+   * Parse the channel using using the specified Parse options.  The 
+   * parse options can be used to control various aspects of the parsing
+   * process such as the character set encoding to use and whether certain
+   * elements should be ignored.  The specified Base URI is used to resolve
+   * relative references contained in the document.
+   * @param in The ReadableByteChannel to parse
+   * @return The parsed Abdera Document
+   * @throws ParseException if the parse failed
+   */
+  <T extends Element>Document<T> parse(ReadableByteChannel buf) throws ParseException;
+
+  /**
+   * Parse the channel using using the specified Parse options.  The 
+   * parse options can be used to control various aspects of the parsing
+   * process such as the character set encoding to use and whether certain
+   * elements should be ignored.  The specified Base URI is used to resolve
+   * relative references contained in the document.
+   * @param in The ReadableByteChannel to parse
+   * @param base The Base URI of the document
+   * @return The parsed Abdera Document
+   * @throws ParseException if the parse failed
+   */
+  <T extends Element>Document<T> parse(ReadableByteChannel buf, String base) throws ParseException;
+  
+  /**
+   * Parse the channel using using the specified Parse options.  The 
+   * parse options can be used to control various aspects of the parsing
+   * process such as the character set encoding to use and whether certain
+   * elements should be ignored.  The specified Base URI is used to resolve
+   * relative references contained in the document.
+   * @param in The ReadableByteChannel to parse
+   * @param base The Base URI of the document
+   * @param options The Parse Options
+   * @return The parsed Abdera Document
+   * @throws ParseException if the parse failed
+   */
+  <T extends Element>Document<T> parse(ReadableByteChannel buf, String base, ParserOptions options) throws ParseException;
+  
+  /**
+   * Parse the channel using using the specified Parse options.  The 
+   * parse options can be used to control various aspects of the parsing
+   * process such as the character set encoding to use and whether certain
+   * elements should be ignored.  The specified Base URI is used to resolve
+   * relative references contained in the document.
+   * @param in The ReadableByteChannel to parse
+   * @param options The Parse Options
+   * @return The parsed Abdera Document
+   * @throws ParseException if the parse failed
+   */
+  <T extends Element>Document<T> parse(ReadableByteChannel buf, ParserOptions options) throws ParseException;
   
   /**
    * Return the default parser options for this Parser. This method 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java Fri Oct 26 17:52:11 2007
@@ -17,6 +17,7 @@
 */
 package org.apache.abdera.util;
 
+import java.io.Serializable;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -34,8 +35,10 @@
  * class should not be accessed by applications directly without very good reason.
  */
 public final class AbderaConfiguration 
-  implements Constants, Cloneable {
+  implements Constants, Cloneable, Serializable {
   
+  private static final long serialVersionUID = 7460203853824337559L;
+
   /**
    * Returns the default configuration. Every call to this method returns
    * a new AbderaConfiguration instance using abdera.properties

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java Fri Oct 26 17:52:11 2007
@@ -38,6 +38,7 @@
  * 
  * Only use this once per transform!!!
  */
+@SuppressWarnings("unchecked")
 public final class AbderaResult 
   extends StreamResult 
   implements Result {
@@ -90,6 +91,4 @@
     throw new UnsupportedOperationException();
   }
 
-  
-  
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractParser.java Fri Oct 26 17:52:11 2007
@@ -19,6 +19,8 @@
 
 import java.io.InputStream;
 import java.io.Reader;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.factory.Factory;
@@ -101,6 +103,42 @@
     return parse(in, null, options);
   }
   
+  
+  
+  public <T extends Element> Document<T> parse(
+    ReadableByteChannel buf,
+    ParserOptions options) 
+      throws ParseException {
+    return parse(buf,null,options);
+  }
+
+  public <T extends Element> Document<T> parse(
+    ReadableByteChannel buf,
+    String base, 
+    ParserOptions options) 
+      throws ParseException {
+    String charset = options.getCharset();
+    return parse(
+      Channels.newReader(
+        buf,
+        charset!=null?
+          charset:"utf-8"),
+        base,options);
+  }
+
+  public <T extends Element> Document<T> parse(
+    ReadableByteChannel buf,
+    String base) 
+      throws ParseException {
+    return parse(buf,base,getDefaultParserOptions());
+  }
+
+  public <T extends Element> Document<T> parse(
+    ReadableByteChannel buf)
+      throws ParseException {
+    return parse(buf,null,getDefaultParserOptions());
+  }
+
   public synchronized ParserOptions getDefaultParserOptions() {
     if (options == null) options = initDefaultParserOptions();
 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractWriter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractWriter.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractWriter.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractWriter.java Fri Oct 26 17:52:11 2007
@@ -19,12 +19,17 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.channels.Channels;
+import java.nio.channels.WritableByteChannel;
 import java.util.zip.DeflaterOutputStream;
 
 import org.apache.abdera.model.Base;
+import org.apache.abdera.model.Document;
+import org.apache.abdera.model.Element;
 import org.apache.abdera.writer.Writer;
 import org.apache.abdera.writer.WriterOptions;
 
+@SuppressWarnings("unchecked")
 public abstract class AbstractWriter 
   implements Writer {
 
@@ -95,4 +100,36 @@
       ((DeflaterOutputStream)out).finish();
     }
   }
+
+  public void writeTo(
+    Base base, 
+    WritableByteChannel out, 
+    WriterOptions options)
+      throws IOException {
+    String charset = options.getCharset();
+    if (charset == null) {
+      Document doc = null;
+      if (base instanceof Document)
+        doc = (Document) base;
+      else if (base instanceof Element) {
+        doc = ((Element)base).getDocument();
+      }
+      charset = doc != null ? doc.getCharset() : null;
+    }
+    writeTo(
+      base,
+      Channels.newWriter(
+        out, charset != null ? 
+          charset : 
+          "utf-8"),
+          options);
+  }
+
+  public void writeTo(
+    Base base, 
+    WritableByteChannel out) 
+      throws IOException {
+    writeTo(base,out,getDefaultWriterOptions());
+  }
+  
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/writer/Writer.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/writer/Writer.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/writer/Writer.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/writer/Writer.java Fri Oct 26 17:52:11 2007
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.channels.WritableByteChannel;
 
 import org.apache.abdera.model.Base;
 
@@ -70,6 +71,15 @@
    */
   Object write(
     Base base, 
+    WriterOptions options) 
+      throws IOException;
+  
+  void writeTo(Base base, 
+    WritableByteChannel out) 
+      throws IOException;
+
+  void writeTo(Base base, 
+    WritableByteChannel out,
     WriterOptions options) 
       throws IOException;
   

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/xpath/XPath.java Fri Oct 26 17:52:11 2007
@@ -25,6 +25,7 @@
 /**
  * Used to execute XPath queries over Feed Object Model instances.
  */
+@SuppressWarnings("unchecked") 
 public interface XPath {
   
   /**

Modified: incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java?rev=588831&r1=588830&r2=588831&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java (original)
+++ incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java Fri Oct 26 17:52:11 2007
@@ -26,6 +26,7 @@
 import java.io.Writer;
 import java.util.Comparator;
 import java.util.Date;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -728,6 +729,10 @@
     }
 
     public void complete() {}
+
+    public Iterator<Element> iterator() {
+      return null;
+    }
     
   }
   
@@ -1379,6 +1384,10 @@
     }
 
     public void complete() {}
+
+    public Iterator<Element> iterator() {
+      return null;
+    }
     
   }
 }

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=588831&r1=588830&r2=588831&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 Fri Oct 26 17:52:11 2007
@@ -772,7 +772,7 @@
       OMContainer parent = current.getParent();
       current = (OMElement) ((parent != null && parent instanceof OMElement) ? parent : null);
     }
-    return namespaces;
+    return Collections.unmodifiableMap(namespaces);
   }
 
   
@@ -824,5 +824,12 @@
    */
   public void complete() {
     if (!isComplete() && builder != null) super.build();
+  }
+
+  /**
+   * Iterate over all child elements
+   */
+  public Iterator<Element> iterator() {
+    return getElements().iterator();
   }
 }



Mime
View raw message