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 2013/01/14 22:45:36 UTC
svn commit: r1433154 - in /webservices/commons/trunk/modules/axiom: ./
modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java
modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java
Author: veithen
Date: Mon Jan 14 21:45:35 2013
New Revision: 1433154
URL: http://svn.apache.org/viewvc?rev=1433154&view=rev
Log:
Reintegrated the branch for AXIOM-201. Although the change is far from complete, after the refactoring of SwitchingWrapper, we are now on the right track and can pursue this on the trunk.
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java
- copied unchanged from r1433135, webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/StreamSwitch.java
Modified:
webservices/commons/trunk/modules/axiom/ (props changed)
webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java
Propchange: webservices/commons/trunk/modules/axiom/
------------------------------------------------------------------------------
Merged /webservices/axiom/branches/AXIOM-201:r1183599-1433135
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java?rev=1433154&r1=1433153&r2=1433154&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java Mon Jan 14 21:45:35 2013
@@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFac
class OMStAXWrapper extends StreamReaderDelegate implements OMXMLStreamReaderEx {
private static final Log log = LogFactory.getLog(OMStAXWrapper.class);
- private final SwitchingWrapper switchingWrapper;
+ private final StreamSwitch streamSwitch = new StreamSwitch();
private XOPEncodingStreamReader xopEncoder;
/**
@@ -57,8 +57,8 @@ class OMStAXWrapper extends StreamReader
*/
public OMStAXWrapper(OMXMLParserWrapper builder, OMContainer startNode,
boolean cache, boolean preserveNamespaceContext) {
- switchingWrapper = new SwitchingWrapper(builder, startNode, cache, preserveNamespaceContext);
- setParent(switchingWrapper);
+ streamSwitch.setParent(new SwitchingWrapper(builder, startNode, cache, preserveNamespaceContext));
+ setParent(streamSwitch);
}
public boolean isInlineMTOM() {
@@ -72,14 +72,14 @@ class OMStAXWrapper extends StreamReader
if (value) {
if (xopEncoder != null) {
xopEncoder = null;
- setParent(switchingWrapper);
+ setParent(streamSwitch);
}
} else {
if (xopEncoder == null) {
// Since the intention is to support an efficient way to pass binary content to a
// consumer that is not aware of our data handler extension (see AXIOM-202), we
// use OptimizationPolicy.ALL, i.e. we ignore OMText#isOptimized().
- xopEncoder = new XOPEncodingStreamReader(switchingWrapper, ContentIDGenerator.DEFAULT,
+ xopEncoder = new XOPEncodingStreamReader(streamSwitch, ContentIDGenerator.DEFAULT,
OptimizationPolicy.ALL);
setParent(xopEncoder);
}
@@ -111,18 +111,18 @@ class OMStAXWrapper extends StreamReader
// some of them should also be defined properly by an interface
public boolean isClosed() {
- return switchingWrapper.isClosed();
+ return streamSwitch.isClosed();
}
public void releaseParserOnClose(boolean value) {
- switchingWrapper.releaseParserOnClose(value);
+ streamSwitch.releaseParserOnClose(value);
}
public OMDataSource getDataSource() {
- return switchingWrapper.getDataSource();
+ return streamSwitch.getDataSource();
}
public void enableDataSourceEvents(boolean value) {
- switchingWrapper.enableDataSourceEvents(value);
+ streamSwitch.enableDataSourceEvents(value);
}
}