You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2015/08/29 12:41:34 UTC

svn commit: r1698457 - in /webservices/axiom/trunk: aspects/fom-aspects/src/main/java/org/apache/axiom/fom/ implementations/fom-impl/ implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/

Author: veithen
Date: Sat Aug 29 10:41:33 2015
New Revision: 1698457

URL: http://svn.apache.org/r1698457
Log:
Reduce the coupling between fom-impl and axiom-impl.

Added:
    webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaTextValue.java   (with props)
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java   (with props)
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java   (with props)
Modified:
    webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCDATASection.java
    webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCharacterDataNode.java
    webservices/axiom/trunk/implementations/fom-impl/pom.xml
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java

Modified: webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCDATASection.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCDATASection.java?rev=1698457&r1=1698456&r2=1698457&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCDATASection.java (original)
+++ webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCDATASection.java Sat Aug 29 10:41:33 2015
@@ -18,9 +18,8 @@
  */
 package org.apache.axiom.fom;
 
-import org.apache.abdera.model.TextValue;
 import org.apache.axiom.core.CoreCDATASection;
 
-public interface AbderaCDATASection extends TextValue, AbderaChildNode, CoreCDATASection {
+public interface AbderaCDATASection extends AbderaTextValue, CoreCDATASection {
 
 }

Modified: webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCharacterDataNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCharacterDataNode.java?rev=1698457&r1=1698456&r2=1698457&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCharacterDataNode.java (original)
+++ webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaCharacterDataNode.java Sat Aug 29 10:41:33 2015
@@ -18,9 +18,8 @@
  */
 package org.apache.axiom.fom;
 
-import org.apache.abdera.model.TextValue;
 import org.apache.axiom.core.CoreCharacterDataNode;
 
-public interface AbderaCharacterDataNode extends TextValue, AbderaChildNode, CoreCharacterDataNode {
+public interface AbderaCharacterDataNode extends AbderaTextValue, CoreCharacterDataNode {
 
 }

Added: webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaTextValue.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaTextValue.java?rev=1698457&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaTextValue.java (added)
+++ webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaTextValue.java Sat Aug 29 10:41:33 2015
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.fom;
+
+import org.apache.abdera.model.TextValue;
+
+public interface AbderaTextValue extends TextValue, AbderaChildNode {
+
+}

Propchange: webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaTextValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/implementations/fom-impl/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/pom.xml?rev=1698457&r1=1698456&r2=1698457&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/pom.xml (original)
+++ webservices/axiom/trunk/implementations/fom-impl/pom.xml Sat Aug 29 10:41:33 2015
@@ -45,16 +45,15 @@
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
+            <artifactId>om-aspects</artifactId>
+            <version>${project.version}</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
             <artifactId>fom-aspects</artifactId>
             <version>${project.version}</version>
             <optional>true</optional>
-            <exclusions>
-                <exclusion>
-                    <!-- Already included in axiom-impl -->
-                    <groupId>${project.groupId}</groupId>
-                    <artifactId>core-aspects</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -77,6 +76,18 @@
                     <aspectLibraries>
                         <aspectLibrary>
                             <groupId>${project.groupId}</groupId>
+                            <artifactId>core-aspects</artifactId>
+                        </aspectLibrary>
+                        <aspectLibrary>
+                            <groupId>${project.groupId}</groupId>
+                            <artifactId>om-aspects</artifactId>
+                        </aspectLibrary>
+                        <aspectLibrary>
+                            <groupId>${project.groupId}</groupId>
+                            <artifactId>shared-aspects</artifactId>
+                        </aspectLibrary>
+                        <aspectLibrary>
+                            <groupId>${project.groupId}</groupId>
                             <artifactId>fom-aspects</artifactId>
                         </aspectLibrary>
                     </aspectLibraries>

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java?rev=1698457&r1=1698456&r2=1698457&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java Sat Aug 29 10:41:33 2015
@@ -20,13 +20,11 @@ package org.apache.abdera.parser.stax;
 import java.io.IOException;
 import java.io.InputStream;
 
-import javax.activation.DataHandler;
-
 import org.apache.axiom.fom.AbderaCDATASection;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.llom.CDATASectionImpl;
+import org.apache.axiom.om.impl.common.AxiomCDATASection;
 
-public class FOMCDATASection extends CDATASectionImpl implements AbderaCDATASection {
+public class FOMCDATASection extends FOMTextValue implements AbderaCDATASection, AxiomCDATASection {
 
     public FOMCDATASection(OMFactory factory) {
         super(factory);

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java?rev=1698457&r1=1698456&r2=1698457&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java Sat Aug 29 10:41:33 2015
@@ -20,13 +20,11 @@ package org.apache.abdera.parser.stax;
 import java.io.IOException;
 import java.io.InputStream;
 
-import javax.activation.DataHandler;
-
 import org.apache.axiom.fom.AbderaCharacterDataNode;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.llom.CharacterDataImpl;
+import org.apache.axiom.om.impl.common.AxiomCharacterDataNode;
 
-public class FOMCharacterDataNode extends CharacterDataImpl implements AbderaCharacterDataNode {
+public class FOMCharacterDataNode extends FOMTextValue implements AbderaCharacterDataNode, AxiomCharacterDataNode {
 
     public FOMCharacterDataNode(OMFactory factory) {
         super(factory);

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java?rev=1698457&r1=1698456&r2=1698457&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java Sat Aug 29 10:41:33 2015
@@ -20,19 +20,19 @@ package org.apache.abdera.parser.stax;
 import org.apache.abdera.model.Comment;
 import org.apache.axiom.fom.AbderaComment;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.llom.OMCommentImpl;
+import org.apache.axiom.om.impl.common.AxiomComment;
 
-public class FOMComment extends OMCommentImpl implements AbderaComment {
+public class FOMComment extends FOMLeafNode implements AbderaComment, AxiomComment {
     public FOMComment(OMFactory factory) {
         super(factory);
     }
 
     public String getText() {
-        return super.getValue();
+        return getValue();
     }
 
     public Comment setText(String text) {
-        super.setValue(text);
+        setValue(text);
         return this;
     }
 

Added: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java?rev=1698457&view=auto
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java (added)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java Sat Aug 29 10:41:33 2015
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.abdera.parser.stax;
+
+import org.apache.axiom.fom.AbderaChildNode;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.impl.llom.OMLeafNode;
+
+public abstract class FOMLeafNode extends OMLeafNode implements AbderaChildNode {
+    public FOMLeafNode(OMFactory factory) {
+        super(factory);
+    }
+}

Propchange: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java?rev=1698457&r1=1698456&r2=1698457&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java Sat Aug 29 10:41:33 2015
@@ -19,9 +19,9 @@ package org.apache.abdera.parser.stax;
 
 import org.apache.axiom.fom.AbderaProcessingInstruction;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.llom.OMProcessingInstructionImpl;
+import org.apache.axiom.om.impl.common.AxiomProcessingInstruction;
 
-public class FOMProcessingInstruction extends OMProcessingInstructionImpl implements AbderaProcessingInstruction {
+public class FOMProcessingInstruction extends FOMLeafNode implements AbderaProcessingInstruction, AxiomProcessingInstruction {
     FOMProcessingInstruction(OMFactory factory) {
         super(factory);
     }

Added: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java?rev=1698457&view=auto
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java (added)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java Sat Aug 29 10:41:33 2015
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.abdera.parser.stax;
+
+import org.apache.axiom.fom.AbderaTextValue;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.impl.common.AxiomText;
+
+public abstract class FOMTextValue extends FOMLeafNode implements AbderaTextValue, AxiomText {
+    public FOMTextValue(OMFactory factory) {
+        super(factory);
+    }
+}

Propchange: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java
------------------------------------------------------------------------------
    svn:eol-style = native