Author: gdaniels
Date: Tue May 16 07:32:31 2006
New Revision: 406956
URL: http://svn.apache.org/viewcvs?rev=406956&view=rev
Log:
Slight optimization for OMElementImpl (xmlns namespace is a constant now)
Few places where refactoring was missed in comments, etc.
Make StAXPolicyWriter constructor public
Modified:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
webservices/commons/trunk/modules/neethi/examples/wsse/src/secParser/WSSPolicyProcessor.java
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/Policy.java
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/PolicyConstants.java
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/util/StAXPolicyWriter.java
Modified:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=406956&r1=406955&r2=406956&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
(original)
+++
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
Tue May 16 07:32:31 2006
@@ -381,13 +381,16 @@
return ns;
}
+ // Constant
+ static final OMNamespaceImpl xmlns =
+ new OMNamespaceImpl(OMConstants.XMLNS_URI,
+ OMConstants.XMLNS_PREFIX);
+
/**
* Checks for the namespace <B>only</B> in the current Element.
* This is also used to retrieve the prefix of a known namespace URI.
*/
private OMNamespace findDeclaredNamespace(String uri, String prefix) {
-
-
if (uri == null) {
return null;
}
@@ -395,7 +398,7 @@
//If the prefix is available and uri is available and its the xml
namespace
if (prefix != null && prefix.equals(OMConstants.XMLNS_PREFIX) &&
uri.equals(OMConstants.XMLNS_URI))
{
- return new OMNamespaceImpl(uri, prefix);
+ return xmlns;
}
if (namespaces == null) {
Modified:
webservices/commons/trunk/modules/neethi/examples/wsse/src/secParser/WSSPolicyProcessor.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/neethi/examples/wsse/src/secParser/WSSPolicyProcessor.java?rev=406956&r1=406955&r2=406956&view=diff
==============================================================================
---
webservices/commons/trunk/modules/neethi/examples/wsse/src/secParser/WSSPolicyProcessor.java
(original)
+++
webservices/commons/trunk/modules/neethi/examples/wsse/src/secParser/WSSPolicyProcessor.java
Tue May 16 07:32:31 2006
@@ -166,7 +166,7 @@
*
* Each policy must be nromalized accordig to the WS Policy framework
* specification. Therefore a policy has one child (wsp:ExactlyOne)
that is
- * a XorCompositeAssertion. This child may contain one or more other
terms
+ * an ExactlyOne. This child may contain one or more other terms
* (alternatives). To match the policy one of these terms (alternatives)
* must match. If none of the contained terms match this policy cannot
be
* enforced.
Modified:
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/Policy.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/Policy.java?rev=406956&r1=406955&r2=406956&view=diff
==============================================================================
---
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/Policy.java
(original)
+++
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/Policy.java
Tue May 16 07:32:31 2006
@@ -423,7 +423,7 @@
/**
* @param allTerms
- * XorCompositeAssertion to be corssproducted
+ * ExactlyOne to be corssproducted
* @param index
* starting point of cross product
* @return
Modified:
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/PolicyConstants.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/PolicyConstants.java?rev=406956&r1=406955&r2=406956&view=diff
==============================================================================
---
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/PolicyConstants.java
(original)
+++
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/PolicyConstants.java
Tue May 16 07:32:31 2006
@@ -25,7 +25,7 @@
/** Tag name of AndComposteAssertion */
public static final String ALL = "All";
- /** Tag name of XorCompositeAssertion */
+ /** Tag name of ExactlyOne */
public static final String EXACTLY_ONE = "ExactlyOne";
/** Tag name of Policy */
Modified:
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/util/StAXPolicyWriter.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/util/StAXPolicyWriter.java?rev=406956&r1=406955&r2=406956&view=diff
==============================================================================
---
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/util/StAXPolicyWriter.java
(original)
+++
webservices/commons/trunk/modules/neethi/src/org/apache/ws/policy/util/StAXPolicyWriter.java
Tue May 16 07:32:31 2006
@@ -44,7 +44,7 @@
private int num = 1;
- StAXPolicyWriter() {
+ public StAXPolicyWriter() {
}
public void writePolicy(Policy policy, OutputStream output) {
@@ -226,7 +226,7 @@
Hashtable attributes = assertion.getAttributes();
writeAttributes(attributes, writer);
- String text = (String) assertion.getStrValue();
+ String text = assertion.getStrValue();
if (text != null) {
writer.writeCharacters(text);
}