ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1798259 - in /webservices/axiom/trunk: aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/ implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/
Date Fri, 09 Jun 2017 18:51:16 GMT
Author: veithen
Date: Fri Jun  9 18:51:16 2017
New Revision: 1798259

URL: http://svn.apache.org/viewvc?rev=1798259&view=rev
Log:
Don't weave DOOMNodeFactory.

Added:
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMImplementationImpl.java
      - copied, changed from r1798258, webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeFactorySupport.aj
Removed:
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeFactorySupport.aj
Modified:
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMDocumentSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeSupport.aj
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java

Copied: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMImplementationImpl.java
(from r1798258, webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeFactorySupport.aj)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMImplementationImpl.java?p2=webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMImplementationImpl.java&p1=webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeFactorySupport.aj&r1=1798258&r2=1798259&rev=1798259&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeFactorySupport.aj
(original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMImplementationImpl.java
Fri Jun  9 18:51:16 2017
@@ -16,28 +16,35 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.dom.impl.mixin;
+package org.apache.axiom.dom;
 
-import org.apache.axiom.dom.DOMDocument;
-import org.apache.axiom.dom.DOMDocumentType;
-import org.apache.axiom.dom.DOMNodeFactory;
+import org.apache.axiom.core.NodeFactory;
 import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
 import org.w3c.dom.DocumentType;
 import org.w3c.dom.Element;
 
-public aspect DOMNodeFactorySupport {
-    public boolean DOMNodeFactory.hasFeature(String feature, String version) {
+public final class DOMImplementationImpl implements DOMImplementation {
+    private final NodeFactory nodeFactory;
+
+    public DOMImplementationImpl(NodeFactory nodeFactory) {
+        this.nodeFactory = nodeFactory;
+    }
+
+    @Override
+    public boolean hasFeature(String feature, String version) {
         boolean anyVersion = version == null || version.length() == 0;
         return (feature.equalsIgnoreCase("Core") || feature.equalsIgnoreCase("XML"))
                 && (anyVersion || version.equals("1.0") || version.equals("2.0")
|| version.equals("3.0"));
     }
 
-    public Document DOMNodeFactory.createDocument(String namespaceURI, String qualifiedName,
+    @Override
+    public Document createDocument(String namespaceURI, String qualifiedName,
                                    DocumentType doctype) throws DOMException {
 
         // TODO Handle docType stuff
-        DOMDocument doc = createNode(DOMDocument.class);
+        DOMDocument doc = nodeFactory.createNode(DOMDocument.class);
 
         Element element = doc.createElementNS(namespaceURI, qualifiedName);
         doc.appendChild(element);
@@ -45,9 +52,10 @@ public aspect DOMNodeFactorySupport {
         return doc;
     }
 
-    public DocumentType DOMNodeFactory.createDocumentType(String qualifiedName,
+    @Override
+    public DocumentType createDocumentType(String qualifiedName,
                                            String publicId, String systemId) {
-        DOMDocumentType docType = createNode(DOMDocumentType.class);
+        DOMDocumentType docType = nodeFactory.createNode(DOMDocumentType.class);
         docType.coreSetRootName(qualifiedName);
         docType.coreSetPublicId(publicId);
         docType.coreSetSystemId(systemId);
@@ -58,7 +66,8 @@ public aspect DOMNodeFactorySupport {
      * DOM-Level 3 methods
      */
 
-    public Object DOMNodeFactory.getFeature(String feature, String version) {
+    @Override
+    public Object getFeature(String feature, String version) {
         // TODO TODO
         throw new UnsupportedOperationException("TODO");
     }

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java?rev=1798259&r1=1798258&r2=1798259&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java
(original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java
Fri Jun  9 18:51:16 2017
@@ -21,6 +21,6 @@ package org.apache.axiom.dom;
 import org.apache.axiom.core.NodeFactory;
 import org.w3c.dom.DOMImplementation;
 
-public interface DOMNodeFactory extends NodeFactory, DOMImplementation {
-
+public interface DOMNodeFactory extends NodeFactory {
+    DOMImplementation getDOMImplementation();
 }

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMDocumentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMDocumentSupport.aj?rev=1798259&r1=1798258&r2=1798259&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMDocumentSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMDocumentSupport.aj
Fri Jun  9 18:51:16 2017
@@ -144,7 +144,7 @@ public aspect DOMDocumentSupport {
     }
 
     public final DOMImplementation DOMDocument.getImplementation() {
-        return (DOMNodeFactory)coreGetNodeFactory();
+        return ((DOMNodeFactory)coreGetNodeFactory()).getDOMImplementation();
     }
 
     public final DOMConfiguration DOMDocument.getDomConfig() {

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeSupport.aj?rev=1798259&r1=1798258&r2=1798259&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeSupport.aj
Fri Jun  9 18:51:16 2017
@@ -35,7 +35,7 @@ public aspect DOMNodeSupport {
     }
 
     public final boolean DOMNode.isSupported(String feature, String version) {
-        return ((DOMNodeFactory)coreGetNodeFactory()).hasFeature(feature, version);
+        return ((DOMNodeFactory)coreGetNodeFactory()).getDOMImplementation().hasFeature(feature,
version);
     }
     
     public final String DOMNode.lookupNamespaceURI(String prefix) {

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java?rev=1798259&r1=1798258&r2=1798259&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
Fri Jun  9 18:51:16 2017
@@ -18,17 +18,27 @@
  */
 package org.apache.axiom.om.impl.dom.factory;
 
+import org.apache.axiom.dom.DOMImplementationImpl;
 import org.apache.axiom.dom.DOMNodeFactory;
 import org.apache.axiom.om.impl.common.factory.AxiomNodeFactoryImpl;
+import org.w3c.dom.DOMImplementation;
 
 public final class DOOMNodeFactory extends AxiomNodeFactoryImpl implements DOMNodeFactory
{
     public static final DOOMNodeFactory INSTANCE = new DOOMNodeFactory();
     
+    private final DOMImplementation domImplementation;
+
     private DOOMNodeFactory() {
         super(DOOMNodeFactory.class.getClassLoader(),
                 "org.apache.axiom.om.impl.dom",
                 "org.apache.axiom.soap.impl.dom",
                 "org.apache.axiom.soap.impl.dom.soap11",
                 "org.apache.axiom.soap.impl.dom.soap12");
+        domImplementation = new DOMImplementationImpl(this);
+    }
+
+    @Override
+    public DOMImplementation getDOMImplementation() {
+        return domImplementation;
     }
 }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java?rev=1798259&r1=1798258&r2=1798259&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
Fri Jun  9 18:51:16 2017
@@ -66,6 +66,6 @@ public class OMDOMMetaFactory extends Ab
     }
 
     public DOMImplementation getDOMImplementation() {
-        return DOOMNodeFactory.INSTANCE;
+        return DOOMNodeFactory.INSTANCE.getDOMImplementation();
     }
 }



Mime
View raw message