abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r551069 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/model/Element.java core/src/main/java/org/apache/abdera/model/ElementWrapper.java parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
Date Wed, 27 Jun 2007 06:12:18 GMT
Author: jmsnell
Date: Tue Jun 26 23:12:18 2007
New Revision: 551069

URL: http://svn.apache.org/viewvc?view=rev&rev=551069
Log:
support a setText(DataHandler) option.

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java?view=diff&rev=551069&r1=551068&r2=551069
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java Tue
Jun 26 23:12:18 2007
@@ -21,6 +21,7 @@
 import java.util.Locale;
 import java.util.Map;
 
+import javax.activation.DataHandler;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.i18n.iri.IRI;
@@ -210,6 +211,11 @@
    * @param text The text value
    */
   void setText(String text);
+  
+  /**
+   * Set the Text value of this element using the data handler
+   */
+  void setText(DataHandler dataHandler);
   
   /**
    * Declare a namespace

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java?view=diff&rev=551069&r1=551068&r2=551069
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ElementWrapper.java
Tue Jun 26 23:12:18 2007
@@ -24,6 +24,7 @@
 import java.util.Locale;
 import java.util.Map;
 
+import javax.activation.DataHandler;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -183,6 +184,10 @@
     internal.setText(text);
   }
 
+  public void setText(DataHandler handler) {
+    internal.setText(handler);
+  }
+  
   public void writeTo(OutputStream out) throws IOException {
     internal.writeTo(out);
   }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?view=diff&rev=551069&r1=551068&r2=551069
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
Tue Jun 26 23:12:18 2007
@@ -30,6 +30,7 @@
 import java.util.Locale;
 import java.util.Map;
 
+import javax.activation.DataHandler;
 import javax.activation.MimeType;
 import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
@@ -739,5 +740,10 @@
     } else if (!preserve && getMustPreserveWhitespace()) {
       setAttributeValue(SPACE, "default");
     }
+  }
+  
+  public void setText(DataHandler handler) {
+    _removeAllChildren();
+    addChild(factory.createOMText(handler, true));
   }
 }



Mime
View raw message