cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: Defining Source Interfaces
Date Wed, 08 Jan 2003 13:47:43 GMT

Sylvain Wallez wrote:
> 
> Nicola Ken Barozzi wrote:
> 
> <snip/>
> 
> > 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 :-)
> 
> 
> Thanks. Actually, the discussions is about many points, one after the 
> other ;-)
> 
> > 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
> >
> >    mydir/myfile.pdf
> >    mydir/thefile.xml
> >    mydir/mydile.xml
> >
> > 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.
> 
> 
> Thats it. We're discussing about the definition of a Source that can 
> give you its parent ("mydir/") and its children.
> 
> > 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 :-)
> 
> 
> You're totally on track. If you need this action right now, I would 
> suggest to mimic what's in the DirectoryGenerator, that makes the 
> assumption that the Source is a file. You can then use all the 
> facilities given by File.
> 
And we only argue, if this support should belong to the Source interface
or too an optional extension interface where I always have to do 
an instanceof to see if the source has childs or not.

:)

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message