cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: Defining Source Interfaces
Date Wed, 08 Jan 2003 12:29:16 GMT

Carsten Ziegeler wrote:
> Sylvain Wallez wrote:
>>Carsten Ziegeler wrote:
>>>Ah, btw you're right that the Source object should return a Collection
>>>instead of an Iterator for the children - I will fix that, too, asap.
>>Cool. But I'm still not that happy with these methods being on Source
>>itself. What about TraversableSource or HierarchicalSource (I have this
>>last one ready on my PC with collections) ?
> I really don't like all these instanceof tests and I think that a source
> can have children is very common. So if you deal with sources you always
> end up with a test if this source contains children or not.
> I think this test is much more cleaner/nicer/whatever if I can directly
> query the source. An instanceof test for this reason is not appropriate.

I really don't understand much of the heat in this discussion because 
I'm not so into it, but I'm happy you guys are and are making progress :-)

I just wanted to ask for a second (please excluse my ignorance), if this 
means that a Generator can query a source if a certain "file" in the 
same dir exists.

The reason (Forrest need): on the filesystem I have


If I get a request for "mydir/myfile", I would like to get a Source for 
""mydir/" and ask what "files" it contains that have "myfile" as a name.
Basically it could make us do a more generic version of ResourceExists.

Do I understand what can be done or am I on track? Sorry if I cannot 
dwelve further myself into it now, and thanks for the answers :-)

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

To unsubscribe, e-mail:
For additional commands, email:

View raw message