axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r157237 - in webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src: java/org/apache/axis/om/OMNode.java java/org/apache/axis/om/OMText.java test-resources/OMSerializeMTOMOut.txt
Date Sat, 12 Mar 2005 07:18:24 GMT
Author: chinthaka
Date: Fri Mar 11 23:18:22 2005
New Revision: 157237

URL: http://svn.apache.org/viewcvs?view=rev&rev=157237
Log:
Applying the patch for Thilina

Modified:
    webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMNode.java
    webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMText.java
    webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/test-resources/OMSerializeMTOMOut.txt

Modified: webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMNode.java?view=diff&r1=157236&r2=157237
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMNode.java
(original)
+++ webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMNode.java
Fri Mar 11 23:18:22 2005
@@ -1,38 +1,42 @@
+/*
+ * 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;
 
 /**
- * Copyright 2001-2004 The Apache Software Foundation.
- * <p/>
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.
- * <p/>
+ * Interface OMNode
  */
 public interface OMNode {
-    //==================================================================================
-
-    // Followings are the codes for node types. Extracted these from DOM API
     /**
      * 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>.
      */
@@ -42,64 +46,83 @@
      * 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;
-
+    /**
+     * The node is a <code>Binary</code>.
+     */
     public static final short BLOB_NODE = 10;
 
-    //==================================================================================
-
     /**
-     * This method should return the immediate parent of the node. Parent is
-     * always an Element
+     * 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.
+     * 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
+     * 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.
+     * 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
+     * This will remove this information item and its children, from the model completely
      *
      * @throws OMException
      */
@@ -122,14 +145,19 @@
     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
+     * 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;
 
     /**
@@ -146,4 +174,11 @@
      */
     public void setPreviousSibling(OMNode previousSibling);
 
+    /**
+     * @param writer
+     * @param cache
+     * @throws XMLStreamException
+     */
+    public void serialize(XMLStreamWriter writer, boolean cache)
+            throws XMLStreamException;
 }

Modified: webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMText.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMText.java?view=diff&r1=157236&r2=157237
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMText.java
(original)
+++ webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/java/org/apache/axis/om/OMText.java
Fri Mar 11 23:18:22 2005
@@ -1,29 +1,41 @@
+/*
+ * 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.activation.DataHandler;
+
 /**
- * Copyright 2001-2004 The Apache Software Foundation.
- * <p/>
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.
- * <p/>
+ * 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
+     * We use the OMText class to hold comments, text, characterData, CData, etc.,
+     * Also to hold base64 encoded binary Data
+     * The codes are found in OMNode class
      *
      * @param type
      */
     public void setTextType(short type);
 
+    /**
+     * Method getTextType
+     *
+     * @return
+     */
     public short getTextType();
+    
+    public DataHandler getDataHandler();
 }

Modified: webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/test-resources/OMSerializeMTOMOut.txt
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/test-resources/OMSerializeMTOMOut.txt?view=diff&r1=157236&r2=157237
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/test-resources/OMSerializeMTOMOut.txt
(original)
+++ webservices/axis/trunk/archive/java/scratch/Thilina/MTOM/src/test-resources/OMSerializeMTOMOut.txt
Fri Mar 11 23:18:22 2005
@@ -1,17 +1,17 @@
 MIME-Version: 1.0
 Content-Type: multipart/Related; 
-	boundary="----=_Part_0_2771331.1110371552187"
+	boundary="----=_Part_0_5525185.1110549010843"
 
-------=_Part_0_2771331.1110371552187
+------=_Part_0_5525185.1110549010843
 Content-Type: application/xop+xml
 Content-Transfer-Encoding: 8bit
 Content-ID: <http://example.org/my.hsh>
 
-<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><m:data
xmlns:m="http://www.example.org/stuff"><m:name m:contentType="text/plain"><xop:Include
xmlns:xop="http://www.w3.org/2004/08/xop/Include" href="cid:http://example.org/my.hsh1085540439"></xop:Include></m:name></m:data></soap:Body></soap:Envelope>
-------=_Part_0_2771331.1110371552187
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><m:data
xmlns:m="http://www.example.org/stuff"><m:name m:contentType="text/plain"><xop:Include
xmlns:xop="http://www.w3.org/2004/08/xop/Include" href="cid:http://example.org/my.hsh1110549010656"></xop:Include></m:name></m:data></soap:Body></soap:Envelope>
+------=_Part_0_5525185.1110549010843
 Content-Type: text/plain; charset=Cp1252
 Content-Transfer-Encoding: binary
-Content-ID: <http://example.org/my.hsh1085540439>
+Content-ID: <http://example.org/my.hsh1110549010656>
 
 Programming Project
-------=_Part_0_2771331.1110371552187--
+------=_Part_0_5525185.1110549010843--



Mime
View raw message