ws-woden-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkapu...@apache.org
Subject svn commit: r293243 - /incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionElementImpl.java
Date Mon, 03 Oct 2005 05:05:53 GMT
Author: jkaputin
Date: Sun Oct  2 22:05:48 2005
New Revision: 293243

URL: http://svn.apache.org/viewcvs?rev=293243&view=rev
Log:
modified namespace handling methods and changed 
<documentation> from a single element to a list of 
elements, per the spec.

Modified:
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionElementImpl.java

Modified: incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionElementImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionElementImpl.java?rev=293243&r1=293242&r2=293243&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionElementImpl.java
(original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionElementImpl.java
Sun Oct  2 22:05:48 2005
@@ -15,8 +15,10 @@
  */
 package org.apache.woden.internal.wsdl20;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Vector;
 
 import org.apache.woden.internal.util.ComponentModelBuilder;
 import org.apache.woden.wsdl20.Description;
@@ -49,15 +51,14 @@
  */
 public class DescriptionElementImpl implements DescriptionElement {
     
-    private String fDocumentBaseURI;
+    private String fDocumentBaseURI = null;
     
+    private String fTargetNamespace = null;
+    private Map fNamespaces = new HashMap();
     
-    private String fTargetNamespace;
-    private Map fNamespaces;
-    
-    private DocumentationElement fDocumentationElement;
-    private TypesElement fTypesElement;
-    private List fInterfaceElements;
+    private List fDocumentationElements = new Vector();
+    private TypesElement fTypesElement = null;
+    private List fInterfaceElements = new Vector();
     
     /* 
      * Cache the WSDL component model here, but flush it if any
@@ -96,10 +97,11 @@
         
         String pfx = (prefix != null) ? prefix : "";
         
-        //null namespace value deletes the namespace
-        if (namespace != null) {
+        if (namespace != null) 
+        {
             fNamespaces.put(pfx,namespace);
-        } else {
+        } else 
+        {
             removeNamespace(pfx);
         }
     }
@@ -108,12 +110,14 @@
     public void removeNamespace(String prefix) {
         
         String pfx = (prefix != null) ? prefix : "";
+        
         fNamespaces.remove(pfx);
     }
     
     public String getNamespace(String prefix) 
     {
         String pfx = (prefix != null) ? prefix : "";
+        
         return (String) fNamespaces.get(pfx);
     }
     
@@ -126,16 +130,6 @@
      * Element accessor and modifier methods.
      * ******************************************/
     
-    public void setDocumentationElement(DocumentationElement docEl) 
-    {
-        fDocumentationElement = docEl;
-    }
-    
-    public DocumentationElement getDocumentationElement() 
-    {
-        return fDocumentationElement;
-    }
-    
     public void addImportElement(ImportElement importEl)
     {
         //TODO
@@ -200,6 +194,22 @@
         return null;    
     }
 
+    /*
+     * @see org.apache.woden.wsdl20.xml.DocumentableElement#addDocumentationElement(DocumentationElement)
+     */
+    public void addDocumentationElement(DocumentationElement docEl) 
+    {
+        fDocumentationElements.add(docEl);
+    }
+
+    /*
+     * @see org.apache.woden.wsdl20.xml.DocumentableElement#getDocumentationElements()
+     */
+    public DocumentationElement[] getDocumentationElements() 
+    {
+        return (DocumentationElement[])fDocumentationElements.toArray();
+    }
+    
     /* ************************************
      * Element creator methods.
      * ************************************/    



---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


Mime
View raw message