Author: chinthaka
Date: Fri Apr 21 08:47:15 2006
New Revision: 395918
URL: http://svn.apache.org/viewcvs?rev=395918&view=rev
Log:
Reverting Dennis' commit according to
http://mail-archives.apache.org/mod_mbox/ws-commons-dev/200604.mbox/ajax/[EMAIL
PROTECTED]
Removed:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMDataSource.java
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
webservices/commons/trunk/modules/axiom/test/org/apache/axiom/om/impl/llom/OMSourcedElementTest.java
Modified:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMFactory.java
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
Modified:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMFactory.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMFactory.java?rev=395918&r1=395917&r2=395918&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMFactory.java
(original)
+++
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMFactory.java
Fri Apr 21 08:47:15 2006
@@ -50,17 +50,6 @@
OMXMLParserWrapper builder);
/**
- * Construct element with arbitrary data source. This is an optional
- * operation which may not be supported by all factories.
- *
- * @param source
- * @param localName
- * @param ns
- */
- public OMElement createOMElement(OMDataSource source, String localName,
- OMNamespace ns);
-
- /**
* This is almost the same as as createOMElement(localName,OMNamespace)
method above.
* But some people may, for some reason, need to use the conventional
method of putting a namespace.
* Or in other words people might not want to use the new OMNamespace.
@@ -105,7 +94,6 @@
/**
* @param parent
* @param text - This text itself can contain a namespace inside it.
- * @return
*/
public OMText createOMText(OMElement parent, QName text);
@@ -123,7 +111,6 @@
* @param parent
* @param text - This text itself can contain a namespace inside it.
* @param type
- * @return
*/
public OMText createOMText(OMElement parent, QName text, int type);
Modified:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java?rev=395918&r1=395917&r2=395918&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
(original)
+++
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
Fri Apr 21 08:47:15 2006
@@ -65,21 +65,6 @@
}
/**
- * Constructor linked to existing element.
- *
- * @param factory
- * @param parser
- * @param element
- */
- public StAXOMBuilder(OMFactory factory, XMLStreamReader parser, OMElement
element) {
- this(factory, parser);
- lastNode = element;
- document.setOMDocumentElement(element);
- doDebug = log.isDebugEnabled();
- populateOMElement(element);
- }
-
- /**
* @param filePath - Path to the XML file
* @throws XMLStreamException
* @throws FileNotFoundException
@@ -207,21 +192,7 @@
throw new OMException(e);
}
}
-
- /**
- * Populate element with data from parser START_ELEMENT event. This is used
- * when the source of data for an element needs to be parsed on demand. The
- * supplied element must already be set to the proper name and namespace.
- *
- * @param node element to be populated
- */
- private void populateOMElement(OMElement node) {
- // create the namespaces
- processNamespaceData(node);
- // fill in the attributes
- processAttributes(node);
- node.setLineNumber(parser.getLocation().getLineNumber());
- }
+
/**
* Method createOMElement.
@@ -245,7 +216,11 @@
(OMElement) lastNode, this);
e.setFirstChild(node);
}
- populateOMElement(node);
+ // create the namespaces
+ processNamespaceData(node);
+ // fill in the attributes
+ processAttributes(node);
+ node.setLineNumber(parser.getLocation().getLineNumber());
return node;
}
@@ -343,7 +318,7 @@
//if the namespace is not defined already when we write the start
tag declare it
// check whether this is the default namespace and make sure we
have not declared that earlier
namespaceURIFromParser = parser.getNamespaceURI(i);
- if ("".equals(nsprefix) || nsprefix == null) {
+ if (nsprefix == null || "".equals(nsprefix)) {
node.declareDefaultNamespace(parser.getNamespaceURI(i));
} else {
node.declareNamespace(namespaceURIFromParser, nsprefix);
Modified:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java?rev=395918&r1=395917&r2=395918&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
(original)
+++
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
Fri Apr 21 08:47:15 2006
@@ -18,7 +18,6 @@
import org.apache.axiom.om.OMAttribute;
import org.apache.axiom.om.OMComment;
import org.apache.axiom.om.OMContainer;
-import org.apache.axiom.om.OMDataSource;
import org.apache.axiom.om.OMDocType;
import org.apache.axiom.om.OMDocument;
import org.apache.axiom.om.OMElement;
@@ -62,7 +61,7 @@
/**
* Configure this factory to use the given document. Use with care.
- *
+ *
* @param document
*/
public void setDocument(DocumentImpl document) {
@@ -133,20 +132,6 @@
"The parent container can only be an ELEMENT, DOCUMENT " +
"or a DOCUMENT FRAGMENT");
}
- }
-
- /* (non-Javadoc)
- * @see
org.apache.axiom.om.OMFactory#createOMElement(org.apache.axiom.om.OMDataSource,
java.lang.String, org.apache.axiom.om.OMNamespace,
org.apache.axiom.om.OMContainer)
- */
- public OMElement createOMElement(OMDataSource source, String localName,
OMNamespace ns, OMContainer parent) {
- throw new UnsupportedOperationException("Not supported for DOM");
- }
-
- /* (non-Javadoc)
- * @see
org.apache.axiom.om.OMFactory#createOMElement(org.apache.axiom.om.OMDataSource,
java.lang.String, org.apache.axiom.om.OMNamespace)
- */
- public OMElement createOMElement(OMDataSource source, String localName,
OMNamespace ns) {
- throw new UnsupportedOperationException("Not supported for DOM");
}
/**
Modified:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
URL:
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java?rev=395918&r1=395917&r2=395918&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
(original)
+++
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
Fri Apr 21 08:47:15 2006
@@ -19,7 +19,6 @@
import org.apache.axiom.om.OMAttribute;
import org.apache.axiom.om.OMComment;
import org.apache.axiom.om.OMContainer;
-import org.apache.axiom.om.OMDataSource;
import org.apache.axiom.om.OMDocType;
import org.apache.axiom.om.OMDocument;
import org.apache.axiom.om.OMElement;
@@ -36,7 +35,6 @@
import org.apache.axiom.om.impl.llom.OMElementImpl;
import org.apache.axiom.om.impl.llom.OMNamespaceImpl;
import org.apache.axiom.om.impl.llom.OMProcessingInstructionImpl;
-import org.apache.axiom.om.impl.llom.OMSourcedElementImpl;
import org.apache.axiom.om.impl.llom.OMTextImpl;
import javax.xml.namespace.QName;
@@ -112,17 +110,6 @@
public OMElement createOMElement(QName qname, OMContainer parent)
throws OMException {
return new OMElementImpl(qname, parent, this);
- }
-
- /**
- * Construct element with arbitrary data source.
- *
- * @param source
- * @param localName
- * @param ns
- */
- public OMElement createOMElement(OMDataSource source, String localName,
OMNamespace ns) {
- return new OMSourcedElementImpl(localName, ns, this, source);
}
/**