Author: jkaputin
Date: Tue Jul  5 07:54:40 2005
New Revision: 209288

URL: http://svn.apache.org/viewcvs?rev=209288&view=rev
Log:
working on parsing Types and Interface

Added:
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java
Modified:
    incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
    incubator/woden/java/src/org/apache/woden/wsdl20/xml/DescriptionElement.java
    incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java

Modified: incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java?rev=209288&r1=209287&r2=209288&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java 
(original)
+++ incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java Tue 
Jul  5 07:54:40 2005
@@ -17,8 +17,7 @@
 import org.apache.woden.internal.util.dom.DOMUtils;

 import org.apache.woden.internal.util.dom.QNameUtils;

 import org.apache.woden.internal.wsdl20.Constants;

-import org.apache.woden.wsdl20.xml.DescriptionElement;

-import org.apache.woden.wsdl20.xml.ImportElement;

+import org.apache.woden.wsdl20.xml.*;

 import org.w3c.dom.Attr;

 import org.w3c.dom.Document;

 import org.w3c.dom.Element;

@@ -75,7 +74,7 @@
             throw e;

         }

     }

-

+    

     private DescriptionElement parseDescription(String documentBaseURI, 

                                                 Element descEl, 

                                                 Map importedDescs) 

@@ -122,18 +121,32 @@
           }

         }

         

-        //Parse the child elements of the description. 

-        //Per the WSDL 2.0 spec, they must be in the following order if 
present:

-        //<document> 

-        //<import> <include> or WSDL extension elements in any order

-        //<types> 

-        //<interface> <binding> <service> or WSDL extension elements in any 
order.

+        /* Parse the child elements. As per the WSDL 2.0 spec, 

+         * they must be in the following order if present:

+         * <document>

+         * <import> <include> or WSDL extension elements in any order

+         * <types>

+         * <interface> <binding> <service> or WSDL extension elements in any 
order.

+         */ 

 

         Element tempEl = DOMUtils.getFirstChildElement(descEl);

 

         while (tempEl != null)

         {

-            //TODO child elements

+            //TODO validate that the elements are in correct order

+            

+            if (QNameUtils.matches(Constants.Q_ELEM_TYPES, tempEl))

+            {

+                desc.setTypesElement(parseTypes(tempEl, desc));

+            }

+            else if (QNameUtils.matches(Constants.Q_ELEM_INTERFACE, tempEl))

+            {

+                desc.addInterfaceElement(parseInterface(tempEl, desc));

+            }

+            else

+            {

+                //TODO document, import, include, binding, service, extensions

+            }

             

             tempEl = DOMUtils.getNextSiblingElement(tempEl);

         }

@@ -141,8 +154,8 @@
         return desc;

     }

 

-    private ImportElement parseImport(String documentBaseURI, 

-                                      Element importEl,

+    private ImportElement parseImport(Element importEl,

+                                      DescriptionElement desc,

                                       Map importedDescs) 

                                       throws WSDLException

     {

@@ -150,6 +163,23 @@
         return null;

     }

         

+    private InterfaceElement parseInterface(Element interfaceEl,

+                                            DescriptionElement desc) 

+                                            throws WSDLException

+    {

+        //TODO complete this method

+        return null;

+    }

+

+    private TypesElement parseTypes(Element typesEl,

+                                    DescriptionElement desc) 

+                                    throws WSDLException

+    {

+        TypesElement types = desc.createTypesElement();

+        

+        return null;

+    }

+

     /**

      * Check the actual element encountered against the expected qname

      * 


Modified: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java?rev=209288&r1=209287&r2=209288&view=diff
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java 
(original)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java 
Tue Jul  5 07:54:40 2005
@@ -5,13 +5,7 @@
 

 import java.util.Map;

 

-import org.apache.woden.wsdl20.xml.BindingElement;

-import org.apache.woden.wsdl20.xml.DescriptionElement;

-import org.apache.woden.wsdl20.xml.ImportElement;

-import org.apache.woden.wsdl20.xml.IncludeElement;

-import org.apache.woden.wsdl20.xml.InterfaceElement;

-import org.apache.woden.wsdl20.xml.ServiceElement;

-import org.apache.woden.wsdl20.xml.TypesElement;

+import org.apache.woden.wsdl20.xml.*;

 import org.w3c.dom.Element;

 

 /**

@@ -102,12 +96,17 @@
         return null;

     }

 

-    public void addTypesElement(TypesElement typesEl)

+    public TypesElement createTypesElement()

+    {

+        return new TypesImpl();

+    }

+    

+    public void setTypesElement(TypesElement typesEl)

     {

         

     }

 

-    public TypesElement[] getTypes() {

+    public TypesElement getTypesElement() {

         return null;    

     }

 


Added: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java?rev=209288&view=auto
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java 
(added)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java 
Tue Jul  5 07:54:40 2005
@@ -0,0 +1,73 @@
+/*

+ * TODO Apache boiler plate

+ */

+package org.apache.woden.internal.wsdl20;

+

+import javax.xml.namespace.QName;

+

+import org.apache.woden.wsdl20.Feature;

+import org.apache.woden.wsdl20.Interface;

+import org.apache.woden.wsdl20.InterfaceFault;

+import org.apache.woden.wsdl20.InterfaceOperation;

+import org.apache.woden.wsdl20.Property;

+import org.apache.woden.wsdl20.xml.InterfaceElement;

+

+/**

+ * This class represents both the Interface component as described in the

+ * WSDL 2.0 Component Model specification and the XML element information item 

+ * for a WSDL 2.0 &lt;interface&gt; element. It implements the behaviour 
required to 

+ * support parsing, creating and manipulating a &lt;interface&gt; element.

+ * 

+ * @author [EMAIL PROTECTED]

+ */

+public class InterfaceImpl implements Interface, InterfaceElement {

+

+    /* (non-Javadoc)

+     * @see org.apache.woden.wsdl20.Interface#getName()

+     */

+    public QName getName() {

+        // TODO Auto-generated method stub

+        return null;

+    }

+

+    /* (non-Javadoc)

+     * @see org.apache.woden.wsdl20.Interface#getExtendedInterfaces()

+     */

+    public Interface[] getExtendedInterfaces() {

+        // TODO Auto-generated method stub

+        return null;

+    }

+

+    /* (non-Javadoc)

+     * @see org.apache.woden.wsdl20.Interface#getInterfaceFaults()

+     */

+    public InterfaceFault[] getInterfaceFaults() {

+        // TODO Auto-generated method stub

+        return null;

+    }

+

+    /* (non-Javadoc)

+     * @see org.apache.woden.wsdl20.Interface#getInterfaceOperations()

+     */

+    public InterfaceOperation[] getInterfaceOperations() {

+        // TODO Auto-generated method stub

+        return null;

+    }

+

+    /* (non-Javadoc)

+     * @see org.apache.woden.wsdl20.ConfigurableComponent#getFeatures()

+     */

+    public Feature[] getFeatures() {

+        // TODO Auto-generated method stub

+        return null;

+    }

+

+    /* (non-Javadoc)

+     * @see org.apache.woden.wsdl20.ConfigurableComponent#getProperties()

+     */

+    public Property[] getProperties() {

+        // TODO Auto-generated method stub

+        return null;

+    }

+

+}


Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java?rev=209288&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java 
(added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java 
Tue Jul  5 07:54:40 2005
@@ -0,0 +1,17 @@
+/*

+ * TODO Apache boiler plate

+ */

+package org.apache.woden.internal.wsdl20;

+

+import org.apache.woden.wsdl20.xml.TypesElement;

+

+/**

+ * This class represents the XML element information item for

+ * a WSDL 2.0 &lt;types&gt; element. It implemements the behaviour required 

+ * to support parsing, creating and manipulating a &lt;types&gt; element.

+ * 

+ * @author [EMAIL PROTECTED]

+ */

+public class TypesImpl implements TypesElement {

+

+}


Modified: 
incubator/woden/java/src/org/apache/woden/wsdl20/xml/DescriptionElement.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/DescriptionElement.java?rev=209288&r1=209287&r2=209288&view=diff
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/wsdl20/xml/DescriptionElement.java 
(original)
+++ 
incubator/woden/java/src/org/apache/woden/wsdl20/xml/DescriptionElement.java 
Tue Jul  5 07:54:40 2005
@@ -30,15 +30,17 @@
     public void setDocumentationElement(Element element);

     public Element getDocumentationElement();

     

-    //TODO removeXXX, getXXX methods for the following

+    //TODO removeXXX, getXXX methods for the elements with an addXXX method

+    

     public void addImportElement(ImportElement importEl);

     public ImportElement[] getImports();

     

     public void addIncludeElement(IncludeElement includeEl);

     public IncludeElement[] getIncludes();

     

-    public void addTypesElement(TypesElement typesEl);

-    public TypesElement[] getTypes();

+    public TypesElement createTypesElement();

+    public void setTypesElement(TypesElement typesEl);

+    public TypesElement getTypesElement();

     

     public void addInterfaceElement(InterfaceElement interfaceEl);

     public InterfaceElement[] getInterfaces();


Modified: incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java?rev=209288&r1=209287&r2=209288&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java 
(original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java Tue 
Jul  5 07:54:40 2005
@@ -4,9 +4,9 @@
 package org.apache.woden.wsdl20.xml;

 

 /**

- * This interface represents a &lt;types&gt; XML element 

- * information item. It declares the behaviour required to support 

- * parsing, creating and manipulating a &lt;types&gt; element.

+ * This interface represents the XML element information item for

+ * a WSDL 2.0 &lt;types&gt; element. It declares the behaviour required to 

+ * support parsing, creating and manipulating a &lt;types&gt; element.

  * 

  * @author [EMAIL PROTECTED]

  */




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to