ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r791319 - /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/stax/AbstractXMLStreamReader.java
Date Sun, 05 Jul 2009 20:47:00 GMT
Author: veithen
Date: Sun Jul  5 20:46:59 2009
New Revision: 791319

URL: http://svn.apache.org/viewvc?rev=791319&view=rev
Log:
Added some more default implementations to AbstractXMLStreamReader.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/stax/AbstractXMLStreamReader.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/stax/AbstractXMLStreamReader.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/stax/AbstractXMLStreamReader.java?rev=791319&r1=791318&r2=791319&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/stax/AbstractXMLStreamReader.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/stax/AbstractXMLStreamReader.java
Sun Jul  5 20:46:59 2009
@@ -66,6 +66,24 @@
         return eventType;
     }
 
+    public boolean isStartElement() {
+        return getEventType() == START_ELEMENT;
+    }
+
+    public boolean isEndElement() {
+        return getEventType() == END_ELEMENT;
+    }
+
+    public boolean isCharacters() {
+        return getEventType() == CHARACTERS;
+    }
+
+    public boolean hasName() {
+        int event = getEventType();
+        // TODO: need to check the StAX specs if this is correct
+        return event == START_ELEMENT || event == END_ELEMENT;
+    }
+
     /**
      * @param i
      * @param s



Mime
View raw message