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 2011/11/13 13:06:49 UTC

svn commit: r1201423 - 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/ axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/

Author: veithen
Date: Sun Nov 13 12:06:48 2011
New Revision: 1201423

URL: http://svn.apache.org/viewvc?rev=1201423&view=rev
Log:
Some Javadoc improvements.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMElement.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMElement.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMElement.java?rev=1201423&r1=1201422&r2=1201423&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMElement.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMElement.java Sun Nov 13 12:06:48 2011
@@ -95,16 +95,21 @@ public interface OMElement extends OMNod
     Iterator getChildElements();
     
     /**
-     * Creates a namespace in the current element scope.
-     *
-     * @param uri    The namespace to declare in the current scope.  The caller is expected to
-     *               ensure that the URI is a valid namespace name.
-     * @param prefix The prefix to associate with the given namespace. The caller is expected to
-     *               ensure that this is a valid XML prefix. If <code>null</code> or the empty
-     *               string is given, a prefix will be auto-generated. <b>Please note that using the
-     *               empty string for this purpose is deprecated and will no longer be supported in
-     *               Axiom 1.3.</b>
-     * @return Returns the created namespace information item.
+     * Add a namespace declaration for the given namespace URI to this element, optionally
+     * generating a prefix for that namespace.
+     * <p>
+     * Note that this method can't be used to declare a default namespace. For that purpose use
+     * {@link #declareDefaultNamespace(String)} or {@link #declareNamespace(OMNamespace)}.
+     * 
+     * @param uri
+     *            The namespace to declare in the current scope. The caller is expected to ensure
+     *            that the URI is a valid namespace name.
+     * @param prefix
+     *            The prefix to associate with the given namespace. The caller is expected to ensure
+     *            that this is a valid XML prefix. If <code>null</code> or the empty string is
+     *            given, a prefix will be auto-generated. <b>Please note that using the empty string
+     *            for this purpose is deprecated and will no longer be supported in Axiom 1.3.</b>
+     * @return the created namespace information item
      * @throws IllegalArgumentException
      *             if an attempt is made to bind a prefix to the empty namespace name
      * @see #declareNamespace(OMNamespace)
@@ -113,11 +118,13 @@ public interface OMElement extends OMNod
      */
     OMNamespace declareNamespace(String uri, String prefix);
 
-
     /**
-     * This will declare a default namespace for this element explicitly
-     *
+     * Add a namespace declaration for the default namespace to this element.
+     * 
      * @param uri
+     *            The default namespace to declare in the current scope. The caller is expected to
+     *            ensure that the URI is a valid namespace name.
+     * @return the created namespace information item
      */
     OMNamespace declareDefaultNamespace(String uri);
 

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?rev=1201423&r1=1201422&r2=1201423&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java Sun Nov 13 12:06:48 2011
@@ -770,11 +770,6 @@ public class ElementImpl extends ParentN
         namespaces.put(prefix, new OMNamespaceImpl("", prefix));
     }
 
-    /**
-     * Allows overriding an existing declaration if the same prefix was used.
-     *
-     * @see org.apache.axiom.om.OMElement#declareNamespace(String, String)
-     */
     public OMNamespace declareNamespace(String uri, String prefix) {
         if ("".equals(prefix)) {
             log.warn("Deprecated usage of OMElement#declareNamespace(String,String) with empty prefix");
@@ -785,12 +780,6 @@ public class ElementImpl extends ParentN
         return declareNamespace(ns);
     }
 
-    /**
-     * We use "" to store the default namespace of this element. As one can see user can not give ""
-     * as the prefix, when he declare a usual namespace.
-     *
-     * @param uri
-     */
     public OMNamespace declareDefaultNamespace(String uri) {
         OMNamespaceImpl ns = new OMNamespaceImpl(uri, "");
         if (namespaces == null) {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=1201423&r1=1201422&r2=1201423&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java Sun Nov 13 12:06:48 2011
@@ -374,11 +374,6 @@ public class OMElementImpl extends OMNod
         return new OMChildElementIterator(getFirstElement());
     }
 
-    /**
-     * Creates a namespace in the current element scope.
-     *
-     * @return Returns namespace.
-     */
     public OMNamespace declareNamespace(String uri, String prefix) {
         if ("".equals(prefix)) {
             log.warn("Deprecated usage of OMElement#declareNamespace(String,String) with empty prefix");
@@ -388,12 +383,6 @@ public class OMElementImpl extends OMNod
         return declareNamespace(ns);
     }
 
-    /**
-     * We use "" to store the default namespace of this element. As one can see user can not give ""
-     * as the prefix, when he declare a usual namespace.
-     *
-     * @param uri
-     */
     public OMNamespace declareDefaultNamespace(String uri) {
 
         OMNamespaceImpl namespace = new OMNamespaceImpl(uri == null ? "" : uri, "");