You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2009/06/20 22:25:52 UTC

svn commit: r786905 - in /webservices/commons/trunk/modules/axiom/modules: axiom-api/src/main/java/org/apache/axiom/om/ axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/ axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/

Author: veithen
Date: Sat Jun 20 20:25:52 2009
New Revision: 786905

URL: http://svn.apache.org/viewvc?rev=786905&view=rev
Log:
WSCOMMONS-481: Added a method to OMFactory to create an OMSourcedElement using a QName.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java?rev=786905&r1=786904&r2=786905&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java Sat Jun 20 20:25:52 2009
@@ -61,6 +61,15 @@
                                      OMNamespace ns);
 
     /**
+     * Construct element with arbitrary data source. This is an optional operation which may not be
+     * supported by all factories.
+     *
+     * @param source the data source
+     * @param qname the name of the element produced by the data source
+     */
+    OMSourcedElement createOMElement(OMDataSource source, QName qname);
+
+    /**
      * This is almost the same as as createOMElement(localName,OMNamespace) method above. But some
      * people may, for some reason, need to use the conventional method of putting a namespace. Or
      * in other words people might not want to use the new OMNamespace. Well, this is for those

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java?rev=786905&r1=786904&r2=786905&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java Sat Jun 20 20:25:52 2009
@@ -183,6 +183,13 @@
     }
 
     /**
+     * Unsupported.
+     */
+    public OMSourcedElement createOMElement(OMDataSource source, QName qname) {
+        throw new UnsupportedOperationException("Not supported for DOM");
+    }
+
+    /**
      * Creates an OMElement.
      *
      * @see org.apache.axiom.om.OMFactory#createOMElement(String, String,

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java?rev=786905&r1=786904&r2=786905&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java Sat Jun 20 20:25:52 2009
@@ -154,6 +154,16 @@
     }
 
     /**
+     * Construct element with arbitrary data source.
+     * 
+     * @param source the data source
+     * @param qname the name of the element produced by the data source
+     */
+    public OMSourcedElement createOMElement(OMDataSource source, QName qname) {
+        return new OMSourcedElementImpl(qname, this, source);
+    }
+
+    /**
      * Method createOMNamespace.
      *
      * @param uri