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 2005/11/07 17:17:59 UTC
svn commit: r331295 -
/incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
Author: jkaputin
Date: Mon Nov 7 08:17:52 2005
New Revision: 331295
URL: http://svn.apache.org/viewcvs?rev=331295&view=rev
Log:
Added support for setting the 'parent' of nested elements.
Interface components work in progress.
Modified:
incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
Modified: incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java?rev=331295&r1=331294&r2=331295&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java Mon Nov 7 08:17:52 2005
@@ -52,6 +52,7 @@
import org.apache.woden.wsdl20.xml.InterfaceOperationElement;
import org.apache.woden.wsdl20.xml.PropertyElement;
import org.apache.woden.wsdl20.xml.TypesElement;
+import org.apache.woden.wsdl20.xml.WSDL20Element;
import org.apache.ws.commons.schema.XmlSchema;
import org.apache.ws.commons.schema.XmlSchemaCollection;
import org.w3c.dom.Attr;
@@ -229,10 +230,12 @@
}
private FeatureElement parseFeature(Element featEl,
- DescriptionElement desc)
+ DescriptionElement desc,
+ WSDL20Element parent)
throws WSDLException
{
FeatureElement feature = desc.createFeatureElement();
+ feature.setParentElement(parent);
String ref = DOMUtils.getAttribute(featEl, Constants.ATTR_REF);
if(ref != null)
@@ -335,19 +338,19 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, tempEl))
{
- intface.addInterfaceFaultElement(parseInterfaceFault(tempEl, desc));
+ intface.addInterfaceFaultElement(parseInterfaceFault(tempEl, desc, intface));
}
else if (QNameUtils.matches(Constants.Q_ELEM_OPERATION, tempEl))
{
- intface.addInterfaceOperationElement(parseInterfaceOperation(tempEl, desc));
+ intface.addInterfaceOperationElement(parseInterfaceOperation(tempEl, desc, intface));
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- intface.addFeatureElement(parseFeature(tempEl, desc));
+ intface.addFeatureElement(parseFeature(tempEl, desc, intface));
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- intface.addPropertyElement(parseProperty(tempEl, desc));
+ intface.addPropertyElement(parseProperty(tempEl, desc, intface));
}
else
{
@@ -369,10 +372,12 @@
*/
private InterfaceFaultElement parseInterfaceFault(
Element faultEl,
- DescriptionElement desc)
+ DescriptionElement desc,
+ InterfaceElement parent)
throws WSDLException
{
InterfaceFaultElement fault = desc.createInterfaceFaultElement();
+ fault.setParentElement(parent);
String name =
DOMUtils.getAttribute(faultEl, Constants.ATTR_NAME);
@@ -417,11 +422,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- fault.addFeatureElement(parseFeature(tempEl, desc));
+ fault.addFeatureElement(parseFeature(tempEl, desc, fault));
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- fault.addPropertyElement(parseProperty(tempEl, desc));
+ fault.addPropertyElement(parseProperty(tempEl, desc, fault));
}
else
{
@@ -436,10 +441,12 @@
private InterfaceOperationElement parseInterfaceOperation(
Element operEl,
- DescriptionElement desc)
+ DescriptionElement desc,
+ InterfaceElement parent)
throws WSDLException
{
InterfaceOperationElement oper = desc.createInterfaceOperationElement();
+ oper.setParentElement(parent);
String name = DOMUtils.getAttribute(operEl, Constants.ATTR_NAME);
if(name != null)
@@ -484,27 +491,27 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- oper.addFeatureElement(parseFeature(tempEl, desc));
+ oper.addFeatureElement(parseFeature(tempEl, desc, oper));
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- oper.addPropertyElement(parseProperty(tempEl, desc));
+ oper.addPropertyElement(parseProperty(tempEl, desc, oper));
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, tempEl))
{
- oper.addInputElement(parseInterfaceMessageReference(tempEl, desc));
+ oper.addInputElement(parseInterfaceMessageReference(tempEl, desc, oper));
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTPUT, tempEl))
{
- oper.addOutputElement(parseInterfaceMessageReference(tempEl, desc));
+ oper.addOutputElement(parseInterfaceMessageReference(tempEl, desc, oper));
}
else if (QNameUtils.matches(Constants.Q_ELEM_INFAULT, tempEl))
{
- oper.addInfaultElement(parseInterfaceFaultReference(tempEl, desc));
+ oper.addInfaultElement(parseInterfaceFaultReference(tempEl, desc, oper));
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTFAULT, tempEl))
{
- oper.addOutfaultElement(parseInterfaceFaultReference(tempEl, desc));
+ oper.addOutfaultElement(parseInterfaceFaultReference(tempEl, desc, oper));
}
else
{
@@ -519,10 +526,12 @@
private InterfaceMessageReferenceElement parseInterfaceMessageReference(
Element messageEl,
- DescriptionElement desc)
+ DescriptionElement desc,
+ InterfaceOperationElement parent)
throws WSDLException
{
InterfaceMessageReferenceElement message = desc.createInterfaceMessageReferenceElement();
+ message.setParentElement(parent);
message.setMessageLabel(DOMUtils.getAttribute(messageEl, Constants.ATTR_MESSAGE_LABEL));
@@ -553,11 +562,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- message.addFeatureElement(parseFeature(tempEl, desc));
+ message.addFeatureElement(parseFeature(tempEl, desc, message));
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- message.addPropertyElement(parseProperty(tempEl, desc));
+ message.addPropertyElement(parseProperty(tempEl, desc, message));
}
else
{
@@ -572,10 +581,12 @@
private FaultReferenceElement parseInterfaceFaultReference(
Element faultRefEl,
- DescriptionElement desc)
+ DescriptionElement desc,
+ InterfaceOperationElement parent)
throws WSDLException
{
FaultReferenceElement faultRef = desc.createInterfaceFaultReferenceElement();
+ faultRef.setParentElement(parent);
String ref = DOMUtils.getAttribute(faultRefEl, Constants.ATTR_REF);
if(ref != null)
@@ -606,11 +617,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- faultRef.addFeatureElement(parseFeature(tempEl, desc));
+ faultRef.addFeatureElement(parseFeature(tempEl, desc, faultRef));
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- faultRef.addPropertyElement(parseProperty(tempEl, desc));
+ faultRef.addPropertyElement(parseProperty(tempEl, desc, faultRef));
}
else
{
@@ -649,10 +660,12 @@
*
*/
private PropertyElement parseProperty(Element propEl,
- DescriptionElement desc)
+ DescriptionElement desc,
+ WSDL20Element parent)
throws WSDLException
{
PropertyElement property = desc.createPropertyElement();
+ property.setParentElement(parent);
String ref = DOMUtils.getAttribute(propEl, Constants.ATTR_REF);
if(ref != null)
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org