ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1700239 - in /webservices/axiom/trunk/aspects: core-aspects/src/main/java/org/apache/axiom/core/ dom-aspects/src/main/java/org/apache/axiom/dom/ om-aspects/src/main/java/org/apache/axiom/om/impl/common/
Date Mon, 31 Aug 2015 11:58:51 GMT
Author: veithen
Date: Mon Aug 31 11:58:50 2015
New Revision: 1700239

URL: http://svn.apache.org/r1700239
Log:
Use enum to identify node types.

Added:
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NodeType.java
  (with props)
Modified:
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ClonePolicy.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCDATASectionSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCharacterDataNodeSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCommentSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentFragmentSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentTypeDeclarationSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreEntityReferenceSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareAttributeSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareElementSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareAttributeSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareElementSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNamespaceDeclarationSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreProcessingInstructionSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/Policies.java

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ClonePolicy.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ClonePolicy.java?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ClonePolicy.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ClonePolicy.java
Mon Aug 31 11:58:50 2015
@@ -24,5 +24,5 @@ package org.apache.axiom.core;
 public interface ClonePolicy {
     boolean repairNamespaces();
     boolean cloneAttributes();
-    boolean cloneChildren(int nodeType);
+    boolean cloneChildren(NodeType nodeType);
 }

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCDATASectionSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCDATASectionSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCDATASectionSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCDATASectionSupport.aj
Mon Aug 31 11:58:50 2015
@@ -19,8 +19,8 @@
 package org.apache.axiom.core;
 
 public aspect CoreCDATASectionSupport {
-    public final int CoreCDATASection.coreGetNodeType() {
-        return CDATA_SECTION_NODE;
+    public final NodeType CoreCDATASection.coreGetNodeType() {
+        return NodeType.CDATA_SECTION;
     }
     
     public final CoreNode CoreCDATASection.shallowClone(ClonePolicy policy, Object options)
{

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCharacterDataNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCharacterDataNodeSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCharacterDataNodeSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCharacterDataNodeSupport.aj
Mon Aug 31 11:58:50 2015
@@ -24,8 +24,8 @@ public aspect CoreCharacterDataNodeSuppo
      */
     private Object CoreCharacterDataNode.data;
     
-    public final int CoreCharacterDataNode.coreGetNodeType() {
-        return CHARACTER_DATA_NODE;
+    public final NodeType CoreCharacterDataNode.coreGetNodeType() {
+        return NodeType.CHARACTER_DATA;
     }
     
     public final boolean CoreCharacterDataNode.coreIsIgnorable() {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCommentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCommentSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCommentSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreCommentSupport.aj
Mon Aug 31 11:58:50 2015
@@ -19,8 +19,8 @@
 package org.apache.axiom.core;
 
 public aspect CoreCommentSupport {
-    public final int CoreComment.coreGetNodeType() {
-        return COMMENT_NODE;
+    public final NodeType CoreComment.coreGetNodeType() {
+        return NodeType.COMMENT;
     }
     
     public final CoreNode CoreComment.shallowClone(ClonePolicy policy, Object options) {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentFragmentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentFragmentSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentFragmentSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentFragmentSupport.aj
Mon Aug 31 11:58:50 2015
@@ -21,8 +21,8 @@ package org.apache.axiom.core;
 public aspect CoreDocumentFragmentSupport {
     private CoreDocument CoreDocumentFragment.ownerDocument;
     
-    public final int CoreDocumentFragment.coreGetNodeType() {
-        return DOCUMENT_FRAGMENT_NODE;
+    public final NodeType CoreDocumentFragment.coreGetNodeType() {
+        return NodeType.DOCUMENT_FRAGMENT;
     }
     
     public final CoreNode CoreDocumentFragment.getRootOrOwnerDocument() {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentSupport.aj
Mon Aug 31 11:58:50 2015
@@ -24,8 +24,8 @@ public aspect CoreDocumentSupport {
     private String CoreDocument.xmlEncoding;
     private boolean CoreDocument.standalone;
     
-    public final int CoreDocument.coreGetNodeType() {
-        return DOCUMENT_NODE;
+    public final NodeType CoreDocument.coreGetNodeType() {
+        return NodeType.DOCUMENT;
     }
     
     public final CoreNode CoreDocument.getRootOrOwnerDocument() {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentTypeDeclarationSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentTypeDeclarationSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentTypeDeclarationSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreDocumentTypeDeclarationSupport.aj
Mon Aug 31 11:58:50 2015
@@ -24,8 +24,8 @@ public aspect CoreDocumentTypeDeclaratio
     private String CoreDocumentTypeDeclaration.systemId;
     private String CoreDocumentTypeDeclaration.internalSubset;
     
-    public final int CoreDocumentTypeDeclaration.coreGetNodeType() {
-        return DOCUMENT_TYPE_DECLARATION_NODE;
+    public final NodeType CoreDocumentTypeDeclaration.coreGetNodeType() {
+        return NodeType.DOCUMENT_TYPE_DECLARATION;
     }
     
     public final String CoreDocumentTypeDeclaration.coreGetRootName() {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreEntityReferenceSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreEntityReferenceSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreEntityReferenceSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreEntityReferenceSupport.aj
Mon Aug 31 11:58:50 2015
@@ -22,8 +22,8 @@ public aspect CoreEntityReferenceSupport
     private String CoreEntityReference.name;
     private String CoreEntityReference.replacementText;
     
-    public final int CoreEntityReference.coreGetNodeType() {
-        return ENTITY_REFERENCE_NODE;
+    public final NodeType CoreEntityReference.coreGetNodeType() {
+        return NodeType.ENTITY_REFERENCE;
     }
     
     public final String CoreEntityReference.coreGetName() {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareAttributeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareAttributeSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareAttributeSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareAttributeSupport.aj
Mon Aug 31 11:58:50 2015
@@ -19,8 +19,8 @@
 package org.apache.axiom.core;
 
 public aspect CoreNSAwareAttributeSupport {
-    public final int CoreNSAwareAttribute.coreGetNodeType() {
-        return NS_AWARE_ATTRIBUTE_NODE;
+    public final NodeType CoreNSAwareAttribute.coreGetNodeType() {
+        return NodeType.NS_AWARE_ATTRIBUTE;
     }
     
     public final CoreNode CoreNSAwareAttribute.shallowClone(ClonePolicy policy, Object options)
{

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareElementSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareElementSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSAwareElementSupport.aj
Mon Aug 31 11:58:50 2015
@@ -19,8 +19,8 @@
 package org.apache.axiom.core;
 
 public aspect CoreNSAwareElementSupport {
-    public final int CoreNSAwareElement.coreGetNodeType() {
-        return NS_AWARE_ELEMENT_NODE;
+    public final NodeType CoreNSAwareElement.coreGetNodeType() {
+        return NodeType.NS_AWARE_ELEMENT;
     }
     
     public final String CoreNSAwareElement.getImplicitNamespaceURI(String prefix) {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareAttributeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareAttributeSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareAttributeSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareAttributeSupport.aj
Mon Aug 31 11:58:50 2015
@@ -19,8 +19,8 @@
 package org.apache.axiom.core;
 
 public aspect CoreNSUnawareAttributeSupport {
-    public final int CoreNSUnawareAttribute.coreGetNodeType() {
-        return NS_UNAWARE_ATTRIBUTE_NODE;
+    public final NodeType CoreNSUnawareAttribute.coreGetNodeType() {
+        return NodeType.NS_UNAWARE_ATTRIBUTE;
     }
     
     public final CoreNode CoreNSUnawareAttribute.shallowClone(ClonePolicy policy, Object
options) {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareElementSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareElementSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNSUnawareElementSupport.aj
Mon Aug 31 11:58:50 2015
@@ -19,8 +19,8 @@
 package org.apache.axiom.core;
 
 public aspect CoreNSUnawareElementSupport {
-    public final int CoreNSUnawareElement.coreGetNodeType() {
-        return NS_UNAWARE_ELEMENT_NODE;
+    public final NodeType CoreNSUnawareElement.coreGetNodeType() {
+        return NodeType.NS_UNAWARE_ELEMENT;
     }
     
     public final String CoreNSUnawareElement.getImplicitNamespaceURI(String prefix) {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNamespaceDeclarationSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNamespaceDeclarationSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNamespaceDeclarationSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNamespaceDeclarationSupport.aj
Mon Aug 31 11:58:50 2015
@@ -19,8 +19,8 @@
 package org.apache.axiom.core;
 
 public aspect CoreNamespaceDeclarationSupport {
-    public final int CoreNamespaceDeclaration.coreGetNodeType() {
-        return NAMESPACE_DECLARATION_NODE;
+    public final NodeType CoreNamespaceDeclaration.coreGetNodeType() {
+        return NodeType.NAMESPACE_DECLARATION;
     }
     
     public final CoreNode CoreNamespaceDeclaration.shallowClone(ClonePolicy policy, Object
options) {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java
Mon Aug 31 11:58:50 2015
@@ -19,71 +19,6 @@
 package org.apache.axiom.core;
 
 public interface CoreNode {
-    /**
-     * The node is a {@link CoreDocument}.
-     */
-    int DOCUMENT_NODE = 0;
-    
-    /**
-     * The node is a {@link CoreDocumentTypeDeclaration}.
-     */
-    int DOCUMENT_TYPE_DECLARATION_NODE = 1;
-    
-    /**
-     * The node is a {@link CoreNSUnawareElement}.
-     */
-    int NS_UNAWARE_ELEMENT_NODE = 2;
-    
-    /**
-     * The node is a {@link CoreNSAwareElement}.
-     */
-    int NS_AWARE_ELEMENT_NODE = 3;
-    
-    /**
-     * The node is a {@link CoreNSUnawareAttribute}.
-     */
-    int NS_UNAWARE_ATTRIBUTE_NODE = 4;
-    
-    /**
-     * The node is a {@link CoreNSAwareAttribute}.
-     */
-    int NS_AWARE_ATTRIBUTE_NODE = 5;
-    
-    /**
-     * The node is a {@link CoreNamespaceDeclaration}.
-     */
-    int NAMESPACE_DECLARATION_NODE = 6;
-    
-    /**
-     * The node is a {@link CoreProcessingInstruction}.
-     */
-    int PROCESSING_INSTRUCTION_NODE = 7;
-    
-    /**
-     * The node is a {@link CoreDocumentFragment}.
-     */
-    int DOCUMENT_FRAGMENT_NODE = 8;
-    
-    /**
-     * The node is a {@link CoreCharacterDataNode}.
-     */
-    int CHARACTER_DATA_NODE = 9;
-    
-    /**
-     * The node is a {@link CoreComment}.
-     */
-    int COMMENT_NODE = 10;
-    
-    /**
-     * The node is a {@link CoreCDATASection}.
-     */
-    int CDATA_SECTION_NODE = 11;
-    
-    /**
-     * The node is a {@link CoreEntityReference}.
-     */
-    int ENTITY_REFERENCE_NODE = 12;
-    
     void coreSetOwnerDocument(CoreDocument document);
     
     NodeFactory coreGetNodeFactory();
@@ -91,9 +26,9 @@ public interface CoreNode {
     /**
      * Get the node type.
      * 
-     * @return one of the constants defined by {@link CoreNode} identifying the type of node
+     * @return the node type
      */
-    int coreGetNodeType();
+    NodeType coreGetNodeType();
 
     /**
      * Clone this node according to the provided policy.

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreProcessingInstructionSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreProcessingInstructionSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreProcessingInstructionSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreProcessingInstructionSupport.aj
Mon Aug 31 11:58:50 2015
@@ -21,8 +21,8 @@ package org.apache.axiom.core;
 public aspect CoreProcessingInstructionSupport {
     private String CoreProcessingInstruction.target;
 
-    public final int CoreProcessingInstruction.coreGetNodeType() {
-        return PROCESSING_INSTRUCTION_NODE;
+    public final NodeType CoreProcessingInstruction.coreGetNodeType() {
+        return NodeType.PROCESSING_INSTRUCTION;
     }
     
     public final String CoreProcessingInstruction.coreGetTarget() {

Added: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NodeType.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NodeType.java?rev=1700239&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NodeType.java
(added)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NodeType.java
Mon Aug 31 11:58:50 2015
@@ -0,0 +1,86 @@
+/*
+ * 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.core;
+
+public enum NodeType {
+    /**
+     * The node is a {@link CoreDocument}.
+     */
+    DOCUMENT,
+    
+    /**
+     * The node is a {@link CoreDocumentTypeDeclaration}.
+     */
+    DOCUMENT_TYPE_DECLARATION,
+    
+    /**
+     * The node is a {@link CoreNSUnawareElement}.
+     */
+    NS_UNAWARE_ELEMENT,
+    
+    /**
+     * The node is a {@link CoreNSAwareElement}.
+     */
+    NS_AWARE_ELEMENT,
+    
+    /**
+     * The node is a {@link CoreNSUnawareAttribute}.
+     */
+    NS_UNAWARE_ATTRIBUTE,
+    
+    /**
+     * The node is a {@link CoreNSAwareAttribute}.
+     */
+    NS_AWARE_ATTRIBUTE,
+    
+    /**
+     * The node is a {@link CoreNamespaceDeclaration}.
+     */
+    NAMESPACE_DECLARATION,
+    
+    /**
+     * The node is a {@link CoreProcessingInstruction}.
+     */
+    PROCESSING_INSTRUCTION,
+    
+    /**
+     * The node is a {@link CoreDocumentFragment}.
+     */
+    DOCUMENT_FRAGMENT,
+    
+    /**
+     * The node is a {@link CoreCharacterDataNode}.
+     */
+    CHARACTER_DATA,
+    
+    /**
+     * The node is a {@link CoreComment}.
+     */
+    COMMENT,
+    
+    /**
+     * The node is a {@link CoreCDATASection}.
+     */
+    CDATA_SECTION,
+    
+    /**
+     * The node is a {@link CoreEntityReference}.
+     */
+    ENTITY_REFERENCE
+}

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

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj
Mon Aug 31 11:58:50 2015
@@ -269,11 +269,11 @@ public aspect DOMDocumentSupport {
         }
         namespaceURI = NSUtil.normalizeNamespaceURI(namespaceURI);
         switch (((DOMNode)node).coreGetNodeType()) {
-            case NS_AWARE_ELEMENT_NODE:
+            case NS_AWARE_ELEMENT:
                 NSUtil.validateNamespace(namespaceURI, prefix);
                 ((DOMNSAwareElement)node).coreSetName(namespaceURI, localName, prefix);
                 return node;
-            case NS_AWARE_ATTRIBUTE_NODE:
+            case NS_AWARE_ATTRIBUTE:
                 if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI)) {
                     DOMNamespaceDeclaration decl = coreGetNodeFactory().createNode(DOMNamespaceDeclaration.class);
                     decl.coreSetOwnerDocument(this);
@@ -286,7 +286,7 @@ public aspect DOMDocumentSupport {
                     ((DOMNSAwareAttribute)node).coreSetName(namespaceURI, localName, prefix);
                     return node;
                 }
-            case NAMESPACE_DECLARATION_NODE:
+            case NAMESPACE_DECLARATION:
                 // TODO
                 throw new UnsupportedOperationException();
             default:

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java
(original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java
Mon Aug 31 11:58:50 2015
@@ -23,13 +23,13 @@ import org.apache.axiom.core.ClonePolicy
 import org.apache.axiom.core.CoreAttribute;
 import org.apache.axiom.core.CoreDocument;
 import org.apache.axiom.core.CoreNSUnawareAttribute;
-import org.apache.axiom.core.CoreNode;
 import org.apache.axiom.core.CoreParentNode;
 import org.apache.axiom.core.DetachPolicy;
 import org.apache.axiom.core.NSAwareAttributeMatcher;
 import org.apache.axiom.core.NamespaceDeclarationMatcher;
 import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.core.NodeMigrationPolicy;
+import org.apache.axiom.core.NodeType;
 
 public final class Policies {
     private Policies() {}
@@ -109,7 +109,7 @@ public final class Policies {
             return true;
         }
 
-        public boolean cloneChildren(int nodeType) {
+        public boolean cloneChildren(NodeType nodeType) {
             return true;
         }
     };
@@ -123,8 +123,8 @@ public final class Policies {
             return true;
         }
 
-        public boolean cloneChildren(int nodeType) {
-            return nodeType == CoreNode.NS_UNAWARE_ATTRIBUTE_NODE || nodeType == CoreNode.NS_AWARE_ATTRIBUTE_NODE;
+        public boolean cloneChildren(NodeType nodeType) {
+            return nodeType == NodeType.NS_UNAWARE_ATTRIBUTE || nodeType == NodeType.NS_AWARE_ATTRIBUTE;
         }
     };
 }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/Policies.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/Policies.java?rev=1700239&r1=1700238&r2=1700239&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/Policies.java
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/Policies.java
Mon Aug 31 11:58:50 2015
@@ -26,6 +26,7 @@ import org.apache.axiom.core.DetachPolic
 import org.apache.axiom.core.NSAwareAttributeMatcher;
 import org.apache.axiom.core.NamespaceDeclarationMatcher;
 import org.apache.axiom.core.NodeMigrationPolicy;
+import org.apache.axiom.core.NodeType;
 
 public final class Policies {
     private Policies() {}
@@ -65,7 +66,7 @@ public final class Policies {
             return true;
         }
 
-        public boolean cloneChildren(int nodeType) {
+        public boolean cloneChildren(NodeType nodeType) {
             return true;
         }
     };



Mime
View raw message