Author: hughesj
Date: Fri Sep  8 07:50:45 2006
New Revision: 441522

URL: http://svn.apache.org/viewvc?view=rev&rev=441522
Log:
addDocumentationElement() now creates and adds. Removed the create method
from DescriptionElement

Modified:
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/DOMWSDLReader.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/OMWSDLReader.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DescriptionElement.java
    
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DocumentableElement.java

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/DOMWSDLReader.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/DOMWSDLReader.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/DOMWSDLReader.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/DOMWSDLReader.java
 Fri Sep  8 07:50:45 2006
@@ -57,6 +57,7 @@
 import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
 import org.apache.woden.wsdl20.xml.BindingOperationElement;
 import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
 import org.apache.woden.wsdl20.xml.DocumentationElement;
 import org.apache.woden.wsdl20.xml.EndpointElement;
 import org.apache.woden.wsdl20.xml.FeatureElement;
@@ -358,7 +359,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                desc.addDocumentationElement(parseDocumentation(tempEl, desc));
+                parseDocumentation(tempEl, desc, desc);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_IMPORT, tempEl))
             {
@@ -432,10 +433,11 @@
     }
 
     private DocumentationElement parseDocumentation(Element docEl, 
-                                                    DescriptionElement desc) 
+                                                    DescriptionElement desc,
+                                                    DocumentableElement 
parent) 
                                                     throws WSDLException
     {
-        DocumentationElement documentation = desc.createDocumentationElement();
+        DocumentationElement documentation = parent.addDocumentationElement();
         
         //TODO store docEl as below, or just extract any text? 
         documentation.setContent(docEl);
@@ -462,7 +464,7 @@
                                       Map wsdlModules) 
                                       throws WSDLException
     {
-        ImportElement imp = desc.createImportElement();
+        ImportElement imp = desc.addImportElement();
         
         String namespaceURI = DOMUtils.getAttribute(importEl, 
Constants.ATTR_NAMESPACE);
         String locationURI = DOMUtils.getAttribute(importEl, 
Constants.ATTR_LOCATION);
@@ -492,7 +494,7 @@
                                         Map wsdlModules) 
                                         throws WSDLException
     {
-        IncludeElement include = desc.createIncludeElement();
+        IncludeElement include = desc.addIncludeElement();
         
         String locationURI = DOMUtils.getAttribute(includeEl, 
Constants.ATTR_LOCATION);
         
@@ -535,7 +537,7 @@
             
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                types.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, types);
             }
             else if 
(SchemaConstants.XSD_IMPORT_QNAME_LIST.contains(tempElType))
             {
@@ -784,7 +786,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                intface.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, intface);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, tempEl))
             {
@@ -859,7 +861,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                fault.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, fault);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -930,7 +932,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                oper.addDocumentationElement(parseDocumentation(tempEl, desc));
+                parseDocumentation(tempEl, desc, oper);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -1020,7 +1022,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                faultRef.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, faultRef);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -1123,7 +1125,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                message.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, message);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -1193,7 +1195,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                binding.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, binding);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, tempEl))
             {
@@ -1262,7 +1264,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                fault.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, fault);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -1324,7 +1326,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                oper.addDocumentationElement(parseDocumentation(tempEl, desc));
+                parseDocumentation(tempEl, desc, oper);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -1415,7 +1417,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                faultRef.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, faultRef);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -1493,7 +1495,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                message.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, message);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -1559,7 +1561,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                service.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, service);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_ENDPOINT, tempEl))
             {
@@ -1638,7 +1640,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                endpoint.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, endpoint);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
             {
@@ -1694,7 +1696,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                feature.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, feature);
             }
             else
             {
@@ -1753,7 +1755,7 @@
         {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
             {
-                property.addDocumentationElement(parseDocumentation(tempEl, 
desc));
+                parseDocumentation(tempEl, desc, property);
             }
             else if(QNameUtils.matches(Constants.Q_ELEM_VALUE, tempEl))
             {

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/OMWSDLReader.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/OMWSDLReader.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/OMWSDLReader.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/OMWSDLReader.java
 Fri Sep  8 07:50:45 2006
@@ -41,6 +41,7 @@
 import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
 import org.apache.woden.wsdl20.xml.BindingOperationElement;
 import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
 import org.apache.woden.wsdl20.xml.DocumentationElement;
 import org.apache.woden.wsdl20.xml.EndpointElement;
 import org.apache.woden.wsdl20.xml.FeatureElement;
@@ -162,7 +163,7 @@
         while (wsdlComponents.hasNext()){
             OMElement wsdlComponent = ((OMElement)wsdlComponents.next());
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
wsdlComponent)){
-                desc.addDocumentationElement(parseDocumentation(wsdlComponent, 
desc));
+                parseDocumentation(wsdlComponent, desc, desc);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_TYPES, 
wsdlComponent)){
                 parseTypes(wsdlComponent, desc);
@@ -200,10 +201,11 @@
 
 
    private DocumentationElement parseDocumentation(OMElement docEl,
-                                                    DescriptionElement desc)
+                                                    DescriptionElement desc,
+                                                    DocumentableElement parent)
                                                     throws WSDLException {
 
-        DocumentationElement documentation = desc.createDocumentationElement();
+        DocumentationElement documentation = parent.addDocumentationElement();
 
         //Stores the documentation values as a string
         documentation.setContent(docEl.getText());
@@ -241,7 +243,7 @@
             QName elementType = QNameUtils.newQName(typesChildElement);
 
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
typesChildElement)){
-                
types.addDocumentationElement(parseDocumentation(typesChildElement, desc));
+                parseDocumentation(typesChildElement, desc, types);
             }
             else if 
(SchemaConstants.XSD_IMPORT_QNAME_LIST.contains(typesChildElement)){
                 types.addSchema(parseSchemaImport(typesChildElement, desc));
@@ -292,7 +294,7 @@
         while (serviceElChildren.hasNext()){
             OMElement serviceElChild = (OMElement)serviceElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
serviceElChild)){
-                
service.addDocumentationElement(parseDocumentation(serviceElChild, desc));
+                parseDocumentation(serviceElChild, desc, service);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_ENDPOINT, 
serviceElChild)){
                 parseEndpoint(serviceElChild, desc, service);
@@ -353,7 +355,7 @@
         while (endpointElChildren.hasNext()){
             OMElement endpointElChild = (OMElement)endpointElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
endpointElChild)){
-                
endpoint.addDocumentationElement(parseDocumentation(endpointElChild, desc));
+                parseDocumentation(endpointElChild, desc, endpoint);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
endpointElChild)){
                 endpoint.addFeatureElement(parseFeature(endpointElChild, desc, 
endpoint));
@@ -409,7 +411,7 @@
         while (bindElChildren.hasNext()){
             OMElement bindElChild = (OMElement)bindElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
bindElChild)){
-                
binding.addDocumentationElement(parseDocumentation(bindElChild, desc));
+                parseDocumentation(bindElChild, desc, binding);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, bindElChild)){
                 parseBindingFault(bindElChild, desc, binding);
@@ -462,7 +464,7 @@
         while (bindOpElChildren.hasNext()){
             OMElement bindOpElChild = (OMElement)bindOpElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
bindOpElChild)){
-                oper.addDocumentationElement(parseDocumentation(bindOpElChild, 
desc));
+                parseDocumentation(bindOpElChild, desc, oper);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
bindOpElChild)){
                 oper.addFeatureElement(parseFeature(bindOpElChild, desc, 
oper));
@@ -537,7 +539,7 @@
         while (faultRefElChildren.hasNext()){
             OMElement faultRefChild = (OMElement)faultRefElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
faultRefChild)){
-                
faultRef.addDocumentationElement(parseDocumentation(faultRefChild, desc));
+                parseDocumentation(faultRefChild, desc, faultRef);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
faultRefChild)){
                 faultRef.addFeatureElement(parseFeature(faultRefChild, desc, 
faultRef));
@@ -599,7 +601,7 @@
         while (msgRefElChildren.hasNext()){
             OMElement msgRefChild = (OMElement)msgRefElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
msgRefChild)){
-                
message.addDocumentationElement(parseDocumentation(msgRefChild, desc));
+                parseDocumentation(msgRefChild, desc, message);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
msgRefChild)){
                 message.addFeatureElement(parseFeature(msgRefChild, desc, 
message));
@@ -646,7 +648,7 @@
         while (bindFaultElChildren.hasNext()){
             OMElement bindFaultChild = (OMElement)bindFaultElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
bindFaultChild)){
-                
fault.addDocumentationElement(parseDocumentation(bindFaultChild, desc));
+                parseDocumentation(bindFaultChild, desc, fault);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
bindFaultChild)){
                 fault.addFeatureElement(parseFeature(bindFaultChild, desc, 
fault));
@@ -699,7 +701,7 @@
         while (interfaceChildren.hasNext()){
             OMElement interfaceChild = (OMElement)interfaceChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
interfaceChild)){
-                
intface.addDocumentationElement(parseDocumentation(interfaceChild, desc));
+                parseDocumentation(interfaceChild, desc, intface);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, 
interfaceChild)){
                 parseInterfaceFault(interfaceChild, desc, intface);
@@ -759,7 +761,7 @@
         while (operElChildren.hasNext()){
             OMElement operElChild = (OMElement)operElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
operElChild)){
-                oper.addDocumentationElement(parseDocumentation(operElChild, 
desc));
+                parseDocumentation(operElChild, desc, oper);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
operElChild)){
                 oper.addFeatureElement(parseFeature(operElChild, desc, oper));
@@ -840,7 +842,7 @@
         while (faultRefElChildren.hasNext()){
             OMElement faultRefElChild = (OMElement)faultRefElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
faultRefElChild)){
-                
faultRef.addDocumentationElement(parseDocumentation(faultRefElChild, desc));
+                parseDocumentation(faultRefElChild, desc, faultRef);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
faultRefElChild)){
                 faultRef.addFeatureElement(parseFeature(faultRefElChild, desc, 
faultRef));
@@ -923,7 +925,7 @@
         while(msgRefElChildren.hasNext()){
             OMElement msgRefChild = (OMElement)msgRefElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
msgRefChild)){
-                
message.addDocumentationElement(parseDocumentation(msgRefChild, desc));
+                parseDocumentation(msgRefChild, desc, message);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
msgRefChild)){
                 message.addFeatureElement(parseFeature(msgRefChild, desc, 
message));
@@ -977,7 +979,7 @@
         while(faultElChildren.hasNext()){
             OMElement faultElChild = (OMElement)faultElChildren.next();
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
faultElChild)){
-                fault.addDocumentationElement(parseDocumentation(faultElChild, 
desc));
+                parseDocumentation(faultElChild, desc, fault);
             }
             else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, 
faultElChild)){
                 fault.addFeatureElement(parseFeature(faultElChild, desc, 
fault));
@@ -1015,7 +1017,7 @@
             OMElement propElChild = (OMElement)propElChildren.next();
 
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
propElChild)){
-                
property.addDocumentationElement(parseDocumentation(propElChild, desc));
+                parseDocumentation(propElChild, desc, property);
             }
             else if(QNameUtils.matches(Constants.Q_ELEM_VALUE, propElChild)){
                 //the property value consists of the child info items of 
<value>
@@ -1237,7 +1239,7 @@
         // Check if this step is necessary
         while (featEl != null) {
             if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, featEl)){
-                feature.addDocumentationElement(parseDocumentation(featEl, 
desc));
+                parseDocumentation(featEl, desc, feature);
             }
             else{
                 
feature.addExtensionElement(parseExtensionElement(FeatureElement.class, 
feature, featEl, desc) );
@@ -1247,7 +1249,7 @@
             while (featElChildren.hasNext()){
                 OMElement featElChild = (OMElement)featElChildren.next();
                 if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
featElChild)){
-                    
feature.addDocumentationElement(parseDocumentation(featElChild, desc));
+                    parseDocumentation(featElChild, desc, feature);
                 }
                 else{
                     feature.addExtensionElement(parseExtensionElement(
@@ -1262,7 +1264,7 @@
                                       DescriptionElement desc,
                                       Map wsdlModules)
                                       throws WSDLException{
-        ImportElement imp = desc.createImportElement();
+        ImportElement imp = desc.addImportElement();
 
         String namespaceURI = OMUtils.getAttribute(importEl, 
Constants.ATTR_NAMESPACE);
         String locationURI = OMUtils.getAttribute(importEl, 
Constants.ATTR_LOCATION);
@@ -1289,7 +1291,7 @@
                                         DescriptionElement desc,
                                         Map wsdlModules)
                                         throws WSDLException{
-        IncludeElement include = desc.createIncludeElement();
+        IncludeElement include = desc.addIncludeElement();
 
         String locationURI = OMUtils.getAttribute(includeEl, 
Constants.ATTR_LOCATION);
 

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
 Fri Sep  8 07:50:45 2006
@@ -470,17 +470,13 @@
     
     //creator methods
     
-    public DocumentationElement createDocumentationElement() {
-        return new DocumentationImpl();
-    }
-    
-    public ImportElement createImportElement() {
+    public ImportElement addImportElement() {
         ImportElement importEl = new ImportImpl();
         fImportElements.add(importEl);
         return importEl;
     }
     
-    public IncludeElement createIncludeElement() {
+    public IncludeElement addIncludeElement() {
         IncludeElement include = new IncludeImpl();
         fIncludeElements.add(include);
         return include;

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java
 Fri Sep  8 07:50:45 2006
@@ -28,19 +28,19 @@
  * 
  * @author [EMAIL PROTECTED]
  */
-public abstract class DocumentableImpl extends WSDLObjectImpl 
+public abstract class DocumentableImpl extends WSDLObjectImpl
                                        implements DocumentableElement 
 {
     private List fDocumentationElements = new Vector();
     
     /* (non-Javadoc)
-     * @see 
org.apache.woden.wsdl20.xml.DocumentableElement#addDocumentationElement(org.apache.woden.wsdl20.xml.DocumentationElement)
+     * @see org.apache.woden.wsdl20.xml.DocumentationElement 
org.apache.woden.wsdl20.xml.DocumentableElement#addDocumentationElement()
      */
-    public void addDocumentationElement(DocumentationElement docEl) 
+    public DocumentationElement addDocumentationElement() 
     {
-        if(docEl != null) {
-            fDocumentationElements.add(docEl);
-        }
+        DocumentationElement docEl = new DocumentationImpl();
+        fDocumentationElements.add(docEl);
+        return docEl;
     }
 
     /* (non-Javadoc)

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java
 Fri Sep  8 07:50:45 2006
@@ -32,7 +32,7 @@
  * 
  * @author [EMAIL PROTECTED]
  */
-public abstract class WSDLReferenceImpl extends WSDLElementImpl 
+public abstract class WSDLReferenceImpl extends DocumentableImpl 
 {
     private List fDocumentationElements = new Vector();
     private URI fLocation = null;

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
 Fri Sep  8 07:50:45 2006
@@ -27,6 +27,7 @@
 import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
 import org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement;
 import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
 import org.apache.woden.wsdl20.xml.DocumentationElement;
 import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.w3c.dom.Element;
@@ -82,10 +83,10 @@
     }
 
     private DocumentationElement parseDocumentation(Element docEl, 
-                                                    DescriptionElement desc) 
+                                                    DocumentableElement 
parent) 
                                                     throws WSDLException
     {
-        DocumentationElement documentation = desc.createDocumentationElement();
+        DocumentationElement documentation = parent.addDocumentationElement();
         documentation.setContent(docEl);
         
         //TODO parseExtensionAttributes(docEl, DocumentationElement.class, 
documentation, desc);

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
 Fri Sep  8 07:50:45 2006
@@ -28,6 +28,7 @@
 import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
 import org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement;
 import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
 import org.apache.woden.wsdl20.xml.DocumentationElement;
 import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.w3c.dom.Element;
@@ -104,10 +105,10 @@
     }
 
     private DocumentationElement parseDocumentation(Element docEl, 
-                                                    DescriptionElement desc) 
+                                                    DocumentableElement 
parent) 
                                                     throws WSDLException
     {
-        DocumentationElement documentation = desc.createDocumentationElement();
+        DocumentationElement documentation = parent.addDocumentationElement();
         documentation.setContent(docEl);
         
         //TODO parseExtensionAttributes(docEl, DocumentationElement.class, 
documentation, desc);

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
 Fri Sep  8 07:50:45 2006
@@ -31,6 +31,7 @@
 import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
 import org.apache.woden.wsdl20.extensions.soap.SOAPModuleElement;
 import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
 import org.apache.woden.wsdl20.xml.DocumentationElement;
 import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.w3c.dom.Element;
@@ -103,10 +104,10 @@
     }
             
     private DocumentationElement parseDocumentation(Element docEl, 
-                                                    DescriptionElement desc) 
+                                                    DocumentableElement 
parent) 
                                                     throws WSDLException
     {
-        DocumentationElement documentation = desc.createDocumentationElement();
+        DocumentationElement documentation = parent.addDocumentationElement();
         documentation.setContent(docEl);
         
         //TODO parseExtensionAttributes(docEl, DocumentationElement.class, 
documentation, desc);

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DescriptionElement.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DescriptionElement.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DescriptionElement.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DescriptionElement.java
 Fri Sep  8 07:50:45 2006
@@ -77,11 +77,9 @@
      * Element factory methods
      */
     
-    public DocumentationElement createDocumentationElement();
+    public ImportElement addImportElement();
     
-    public ImportElement createImportElement();
-    
-    public IncludeElement createIncludeElement();
+    public IncludeElement addIncludeElement();
 
     /**
      * Create a new InterfaceElement in this DescriptionElement

Modified: 
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DocumentableElement.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DocumentableElement.java?view=diff&rev=441522&r1=441521&r2=441522
==============================================================================
--- 
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DocumentableElement.java
 (original)
+++ 
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DocumentableElement.java
 Fri Sep  8 07:50:45 2006
@@ -24,7 +24,7 @@
  */
 public interface DocumentableElement extends WSDLElement 
 {
-    public void addDocumentationElement(DocumentationElement docEl);
+    public DocumentationElement addDocumentationElement();
     
     public DocumentationElement[] getDocumentationElements();
     



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

Reply via email to