Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Since WODEN-40, the Element API uses composition rather than aggregation. Elements have addXXXX methods that instantiate their child elements and set the parent element. It should no longer be necessary nor possible to set the parent element explicitly via the Woden API.
The setParentElement method should be removed from the NestedElement interface (so it just retains a getParentElement method) and the setParentElement methods implemented in package org.apache.woden.internal.wsdl20 should be given default access (package private) so that they are only available to the addXXXX methods within the WSDL impl classes.
The calls to setParentElement in the parseXXXX methods of BaseWSDLReader are redundant and should be removed. Some testcases also have redundant calls to setParentElement and those should be removed too. Providing the correct API programming model is used to instantiate objects (via the addXXXX methods), the parent element will always be initialised correctly.