Author: veithen
Date: Fri May 29 22:12:32 2015
New Revision: 1682560
URL: http://svn.apache.org/r1682560
Log:
Deprecate the OMFactory#createOMText methods that take a QName argument.
Modified:
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
Modified:
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj?rev=1682560&r1=1682559&r2=1682560&view=diff
==============================================================================
---
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
(original)
+++
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
Fri May 29 22:12:32 2015
@@ -212,7 +212,9 @@ public aspect AxiomElementSupport {
removeChildren();
// Add a new text node
if (qname != null) {
- getOMFactory().createOMText(this, qname);
+ OMNamespace ns = handleNamespace(qname.getNamespaceURI(),
qname.getPrefix());
+ getOMFactory().createOMText(this,
+ ns == null ? qname.getLocalPart() : ns.getPrefix() + ":" +
qname.getLocalPart());
}
}
Modified:
webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java?rev=1682560&r1=1682559&r2=1682560&view=diff
==============================================================================
---
webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
(original)
+++
webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
Fri May 29 22:12:32 2015
@@ -240,8 +240,9 @@ public interface OMFactory {
public OMText createOMText(OMContainer parent, OMText source);
/**
- * @param parent
- * @param text - This text itself can contain a namespace inside it.
+ * @deprecated This method is only meaningful if it is used to create a
text node that is the
+ * single child of an {@link OMElement}. However, for that
purpose
+ * {@link OMElement#setText(QName)} should be used.
*/
OMText createOMText(OMContainer parent, QName text);
@@ -261,9 +262,8 @@ public interface OMFactory {
OMText createOMText(OMContainer parent, char[] charArary, int type);
/**
- * @param parent
- * @param text - This text itself can contain a namespace inside it.
- * @param type
+ * @deprecated Creating a text node containing a QName and having a type
other than
+ * {@link OMNode#TEXT_NODE} is not meaningful.
*/
OMText createOMText(OMContainer parent, QName text, int type);