ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1610623 - in /webservices/axiom/trunk/modules: axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/ axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/
Date Tue, 15 Jul 2014 08:38:11 GMT
Author: veithen
Date: Tue Jul 15 08:38:11 2014
New Revision: 1610623

URL: http://svn.apache.org/r1610623
Log:
Let LLOM use the new core attribute code.

Added:
    webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IInformationItem.java
  (with props)
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMInformationItemImpl.java
  (with props)
Modified:
    webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IAttribute.java
    webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IElement.java
    webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/INamedInformationItem.java
    webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/ISerializable.java
    webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMAttributeSupport.aj
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMAttributeImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSerializableImpl.java

Modified: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IAttribute.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IAttribute.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IAttribute.java
(original)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IAttribute.java
Tue Jul 15 08:38:11 2014
@@ -18,8 +18,9 @@
  */
 package org.apache.axiom.om.impl.common;
 
+import org.apache.axiom.core.CoreAttribute;
 import org.apache.axiom.om.OMAttribute;
 
-public interface IAttribute extends OMAttribute, INamedInformationItem {
+public interface IAttribute extends OMAttribute, CoreAttribute, INamedInformationItem {
 
 }

Modified: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IElement.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IElement.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IElement.java
(original)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IElement.java
Tue Jul 15 08:38:11 2014
@@ -18,10 +18,11 @@
  */
 package org.apache.axiom.om.impl.common;
 
+import org.apache.axiom.core.CoreElement;
 import org.apache.axiom.core.DeferringParentNode;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.OMElementEx;
 
-public interface IElement extends OMElementEx, IContainer, INode, INamedInformationItem,
DeferringParentNode {
+public interface IElement extends OMElementEx, IContainer, INode, INamedInformationItem,
CoreElement, DeferringParentNode {
     void addNamespaceDeclaration(OMNamespace ns);
 }

Added: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IInformationItem.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IInformationItem.java?rev=1610623&view=auto
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IInformationItem.java
(added)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IInformationItem.java
Tue Jul 15 08:38:11 2014
@@ -0,0 +1,26 @@
+/*
+ * 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.om.impl.common;
+
+import org.apache.axiom.core.CoreNode;
+import org.apache.axiom.om.OMInformationItem;
+
+public interface IInformationItem extends OMInformationItem, CoreNode {
+
+}

Propchange: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IInformationItem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/INamedInformationItem.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/INamedInformationItem.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/INamedInformationItem.java
(original)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/INamedInformationItem.java
Tue Jul 15 08:38:11 2014
@@ -20,6 +20,6 @@ package org.apache.axiom.om.impl.common;
 
 import org.apache.axiom.om.OMNamedInformationItem;
 
-public interface INamedInformationItem extends OMNamedInformationItem {
+public interface INamedInformationItem extends OMNamedInformationItem, IInformationItem {
 
 }

Modified: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/ISerializable.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/ISerializable.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/ISerializable.java
(original)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/ISerializable.java
Tue Jul 15 08:38:11 2014
@@ -18,14 +18,12 @@
  */
 package org.apache.axiom.om.impl.common;
 
-
-import org.apache.axiom.core.CoreNode;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.OMSerializable;
 import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 
-public interface ISerializable extends CoreNode, OMSerializable {
+public interface ISerializable extends OMSerializable, IInformationItem {
     /**
      * Serializes the node.
      *

Modified: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMAttributeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMAttributeSupport.aj?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMAttributeSupport.aj
(original)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMAttributeSupport.aj
Tue Jul 15 08:38:11 2014
@@ -18,9 +18,14 @@
  */
 package org.apache.axiom.om.impl.common;
 
+import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
 
 public aspect OMAttributeSupport {
+    public final OMElement IAttribute.getOwner() {
+        return (OMElement)coreGetOwnerElement();
+    }
+
     public final void IAttribute.setNamespace(OMNamespace namespace, boolean decl) {
         internalSetNamespace(handleNamespace((IElement)getOwner(), namespace, true, decl));
     }

Modified: webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java
Tue Jul 15 08:38:11 2014
@@ -21,12 +21,10 @@ package org.apache.axiom.om.impl.dom;
 
 import javax.xml.XMLConstants;
 
-import org.apache.axiom.core.CoreAttribute;
 import org.apache.axiom.core.NonDeferringParentNode;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMConstants;
-import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMOutputFormat;
@@ -42,7 +40,7 @@ import org.w3c.dom.Text;
 import org.w3c.dom.TypeInfo;
 
 /** Implementation of <code>org.w3c.dom.Attr</code> and <code>org.apache.axiom.om.OMAttribute</code>
*/
-public class AttrImpl extends RootNode implements OMAttributeEx, IAttribute, Attr, NamedNode,
CoreAttribute, NonDeferringParentNode {
+public class AttrImpl extends RootNode implements OMAttributeEx, IAttribute, Attr, NamedNode,
NonDeferringParentNode {
     private String type;
 
     /** Flag used to mark an attribute as per the DOM Level 3 specification */
@@ -307,10 +305,6 @@ public class AttrImpl extends RootNode i
                 + ":" + localName;
     }
 
-    public OMElement getOwner() {
-        return (OMElement)coreGetOwnerElement();
-    }
-
     /**
      * An instance of <code>AttrImpl</code> can act as an <code>OMAttribute</code>
and as well as an
      * <code>org.w3c.dom.Attr</code>. So we first check if the object to compare
with (<code>obj</code>)

Modified: webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
Tue Jul 15 08:38:11 2014
@@ -20,7 +20,6 @@
 package org.apache.axiom.om.impl.dom;
 
 import org.apache.axiom.core.CoreChildNode;
-import org.apache.axiom.core.CoreElement;
 import org.apache.axiom.dom.DOMChildNode;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMCloneOptions;
@@ -59,7 +58,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 
 /** Implementation of the org.w3c.dom.Element and org.apache.axiom.om.Element interfaces.
*/
-public class ElementImpl extends ParentNode implements Element, IElement, NamedNode, DOMChildNode,
CoreElement,
+public class ElementImpl extends ParentNode implements Element, IElement, NamedNode, DOMChildNode,
         OMConstants {
 
     private static final Log log = LogFactory.getLog(ElementImpl.class);

Modified: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMAttributeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMAttributeImpl.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMAttributeImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMAttributeImpl.java
Tue Jul 15 08:38:11 2014
@@ -25,11 +25,10 @@ import org.apache.axiom.om.OMConstants;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.impl.common.IAttribute;
 
 /** Class OMAttributeImpl */
-public class OMAttributeImpl implements IAttribute {
+public class OMAttributeImpl extends OMInformationItemImpl implements IAttribute {
     private String value;
 
     private String type;
@@ -37,9 +36,6 @@ public class OMAttributeImpl implements 
     /** <code>OMFactory</code> that created this <code>OMAttribute</code>
*/
     private OMFactory factory;
 
-    // Keep track of the owner of the attribute
-    OMElementImpl owner;
-
     /**
      * Constructor OMAttributeImpl.
      *
@@ -113,10 +109,6 @@ public class OMAttributeImpl implements 
         return this.factory;
     }
 
-    public OMElement getOwner() {
-        return owner;
-    }
-
     /**
      * Checks for the equality of two <code>OMAttribute</code> instances. Thus
the object to compare
      * this with may be an instance of <code>OMAttributeImpl</code> (an instance
of this class) or

Modified: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
Tue Jul 15 08:38:11 2014
@@ -444,11 +444,11 @@ public class OMElementImpl extends OMNod
             this.attributes = new LinkedHashMap(5);
         }
         // Set the owner element of the attribute
-        ((OMAttributeImpl)attr).owner = this;
+        ((OMAttributeImpl)attr).internalSetOwnerElement(this);
         OMAttributeImpl oldAttr = (OMAttributeImpl)attributes.put(attr.getQName(), attr);
         // Did we replace an existing attribute?
         if (oldAttr != null) {
-            oldAttr.owner = null;
+            oldAttr.internalUnsetOwnerElement(null);
         }
     }
 
@@ -457,7 +457,7 @@ public class OMElementImpl extends OMNod
             throw new OMException("The attribute is not owned by this element");
         }
         // Remove the owner from this attribute
-        ((OMAttributeImpl)attr).owner = null;
+        ((OMAttributeImpl)attr).internalUnsetOwnerElement(null);
         attributes.remove(attr.getQName());
     }
 

Added: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMInformationItemImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMInformationItemImpl.java?rev=1610623&view=auto
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMInformationItemImpl.java
(added)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMInformationItemImpl.java
Tue Jul 15 08:38:11 2014
@@ -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.axiom.om.impl.llom;
+
+import org.apache.axiom.core.CoreDocument;
+import org.apache.axiom.om.impl.common.IInformationItem;
+import org.apache.axiom.om.impl.common.InformationItem;
+
+public abstract class OMInformationItemImpl extends InformationItem implements IInformationItem
{
+    public final CoreDocument createOwnerDocument() {
+        throw new UnsupportedOperationException();
+    }
+}

Propchange: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMInformationItemImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSerializableImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSerializableImpl.java?rev=1610623&r1=1610622&r2=1610623&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSerializableImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSerializableImpl.java
Tue Jul 15 08:38:11 2014
@@ -25,14 +25,12 @@ import java.io.Writer;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.axiom.core.CoreDocument;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
 import org.apache.axiom.om.impl.builder.StAXBuilder;
 import org.apache.axiom.om.impl.common.ISerializable;
-import org.apache.axiom.om.impl.common.InformationItem;
 import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerializer;
 import org.apache.axiom.om.util.StAXUtils;
@@ -40,7 +38,7 @@ import org.apache.axiom.soap.impl.builde
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-public abstract class OMSerializableImpl extends InformationItem implements ISerializable
{
+public abstract class OMSerializableImpl extends OMInformationItemImpl implements ISerializable
{
     private static final Log log = LogFactory.getLog(OMSerializableImpl.class);
     
     private OMFactory factory;
@@ -196,8 +194,4 @@ public abstract class OMSerializableImpl
             writer.close();
         }
     }
-
-    public final CoreDocument createOwnerDocument() {
-        throw new UnsupportedOperationException();
-    }
 }



Mime
View raw message