Author: jkaputin
Date: Mon Nov  7 08:13:30 2005
New Revision: 331292

URL: http://svn.apache.org/viewcvs?rev=331292&view=rev
Log:
Renamed DocumentableImpl to WSDL20ObjectImpl (which still

implements the DocumentableElement interface). Created

the NestedConfigurableImpl abstract class to

encapsulate behaviour for getting/setting a nested

element's 'parent' and refactored this behaviour out

of the relevant Impl classes.

Also, checked in the work-in-progress Interface code

to ensure the repository code compiles.


Added:
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDL20ObjectImpl.java
Removed:
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java
Modified:
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionElementImpl.java
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/FeatureImpl.java
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultImpl.java
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceMessageReferenceImpl.java
    
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/PropertyImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java

Modified: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java?rev=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java 
(original)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java 
Mon Nov  7 08:13:30 2005
@@ -26,25 +26,24 @@
 import org.apache.woden.wsdl20.xml.PropertyElement;

 

 /**

- * This is an abstract superclass providing support for the

- * <feature> and <property> elements. 

- * All WSDL elements that may these as child elements

- * should inherit this class. 

- * <p>

- * Note that in WSDL 2.0, all elements may have documentation, 

- * so this class extends the DocumentableImpl abstract class.

+ * This abstract superclass implements support for features and

+ * properties. All classes representing WSDL components that

+ * can be configured with features and properties will directly 

+ * or indirectly extend this abstract class.

  * 

  * @author [EMAIL PROTECTED]

  */

-public abstract class ConfigurableImpl extends DocumentableImpl 

+public abstract class ConfigurableImpl extends WSDL20ObjectImpl 

                                        implements ConfigurableComponent,

                                                   ConfigurableElement 

 {

     private List fFeatures = new Vector();

     private List fProperties = new Vector();

-    private List fFeatureElements = new Vector();

-    private List fPropertyElements = new Vector();

 

+    /* ************************************************************

+     *  API methods for Property and Feature components.

+     * ************************************************************/

+    

     /* (non-Javadoc)

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

      */

@@ -63,19 +62,23 @@
         return array;

     }

 

+    /* ************************************************************

+     *  API methods for Property and Feature elements.

+     * ************************************************************/

+    

     /* (non-Javadoc)

      * @see 
org.apache.woden.wsdl20.xml.ConfigurableElement#addFeatureElement(org.apache.woden.wsdl20.xml.FeatureElement)

      */

     public void addFeatureElement(FeatureElement feature) {

-        fFeatureElements.add(feature);

+        fFeatures.add(feature);

     }

 

     /* (non-Javadoc)

      * @see 
org.apache.woden.wsdl20.xml.ConfigurableElement#getFeatureElements()

      */

     public FeatureElement[] getFeatureElements() {

-        FeatureElement[] array = new FeatureElement[fFeatureElements.size()];

-        fFeatureElements.toArray(array);

+        FeatureElement[] array = new FeatureElement[fFeatures.size()];

+        fFeatures.toArray(array);

         return array;

     }

 

@@ -83,15 +86,15 @@
      * @see 
org.apache.woden.wsdl20.xml.ConfigurableElement#addPropertyElement(org.apache.woden.wsdl20.xml.PropertyElement)

      */

     public void addPropertyElement(PropertyElement property) {

-        fPropertyElements.add(property);

+        fProperties.add(property);

     }

 

     /* (non-Javadoc)

      * @see 
org.apache.woden.wsdl20.xml.ConfigurableElement#getPropertyElements()

      */

     public PropertyElement[] getPropertyElements() {

-        PropertyElement[] array = new 
PropertyElement[fPropertyElements.size()];

-        fPropertyElements.toArray(array);

+        PropertyElement[] array = new PropertyElement[fProperties.size()];

+        fProperties.toArray(array);

         return array;

     }

 


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=331292&r1=331291&r2=331292&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
 Mon Nov  7 08:13:30 2005
@@ -53,7 +53,7 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class DescriptionElementImpl extends DocumentableImpl

+public class DescriptionElementImpl extends WSDL20ObjectImpl

                                     implements DescriptionElement 

 {

     


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=331292&r1=331291&r2=331292&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 
Mon Nov  7 08:13:30 2005
@@ -17,10 +17,13 @@
 

 import java.net.URI;

 import java.util.HashMap;

+import java.util.Iterator;

 import java.util.List;

 import java.util.Map;

 import java.util.Vector;

 

+import javax.xml.namespace.QName;

+

 import org.apache.woden.internal.util.ComponentModelBuilder;

 import org.apache.woden.wsdl20.Binding;

 import org.apache.woden.wsdl20.Description;

@@ -59,7 +62,7 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class DescriptionImpl extends DocumentableImpl

+public class DescriptionImpl extends WSDL20ObjectImpl

                              implements Description, DescriptionElement 

 {

     /*

@@ -68,8 +71,8 @@
     private List fInterfaces = new Vector();

     private List fBindings = new Vector();

     private List fServices = new Vector();

-    private List fElementDeclarations = new Vector();

-    private List fTypeDefinitions = new Vector();

+    private List fElementDeclarations = new Vector(); //TODO consider using Map

+    private List fTypeDefinitions = new Vector(); //TODO consider using Map

     

     /*

      * XML Element model data

@@ -150,6 +153,25 @@
         TypeDefinition[] array = new TypeDefinition[fTypeDefinitions.size()];

         fTypeDefinitions.toArray(array);

         return array;

+    }

+    

+    /* (non-Javadoc)

+     * @see 
org.apache.woden.wsdl20.Description#getTypeDefinition(javax.xml.namespace.QName)

+     * TODO consider using Map instead of List

+     */

+    public TypeDefinition getTypeDefinition(QName qname)

+    {

+        TypeDefinition typeDef = null;

+        Iterator i = fTypeDefinitions.iterator();

+        while(i.hasNext())

+        {

+            TypeDefinition td = (TypeDefinition)i.next();

+            if(qname.equals(td.getName())) 

+            {

+                typeDef = td;

+            }

+        }

+        return typeDef;

     }

 

     /* (non-Javadoc)


Modified: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/FeatureImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/FeatureImpl.java?rev=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/FeatureImpl.java 
(original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/FeatureImpl.java 
Mon Nov  7 08:13:30 2005
@@ -17,9 +17,10 @@
 

 import java.net.URI;

 

-import org.apache.woden.wsdl20.Component;

 import org.apache.woden.wsdl20.Feature;

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

 import org.apache.woden.wsdl20.xml.FeatureElement;

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

 

 /**

  * This class implements support for the &lt;wsdl:feature&gt; element 

@@ -27,52 +28,70 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class FeatureImpl extends DocumentableImpl

+public class FeatureImpl extends WSDL20ObjectImpl

                          implements Feature, FeatureElement 

 {

     private URI fRef = null;

     private boolean fRequired = false;

+    private WSDL20Element fParent = null;

     

-    /*

-     * @see org.apache.woden.wsdl20.xml.FeatureElement#setRef(URI)

-     */

-    public void setRef(URI ref) 

-    {

-        fRef = ref;

-    }

+    /* ************************************************************

+     *  WSDL Component model methods

+     * ************************************************************/

     

     /* 

      * @see org.apache.woden.wsdl20.Feature#getRef()

      * @see org.apache.woden.wsdl20.xml.FeatureElement#getRef()

      */

-    public URI getRef() 

-    {

+    public URI getRef() {

         return fRef;

     }

 

+    /* 

+     * @see org.apache.woden.wsdl20.Feature#isRequired()

+     * @see org.apache.woden.wsdl20.xml.FeatureElement#isRequired()

+     */

+    public boolean isRequired() {

+        return fRequired;

+    }

+

+    /* 

+     * @see org.apache.woden.wsdl20.NestedComponent#getParent()

+     */

+    public WSDL20Component getParent() {

+        return (WSDL20Component)fParent;

+    }

+    

+    /* ************************************************************

+     *  Methods specific to the XML Element model)

+     * ************************************************************/

+    

     /*

      * @see org.apache.woden.wsdl20.xml.FeatureElement#setRequired(boolean)

      */

-    public void setRequired(boolean required) 

-    {

+    public void setRequired(boolean required) {

         fRequired = required;

     }

     

+    /*

+     * @see org.apache.woden.wsdl20.xml.FeatureElement#setRef(URI)

+     */

+    public void setRef(URI ref) {

+        fRef = ref;

+    }

+    

     /* 

-     * @see org.apache.woden.wsdl20.Feature#isRequired()

-     * @see org.apache.woden.wsdl20.xml.FeatureElement#isRequired()

+     * @see 
org.apache.woden.wsdl20.xml.NestedElement#setParentElement(WSDL20Element)

      */

-    public boolean isRequired() 

-    {

-        return fRequired;

+    public void setParentElement(WSDL20Element parent) {

+        fParent = parent;

     }

 

     /* 

-     * @see org.apache.woden.wsdl20.NestedComponent#getParent()

+     * @see org.apache.woden.wsdl20.xml.NestedElement#getParentElement()

      */

-    public Component getParent() 

-    {

-        return null;

+    public WSDL20Element getParentElement() {

+        return fParent;

     }

 

 }


Modified: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultImpl.java?rev=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultImpl.java
 (original)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultImpl.java
 Mon Nov  7 08:13:30 2005
@@ -17,7 +17,6 @@
 

 import javax.xml.namespace.QName;

 

-import org.apache.woden.wsdl20.Component;

 import org.apache.woden.wsdl20.ElementDeclaration;

 import org.apache.woden.wsdl20.InterfaceFault;

 import org.apache.woden.wsdl20.xml.InterfaceFaultElement;

@@ -28,14 +27,13 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class InterfaceFaultImpl extends ConfigurableImpl

+public class InterfaceFaultImpl extends NestedConfigurableImpl

                                 implements InterfaceFault,

                                            InterfaceFaultElement 

 {

     //WSDL Component model data

     private QName fName = null;

     private ElementDeclaration fElementDeclaration = null;

-    private Component fParent = null;

 

     //XML Element model data

     private QName fElement = null;

@@ -59,23 +57,6 @@
     public ElementDeclaration getElementDeclaration() 

     {

         return fElementDeclaration;

-    }

-    

-    /*

-     * @see org.apache.woden.wsdl20.NestedComponent#getParent()

-     */

-    public Component getParent() 

-    {

-        return fParent;

-    }

-

-    /* ************************************************************

-     *  Public implementation methods (not on the API)

-     * ************************************************************/

-    

-    public void setParent(Component parent) 

-    {

-        fParent = parent;

     }

     

     /* ************************************************************


Modified: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java?rev=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java
 (original)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java
 Mon Nov  7 08:13:30 2005
@@ -17,10 +17,8 @@
 

 import javax.xml.namespace.QName;

 

-import org.apache.woden.wsdl20.Component;

 import org.apache.woden.wsdl20.InterfaceFault;

 import org.apache.woden.wsdl20.InterfaceFaultReference;

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

 import org.apache.woden.wsdl20.xml.FaultReferenceElement;

 

 /**

@@ -29,7 +27,7 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class InterfaceFaultReferenceImpl extends ConfigurableImpl

+public class InterfaceFaultReferenceImpl extends NestedConfigurableImpl

                                          implements InterfaceFaultReference,

                                                     FaultReferenceElement 

 {

@@ -37,11 +35,14 @@
     private InterfaceFault fInterfaceFault = null;

     private String fMessageLabel = null;

     private String fDirection = null;

-    private InterfaceOperation fParent = null;

     

     //XML Element model data

     QName fRef = null;

 

+    /* ************************************************************

+     *  InterfaceFaultReference methods (i.e. WSDL Component model)

+     * ************************************************************/

+    

     /* (non-Javadoc)

      * @see org.apache.woden.wsdl20.InterfaceFaultReference#getInterfaceFault()

      */

@@ -64,6 +65,10 @@
         return fDirection;

     }

 

+    /* ************************************************************

+     *  FaultReferenceElement methods (i.e. XML Element model)

+     * ************************************************************/

+    

     /* (non-Javadoc)

      * @see 
org.apache.woden.wsdl20.xml.FaultReferenceElement#setRef(javax.xml.namespace.QName)

      */

@@ -84,13 +89,6 @@
      */

     public void setMessageLabel(String msgLabel) {

         fMessageLabel = msgLabel;

-    }

-

-    /* (non-Javadoc)

-     * @see org.apache.woden.wsdl20.NestedComponent#getParent()

-     */

-    public Component getParent() {

-        return fParent;

     }

 

 }


Modified: 
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=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java 
(original)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java 
Mon Nov  7 08:13:30 2005
@@ -49,13 +49,9 @@
     private List fInterfaceFaultElements = new Vector();

     private List fInterfaceOperationElements = new Vector();

     

-    /* 

-     * @see org.apache.woden.wsdl20.xml.InterfaceElement#setName(QName)

-     */

-    public void setName(QName qname)

-    {

-        fName = qname;

-    }

+    /* ************************************************************

+     *  Interface interface methods (the WSDL Component model)

+     * ************************************************************/

     

     /* 

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

@@ -67,6 +63,55 @@
     }

     

     /* 

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

+     */

+    public Interface[] getExtendedInterfaces() 

+    {

+        Interface[] array = new Interface[fExtendedInterfaces.size()];

+        fExtendedInterfaces.toArray(array);

+        return array;

+    }

+

+    /* 

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

+     */

+    public InterfaceFault[] getInterfaceFaults() 

+    {

+        InterfaceFault[] array = new InterfaceFault[fInterfaceFaults.size()];

+        fInterfaceFaults.toArray(array);

+        return array;

+    }

+

+    /* 

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

+     */

+    public InterfaceOperation[] getInterfaceOperations() 

+    {

+        InterfaceOperation[] array = new 
InterfaceOperation[fInterfaceOperations.size()];

+        fInterfaceOperations.toArray(array);

+        return array;

+    }

+    

+    /* 

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

+     */

+    public InterfaceElement toElement() {

+        return this;

+    }

+    

+    /* ************************************************************

+     *  DescriptionElement interface methods (the XML Element model)

+     * ************************************************************/

+    

+    /* 

+     * @see org.apache.woden.wsdl20.xml.InterfaceElement#setName(QName)

+     */

+    public void setName(QName qname)

+    {

+        fName = qname;

+    }

+    

+    /* 

      * @see 
org.apache.woden.wsdl20.xml.InterfaceElement#addStyleDefaultURI(URI)

      */

     public void addStyleDefaultURI(URI uri)

@@ -79,7 +124,9 @@
      */

     public URI[] getStyleDefault()

     {

-        return (URI[])fStyleDefault.toArray();

+        URI[] array = new URI[fStyleDefault.size()];

+        fStyleDefault.toArray(array);

+        return array;

     }

     

     /* 

@@ -95,18 +142,12 @@
      */

     public QName[] getExtendsQNames()

     {

-        return (QName[])fExtendsQNames.toArray();

+        QName[] array = new QName[fExtendsQNames.size()];

+        fExtendsQNames.toArray(array);

+        return array;

     }

     

     /* 

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

-     */

-    public Interface[] getExtendedInterfaces() 

-    {

-        return (Interface[])fExtendedInterfaces.toArray();

-    }

-

-    /* 

      * @see 
org.apache.woden.wsdl20.xml.InterfaceElement#addFaultElement(FaultElement)

      */

     public void addInterfaceFaultElement(InterfaceFaultElement fault)

@@ -119,15 +160,9 @@
      */

     public InterfaceFaultElement[] getInterfaceFaultElements()

     {

-        return (InterfaceFaultElement[])fInterfaceFaultElements.toArray();

-    }

-

-    /* 

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

-     */

-    public InterfaceFault[] getInterfaceFaults() 

-    {

-        return (InterfaceFault[])fInterfaceFaults.toArray();

+        InterfaceFaultElement[] array = new 
InterfaceFaultElement[fInterfaceFaultElements.size()];

+        fInterfaceFaultElements.toArray(array);

+        return array;

     }

 

     /* 

@@ -143,15 +178,25 @@
      */

     public InterfaceOperationElement[] getInterfaceOperationElements()

     {

-        return 
(InterfaceOperationElement[])fInterfaceOperationElements.toArray();

+        InterfaceOperationElement[] array = new 
InterfaceOperationElement[fInterfaceOperationElements.size()];

+        fInterfaceOperationElements.toArray(array);

+        return array;

     }

 

-    /* 

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

-     */

-    public InterfaceOperation[] getInterfaceOperations() 

-    {

-        return (InterfaceOperation[])fInterfaceOperations.toArray();

+    /* ************************************************************

+     *  Non-API implementation methods

+     * ************************************************************/

+

+    public void addExtendedInterface(Interface intface) {

+        fExtendedInterfaces.add(intface);

+    }

+

+    public void addInterfaceFault(InterfaceFault fault) {

+        fInterfaceFaults.add(fault);

+    }

+

+    public void addInterfaceOperation(InterfaceOperation operation) {

+        fInterfaceOperations.add(operation);

     }

 

 }


Modified: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceMessageReferenceImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceMessageReferenceImpl.java?rev=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceMessageReferenceImpl.java
 (original)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceMessageReferenceImpl.java
 Mon Nov  7 08:13:30 2005
@@ -17,9 +17,7 @@
 

 import javax.xml.namespace.QName;

 

-import org.apache.woden.wsdl20.Component;

 import org.apache.woden.wsdl20.ElementDeclaration;

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

 import org.apache.woden.wsdl20.InterfaceMessageReference;

 import org.apache.woden.wsdl20.xml.InterfaceMessageReferenceElement;

 

@@ -29,7 +27,7 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class InterfaceMessageReferenceImpl extends ConfigurableImpl

+public class InterfaceMessageReferenceImpl extends NestedConfigurableImpl

                                   implements InterfaceMessageReference, 

                                              InterfaceMessageReferenceElement 

 {

@@ -38,7 +36,6 @@
     private String fDirection = null;

     private String fMessageContentModel = null;

     private ElementDeclaration fElementDeclaration = null;

-    private Interface fParent = null; 

     

     //XML Element model data

     private QName fElement = null;

@@ -76,14 +73,6 @@
         return fElementDeclaration;

     }

 

-    /* (non-Javadoc)

-     * @see org.apache.woden.wsdl20.NestedComponent#getParent()

-     */

-    public Component getParent() 

-    {

-        return fParent;

-    }

-    

     /* ************************************************************

      *  InterfaceMessageReferenceElement methods (the XML Element model)

      * ************************************************************/


Modified: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java?rev=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java
 (original)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java
 Mon Nov  7 08:13:30 2005
@@ -21,8 +21,6 @@
 

 import javax.xml.namespace.QName;

 

-import org.apache.woden.wsdl20.Component;

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

 import org.apache.woden.wsdl20.InterfaceFaultReference;

 import org.apache.woden.wsdl20.InterfaceMessageReference;

 import org.apache.woden.wsdl20.InterfaceOperation;

@@ -36,7 +34,7 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class InterfaceOperationImpl extends ConfigurableImpl

+public class InterfaceOperationImpl extends NestedConfigurableImpl

                                     implements InterfaceOperation, 

                                                InterfaceOperationElement 

 {

@@ -46,7 +44,6 @@
     private List fInterfaceMessageRefs = new Vector();

     private List fInterfaceFaultRefs = new Vector();

     private List fStyle = new Vector();

-    private Interface fParent = null; 

     

     //XML data

     private List fInputs = new Vector();

@@ -105,14 +102,6 @@
         URI[] array = new URI[fStyle.size()];

         fStyle.toArray(array);

         return array;

-    }

-

-    /* (non-Javadoc)

-     * @see org.apache.woden.wsdl20.NestedComponent#getParent()

-     */

-    public Component getParent() 

-    {

-        return fParent;

     }

 

     /* ************************************************************


Modified: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/PropertyImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/PropertyImpl.java?rev=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/PropertyImpl.java 
(original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/PropertyImpl.java 
Mon Nov  7 08:13:30 2005
@@ -19,10 +19,11 @@
 

 import javax.xml.namespace.QName;

 

-import org.apache.woden.wsdl20.Component;

 import org.apache.woden.wsdl20.Property;

 import org.apache.woden.wsdl20.TypeDefinition;

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

 import org.apache.woden.wsdl20.xml.PropertyElement;

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

 

 /**

  * This class implements support for the &lt;wsdl:property&gt; element 

@@ -30,103 +31,119 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class PropertyImpl extends DocumentableImpl

+public class PropertyImpl extends WSDL20ObjectImpl

                           implements Property, PropertyElement 

 {

+    //WSDL Component model data

     private URI fRef = null;

     private Object fValue = null; //TODO decide how to handle value contents

+    private TypeDefinition fValueConstraint = null;

+    private WSDL20Element fParent = null;

+    

+    //XML Element data

     private QName fConstraint = null;

-

     private boolean fHasValueToken = false; //true if <constraint>='#value'

 

-    /*

-     * @see org.apache.woden.wsdl20.xml.PropertyElement#setRef(URI)

-     */

-    public void setRef(URI ref) 

-    {

-        fRef = ref;

-    }

+    /* ************************************************************

+     *  Property interface methods (the WSDL Component model)

+     * ************************************************************/

     

     /* 

      * @see org.apache.woden.wsdl20.Property#getRef()

      * @see org.apache.woden.wsdl20.xml.PropertyElement#getRef()

      */

-    public URI getRef() 

-    {

+    public URI getRef() {

         return fRef;

     }

 

     /*

-     * @see org.apache.woden.wsdl20.xml.PropertyElement#setValue(Object)

+     * @see org.apache.woden.wsdl20.Property#getValue()

+     * @see org.apache.woden.wsdl20.xml.PropertyElement#getValue()

      */

-    public void setValue(Object value) 

-    {

-        fValue = value;

+    public Object getValue() {

+        return fValue;

     }

     

+    /* 

+     * @see org.apache.woden.wsdl20.Property#getValueConstraint()

+     */

+    public TypeDefinition getValueConstraint() {

+        return fValueConstraint;

+    }

+

+    /* (non-Javadoc)

+     * @see org.apache.woden.wsdl20.NestedComponent#getParent()

+     */

+    public WSDL20Component getParent() {

+        return (WSDL20Component)fParent;

+    }

+    

+    /* ************************************************************

+     *  PropertyElement interface methods (the XML Element model)

+     * ************************************************************/

+    

     /*

-     * @see org.apache.woden.wsdl20.Property#getValue()

-     * @see org.apache.woden.wsdl20.xml.PropertyElement#getValue()

+     * @see org.apache.woden.wsdl20.xml.PropertyElement#setRef(URI)

      */

-    public Object getValue() 

-    {

-        return fValue;

+    public void setRef(URI ref) {

+        fRef = ref;

+    }

+    

+    /*

+     * @see org.apache.woden.wsdl20.xml.PropertyElement#setValue(Object)

+     */

+    public void setValue(Object value) {

+        fValue = value;

     }

     

     /*

      * @see org.apache.woden.wsdl20.xml.PropertyElement#setConstraint(QName)

      */

-    public void setConstraint(QName constraint) 

-    {

+    public void setConstraint(QName constraint) {

         fConstraint = constraint;

     }

     

     /*

      * @see org.apache.woden.wsdl20.xml.PropertyElement#getConstraint()

      */

-    public QName getConstraint() 

-    {

+    public QName getConstraint() {

         return fConstraint;

     }

-    

+

     /*

-     * Set to true if <constraint> contains the NMToken "#value",  

-     * which would indicate that this property specifies a <value> instead of 
a 

-     * <constraint> QName.

-     * 

      * @see 
org.apache.woden.wsdl20.xml.PropertyElement#setHasValueToken(boolean)

      */

-    public void setHasValueToken(boolean b) 

-    {

+    public void setHasValueToken(boolean b) {

         fHasValueToken = b;

     }

     

     /*

-     * Should return true if the <constraint> contains the NMToken "#value",

-     * which would indicate that this property specifies a <value> instead of 
a 

-     * <constraint> QName.

-     * 

      * @see org.apache.woden.wsdl20.xml.PropertyElement#hasValueToken()

      */

-    public boolean hasValueToken() 

-    {

+    public boolean hasValueToken() {

         return fHasValueToken;

     }

     

-    /* 

-     * @see org.apache.woden.wsdl20.Property#getValueConstraint()

+    /*

+     * @see 
org.apache.woden.wsdl20.xml.NestedElement#setParentElement(WSDL20Element)

      */

-    public TypeDefinition getValueConstraint() {

-        // TODO Auto-generated method stub

-        return null;

+    public void setParentElement(WSDL20Element parent) {

+        fParent = parent;

     }

-

-    /* (non-Javadoc)

-     * @see org.apache.woden.wsdl20.NestedComponent#getParent()

+    

+    /*

+     * @see org.apache.woden.wsdl20.xml.NestedElement#getParentElement()

      */

-    public Component getParent() {

-        // TODO Auto-generated method stub

-        return null;

+    public WSDL20Element getParentElement() {

+        return fParent;

+    }

+    

+    /* ************************************************************

+     *  Non-API implementation methods

+     * ************************************************************/

+

+    public void setValueConstraint(TypeDefinition typeDef) {

+        fValueConstraint = typeDef;

     }

 

 }


Modified: 
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=331292&r1=331291&r2=331292&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java 
(original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java 
Mon Nov  7 08:13:30 2005
@@ -39,7 +39,7 @@
  * 

  * @author [EMAIL PROTECTED]

  */

-public class TypesImpl extends DocumentableImpl

+public class TypesImpl extends WSDL20ObjectImpl

                        implements TypesElement 

 {

     private String fTypeSystem;


Added: 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDL20ObjectImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDL20ObjectImpl.java?rev=331292&view=auto
==============================================================================
--- 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDL20ObjectImpl.java 
(added)
+++ 
incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDL20ObjectImpl.java 
Mon Nov  7 08:13:30 2005
@@ -0,0 +1,60 @@
+/**

+ * Copyright 2005 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.woden.internal.wsdl20;

+

+import java.util.List;

+import java.util.Vector;

+

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

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

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

+

+/**

+ * All classes implementing the WSDL 2.0 Component and Element

+ * model interfaces directly or indirectly extend this 

+ * abstract class. It implements the WSDL20Component interface

+ * which provides a common object reference for the WSDL 2.0 

+ * Component API. Via the DocumentableElement interface, this 

+ * class also implements the WSDL20Element interface, which provides 

+ * a common object reference for WSDL 2.0 Element API.

+ * <p>

+ * Note, this class implements DocumentableElement because all

+ * WSDL 2.0 elements may have &lt;documentation&gt; child elements.

+ * 

+ * @author [EMAIL PROTECTED]

+ */

+public abstract class WSDL20ObjectImpl implements WSDL20Component,

+                                                  DocumentableElement {

+

+    private List fDocumentationElements = new Vector();

+    

+    /* (non-Javadoc)

+     * @see 
org.apache.woden.wsdl20.xml.DocumentableElement#addDocumentationElement(org.apache.woden.wsdl20.xml.DocumentationElement)

+     */

+    public void addDocumentationElement(DocumentationElement docEl) {

+        fDocumentationElements.add(docEl);

+    }

+

+    /* (non-Javadoc)

+     * @see 
org.apache.woden.wsdl20.xml.DocumentableElement#getDocumentationElements()

+     */

+    public DocumentationElement[] getDocumentationElements() {

+        DocumentationElement[] array = new 
DocumentationElement[fDocumentationElements.size()];

+        fDocumentationElements.toArray(array);

+        return array;

+    }

+

+}




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

Reply via email to