You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2006/01/17 05:06:42 UTC
svn commit: r369673 - in /incubator/woden/java/src/org/apache/woden:
internal/wsdl20/ wsdl20/xml/
Author: jkaputin
Date: Mon Jan 16 20:06:29 2006
New Revision: 369673
URL: http://svn.apache.org/viewcvs?rev=369673&view=rev
Log:
Added support for WSDL <import> and <include>
Added:
incubator/woden/java/src/org/apache/woden/internal/wsdl20/ImportImpl.java
incubator/woden/java/src/org/apache/woden/internal/wsdl20/IncludeImpl.java
incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java
Modified:
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/ImportElement.java
incubator/woden/java/src/org/apache/woden/wsdl20/xml/IncludeElement.java
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=369673&r1=369672&r2=369673&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 Jan 16 20:06:29 2006
@@ -1,5 +1,5 @@
/**
- * Copyright 2005 Apache Software Foundation
+ * Copyright 2005, 2006 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.
@@ -347,6 +347,14 @@
public DocumentationElement createDocumentationElement() {
return new DocumentationImpl();
+ }
+
+ public ImportElement createImportElement() {
+ return new ImportImpl();
+ }
+
+ public IncludeElement createIncludeElement() {
+ return new IncludeImpl();
}
public TypesElement createTypesElement() {
Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/ImportImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/ImportImpl.java?rev=369673&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/ImportImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/ImportImpl.java Mon Jan 16 20:06:29 2006
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2006 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.net.URI;
+
+import org.apache.woden.wsdl20.xml.ImportElement;
+
+/**
+ * This class implements the <wsdl:import> element.
+ *
+ * @author jkaputin@apache.org
+ */
+public class ImportImpl extends WSDLReferenceImpl implements ImportElement
+{
+ private URI fNamespace = null;
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.wsdl20.xml.ImportElement#setNamespace(java.net.URI)
+ */
+ public void setNamespace(URI nsURI)
+ {
+ fNamespace = nsURI;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.wsdl20.xml.ImportElement#getNamespace()
+ */
+ public URI getNamespace()
+ {
+ return fNamespace;
+ }
+
+}
Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/IncludeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/IncludeImpl.java?rev=369673&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/IncludeImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/IncludeImpl.java Mon Jan 16 20:06:29 2006
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2006 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 org.apache.woden.wsdl20.xml.IncludeElement;
+
+/**
+ * This class implements the <wsdl:include> element.
+ *
+ * @author jkaputin@apache.org
+ */
+public class IncludeImpl extends WSDLReferenceImpl implements IncludeElement
+{
+ /* No additional definitions required. This class inherits all of its behaviour
+ * from WSDLReferenceImpl. We just need this subclass so we can create an
+ * object representing IncludeElement, which maps to <wsdl:include>.
+ */
+}
Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java?rev=369673&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java Mon Jan 16 20:06:29 2006
@@ -0,0 +1,88 @@
+/**
+ * Copyright 2006 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.net.URI;
+import java.util.List;
+import java.util.Vector;
+
+import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentationElement;
+
+/**
+ * This abstract class defines the common behaviour for referencing WSDL
+ * documents via the <wsdl:import> and <wsdl:include> elements.
+ * It is extended by the concrete implementation classes for those two elements.
+ *
+ * TODO consider whether to expose a WSDLReferenceElement interface on the API too
+ * to provide a common handle for import and include elements (is there a use case?).
+ *
+ * @author jkaputin@apache.org
+ */
+public abstract class WSDLReferenceImpl extends WSDLElementImpl
+{
+ private List fDocumentationElements = new Vector();
+ private URI fLocation = null;
+ private DescriptionElement fDescriptionElement = null;
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.wsdl20.xml.ImportElement#setLocation(java.net.URI)
+ */
+ public void setLocation(URI locURI) {
+ fLocation = locURI;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.wsdl20.xml.ImportElement#getLocation()
+ */
+ public URI getLocation() {
+ return fLocation;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.wsdl20.xml.ImportElement#setDescriptionElement(org.apache.woden.wsdl20.xml.DescriptionElement)
+ */
+ public void setDescriptionElement(DescriptionElement desc) {
+ fDescriptionElement = desc;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.wsdl20.xml.ImportElement#getDescriptionElement()
+ */
+ public DescriptionElement getDescriptionElement() {
+ return fDescriptionElement;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.woden.wsdl20.xml.DocumentableElement#addDocumentationElement(org.apache.woden.wsdl20.xml.DocumentationElement)
+ */
+ public void addDocumentationElement(DocumentationElement docEl)
+ {
+ if(docEl != null) {
+ 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;
+ }
+
+}
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=369673&r1=369672&r2=369673&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 Mon Jan 16 20:06:29 2006
@@ -1,5 +1,5 @@
/**
- * Copyright 2005 Apache Software Foundation
+ * Copyright 2005, 2006 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.
@@ -79,6 +79,10 @@
*/
public DocumentationElement createDocumentationElement();
+
+ public ImportElement createImportElement();
+
+ public IncludeElement createIncludeElement();
public TypesElement createTypesElement();
Modified: incubator/woden/java/src/org/apache/woden/wsdl20/xml/ImportElement.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/ImportElement.java?rev=369673&r1=369672&r2=369673&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/xml/ImportElement.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/xml/ImportElement.java Mon Jan 16 20:06:29 2006
@@ -1,5 +1,5 @@
/**
- * Copyright 2005 Apache Software Foundation
+ * Copyright 2005, 2006 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.
@@ -15,6 +15,8 @@
*/
package org.apache.woden.wsdl20.xml;
+import java.net.URI;
+
/**
* This interface represents a <import> XML element
* information item. It declares the behaviour required to support
@@ -24,5 +26,12 @@
*/
public interface ImportElement extends DocumentableElement
{
- //TODO
+ public void setNamespace(URI nsURI);
+ public URI getNamespace();
+
+ public void setLocation(URI locURI);
+ public URI getLocation();
+
+ public void setDescriptionElement(DescriptionElement desc);
+ public DescriptionElement getDescriptionElement();
}
Modified: incubator/woden/java/src/org/apache/woden/wsdl20/xml/IncludeElement.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/IncludeElement.java?rev=369673&r1=369672&r2=369673&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/xml/IncludeElement.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/xml/IncludeElement.java Mon Jan 16 20:06:29 2006
@@ -1,5 +1,5 @@
/**
- * Copyright 2005 Apache Software Foundation
+ * Copyright 2005, 2006 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.
@@ -15,6 +15,8 @@
*/
package org.apache.woden.wsdl20.xml;
+import java.net.URI;
+
/**
* This interface represents a <include> XML element
* information item. It declares the behaviour required to support
@@ -24,5 +26,9 @@
*/
public interface IncludeElement extends DocumentableElement
{
- //TODO
+ public void setLocation(URI locURI);
+ public URI getLocation();
+
+ public void setDescriptionElement(DescriptionElement desc);
+ public DescriptionElement getDescriptionElement();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org