You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2006/09/13 18:14:46 UTC

svn commit: r443011 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/model/Source.java parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java

Author: jmsnell
Date: Wed Sep 13 09:14:43 2006
New Revision: 443011

URL: http://svn.apache.org/viewvc?view=rev&rev=443011
Log:
Per APP Draft -10 Section 8.2.3.1: 

   The app:collection element MAY appear as a child of an atom:feed or
   atom:source element in an Atom Feed Document.  Its value identifies a
   Collection by which new entries can be added to appear in the feed.

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java?view=diff&rev=443011&r1=443010&r2=443011
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java Wed Sep 13 09:14:43 2006
@@ -471,4 +471,9 @@
   URI getLinkResolvedHref(String rel) throws URISyntaxException;
   URI getSelfLinkResolvedHref() throws URISyntaxException;
   URI getAlternateLinkResolvedHref() throws URISyntaxException;
+  
+  Collection getCollection();
+  
+  void setCollection(Collection collection);
+  
 }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java?view=diff&rev=443011&r1=443010&r2=443011
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java Wed Sep 13 09:14:43 2006
@@ -28,6 +28,7 @@
 import org.apache.abdera.model.AtomDate;
 import org.apache.abdera.model.Categories;
 import org.apache.abdera.model.Category;
+import org.apache.abdera.model.Collection;
 import org.apache.abdera.model.DateTime;
 import org.apache.abdera.model.Div;
 import org.apache.abdera.model.Generator;
@@ -562,4 +563,14 @@
     return (text != null) ? text.getTextType() : null;
   }
 
+  public Collection getCollection() {
+    return getFirstChild(COLLECTION);
+  }
+  
+  public void setCollection(Collection collection) {
+    if (collection != null) 
+      _setChild(COLLECTION, (OMElement)collection);
+    else 
+      _removeChildren(COLLECTION, false);
+  }
 }