One idea I have is to think in terms of the MVC pattern. The current *Impl classes are the model, the *Element interfaces include controller methods (add* etc). We have two views - the component view and the element (XML infoset) view.
Right now the *Impl classes directly implement the component and element java interfaces. So there is only one equals() implementation and that needs to cover both component and element views. If we separate the *Impl classes from those interfaces, by having a lightweight 'component view' implementation and an 'element view' implementation, then we can have a separate implementation of equals() for each. The other methods will simple delegate straight into the existing *Impl classes. This will be easier to talk about with some code to look at so I'll put together a sample of what I mean. Cheers, Jeremy On 22/11/2007, John Kaputin <[EMAIL PROTECTED]> wrote: > Merging the Component and Element APIs will not solve the problem of > implementing equals(Object) to determine logical equality. The object > model will still contain Component model and Infoset data and equality > between components does not necessarily mean their infosets are > equivalent. Some component properties are derived by evaluating the > attributes present in the infoset and applying certain rules. It's > possible to have equivalent Component models created from different XML > infosets. > > We could decide that equals(Object) applies to WSDL Component model > equivalence only, but that does mean we could end up with two objects with > different infoset data being considered equal. We won't be able to use > equals(Object) for checking equivalence in the WSDL infoset model. Maybe > that doesn't matter. Maybe it's enough just to use the Component > equivalence defined in the spec when comparing Woden WSDL objects via > equals(Object). > > regards, > John Kaputin > > > [EMAIL PROTECTED] wrote on 21/11/2007 17:13:18: > > > One issue is the equals() method. As things stand there is an > > equals(WSDLComponent) method on WSDLComponent interface and > > implemented trivially on WSDLComponentImpl. Unfortunately if you > > compare two DescriptionElement objects the equals(Object) method is > > called which returns false. There is a fundamental problem with having > > a single implementation class implementing the WSDLComponent and > > WSDLElement interfaces. > > > > If I want to compare two DescriptionElement instances with each other > > then equals(Object) needs to be implemented (by DescriptionImpl) and > > that implementation needs to do the comparison at the XML infoset > > level. > > > > If I want to compare two Description instances (ie at the component > > model level) then equals(Object) needs to be implemented (by > > DescriptionImpl) and that implementation needs to do the comparison at > > the Component model level. > > > > There's a conflict here ... the equals() method doesn't know which one > to do! > > > > So ... firstly, is object comparison something we wish to allow our > > users to do. I think it would be useful and equals() is a fundamental > > part of a well formed API. > > > > Not quite sure what the solution is right now though. > > > > Cheers, > > Jeremy > > > > On 15/11/2007, John Kaputin <[EMAIL PROTECTED]> wrote: > > > With Woden M8 in progress and (hopefully) a Woden 1.0 release to > follow we > > > need to think about stabilizing/finalizing the Woden API. The 1.0 > release > > > should define our 'committed' API. Some API issues have been or are > being > > > addressed via JIRAs. Some other issues may require more discussion on > the > > > woden-dev mailing list before they're ready to track as JIRAs. > > > > > > To capture such issues and provide background info to prompt further > > > discussion, I have created an API Review page on the Woden Wiki [1]. > See > > > the intro there for more details, read through the issues (2 so far) > and > > > post your ideas to the list. > > > > > > [1] http://wiki.apache.org/ws/FrontPage/Woden/APIReview > > > > > > regards, > > > John Kaputin > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]