abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r440891 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/factory/Factory.java parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
Date Wed, 06 Sep 2006 22:37:47 GMT
Author: jmsnell
Date: Wed Sep  6 15:37:45 2006
New Revision: 440891

URL: http://svn.apache.org/viewvc?view=rev&rev=440891
Log:
Add a newUuidUri method to Factory.  This is helpful when setting the value of atom:id
to some random value (e.g. like when we're sending off a new entry to an Atom Publishing
Server).

Previously, the method was in FOMHelper and required the users depend on a parser 
implementation specific helper class rather than on the core API.

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java

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?view=diff&rev=440891&r1=440890&r2=440891
==============================================================================
--- 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
Wed Sep  6 15:37:45 2006
@@ -461,4 +461,9 @@
    * Create a new Categories element as a child of the given Element
    */
   Categories newCategories(Element parent);
+  
+  /**
+   * Generate a new random UUID URI 
+   */
+  String newUuidUri();
 }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?view=diff&rev=440891&r1=440890&r2=440891
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
Wed Sep  6 15:37:45 2006
@@ -53,6 +53,7 @@
 import org.apache.abdera.model.Workspace;
 import org.apache.abdera.model.Content.Type;
 import org.apache.abdera.parser.Parser;
+import org.apache.abdera.parser.stax.util.FOMHelper;
 import org.apache.abdera.util.Constants;
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.abdera.util.Version;
@@ -882,4 +883,7 @@
         return new FOMCategories(qname,parent, this, parserWrapper);
     }
 
+  public String newUuidUri() {
+    return FOMHelper.generateUuid();
+  }
 }



Mime
View raw message