abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r429835 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java
Date Tue, 08 Aug 2006 21:47:42 GMT
Author: jmsnell
Date: Tue Aug  8 14:47:41 2006
New Revision: 429835

URL: http://svn.apache.org/viewvc?rev=429835&view=rev
Log:
Utility method for generating UUID urn's for use with atom:id. 

e.g.entry.setId(FOMHelper.generateUuid());

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java?rev=429835&r1=429834&r2=429835&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMHelper.java
Tue Aug  8 14:47:41 2006
@@ -24,6 +24,7 @@
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Link;
 import org.apache.abdera.util.Constants;
+import org.apache.axiom.om.util.UUIDGenerator;
 
 public class FOMHelper implements Constants {
 
@@ -37,5 +38,9 @@
   public static List<Link> getLinks(Element element, String rel) {
     Iterator i = new FOMLinkIterator(element, Link.class, REL, rel, Link.REL_ALTERNATE);
     return new FOMList<Link>(i);
+  }
+  
+  public static String generateUuid() {
+    return UUIDGenerator.getUUID();
   }
 }



Mime
View raw message