On Wed, 29 Jan 2003, Sylvain Wallez wrote:
> Stephan Michels wrote:
>
> >Hi,
> >
> >I want to ask for the status of TraversableSource interface. Is this
> >proposal now final?
> >
>
> I sent a patch on avalon-dev about this. Considering the ongoing vote,
> I'll be soon able to commit it myself...
Congratulation!
> >There were some questions open, I think?
> >
> >Now we have three kinds of returning an information of child sources:
> >
> > Collection getChildrenURIs() throws SourceException;
> >
> > Collection getChildrenSources() throws SourceException;
> >
> > Collection getChildrenNames() throws SourceException;
> >
> >Do we really need these 3 methods? Couldn't we simplify these methods to one method?
> >
>
> IMO getChildrenURIs() could be removed in favor of getChildrenSources().
> But it may prove useful if we need the URIs withouth going through the
> SourceResolver.release() hassle.
Hassle or not hassle? It follows the lookup behavior of the
component manager. But it seems to be only my opinion :-/
> getChildrenNames() is required, as it's the one that will allows us to
> build navigation trees easily.
Couldn't we write
for(Iterator i=parent.getChildrenSources(); i.hasNext();) {
Source source = (Source)i.next();
System.out.println("name="+source.getName()+" uri="+source.getURI());
}
instead? You must retrieve the source in any case.
> >Another question, can we rename
> > boolean isDirectory();
> >to
> > boolean isCollection();
> >
> >This will be more coherent to
> > Collection getChildrenSources()
> >
>
> Because it returns a "Collection" ?
Why not ;-)
> I'm not sure about this. "Directory"
> is a well-known word when it comes to defining hierarchies of file-like
> objects, and I must admit I wondered what was the meaning of
> "isCollection()" the first time I saw it.
;-)
I saw other examples, which uses the term 'collection of documents'
http://xml.apache.org/xindice/guide-developer.html#N101B5
http://asg.web.cmu.edu/rfc/rfc2518.html#sec-8.3
Stephan Michels.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]