abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r617938 - in /incubator/abdera/java/trunk: contrib/rss/src/main/java/org/apache/abdera/contrib/rss/ core/src/main/java/org/apache/abdera/model/ core/src/test/java/org/apache/abdera/test/core/ parser/src/main/java/org/apache/abdera/parser/stax/
Date Sun, 03 Feb 2008 01:53:00 GMT
Author: jmsnell
Date: Sat Feb  2 17:52:59 2008
New Revision: 617938

URL: http://svn.apache.org/viewvc?rev=617938&view=rev
Log:
Method to add a control element

Modified:
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.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/FOMEntry.java

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=617938&r1=617937&r2=617938&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
Sat Feb  2 17:52:59 2008
@@ -608,4 +608,8 @@
   public IRIElement setValue(String iri) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
+
+  public Control addControl() {
+    throw new UnsupportedOperationException("Modifications are not allowed");
+  }
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java?rev=617938&r1=617937&r2=617938&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java Sat
Feb  2 17:52:59 2008
@@ -937,5 +937,7 @@
    * @throws IRISyntaxException if the href attribute is malformed
    */
   IRI getSelfLinkResolvedHref();
+  
+  Control addControl();
 }
 

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=617938&r1=617937&r2=617938&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
Sat Feb  2 17:52:59 2008
@@ -1516,5 +1516,9 @@
       return null;
     }
     
+    public Control addControl() {
+      return null;
+    }
+    
   }
 }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java?rev=617938&r1=617937&r2=617938&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
Sat Feb  2 17:52:59 2008
@@ -907,4 +907,13 @@
     Control control = getControl();
     return (control != null) ? control.isDraft() : false;
   }
+
+  public Control addControl() {
+    complete();
+    Control control = getControl();
+    if (control == null) {
+      control = ((FOMFactory)factory).newControl(this);
+    }
+    return control;
+  }
 }



Mime
View raw message