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 hu...@apache.org on 2006/09/08 17:20:23 UTC
svn commit: r441532 - in
/incubator/woden/branches/WODEN-40/src/org/apache/woden: internal/
internal/wsdl20/ wsdl20/xml/
Author: hughesj
Date: Fri Sep 8 08:20:22 2006
New Revision: 441532
URL: http://svn.apache.org/viewvc?view=rev&rev=441532
Log:
Removed createPropertyElement and createFeatureElement from DescriptionElement.
addPropertyElement and addFeatureElement on the ConfigurableImpl now does a
create then add. This means create and add is now an atomic action.
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/ConfigurableImpl.java
incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/ConfigurableElement.java
incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/DescriptionElement.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=441532&r1=441531&r2=441532
==============================================================================
--- 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 08:20:22 2006
@@ -56,6 +56,7 @@
import org.apache.woden.wsdl20.xml.BindingFaultReferenceElement;
import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
import org.apache.woden.wsdl20.xml.BindingOperationElement;
+import org.apache.woden.wsdl20.xml.ConfigurableElement;
import org.apache.woden.wsdl20.xml.DescriptionElement;
import org.apache.woden.wsdl20.xml.DocumentableElement;
import org.apache.woden.wsdl20.xml.DocumentationElement;
@@ -798,11 +799,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- intface.addFeatureElement(parseFeature(tempEl, desc, intface));
+ parseFeature(tempEl, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- intface.addPropertyElement(parseProperty(tempEl, desc, intface));
+ parseProperty(tempEl, desc, intface);
}
else
{
@@ -865,11 +866,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- fault.addFeatureElement(parseFeature(tempEl, desc, fault));
+ parseFeature(tempEl, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- fault.addPropertyElement(parseProperty(tempEl, desc, fault));
+ parseProperty(tempEl, desc, fault);
}
else
{
@@ -936,11 +937,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- oper.addFeatureElement(parseFeature(tempEl, desc, oper));
+ parseFeature(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- oper.addPropertyElement(parseProperty(tempEl, desc, oper));
+ parseProperty(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, tempEl))
{
@@ -1026,11 +1027,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- faultRef.addFeatureElement(parseFeature(tempEl, desc, faultRef));
+ parseFeature(tempEl, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- faultRef.addPropertyElement(parseProperty(tempEl, desc, faultRef));
+ parseProperty(tempEl, desc, faultRef);
}
else
{
@@ -1129,11 +1130,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- message.addFeatureElement(parseFeature(tempEl, desc, message));
+ parseFeature(tempEl, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- message.addPropertyElement(parseProperty(tempEl, desc, message));
+ parseProperty(tempEl, desc, message);
}
else
{
@@ -1207,11 +1208,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- binding.addFeatureElement(parseFeature(tempEl, desc, binding));
+ parseFeature(tempEl, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- binding.addPropertyElement(parseProperty(tempEl, desc, binding));
+ parseProperty(tempEl, desc, binding);
}
else
{
@@ -1268,11 +1269,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- fault.addFeatureElement(parseFeature(tempEl, desc, fault));
+ parseFeature(tempEl, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- fault.addPropertyElement(parseProperty(tempEl, desc, fault));
+ parseProperty(tempEl, desc, fault);
}
else
{
@@ -1330,11 +1331,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- oper.addFeatureElement(parseFeature(tempEl, desc, oper));
+ parseFeature(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- oper.addPropertyElement(parseProperty(tempEl, desc, oper));
+ parseProperty(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, tempEl))
{
@@ -1421,11 +1422,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- faultRef.addFeatureElement(parseFeature(tempEl, desc, faultRef));
+ parseFeature(tempEl, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- faultRef.addPropertyElement(parseProperty(tempEl, desc, faultRef));
+ parseProperty(tempEl, desc, faultRef);
}
else
{
@@ -1499,11 +1500,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- message.addFeatureElement(parseFeature(tempEl, desc, message));
+ parseFeature(tempEl, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- message.addPropertyElement(parseProperty(tempEl, desc, message));
+ parseProperty(tempEl, desc, message);
}
else
{
@@ -1569,11 +1570,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- service.addFeatureElement(parseFeature(tempEl, desc, service));
+ parseFeature(tempEl, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- service.addPropertyElement(parseProperty(tempEl, desc, service));
+ parseProperty(tempEl, desc, service);
}
else
{
@@ -1644,11 +1645,11 @@
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- endpoint.addFeatureElement(parseFeature(tempEl, desc, endpoint));
+ parseFeature(tempEl, desc, endpoint);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- endpoint.addPropertyElement(parseProperty(tempEl, desc, endpoint));
+ parseProperty(tempEl, desc, endpoint);
}
else
{
@@ -1664,10 +1665,10 @@
private FeatureElement parseFeature(Element featEl,
DescriptionElement desc,
- WSDLElement parent)
+ ConfigurableElement parent)
throws WSDLException
{
- FeatureElement feature = desc.createFeatureElement();
+ FeatureElement feature = parent.addFeatureElement();
feature.setParentElement(parent);
String ref = DOMUtils.getAttribute(featEl, Constants.ATTR_REF);
@@ -1735,10 +1736,10 @@
*/
private PropertyElement parseProperty(Element propEl,
DescriptionElement desc,
- WSDLElement parent)
+ ConfigurableElement parent)
throws WSDLException
{
- PropertyElement property = desc.createPropertyElement();
+ PropertyElement property = parent.addPropertyElement();
property.setParentElement(parent);
String ref = DOMUtils.getAttribute(propEl, Constants.ATTR_REF);
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=441532&r1=441531&r2=441532
==============================================================================
--- 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 08:20:22 2006
@@ -40,6 +40,7 @@
import org.apache.woden.wsdl20.xml.BindingFaultReferenceElement;
import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
import org.apache.woden.wsdl20.xml.BindingOperationElement;
+import org.apache.woden.wsdl20.xml.ConfigurableElement;
import org.apache.woden.wsdl20.xml.DescriptionElement;
import org.apache.woden.wsdl20.xml.DocumentableElement;
import org.apache.woden.wsdl20.xml.DocumentationElement;
@@ -300,10 +301,10 @@
parseEndpoint(serviceElChild, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, serviceElChild)){
- service.addFeatureElement(parseFeature(serviceElChild, desc, service));
+ parseFeature(serviceElChild, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, serviceElChild)){
- service.addPropertyElement(parseProperty(serviceElChild, desc, service));
+ parseProperty(serviceElChild, desc, service);
}
else{
service.addExtensionElement(parseExtensionElement(ServiceElement.class, service, serviceElChild, desc) );
@@ -358,10 +359,10 @@
parseDocumentation(endpointElChild, desc, endpoint);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, endpointElChild)){
- endpoint.addFeatureElement(parseFeature(endpointElChild, desc, endpoint));
+ parseFeature(endpointElChild, desc, endpoint);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, endpointElChild)){
- endpoint.addPropertyElement(parseProperty(endpointElChild, desc, endpoint));
+ parseProperty(endpointElChild, desc, endpoint);
}
else{
endpoint.addExtensionElement(
@@ -420,10 +421,10 @@
parseBindingOperation(bindElChild, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, bindElChild)){
- binding.addFeatureElement(parseFeature(bindElChild, desc, binding));
+ parseFeature(bindElChild, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, bindElChild)){
- binding.addPropertyElement(parseProperty(bindElChild, desc, binding));
+ parseProperty(bindElChild, desc, binding);
}
else{
binding.addExtensionElement(parseExtensionElement(BindingElement.class, binding, bindElChild, desc) );
@@ -467,10 +468,10 @@
parseDocumentation(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, bindOpElChild)){
- oper.addFeatureElement(parseFeature(bindOpElChild, desc, oper));
+ parseFeature(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, bindOpElChild)){
- oper.addPropertyElement(parseProperty(bindOpElChild, desc, oper));
+ parseProperty(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, bindOpElChild)){
parseBindingMessageReference(bindOpElChild, desc, oper);
@@ -542,10 +543,10 @@
parseDocumentation(faultRefChild, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, faultRefChild)){
- faultRef.addFeatureElement(parseFeature(faultRefChild, desc, faultRef));
+ parseFeature(faultRefChild, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, faultRefChild)){
- faultRef.addPropertyElement(parseProperty(faultRefChild, desc, faultRef));
+ parseProperty(faultRefChild, desc, faultRef);
}
else{
faultRef.addExtensionElement(parseExtensionElement(BindingFaultReferenceElement.class, faultRef, faultRefChild, desc) );
@@ -604,10 +605,10 @@
parseDocumentation(msgRefChild, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, msgRefChild)){
- message.addFeatureElement(parseFeature(msgRefChild, desc, message));
+ parseFeature(msgRefChild, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, msgRefChild)){
- message.addPropertyElement(parseProperty(msgRefChild, desc, message));
+ parseProperty(msgRefChild, desc, message);
}
else{
message.addExtensionElement(parseExtensionElement(BindingMessageReferenceElement.class, message, msgRefChild, desc) );
@@ -651,10 +652,10 @@
parseDocumentation(bindFaultChild, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, bindFaultChild)){
- fault.addFeatureElement(parseFeature(bindFaultChild, desc, fault));
+ parseFeature(bindFaultChild, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, bindFaultChild)){
- fault.addPropertyElement(parseProperty(bindFaultChild, desc, fault));
+ parseProperty(bindFaultChild, desc, fault);
}
else{
fault.addExtensionElement(parseExtensionElement(BindingFaultElement.class, fault, bindFaultChild, desc) );
@@ -710,10 +711,10 @@
parseInterfaceOperation(interfaceChild, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, interfaceChild)){
- intface.addFeatureElement(parseFeature(interfaceChild, desc, intface));
+ parseFeature(interfaceChild, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, interfaceChild)){
- intface.addPropertyElement(parseProperty(interfaceChild, desc, intface));
+ parseProperty(interfaceChild, desc, intface);
}
else{
intface.addExtensionElement(
@@ -764,10 +765,10 @@
parseDocumentation(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, operElChild)){
- oper.addFeatureElement(parseFeature(operElChild, desc, oper));
+ parseFeature(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, operElChild)){
- oper.addPropertyElement(parseProperty(operElChild, desc, oper));
+ parseProperty(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, operElChild)){
parseInterfaceMessageReference(operElChild, desc, oper);
@@ -845,10 +846,10 @@
parseDocumentation(faultRefElChild, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, faultRefElChild)){
- faultRef.addFeatureElement(parseFeature(faultRefElChild, desc, faultRef));
+ parseFeature(faultRefElChild, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, faultRefElChild)){
- faultRef.addPropertyElement(parseProperty(faultRefElChild, desc, faultRef));
+ parseProperty(faultRefElChild, desc, faultRef);
}
else{
faultRef.addExtensionElement(
@@ -928,10 +929,10 @@
parseDocumentation(msgRefChild, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, msgRefChild)){
- message.addFeatureElement(parseFeature(msgRefChild, desc, message));
+ parseFeature(msgRefChild, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, msgRefChild)){
- message.addPropertyElement(parseProperty(msgRefChild, desc, message));
+ parseProperty(msgRefChild, desc, message);
}
else{
message.addExtensionElement(
@@ -982,10 +983,10 @@
parseDocumentation(faultElChild, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, faultElChild)){
- fault.addFeatureElement(parseFeature(faultElChild, desc, fault));
+ parseFeature(faultElChild, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, faultElChild)){
- fault.addPropertyElement(parseProperty(faultElChild, desc, fault));
+ parseProperty(faultElChild, desc, fault);
}
else{
fault.addExtensionElement(
@@ -998,10 +999,10 @@
private PropertyElement parseProperty(OMElement propEl,
DescriptionElement desc,
- WSDLElement parent)
+ ConfigurableElement parent)
throws WSDLException{
- PropertyElement property = desc.createPropertyElement();
+ PropertyElement property = parent.addPropertyElement();
property.setParentElement(parent);
String ref = OMUtils.getAttribute(propEl, Constants.ATTR_REF);
@@ -1216,10 +1217,10 @@
private FeatureElement parseFeature(OMElement featEl,
DescriptionElement desc,
- WSDLElement parent)
+ ConfigurableElement parent)
throws WSDLException {
- FeatureElement feature = desc.createFeatureElement();
+ FeatureElement feature = parent.addFeatureElement();
feature.setParentElement(parent);
String ref = OMUtils.getAttribute(featEl, Constants.ATTR_REF);
Modified: incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java?view=diff&rev=441532&r1=441531&r2=441532
==============================================================================
--- incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java (original)
+++ incubator/woden/branches/WODEN-40/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java Fri Sep 8 08:20:22 2006
@@ -69,14 +69,14 @@
* ************************************************************/
/* (non-Javadoc)
- * @see org.apache.woden.wsdl20.xml.ConfigurableElement#addFeatureElement(org.apache.woden.wsdl20.xml.FeatureElement)
+ * @see org.apache.woden.wsdl20.xml.ConfigurableElement#addFeatureElement()
*/
- public void addFeatureElement(FeatureElement feature)
+ public FeatureElement addFeatureElement()
{
- if(feature != null) {
- fFeatures.add(feature);
- feature.setParentElement(this);
- }
+ FeatureElement feature = new FeatureImpl();
+ fFeatures.add(feature);
+ feature.setParentElement(this);
+ return feature;
}
/* (non-Javadoc)
@@ -92,12 +92,12 @@
/* (non-Javadoc)
* @see org.apache.woden.wsdl20.xml.ConfigurableElement#addPropertyElement(org.apache.woden.wsdl20.xml.PropertyElement)
*/
- public void addPropertyElement(PropertyElement property)
+ public PropertyElement addPropertyElement()
{
- if(property != null) {
- fProperties.add(property);
- property.setParentElement(this);
- }
+ PropertyElement property = new PropertyImpl();
+ fProperties.add(property);
+ property.setParentElement(this);
+ return property;
}
/* (non-Javadoc)
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=441532&r1=441531&r2=441532
==============================================================================
--- 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 08:20:22 2006
@@ -504,14 +504,6 @@
return service;
}
- public FeatureElement createFeatureElement() {
- return new FeatureImpl();
- }
-
- public PropertyElement createPropertyElement() {
- return new PropertyImpl();
- }
-
public void setExtensionRegistry(ExtensionRegistry extReg)
{
fExtReg = extReg;
Modified: incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/ConfigurableElement.java
URL: http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/ConfigurableElement.java?view=diff&rev=441532&r1=441531&r2=441532
==============================================================================
--- incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/ConfigurableElement.java (original)
+++ incubator/woden/branches/WODEN-40/src/org/apache/woden/wsdl20/xml/ConfigurableElement.java Fri Sep 8 08:20:22 2006
@@ -30,11 +30,11 @@
*/
public interface ConfigurableElement extends WSDLElement {
- public void addFeatureElement(FeatureElement feature);
+ public FeatureElement addFeatureElement();
public FeatureElement[] getFeatureElements();
//TODO a remove method
- public void addPropertyElement(PropertyElement property);
+ public PropertyElement addPropertyElement();
public PropertyElement[] getPropertyElements();
//TODO a remove method
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=441532&r1=441531&r2=441532
==============================================================================
--- 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 08:20:22 2006
@@ -89,12 +89,7 @@
public BindingElement addBindingElement();
- public FeatureElement createFeatureElement();
-
public ServiceElement addServiceElement();
-
- public PropertyElement createPropertyElement();
-
/*
* Element accessor and modifier methods
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org