cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Lorenz" <>
Subject Re: [PROPOSAL] Sources, the next generation RE: Speedup *DirectoryGenerator
Date Fri, 21 Jun 2002 14:09:38 GMT
----- Original Message -----
From: "Stephan Michels" <>
To: "cocoon-dev" <>
Sent: Friday, June 21, 2002 3:54 PM
Subject: RE: [PROPOSAL] Sources, the next generation RE: Speedup


> I think it should work like this:
> Source source = resolver.resolveURI("dav://mydir/mydir2/");
> if (source instanceof TraversableSource) {
>     TraversableSource tsource = (TraversableSource) source;
>     Source parent = resolver.resolveURI(tsource.getParentSource());
>     Source child = resolver.resolveURI(tsource.getChildSource(0));
> }

Just wanted to mention, that there document stores, where one
TraversableSource can have multiple ParentSources. For example
unix hardlinks, document managment systems with some sort of collections.
and one document being in more than one collection. Document
having meaning of a single file and Collection having the
meaning of folder which has files.
(Yes, this really sets your mind twisting, if you have to deal with
stuff like this)

So there should be a convenience method named getParentSource()
(or similar) which just returns the first parent (most of the
times there will be only one) and another way of accessing the
other parents.




jens.lorenz at interface-projects dot de

interface:projects GmbH                             \\|//
Tolkewitzer Strasse 49                              (o o)
01277 Dresden                               ~~~~oOOo~(_)~oOOo~~~~

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

View raw message