[jdom-interest] JDOM Beta10 released

Rolf Lear rlear at algorithmics.com
Tue Feb 17 07:01:24 PST 2004


Aww hell.... the problem with having real work to do. I missed a deadline.

API Recommendations:
====================

Only two objects implement Parent, and the ONLY functional use for Parent is
to help the ContentList object reference the "canContain()" method. In light
of other peoples, (and now suddenly mine) displeasure at having a "Parent"
returned from "addContent()", I think it is really easy to do the following:
Remove all but canContain() and getContent() from the Parent interface,
return "Element" from the Element's addContent() style methods, Document
from the Document's addContent(DocType/Comment/Element) and setRootElement()
style methods.

Attached is a patch that renames "Parent" to Container (to keep things in
perspective, Container has only two methods, boolean canContain() and List
getContent() ).

Document and Element had to implement all the content related methods anyway
because they implemented "Parent". So, nothing is broken there. Instead of
returning "Container", all the methods now return "Document", or "Element"
respectively.

This essentially removes the Parent/Child relationship anyway, so
Container/Content is fine. getParent() still returns Container though...
(the only non-package need for Container - people will have to determine
whether the parent is a Document or Element - which was needed in beta8
anyways ...). to restate it... IT IS MOST UNLIKELY THAT CONTAINER WILL BE
USED OUTSIDE OF THE org.jdom PACKAGES.

In addition to the above, I have done some very small changes here and there
to keep comments in line, and so on.

I know I submitted much of the parent/child stuff, and the "Child" part of
that is still very relevant, but the parent side of things was possibly too
intrusive a change.

Attached is a patch to JDom which "undoes" some of the Parent side of
things. All tests run just fine without change.

In effect, this patch adds no overhead, and allows the "friendly" Element
addContent() style methods to live again. This should greatly reduce
migration overhead to JDom beta11..... ;-)

Rolf



-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Jason Hunter
Sent: Monday, February 16, 2004 7:12 PM
To: jdom-interest at jdom.org; jdom-announce at jdom.org
Subject: [jdom-interest] JDOM Beta10 released


Hi all,

I've just posted the official JDOM 1.0 beta10 release to 
http://jdom.org.  This is expected to be the final beta before 1.0.  I 
encourage everyone depending on JDOM to try it now and speak up with any 
bugs, or forever hold your peace.  My plan is to ship the 1.0 release in 
roughly one month.

-jh-

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jdompatch.zip
Type: application/octet-stream
Size: 5283 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20040217/85510e62/jdompatch.obj


More information about the jdom-interest mailing list