abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r420561 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/model/ExtensibleElement.java parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
Date Mon, 10 Jul 2006 15:15:24 GMT
Author: jmsnell
Date: Mon Jul 10 08:15:23 2006
New Revision: 420561

URL: http://svn.apache.org/viewvc?rev=420561&view=rev
Log:
Making it easier to get the value of a simple extension

ExtensibleElemenet.getSimpleExtension(qname) will return the string value of the extension

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

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java?rev=420561&r1=420560&r2=420561&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java
Mon Jul 10 08:15:23 2006
@@ -83,6 +83,16 @@
     String value);
   
   /**
+   * Gets the value of a simple extension
+   */
+  String getSimpleExtension(QName qname);
+  
+  /**
+   * Gets the value of a simple extension
+   */
+  String getSimpleExtension(String namespace, String localPart, String prefix);
+  
+  /**
    * Adds a list of extensions
    */
   void addExtensions(List<ExtensionElement> extensions);

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java?rev=420561&r1=420560&r2=420561&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
Mon Jul 10 08:15:23 2006
@@ -149,6 +149,22 @@
         value);
   }
   
+  public String getSimpleExtension(QName qname) {
+    StringElement el  = getExtension(qname);
+    return el.getValue();
+  }
+  
+  public String getSimpleExtension(
+    String namespace, 
+    String localPart, 
+    String prefix) {
+      return getSimpleExtension(
+        new QName(
+          namespace, 
+          localPart, 
+          prefix));
+  }
+  
   public void addExtensions(List<ExtensionElement> extensions) {
     for (ExtensionElement e : extensions) {
       addExtension(e);



Mime
View raw message