You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ve...@apache.org on 2005/04/28 08:42:28 UTC

svn commit: r165108 [3/6] - in /webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance: ./ XMLConformanceTestingProject/ XMLConformanceTestingProject/bin/ XMLConformanceTestingProject/src/ XMLConformanceTestingProject/src/org/ XMLConformanceTestingProject/src/org/apache/ XMLConformanceTestingProject/src/org/apache/axis/ XMLConformanceTestingProject/src/org/apache/axis/om/ XMLConformanceTestingProject/src/org/apache/axis/om/impl/ XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/ XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/ XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/exception/ XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/ XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/serialize/ XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/traverse/ XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/ XMLConformanceTestingProject/test/ XMLConformanceTestingProject/test/junittesting/

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMConstants.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMConstants.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMConstants.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * Interface OMConstants
+ */
+public interface OMConstants {
+    /**
+     * Field SOAP_ENVELOPE_NAMESPACE_URI
+     */
+    public static final String SOAP_ENVELOPE_NAMESPACE_URI =
+            "http://schemas.xmlsoap.org/soap/envelope/";
+
+    /**
+     * Field SOAPENVELOPE_NAMESPACE_PREFIX
+     */
+    public static final String SOAPENVELOPE_NAMESPACE_PREFIX = "soapenv";
+
+    /**
+     * Field SOAPENVELOPE_LOCAL_NAME
+     */
+    public static final String SOAPENVELOPE_LOCAL_NAME = "Envelope";
+
+    // Header constants
+    /**
+     * Field HEADER_NAMESPACEURI
+     */
+    public static final String HEADER_NAMESPACEURI =
+            SOAP_ENVELOPE_NAMESPACE_URI;
+
+    /**
+     * Field HEADER_LOCAL_NAME
+     */
+    public static final String HEADER_LOCAL_NAME = "Header";
+
+    /**
+     * Field HEADER_NAMESPACE_PREFIX
+     */
+    public static final String HEADER_NAMESPACE_PREFIX =
+            SOAPENVELOPE_NAMESPACE_PREFIX;
+
+    // Body Constants
+    /**
+     * Field BODY_NAMESPACE_URI
+     */
+    public static final String BODY_NAMESPACE_URI = SOAP_ENVELOPE_NAMESPACE_URI;
+
+    /**
+     * Field BODY_LOCAL_NAME
+     */
+    public static final String BODY_LOCAL_NAME = "Body";
+
+    /**
+     * Field BODY_NAMESPACE_PREFIX
+     */
+    public static final String BODY_NAMESPACE_PREFIX =
+            SOAPENVELOPE_NAMESPACE_PREFIX;
+
+    /**
+     * Field BODY_FAULT_LOCAL_NAME
+     */
+    public static final String BODY_FAULT_LOCAL_NAME = "Fault";
+
+    // Attribute names of a SOAP Envelope
+    /**
+     * Field ATTR_ACTOR
+     */
+    public static final String ATTR_ACTOR = "actor";
+
+    /**
+     * Field ATTR_MUSTUNDERSTAND
+     */
+    public static final String ATTR_MUSTUNDERSTAND = "mustUnderstand";
+
+    /**
+     * Field SOAPFAULT_LOCAL_NAME
+     */
+    public static final String SOAPFAULT_LOCAL_NAME = "Fault";
+
+    /**
+     * Field SOAPFAULT_CODE_LOCAL_NAME
+     */
+    public static final String SOAPFAULT_CODE_LOCAL_NAME = "faultcode";
+
+    /**
+     * Field SOAPFAULT_STRING_LOCAL_NAME
+     */
+    public static final String SOAPFAULT_STRING_LOCAL_NAME = "faultstring";
+
+    /**
+     * Field SOAPFAULT_ACTOR_LOCAL_NAME
+     */
+    public static final String SOAPFAULT_ACTOR_LOCAL_NAME = "faultactor";
+
+    /**
+     * Field SOAPFAULT_DETAIL_LOCAL_NAME
+     */
+    public static final String SOAPFAULT_DETAIL_LOCAL_NAME = "detail";
+
+    /**
+     * Field SOAPFAULT_NAMESPACE_URI
+     */
+    public static final String SOAPFAULT_NAMESPACE_URI =
+            SOAP_ENVELOPE_NAMESPACE_URI;
+
+    /**
+     * Field SOAPFAULT_NAMESPACE_PREFIX
+     */
+    public static final String SOAPFAULT_NAMESPACE_PREFIX =
+            SOAPENVELOPE_NAMESPACE_PREFIX;
+
+    // OMBuilder constants
+    /**
+     * Field PUSH_TYPE_BUILDER
+     */
+    public static final short PUSH_TYPE_BUILDER = 0;
+
+    /**
+     * Field PULL_TYPE_BUILDER
+     */
+    public static final short PULL_TYPE_BUILDER = 1;
+
+    /**
+     * Field ARRAY_ITEM_NSURI
+     */
+    public static final String ARRAY_ITEM_NSURI =
+            "http://axis.apache.org/encoding/Arrays";
+
+    /**
+     * Field ARRAY_ITEM_LOCALNAME
+     */
+    public static final String ARRAY_ITEM_LOCALNAME = "item";
+
+    /**
+     * Field ARRAY_ITEM_NS_PREFIX
+     */
+    public static final String ARRAY_ITEM_NS_PREFIX = "arrays";
+
+    /**
+     * Field ARRAY_ITEM_QNAME
+     */
+    public static final String ARRAY_ITEM_QNAME =
+            OMConstants.ARRAY_ITEM_NS_PREFIX + ':'
+                    + OMConstants.ARRAY_ITEM_LOCALNAME;
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMDTD.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMDTD.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMDTD.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMDTD.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,19 @@
+/*
+ * Created on Apr 21, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.axis.om;
+
+/**
+ * @author sunja07
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface OMDTD extends OMNode {
+	
+	//public String getContent();
+
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMElement.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMElement.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,254 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import java.util.Iterator;
+
+/**
+ * Interface OMElement
+ */
+public interface OMElement extends OMNode {
+    /**
+     * This will add child to the element. One must preserve the order of children, in this operation
+     * Tip : appending the new child is prefered
+     *
+     * @param omNode
+     */
+    public void addChild(OMNode omNode);
+
+    /**
+     * This will search for children with a given QName and will return an iterator to traverse through
+     * the OMNodes.
+     * This will match localName and namespaceURI only. localName only or namespaceURI only can also be given. But
+     * the other parameter should be set to null
+     * Example : If you want to get all the addressing headers, header.getChildrenWithName(new QName(AddressingNamespace, null))
+     * will do.
+     *
+     * @param elementQName
+     * @return
+     * @throws OMException
+     */
+    public Iterator getChildrenWithName(QName elementQName) throws OMException;
+
+    /**
+     * This will return the first matched child, return null if none found
+     *
+     * @param elementQName
+     * @return
+     * @throws OMException
+     */
+    public OMNode getChildWithName(QName elementQName) throws OMException;
+
+    /**
+     * This returns a collection of this element.
+     * Children can be of types OMElement, OMText.
+     *
+     * @return
+     */
+    public Iterator getChildren();
+
+    /**
+     * THis will create a namespace in the current element scope
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     */
+    public OMNamespace declareNamespace(String uri, String prefix);
+
+    /**
+     * @param namespace
+     * @return
+     */
+    public OMNamespace declareNamespace(OMNamespace namespace);
+
+    /**
+     * This will find a namespace with the given uri and prefix, in the scope of the hierarchy.
+     * This will start to find from the current element and goes up in the hiararchy until this finds one.
+     * If none is found, return null
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     * @throws OMException
+     */
+    public OMNamespace findInScopeNamespace(String uri, String prefix)
+            throws OMException;
+
+    /**
+     * This will ckeck for the namespace <B>only</B> in the current Element
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     * @throws OMException
+     */
+    public OMNamespace findDeclaredNamespace(String uri, String prefix)
+            throws OMException;
+
+    /**
+     * This will provide a list of namespace defined within this Element <B>only</B>
+     *
+     * @return
+     * @throws OMException
+     */
+    public Iterator getAllDeclaredNamespaces();
+
+    /**
+     * This will help to search for an attribute with a given QName within this Element
+     *
+     * @param qname
+     * @return
+     * @throws OMException
+     */
+    public OMAttribute getAttributeWithQName(QName qname) throws OMException;
+
+    /**
+     * This will return a List of OMAttributes
+     *
+     * @return
+     */
+    public Iterator getAttributes();
+
+    /**
+     * This will insert attribute to this element. Implementor can decide as to insert this
+     * in the front or at the end of set of attributes
+     *
+     * @param attr
+     * @return
+     */
+    public OMAttribute insertAttribute(OMAttribute attr);
+
+    /**
+     * @param attributeName
+     * @param value
+     * @param ns            - the namespace has to be one of the in scope namespace. i.e. the passed namespace
+     *                      must be declared in the parent element of this attribute or ancestors of the parent element of the attribute
+     * @return
+     */
+    public OMAttribute insertAttribute(String attributeName, String value,
+                                       OMNamespace ns);
+
+    /**
+     * Method removeAttribute
+     *
+     * @param attr
+     */
+    public void removeAttribute(OMAttribute attr);
+
+    /**
+     * Method setBuilder
+     *
+     * @param wrapper
+     */
+    public void setBuilder(OMXMLParserWrapper wrapper);
+
+    /**
+     * Method getBuilder
+     *
+     * @return
+     */
+    public OMXMLParserWrapper getBuilder();
+
+    /**
+     * Set the first child
+     *
+     * @param node
+     */
+    public void setFirstChild(OMNode node);
+
+    /**
+     * Get the first child
+     *
+     * @return
+     */
+    public OMNode getFirstChild();
+    
+    /**
+     * Convenience extension of the getFirstChild
+     * @return
+     */
+    
+    public OMElement getFirstElement();
+
+    /**
+      * Convenience extension of the getNextSibling
+      * @return
+      */
+    public OMElement getNextSiblingElement() throws OMException;
+
+    /**
+     * Returns the pull parser that will generate the pull
+     * events relevant to THIS element
+     *
+     * @param cacheOff
+     * @return
+     */
+    public XMLStreamReader getPullParser(boolean cacheOff);
+
+    /**
+     * This will return the non-empty text children as a String
+     * @return
+     */
+    public String getText();
+
+    /**
+     * Method getLocalName
+     *
+     * @return
+     */
+    public String getLocalName();
+
+    /**
+     * Method setLocalName
+     *
+     * @param localName
+     */
+    public void setLocalName(String localName);
+
+    /**
+     * Method getNamespace
+     *
+     * @return
+     * @throws OMException
+     */
+    public OMNamespace getNamespace() throws OMException;
+
+    /**
+     * Method getNamespaceName
+     *
+     * @return
+     */
+    public String getNamespaceName();
+
+    /**
+     * Method setNamespace
+     *
+     * @param namespace
+     */
+    public void setNamespace(OMNamespace namespace);
+
+    public QName getQName();
+
+
+    /**
+     * This will completely parse this node and build the object structure in the memory
+     * @throws OMException
+     */
+    public void populateYourSelf() throws OMException ;
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMException.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMException.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMException.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMException.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * Class OMException
+ */
+public class OMException extends RuntimeException {
+    /**
+     * Constructor OMException
+     */
+    public OMException() {
+    }
+
+    /**
+     * Constructor OMException
+     *
+     * @param message
+     */
+    public OMException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor OMException
+     *
+     * @param message
+     * @param cause
+     */
+    public OMException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Constructor OMException
+     *
+     * @param cause
+     */
+    public OMException(Throwable cause) {
+        super(cause);
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMFactory.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMFactory.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMFactory.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,217 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+import javax.xml.namespace.QName;
+import org.apache.axis.om.impl.llom.OMDocument;
+//Actually importing a implemenation class in an api abstract class definition is not good
+//But as of now OMDocument has no corresponding API interface defined for it, hence
+//couldn't help importing the above line.
+
+/**
+ * Class OMFactory
+ */
+public abstract class OMFactory {
+    /**
+     * @param localName
+     * @param ns
+     * @return
+     */
+    public abstract OMElement createOMElement(String localName, OMNamespace ns);
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract OMElement createOMElement(String localName, OMNamespace ns,
+                                              OMElement parent,
+                                              OMXMLParserWrapper builder);
+
+    /**
+     * 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.
+     * Well, this is for those people.
+     *
+     * @param localName
+     * @param namespaceURI
+     * @param namespacePrefix
+     * @return
+     */
+    public abstract OMElement createOMElement(String localName,
+                                              String namespaceURI,
+                                              String namespacePrefix);
+
+    /**
+     * QName(localPart),
+     * QName(namespaceURI, localPart) - a prefix will be assigned to this
+     * QName(namespaceURI, localPart, prefix)
+     *
+     * @param qname
+     * @param parent
+     * @return
+     * @throws OMException
+     */
+    public abstract OMElement createOMElement(QName qname, OMElement parent)
+            throws OMException;
+
+    /**
+     * Method createOMDTD
+     * 
+     * @param parent
+     * @param content
+     * @return
+     */
+    public abstract OMDTD createOMDTD(OMDocument parent, String content);
+
+    /**
+     * @param uri
+     * @param prefix
+     * @return
+     */
+    public abstract OMNamespace createOMNamespace(String uri, String prefix);
+
+    /**
+     * @param parent
+     * @param text
+     * @return
+     */
+    public abstract OMText createText(OMElement parent, String text);
+
+    /**
+     * @param parent
+     * @param piTarget
+     * @param piData
+     * @return
+     */
+    public abstract OMPI createOMPI(OMElement parent, String piTarget, String piData);
+    
+    /**
+     * @param parent
+     * @param content
+     * @return
+     */
+    public abstract OMComment createOMComment(OMElement parent, String content);
+    
+    /**
+     * @param s
+     * @return
+     */
+    public abstract OMText createText(String s);
+
+    /**
+     * @param envelope
+     * @return
+     */
+    public abstract SOAPBody createSOAPBody(SOAPEnvelope envelope);
+
+    /**
+     * @param envelope
+     * @param builder
+     * @return
+     */
+    public abstract SOAPBody createSOAPBody(SOAPEnvelope envelope,
+                                            OMXMLParserWrapper builder);
+
+    /**
+     * @param ns
+     * @param builder
+     * @return
+     */
+    public abstract SOAPEnvelope createSOAPEnvelope(OMNamespace ns,
+                                                    OMXMLParserWrapper builder);
+
+    /**
+     * @param ns
+     * @return
+     */
+    public abstract SOAPEnvelope createSOAPEnvelope(OMNamespace ns);
+
+    /**
+     * @param envelope
+     * @return
+     */
+    public abstract SOAPHeader createSOAPHeader(SOAPEnvelope envelope);
+
+    /**
+     * @param envelope
+     * @param builder
+     * @return
+     */
+    public abstract SOAPHeader createSOAPHeader(SOAPEnvelope envelope,
+                                                OMXMLParserWrapper builder);
+
+    /**
+     * @param localName
+     * @param ns
+     * @return
+     */
+    public abstract SOAPHeaderBlock createSOAPHeaderBlock(String localName,
+                                                          OMNamespace ns);
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract SOAPHeaderBlock createSOAPHeaderBlock(String localName,
+                                                          OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+
+    /**
+     * @param parent
+     * @param e
+     * @return
+     */
+    public abstract SOAPFault createSOAPFault(SOAPBody parent, Exception e);
+
+    /**
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract SOAPFault createSOAPFault(OMNamespace ns, SOAPBody parent,
+                                              OMXMLParserWrapper builder);
+
+    // make the constructor protected
+
+    /**
+     * Constructor OMFactory
+     */
+    protected OMFactory() {
+    }
+
+    /**
+     * Method newInstance
+     *
+     * @return
+     */
+    public static OMFactory newInstance() {
+        return FactoryFinder.findFactory(null);
+    }
+
+    /**
+     * Method getDefaultEnvelope
+     *
+     * @return
+     */
+    public abstract SOAPEnvelope getDefaultEnvelope();
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMFactoryException.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMFactoryException.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMFactoryException.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMFactoryException.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * Class OMFactoryException
+ */
+public class OMFactoryException extends OMException {
+    /**
+     * Constructor OMFactoryException
+     */
+    public OMFactoryException() {
+    }
+
+    /**
+     * Constructor OMFactoryException
+     *
+     * @param message
+     */
+    public OMFactoryException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor OMFactoryException
+     *
+     * @param message
+     * @param cause
+     */
+    public OMFactoryException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Constructor OMFactoryException
+     *
+     * @param cause
+     */
+    public OMFactoryException(Throwable cause) {
+        super(cause);
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMNamespace.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMNamespace.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMNamespace.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMNamespace.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * Interface OMNamespace
+ */
+public interface OMNamespace {
+    /**
+     * Method equals
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     */
+    public boolean equals(String uri, String prefix);
+
+    /**
+     * Method getPrefix
+     *
+     * @return
+     */
+    public String getPrefix();
+
+    /**
+     * Method getName
+     *
+     * @return
+     */
+    public String getName();
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMNode.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMNode.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMNode.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Interface OMNode
+ */
+public interface OMNode {
+    /**
+     * The node is an <code>Element</code>.
+     */
+    public static final short ELEMENT_NODE = 1;
+
+    /**
+     * The node is an <code>Attr</code>.
+     */
+    public static final short ATTRIBUTE_NODE = 2;
+
+    /**
+     * The node is a <code>Text</code> node.
+     */
+    public static final short TEXT_NODE = 3;
+
+    /**
+     * The node is a <code>CDATASection</code>.
+     */
+    public static final short CDATA_SECTION_NODE = 4;
+
+    /**
+     * The node is a <code>Comment</code>.
+     */
+    public static final short COMMENT_NODE = 8;
+
+    /**
+     * The node is a <code>Document</code>.
+     */
+    public static final short DOCUMENT_NODE = 9;
+
+    /**
+     * This method should return the immediate parent of the node.
+     * Parent is always an Element
+     *
+     * @return
+     * @throws OMException
+     */
+    public OMElement getParent() throws OMException;
+
+    /**
+     * Method setParent
+     *
+     * @param element
+     */
+    public void setParent(OMElement element);
+
+    /**
+     * This will give the next sibling. This can be an OMAttribute for OMAttribute or OMText or OMELement for others.
+     *
+     * @return
+     * @throws OMException
+     */
+    public OMNode getNextSibling() throws OMException;
+
+    /**
+     * Method setNextSibling
+     *
+     * @param node
+     */
+    public void setNextSibling(OMNode node);
+
+    /**
+     * This will return the literal value of the node.
+     * OMText --> the text
+     * OMElement --> local name of the element in String format
+     * OMAttribute --> the value of the attribue
+     *
+     * @return
+     * @throws OMException
+     */
+    public String getValue() throws OMException;
+
+    /**
+     * Method setValue
+     *
+     * @param value
+     */
+    public void setValue(String value);
+
+    /**
+     * this will indicate whether parser has parsed this information item completely or not.
+     * If somethings info are not available in the item, one has to check this attribute to make sure that, this
+     * item has been parsed completely or not.
+     *
+     * @return
+     */
+    public boolean isComplete();
+
+    /**
+     * Method setComplete
+     *
+     * @param state
+     */
+    public void setComplete(boolean state);
+
+    /**
+     * This will remove this information item and its children, from the model completely
+     *
+     * @throws OMException
+     */
+    public void detach() throws OMException;
+
+    /**
+     * This will insert a sibling just after the current information item.
+     *
+     * @param sibling
+     * @throws OMException
+     */
+    public void insertSiblingAfter(OMNode sibling) throws OMException;
+
+    /**
+     * This will insert a sibling just before the current information item
+     *
+     * @param sibling
+     * @throws OMException
+     */
+    public void insertSiblingBefore(OMNode sibling) throws OMException;
+
+    /**
+     * This is to get the type of node, as this is the super class of all the nodes
+     *
+     * @return
+     * @throws OMException
+     */
+    public short getType() throws OMException;
+
+    /**
+     * Method setType
+     *
+     * @param nodeType
+     * @throws OMException
+     */
+    public void setType(short nodeType) throws OMException;
+
+    /**
+     * get the previous sibling
+     *
+     * @return
+     */
+    public OMNode getPreviousSibling();
+
+    /**
+     * Set the previous sibling
+     *
+     * @param previousSibling
+     */
+    public void setPreviousSibling(OMNode previousSibling);
+
+    /**
+     * @param writer
+     * @param cache
+     * @throws XMLStreamException
+     */
+    public void serialize(XMLStreamWriter writer, boolean cache)
+            throws XMLStreamException;
+
+    public void serialize(XMLStreamWriter writer)
+            throws XMLStreamException;
+
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMPI.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMPI.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMPI.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMPI.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,23 @@
+/*
+ * Created on Apr 18, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.axis.om;
+
+/**
+ * @author sunja07
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface OMPI extends OMNode {
+	
+	public String getTarget();
+	
+	public String getContent();
+	
+	public OMElement getParent();
+
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMSerializer.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMSerializer.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMSerializer.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Interface OMSerializer
+ */
+public interface OMSerializer {
+    /**
+     * Method serialize
+     *
+     * @param obj
+     * @param writer
+     * @throws XMLStreamException
+     */
+    void serialize(Object obj, XMLStreamWriter writer)
+            throws XMLStreamException;
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMText.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMText.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMText.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMText.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * Interface OMText
+ */
+public interface OMText extends OMNode {
+    /**
+     * We use the OMText class to hold comments, text, characterData, CData, etc.,
+     * The codes are found in OMNode class
+     *
+     * @param type
+     */
+    public void setTextType(short type);
+
+    /**
+     * Method getTextType
+     *
+     * @return
+     */
+    public short getTextType();
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMXMLParserWrapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMXMLParserWrapper.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMXMLParserWrapper.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/OMXMLParserWrapper.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * Interface OMXMLParserWrapper
+ */
+public interface OMXMLParserWrapper {
+    /**
+     * Proceed the parser one step and return the event value
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     * @throws OMException
+     */
+    int next() throws OMException;
+
+    /**
+     * Discard the current element
+     * This should remove the given element and its decendants.
+     *
+     * @param el
+     * @throws org.apache.axis.om.OMException
+     * @throws OMException
+     */
+    void discard(OMElement el) throws OMException;
+
+    /**
+     * @param b
+     * @throws org.apache.axis.om.OMException
+     * @throws OMException
+     */
+    void setCache(boolean b) throws OMException;
+
+    /**
+     * Allows to access the underlying parser. Since the parser
+     * depends on the underlying implementation,an Object is returned
+     * However the implementations may have restrictions in letting access to
+     * the parser
+     *
+     * @return
+     */
+    Object getParser();
+
+    /**
+     * @return the complete status
+     */
+    boolean isCompleted();
+
+    /**
+     * @return the document element
+     */
+    OMElement getDocumentElement();
+
+    /**
+     * Returns the type of the builder.
+     * Can be either the
+     * PUSH_TYPE_BUILDER or PULL_TYPE_BUILDER
+     *
+     * @return
+     */
+    short getBuilderType();
+
+    /**
+     * Registers an external content handler. Especially useful for
+     * push type builders. will throw an unsupportedOperationExcveption if
+     * such handler registration is not supported
+     *
+     * @param obj
+     */
+    void registerExternalContentHandler(Object obj);
+
+    /**
+     * get the registered external content handler
+     *
+     * @return
+     */
+    Object getRegisteredContentHandler();
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPBody.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPBody.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPBody.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPBody.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * An object that represents the contents of the SOAP body
+ * element in a SOAP message. B SOAP body element consists of XML data
+ * that affects the way the application-specific content is processed.
+ * <P>
+ * B <code>SOAPBody</code> object contains <code>OMBodyBlock</code>
+ * objects, which have the content for the SOAP body.
+ * B <code>SOAPFault</code> object, which carries status and/or
+ * error information, is an example of a <code>OMBodyBlock</code> object.
+ */
+public interface SOAPBody extends OMElement {
+    /**
+     * Creates a new <code>SOAPFault</code> object and adds it to
+     * this <code>SOAPBody</code> object.
+     *
+     * @param e
+     * @return the new <code>SOAPFault</code> object
+     * @throws org.apache.axis.om.OMException if there is a SOAP error
+     * @throws OMException
+     */
+    public abstract SOAPFault addFault(Exception e) throws OMException;
+
+    /**
+     * Indicates whether a <code>SOAPFault</code> object exists in
+     * this <code>SOAPBody</code> object.
+     *
+     * @return <code>true</code> if a <code>SOAPFault</code> object exists in
+     *         this <code>SOAPBody</code> object; <code>false</code>
+     *         otherwise
+     */
+    public abstract boolean hasFault();
+
+    /**
+     * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+     * object.
+     *
+     * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+     *         object
+     */
+    public abstract SOAPFault getFault();
+
+    /**
+     * @param soapFault
+     * @throws OMException
+     */
+    public abstract void addFault(SOAPFault soapFault) throws OMException;
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPEnvelope.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPEnvelope.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPEnvelope.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPEnvelope.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * Interface SOAPEnvelope
+ */
+public interface SOAPEnvelope extends OMElement {
+    /**
+     * Returns the <CODE>SOAPHeader</CODE> object for this <CODE>
+     * SOAPEnvelope</CODE> object.
+     * <P> This SOAPHeader will just be a container for all the headers in the
+     * <CODE>OMMessage</CODE>
+     * </P>
+     *
+     * @return the <CODE>SOAPHeader</CODE> object or <CODE>
+     *         null</CODE> if there is none
+     * @throws OMException if there is a problem
+     *                     obtaining the <CODE>SOAPHeader</CODE> object
+     */
+    public abstract SOAPHeader getHeader() throws OMException;
+
+    /**
+     * Returns the <CODE>SOAPBody</CODE> object associated with
+     * this <CODE>SOAPEnvelope</CODE> object.
+     * <P> This SOAPBody will just be a container for all the BodyElements in the
+     * <CODE>OMMessage</CODE>
+     * </P>
+     *
+     * @return the <CODE>SOAPBody</CODE> object for this <CODE>
+     *         SOAPEnvelope</CODE> object or <CODE>null</CODE> if there
+     *         is none
+     * @throws OMException if there is a problem
+     *                     obtaining the <CODE>SOAPBody</CODE> object
+     */
+    public abstract SOAPBody getBody() throws OMException;
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPFault.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPFault.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPFault.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPFault.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+import javax.xml.namespace.QName;
+
+/**
+ * An element in the <CODE>SOAPBody</CODE> object that contains
+ * error and/or status information. This information may relate to
+ * errors in the <CODE>OMMessage</CODE> object or to problems
+ * that are not related to the content in the message itself.
+ * Problems not related to the message itself are generally errors
+ * in processing, such as the inability to communicate with an
+ * upstream server.
+ * <P>
+ * The <CODE>SOAPFault</CODE> interface provides methods for
+ * retrieving the information contained in a <CODE>
+ * SOAPFault</CODE> object and for setting the fault code, the
+ * fault actor, and a string describing the fault. B fault code is
+ * one of the codes defined in the SOAP 1.1 specification that
+ * describe the fault. An actor is an intermediate recipient to
+ * whom a message was routed. The message path may include one or
+ * more actors, or, if no actors are specified, the message goes
+ * only to the default actor, which is the final intended
+ * recipient.
+ */
+public interface SOAPFault extends OMElement {
+    /**
+     * Sets this <CODE>SOAPFault</CODE> object with the given
+     * fault code.
+     * <P>Fault codes, which given information about the fault,
+     * are defined in the SOAP 1.1 specification.</P>
+     *
+     * @param faultCode a <CODE>QName</CODE> giving
+     *                  the fault code to be set; must be one of the fault codes
+     *                  defined in the SOAP 1.1 specification
+     * @throws OMException if there was an error in
+     *                     adding the <CODE>faultCode</CODE> to the underlying XML
+     *                     tree.
+     * @see #getFaultCode() getFaultCode()
+     */
+    public abstract void setFaultCode(QName faultCode) throws OMException;
+
+    /**
+     * Gets the fault code for this <CODE>SOAPFault</CODE>
+     * object.
+     *
+     * @return a <CODE>String</CODE> with the fault code
+     * @see #setFaultCode(QName) setFaultCode(QName)
+     */
+    public abstract QName getFaultCode();
+
+    /**
+     * Sets this <CODE>SOAPFault</CODE> object with the given
+     * fault actor.
+     * <P>The fault actor is the recipient in the message path who
+     * caused the fault to happen.</P>
+     *
+     * @param faultActor a <CODE>String</CODE>
+     *                   identifying the actor that caused this <CODE>
+     *                   SOAPFault</CODE> object
+     * @throws OMException if there was an error in
+     *                     adding the <CODE>faultActor</CODE> to the underlying XML
+     *                     tree.
+     * @see #getFaultActor() getFaultActor()
+     */
+    public abstract void setFaultActor(String faultActor) throws OMException;
+
+    /**
+     * Gets the fault actor for this <CODE>SOAPFault</CODE>
+     * object.
+     *
+     * @return a <CODE>String</CODE> giving the actor in the message
+     *         path that caused this <CODE>SOAPFault</CODE> object
+     * @see #setFaultActor(String) setFaultActor(java.lang.String)
+     */
+    public abstract String getFaultActor();
+
+    /**
+     * Sets the fault string for this <CODE>SOAPFault</CODE>
+     * object to the given string.
+     *
+     * @param faultString a <CODE>String</CODE>
+     *                    giving an explanation of the fault
+     * @throws OMException if there was an error in
+     *                     adding the <CODE>faultString</CODE> to the underlying XML
+     *                     tree.
+     * @see #getFaultString() getFaultString()
+     */
+    public abstract void setFaultString(String faultString) throws OMException;
+
+    /**
+     * Gets the fault string for this <CODE>SOAPFault</CODE>
+     * object.
+     *
+     * @return a <CODE>String</CODE> giving an explanation of the
+     *         fault
+     */
+    public abstract String getFaultString();
+
+    /**
+     * This will set the given omnode under the detail element of SOAP fault
+     *
+     * @param detail
+     */
+    public abstract void setDetailInformation(OMNode detail);
+
+    /**
+     * Method getDetailInformation
+     *
+     * @return
+     */
+    public abstract OMNode getDetailInformation();
+
+    /**
+     * Method getException
+     *
+     * @return
+     * @throws OMException
+     */
+    public abstract Exception getException() throws OMException;
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPHeader.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPHeader.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPHeader.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPHeader.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+import java.util.Iterator;
+
+/**
+ * Interface SOAPHeader
+ */
+public interface SOAPHeader extends OMElement {
+    /**
+     * Creates a new <CODE>SOAPHeaderBlock</CODE> object
+     * initialized with the specified name and adds it to this
+     * <CODE>SOAPHeader</CODE> object.
+     *
+     * @param localName
+     * @param ns
+     * @return the new <CODE>SOAPHeaderBlock</CODE> object that
+     *         was inserted into this <CODE>SOAPHeader</CODE>
+     *         object
+     * @throws OMException if a SOAP error occurs
+     */
+    public abstract SOAPHeaderBlock addHeaderBlock(
+            String localName, OMNamespace ns) throws OMException;
+
+    /**
+     * Returns a list of all the <CODE>SOAPHeaderBlock</CODE>
+     * objects in this <CODE>SOAPHeader</CODE> object that have the
+     * the specified actor. An actor is a global attribute that
+     * indicates the intermediate parties to whom the message should
+     * be sent. An actor receives the message and then sends it to
+     * the next actor. The default actor is the ultimate intended
+     * recipient for the message, so if no actor attribute is
+     * included in a <CODE>SOAPHeader</CODE> object, the message is
+     * sent to its ultimate destination.
+     *
+     * @param actor a <CODE>String</CODE> giving the
+     *              URI of the actor for which to search
+     * @return an <CODE>Iterator</CODE> object over all the <CODE>
+     *         SOAPHeaderBlock</CODE> objects that contain the
+     *         specified actor
+     * @see #extractHeaderBlocks(java.lang.String) extractHeaderBlocks(java.lang.String)
+     */
+    public abstract Iterator examineHeaderBlocks(String actor);
+
+    /**
+     * Returns a list of all the <CODE>SOAPHeaderBlock</CODE>
+     * objects in this <CODE>SOAPHeader</CODE> object that have
+     * the the specified actor and detaches them from this <CODE>
+     * SOAPHeader</CODE> object.
+     * <P>This method allows an actor to process only the parts of
+     * the <CODE>SOAPHeader</CODE> object that apply to it and to
+     * remove them before passing the message on to the next
+     * actor.
+     *
+     * @param actor a <CODE>String</CODE> giving the
+     *              URI of the actor for which to search
+     * @return an <CODE>Iterator</CODE> object over all the <CODE>
+     *         SOAPHeaderBlock</CODE> objects that contain the
+     *         specified actor
+     * @see #examineHeaderBlocks(java.lang.String) examineHeaderBlocks(java.lang.String)
+     */
+    public abstract Iterator extractHeaderBlocks(String actor);
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderBlock</code> objects in this <code>SOAPHeader</code>
+     * object that have the specified actor and that have a MustUnderstand
+     * attribute whose value is equivalent to <code>true</code>.
+     *
+     * @param actor a <code>String</code> giving the URI of the actor for which
+     *              to search
+     * @return an <code>Iterator</code> object over all the
+     *         <code>SOAPHeaderBlock</code> objects that contain the
+     *         specified actor and are marked as MustUnderstand
+     */
+    public abstract Iterator examineMustUnderstandHeaderBlocks(String actor);
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderBlock</code> objects in this <code>SOAPHeader</code>
+     * object.
+     *
+     * @return an <code>Iterator</code> object over all the
+     *         <code>SOAPHeaderBlock</code> objects contained by this
+     *         <code>SOAPHeader</code>
+     */
+    public abstract Iterator examineAllHeaderBlocks();
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderBlock</code> objects in this <code>SOAPHeader </code>
+     * object and detaches them from this <code>SOAPHeader</code> object.
+     *
+     * @return an <code>Iterator</code> object over all the
+     *         <code>SOAPHeaderBlock</code> objects contained by this
+     *         <code>SOAPHeader</code>
+     */
+    public abstract Iterator extractAllHeaderBlocks();
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPHeaderBlock.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPHeaderBlock.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPHeaderBlock.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/SOAPHeaderBlock.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+/**
+ * <P>An object representing the contents in the SOAP header part
+ * of the SOAP envelope. The immediate children of a <CODE>
+ * SOAPHeader</CODE> object can be represented only as <CODE>
+ * SOAPHeaderBlock</CODE> objects.</P>
+ * <P>B <CODE>SOAPHeaderBlock</CODE> object can have other
+ * <CODE>OMElement</CODE> objects as its children.</P>
+ */
+public interface SOAPHeaderBlock extends OMElement {
+    /**
+     * Sets the actor associated with this <CODE>
+     * SOAPHeaderBlock</CODE> object to the specified actor. The
+     * default value of an actor is: <CODE>
+     * OMConstants.URI_SOAP_ACTOR_NEXT</CODE>
+     *
+     * @param actorURI a <CODE>String</CODE> giving
+     *                 the URI of the actor to set
+     * @throws java.lang.IllegalArgumentException
+     *          if
+     *          there is a problem in setting the actor.
+     * @see #getActor() getActor()
+     */
+    public abstract void setActor(String actorURI);
+
+    /**
+     * Returns the uri of the actor associated with this <CODE>
+     * SOAPHeaderBlock</CODE> object.
+     *
+     * @return a <CODE>String</CODE> giving the URI of the
+     *         actor
+     * @see #setActor(java.lang.String) setActor(java.lang.String)
+     */
+    public abstract String getActor();
+
+    /**
+     * Sets the mustUnderstand attribute for this <CODE>
+     * SOAPHeaderBlock</CODE> object to be on or off.
+     * <P>If the mustUnderstand attribute is on, the actor who
+     * receives the <CODE>SOAPHeaderBlock</CODE> must process it
+     * correctly. This ensures, for example, that if the <CODE>
+     * SOAPHeaderBlock</CODE> object modifies the message, that
+     * the message is being modified correctly.</P>
+     *
+     * @param mustUnderstand <CODE>true</CODE> to
+     *                       set the mustUnderstand attribute on; <CODE>false</CODE>
+     *                       to turn if off
+     * @throws java.lang.IllegalArgumentException
+     *          if
+     *          there is a problem in setting the actor.
+     * @see #getMustUnderstand() getMustUnderstand()
+     */
+    public abstract void setMustUnderstand(boolean mustUnderstand);
+
+    /**
+     * Returns whether the mustUnderstand attribute for this
+     * <CODE>SOAPHeaderBlock</CODE> object is turned on.
+     *
+     * @return <CODE>true</CODE> if the mustUnderstand attribute of
+     *         this <CODE>SOAPHeaderBlock</CODE> object is turned on;
+     *         <CODE>false</CODE> otherwise
+     */
+    public abstract boolean getMustUnderstand();
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMAttributeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMAttributeImpl.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMAttributeImpl.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMAttributeImpl.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om.impl.llom;
+
+import org.apache.axis.om.OMAttribute;
+import org.apache.axis.om.OMNamespace;
+
+import javax.xml.namespace.QName;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Class OMAttributeImpl
+ */
+public class OMAttributeImpl implements OMAttribute {
+    /**
+     * Field localName
+     */
+    private String localName;
+
+    /**
+     * Field value
+     */
+    private String value;
+
+    /**
+     * Field namespace
+     */
+    private OMNamespace namespace;
+
+    /**
+     * Field QUOTE_ENTITY
+     */
+    private static String QUOTE_ENTITY = "&quot;";
+
+    /**
+     * Field matcher
+     */
+    private static Matcher matcher = Pattern.compile("\"").matcher(null);
+
+    /**
+     * Constructor OMAttributeImpl
+     *
+     * @param localName
+     * @param ns
+     * @param value
+     */
+    public OMAttributeImpl(String localName, OMNamespace ns, String value) {
+        setLocalName(localName);
+        setValue(value);
+        setOMNamespace(ns);
+    }
+
+    /**
+     * Method getQName
+     *
+     * @return
+     */
+    public QName getQName() {
+        String namespaceName = (namespace != null)
+                ? namespace.getName()
+                : null;
+        return new QName(namespaceName, localName);
+    }
+
+    // -------- Getters and Setters
+
+    /**
+     * Method getLocalName
+     *
+     * @return
+     */
+    public String getLocalName() {
+        return localName;
+    }
+
+    /**
+     * Method setLocalName
+     *
+     * @param localName
+     */
+    public void setLocalName(String localName) {
+        this.localName = localName;
+    }
+
+    /**
+     * Method getValue
+     *
+     * @return
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Method setValue
+     *
+     * @param value
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Method setOMNamespace
+     *
+     * @param omNamespace
+     */
+    public void setOMNamespace(OMNamespace omNamespace) {
+        this.namespace = omNamespace;
+    }
+
+    /**
+     * Method getNamespace
+     *
+     * @return
+     */
+    public OMNamespace getNamespace() {
+        return namespace;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMCommentImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMCommentImpl.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMCommentImpl.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMCommentImpl.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,76 @@
+/*
+ * Created on Apr 12, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.axis.om.impl.llom;
+
+import org.apache.axis.om.OMComment;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMElement;
+
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * @author sunja07
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class OMCommentImpl extends OMNodeImpl implements OMComment {
+
+	//Object parent;		
+	
+	/**
+	 * @param parentNode
+	 * @param contentText
+	 */
+	public OMCommentImpl(OMElement parentNode, String contentText) throws OMException{
+		if(parentNode != null) {
+			this.parent = (OMElementImpl)parentNode;
+		} else {
+			throw new OMException("Comment should have a non-null Document or Element as its parent");
+		}
+		setValue(contentText);
+	}
+
+	/**
+	 * @param parentNode
+	 */
+	public OMCommentImpl(OMElement parentNode) {
+		this(parentNode, null);
+	}
+
+	public void setParent(OMElement element) {
+
+        if( ((OMElement)this.parent) == element){
+            return;
+        }
+
+        if (element instanceof OMElement) {
+            if(this.parent != null){
+                this.detach();
+            }
+            this.parent = (OMElementImpl) element;
+        }
+    }
+		
+	public String getContent() {
+		return getValue();
+	}
+	
+	public void serialize (XMLStreamWriter writer) throws XMLStreamException {
+		serialize(writer, false);
+	}
+	
+	public void serialize (XMLStreamWriter writer, boolean cache) throws XMLStreamException {
+		writer.writeComment(this.value);
+		OMNode nextSibling = this.getNextSibling();
+        if (nextSibling != null) {
+            nextSibling.serialize(writer, cache);
+        }
+	}
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMDTDImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMDTDImpl.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMDTDImpl.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMDTDImpl.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,48 @@
+/*
+ * Created on Apr 21, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.axis.om.impl.llom;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.axis.om.OMDTD;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMNode;
+
+/**
+ * @author sunja07
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class OMDTDImpl extends OMNodeImpl implements OMDTD {
+	
+	public OMDTDImpl(OMElement parentNode, String content) {
+		super(parentNode);
+		this.setValue(content);
+	}
+		
+	/* (non-Javadoc)
+	 * @see org.apache.axis.om.OMNode#serialize(javax.xml.stream.XMLStreamWriter, boolean)
+	 */
+	public void serialize(XMLStreamWriter writer, boolean cache)
+			throws XMLStreamException {		
+		writer.writeDTD(this.value);
+		OMNode nextSibling = this.getNextSibling();
+        if (nextSibling != null) {
+            nextSibling.serialize(writer, cache);
+        }
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.axis.om.OMNode#serialize(javax.xml.stream.XMLStreamWriter)
+	 */
+	public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+		serialize(writer,false);
+	}
+
+}

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMDocument.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMDocument.java?rev=165108&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMDocument.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMDocument.java Wed Apr 27 23:42:26 2005
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om.impl.llom;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+
+/**
+ * Class OMDocument
+ */
+public class OMDocument extends OMElementImpl{
+    /**
+     * Field rootElement
+     */
+    private OMElement rootElement;
+
+    /**
+     * Field parserWrapper
+     */
+    private OMXMLParserWrapper parserWrapper;
+
+    /**
+     * @param rootElement
+     * @param parserWrapper
+     */
+    public OMDocument(OMElement rootElement, OMXMLParserWrapper parserWrapper) {
+    	super("DOCUMENT",null,null, parserWrapper);
+        this.rootElement = rootElement;
+        this.parserWrapper = parserWrapper;
+        addChild(rootElement);
+    }
+
+    /**
+     * @param parserWrapper
+     */
+    public OMDocument(OMXMLParserWrapper parserWrapper) {
+    	super("DOCUMENT",null,null, parserWrapper);
+        this.parserWrapper = parserWrapper;
+        this.firstChild = null;
+    }
+
+    /**
+     * Method getRootElement
+     *
+     * @return
+     */
+    public OMElement getRootElement() {
+        while (rootElement == null) {
+            parserWrapper.next();
+        }
+        return rootElement;
+    }
+
+    /**
+     * Method setRootElement
+     *
+     * @param rootElement
+     */
+    public void setRootElement(OMElement rootElement) {
+        this.rootElement = rootElement;
+    }
+}