You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/05/19 06:47:08 UTC

svn commit: r170868 - in /webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl: ExtensibilityAttribute.java impl/ComponentImpl.java impl/ExtensibilityAttributeImpl.java impl/ExtensibleComponentImpl.java

Author: chathura
Date: Wed May 18 21:47:08 2005
New Revision: 170868

URL: http://svn.apache.org/viewcvs?rev=170868&view=rev
Log:
ExtensibleAttribute added to the Component class and the ExtensibilityElement moved to the Component class so that the functionality will be available to all the Component.

Added:
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibilityAttribute.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibilityAttributeImpl.java
Modified:
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ComponentImpl.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibleComponentImpl.java

Added: webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibilityAttribute.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibilityAttribute.java?rev=170868&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibilityAttribute.java (added)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibilityAttribute.java Wed May 18 21:47:08 2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2001-2004 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.wsdl;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public interface ExtensibilityAttribute {
+	public abstract QName getKey();
+
+	public abstract QName getValue();
+}
\ No newline at end of file

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ComponentImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ComponentImpl.java?rev=170868&r1=170867&r2=170868&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ComponentImpl.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ComponentImpl.java Wed May 18 21:47:08 2005
@@ -16,86 +16,154 @@
 package org.apache.wsdl.impl;
 
 import org.apache.wsdl.Component;
+import org.apache.wsdl.ExtensibilityAttribute;
 import org.apache.wsdl.WSDLConstants;
 import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
 
 /**
  * @author Chathura Herath
  */
 public class ComponentImpl implements WSDLConstants, Component {
-    /**
-     * Field componentProperties
-     */
-    protected HashMap componentProperties = new HashMap();
-    
-    /**
-     * List of Element 
-     */
-    protected List elments;
-
-    
-    /**
-     * Field documentation
-     */
-    protected Document documentation = null;
-
-    /**
-     * Returns the Documentation Element as a
-     * <code>Document</code>.
-     *
-     * @return documentation
-     */
-    public Document getDocumentation() {
-        return documentation;
-    }
-
-    /**
-     * Will set the Documentation element for the Component.
-     *
-     * @param documentation Component Docuemntation
-     */
-    public void setDocumentation(Document documentation) {
-        this.documentation = documentation;
-    }
-
-    /**
-     * Returns the properties that are specific to this WSDL Component.
-     *
-     * @return
-     */
-    public HashMap getComponentProperties() {
-        return componentProperties;
-    }
-
-    /**
-     * Sets the properties of the Component if any.
-     *
-     * @param properties
-     */
-    public void setComponentProperties(HashMap properties) {
-        this.componentProperties = properties;
-    }
-
-    /**
-     * Will set the property keyed with the relavent key
-     *
-     * @param key Key in the map
-     * @param obj Object to be put
-     */
-    public void setComponentProperty(Object key, Object obj) {
-        this.componentProperties.put(key, obj);
-    }
-
-    /**
-     * Gets the component property
-     *
-     * @param key key for the map search.
-     * @return
-     */
-    public Object getComponentProperty(Object key) {
-        return this.componentProperties.get(key);
-    }
-}
+	/**
+	 * Field componentProperties
+	 */
+	protected HashMap componentProperties = new HashMap();
+
+	/**
+	 * List of Element
+	 */
+	protected List elments;
+
+	/**
+	 * Field documentation
+	 */
+	protected Document documentation = null;
+
+	/**
+	 * Field Namespace Qualified elements that can be sticked in the component.
+	 */
+	private List elements = null;
+
+	/**
+	 * Field Namespace Qualified attrebutes that can be sticked int eh
+	 * component.
+	 */
+	private List attributes = null;
+
+	/**
+	 * Returns the Documentation Element as a <code>Document</code>.
+	 * 
+	 * @return documentation
+	 */
+	public Document getDocumentation() {
+		return documentation;
+	}
+
+	/**
+	 * Will set the Documentation element for the Component.
+	 * 
+	 * @param documentation
+	 *            Component Docuemntation
+	 */
+	public void setDocumentation(Document documentation) {
+		this.documentation = documentation;
+	}
+
+	/**
+	 * Returns the properties that are specific to this WSDL Component.
+	 * 
+	 * @return
+	 */
+	public HashMap getComponentProperties() {
+		return componentProperties;
+	}
+
+	/**
+	 * Sets the properties of the Component if any.
+	 * 
+	 * @param properties
+	 */
+	public void setComponentProperties(HashMap properties) {
+		this.componentProperties = properties;
+	}
+
+	/**
+	 * Will set the property keyed with the relavent key
+	 * 
+	 * @param key
+	 *            Key in the map
+	 * @param obj
+	 *            Object to be put
+	 */
+	public void setComponentProperty(Object key, Object obj) {
+		this.componentProperties.put(key, obj);
+	}
+
+	/**
+	 * Gets the component property
+	 * 
+	 * @param key
+	 *            key for the map search.
+	 * @return
+	 */
+	public Object getComponentProperty(Object key) {
+		return this.componentProperties.get(key);
+	}
+
+	/**
+	 * Adds the <code>Element</code> to this Component.
+	 * 
+	 * @param element
+	 */
+	public void addExtensibilityElement(Element element) {
+		if (null == this.elements) {
+			this.elements = new LinkedList();
+		}
+		if (null == element)
+			return;
+		this.elements.add(element);
+
+	}
+
+	/**
+	 * Returns the Extensibility Elements of this component;
+	 * 
+	 * @return List of <code>Element</code> s
+	 */
+	public List getExtensibilityElements() {
+		if (null == this.elements) {
+			this.elements = new LinkedList();			 
+		}
+		return this.elements;
+	}
+
+	/**
+	 * Adds the <code>ExtensibilityAttribute</code> as a attrebute of this 
+	 * Component.
+	 * @param attribute <code>ExtensibilityAttribute</code>
+	 */
+	public void addExtensibleAttributes(ExtensibilityAttribute attribute) {
+		if (null == this.attributes) {
+			this.attributes = new LinkedList();
+		}
+		if (null == attribute)
+			return;
+		this.attributes.add(attribute);
+	}
+
+	/**
+	 * Returns a <code>List</code> of ExtensibleAttributes of this component.
+	 * @return  <code>List</code> 
+	 */
+	public List getExtensibilityAttributes() {
+		if (null == this.attributes) {
+			this.attributes = new LinkedList();
+		}
+		return this.attributes;
+	}
+}
\ No newline at end of file

Added: webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibilityAttributeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibilityAttributeImpl.java?rev=170868&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibilityAttributeImpl.java (added)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibilityAttributeImpl.java Wed May 18 21:47:08 2005
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2001-2004 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.wsdl.impl;
+
+import javax.xml.namespace.QName;
+
+import org.apache.wsdl.ExtensibilityAttribute;
+
+/**
+ * @author chathura@opensource.lk
+ *
+ */
+public class ExtensibilityAttributeImpl implements ExtensibilityAttribute {
+	
+	private QName key;
+	
+	private QName value;
+	
+	/**
+	 * @param key
+	 * @param value
+	 */
+	public ExtensibilityAttributeImpl(QName key, QName value) {
+		this.key = key;
+		this.value = value;
+	}
+	public QName getKey() {
+		return key;
+	}
+	public QName getValue() {
+		return value;
+	}
+}

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibleComponentImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibleComponentImpl.java?rev=170868&r1=170867&r2=170868&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibleComponentImpl.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/ExtensibleComponentImpl.java Wed May 18 21:47:08 2005
@@ -15,13 +15,12 @@
  */
 package org.apache.wsdl.impl;
 
+import java.util.LinkedList;
+import java.util.List;
+
 import org.apache.wsdl.ExtensibleComponent;
 import org.apache.wsdl.WSDLFeature;
 import org.apache.wsdl.WSDLProperty;
-import org.w3c.dom.Element;
-
-import java.util.LinkedList;
-import java.util.List;
 
 
 /**
@@ -39,11 +38,7 @@
      */
     private List properties = null;
     
-    /**
-     * Field Namespace Qualified elements that can be sticked in the 
-     * component.
-     */
-    private List elements = null;
+    
 
     /**
      * Will add a <code>WSDLFeature</code> to the feature list.
@@ -103,28 +98,5 @@
         return this.properties;
     }
     
-    /**
-     * Adds the <code>Element</code> to the Extensible Component.
-     * @param element
-     */
-    public void addExtensibilityElement(Element element){
-    	if(null == this.elements){
-    		this.elements = new LinkedList();
-    	}
-    	if(null == element)
-    		return;
-    	this.elements.add(element);
-    	
-    }
-    
-    /**
-     * Returns the Extensibility Elements of the Extensible component;
-     * @return List of <code>Element</code>s
-     */
-    public List getExtensibilityElements(){
-    	if(null == this.elements){
-    		return new LinkedList();
-    	}
-    	return this.elements;
-    }
+  
 }