[jdom-commits] CVS Update: jdom/src/java/org/jdom
nobody
nobody at chimbo.servlets.com
Tue May 20 14:54:00 PDT 2003
****************************************
Date: Tue May 20, 2003 @15:54:00 MDT
Author:
Update of /home/cvs/jdom/src/java/org/jdom
In directory chimbo:/tmp/cvs-serv4155/src/java/org/jdom
Modified Files:
Comment.java ContentList.java DocType.java Document.java
Element.java EntityRef.java ProcessingInstruction.java
Text.java
Added Files:
Child.java Parent.java
Log Message:
BIG CHANGE. Comments welcome!
Added two new interfaces, Parent and Child.
Parent has methods (* means new):
CVS input xpath int getChildCount();
Parent addContent(Child child);
CVS input xpath Parent addContent(Collection collection);
CVS input xpath Parent addContent(int index, Child child);
CVS input xpath Parent addContent(int index, Collection collection);
CVS input xpath List cloneContent();
List getContent();
List getContent(Filter filter);
CVS input xpath Child getContent(int index);
CVS input xpath List removeContent();
CVS input xpath List removeContent(Filter filter);
CVS input xpath Child removeContent(int index);
boolean removeContent(Child child);
Parent setContent(Child child);
Parent setContent(Collection collection);
CVS input xpath Parent setContent(int index, Child child);
CVS input xpath Parent setContent(int index, Collection collection);
Object clone();
Child has methods:
Child detach();
Document getDocument();
Parent getParent();
CVS input xpath String getValue();
Object clone();
Parent is implemented by Document and Element.
Child is implemented by Comment, DocType, Element, EntityRef,
ProcessingInstruction, and Text (CDATA).
The new methods on Parent are pretty self explanatory. A few methods that
used to require List work are now on Parent itself for convenience. The
cloneContent() and removeContent() calls should be especially helpful.
The getValue() method in Child is defined to return the XPath 1.0 string value
of the element. The getText() methods in Element are left unchanged.
A subtle change is that getParent() now returns a Parent type which is its
immediate parent. Previously an item at the document level would return null
and you'd use getDocument() to get its Document.
In a similar vein, the protected setDocument() methods have been removed in
favor of just using setParent(). getDocument() remains as a potentially
recursive lookup method.
I renamed getChildren() to getChildElements() and renamed getChild() to
getChildElement(). Now that there's a real Child interface getChildren() is
even more confusing than it used to be. I deprecated the old forms. This
change will require a lot of recoding for people.
Also updated supporting files to use the new APIs.
Thanks to Brad's jdom-x experimental tree for lots of the ideas in here,
and thanks to Brad for pre-reviewing this change.
-jh-
===================================================================
File: no file Child.java Status: Needs Checkout
Working revision: 1.1 Tue May 20 21:53:59 2003
Repository revision: 1.1 /home/cvs/jdom/src/java/org/jdom/Child.java,v
Existing Tags:
No Tags Exist
===================================================================
File: no file Parent.java Status: Needs Checkout
Working revision: 1.1 Tue May 20 21:53:59 2003
Repository revision: 1.1 /home/cvs/jdom/src/java/org/jdom/Parent.java,v
Existing Tags:
No Tags Exist
===================================================================
File: no file Comment.java Status: Needs Checkout
Working revision: 1.28 Tue May 20 21:53:59 2003
Repository revision: 1.28 /home/cvs/jdom/src/java/org/jdom/Comment.java,v
Existing Tags:
jdom_1_0_b9 (revision: 1.26)
jdom_1_0_b8 (revision: 1.22)
jdom_prefilter (revision: 1.17)
jdom_1_0_b7 (revision: 1.17)
jdom_1_0_b6 (revision: 1.10)
start (revision: 1.1.1.1)
jdom (branch: 1.1.1)
===================================================================
File: no file ContentList.java Status: Needs Checkout
Working revision: 1.25 Tue May 20 21:53:59 2003
Repository revision: 1.25 /home/cvs/jdom/src/java/org/jdom/ContentList.java,v
Existing Tags:
jdom_1_0_b9 (revision: 1.21)
jdom_1_0_b8 (revision: 1.11)
===================================================================
File: no file DocType.java Status: Needs Checkout
Working revision: 1.26 Tue May 20 21:53:59 2003
Repository revision: 1.26 /home/cvs/jdom/src/java/org/jdom/DocType.java,v
Existing Tags:
jdom_1_0_b9 (revision: 1.24)
jdom_1_0_b8 (revision: 1.18)
jdom_prefilter (revision: 1.15)
jdom_1_0_b7 (revision: 1.14)
jdom_1_0_b6 (revision: 1.7)
start (revision: 1.1.1.1)
jdom (branch: 1.1.1)
===================================================================
File: no file Document.java Status: Needs Checkout
Working revision: 1.67 Tue May 20 21:53:59 2003
Repository revision: 1.67 /home/cvs/jdom/src/java/org/jdom/Document.java,v
Existing Tags:
jdom_1_0_b9 (revision: 1.63)
jdom_1_0_b8 (revision: 1.55)
jdom_prefilter (revision: 1.47)
jdom_1_0_b7 (revision: 1.44)
jdom_1_0_b6 (revision: 1.25)
start (revision: 1.1.1.1)
jdom (branch: 1.1.1)
===================================================================
File: no file Element.java Status: Needs Checkout
Working revision: 1.135 Tue May 20 21:53:59 2003
Repository revision: 1.135 /home/cvs/jdom/src/java/org/jdom/Element.java,v
Existing Tags:
jdom_1_0_b9 (revision: 1.130)
jdom_1_0_b8 (revision: 1.115)
jdom_prefilter (revision: 1.102)
jdom_1_0_b7 (revision: 1.96)
jdom_1_0_b6 (revision: 1.52)
start (revision: 1.1.1.1)
jdom (branch: 1.1.1)
===================================================================
File: no file EntityRef.java Status: Needs Checkout
Working revision: 1.15 Tue May 20 21:53:59 2003
Repository revision: 1.15 /home/cvs/jdom/src/java/org/jdom/EntityRef.java,v
Existing Tags:
jdom_1_0_b9 (revision: 1.13)
jdom_1_0_b8 (revision: 1.8)
jdom_prefilter (revision: 1.3)
jdom_1_0_b7 (revision: 1.3)
===================================================================
File: no file ProcessingInstruction.java Status: Needs Checkout
Working revision: 1.40 Tue May 20 21:53:59 2003
Repository revision: 1.40 /home/cvs/jdom/src/java/org/jdom/ProcessingInstruction.java,v
Existing Tags:
jdom_1_0_b9 (revision: 1.36)
jdom_1_0_b8 (revision: 1.27)
jdom_prefilter (revision: 1.21)
jdom_1_0_b7 (revision: 1.20)
jdom_1_0_b6 (revision: 1.10)
start (revision: 1.1.1.1)
jdom (branch: 1.1.1)
===================================================================
File: no file Text.java Status: Needs Checkout
Working revision: 1.17 Tue May 20 21:54:00 2003
Repository revision: 1.17 /home/cvs/jdom/src/java/org/jdom/Text.java,v
Existing Tags:
jdom_1_0_b9 (revision: 1.15)
jdom_1_0_b8 (revision: 1.11)
jdom_prefilter (revision: 1.7)
jdom_1_0_b7 (revision: 1.7)
More information about the jdom-commits
mailing list