[jdom-interest] Missing some functionality

Ken Rune Helland kenh at csc.no
Thu Jun 21 06:56:47 PDT 2001


At 03:44 PM 6/21/2001 +0100, Markus Bernhardt wrote:


>Ken Rune Helland wrote:
>
> > At 02:34 PM 6/21/2001 +0100, Markus Bernhardt wrote:
> > >Hi all
> > >
> > >We are missing some functionality in the
> > >jdom classes.
> > >
> > >- Helper for working with content:
> > >     At the moment it's only possible to
> > >     add content at the end of the content list.
> > >     Often needed are things like adding an element
> > >     with index, removing an element with index,
> > >     replace a node, move a node, sort the contents ....
> >
> > Element.getMixedContent() returns a live list
> > where you can handle the content with the metods of
> > the java.util.List interface.
> >
> > Element.getChildren() returns a live list of the
> > child elements.
>
>Sorry.
>Haven't looked into PartialList till now.
>Always expected PartialList to create a flat copy from the list.

No it is a Partial live view of the content list.
Any way it is being (has been?) replaced by filterlist
wich gives a filtered view of the content list :-)

Anyway it is a live list.



> >
> >
> > >- Usage of a global default factory for internal creation of objects:
> > >     At the moment the XMLFactory is only used in
> > >     the input package. The problem are methods like
> > >     addAttribute(String name, String value) in Element.
> > >     If you subclass a Attribute, you have to sublass Element.
> > >     At the moment this is not a big problem, but I think
> > >     it is needed for the future.
> >
> > you have also the setAttribute(Attribute) metod
> > witch lets you add any subclass of attribute you like to.
> > (addAttribute is deprecated as of beta7)
>
>I know that addAttribute is deprecated.
>But there is still at least one method with hard coded
>object creation: Element.detach()


Element.detach() dont create any Element it simply
removes the Element from its parents content and sets the
elements parent refence to null, for convenience it returns
the reference to itself. In the case the Element is the root
element it removes itself from the Documents content and sets
its Document reference to null.


> >
> > >We have implemented those things.
> > >
> > >Is there anybody interested in integrating our changes ?
> > >Where to contrib code ?
> > >
> > >- markus
> >
> > KenR


KenR




More information about the jdom-interest mailing list