----- Original Message ----- From: "Stephan Michels" <[EMAIL PROTECTED]> To: "cocoon-dev" <[EMAIL PROTECTED]> Sent: Friday, June 21, 2002 3:54 PM Subject: RE: [PROPOSAL] Sources, the next generation RE: Speedup *DirectoryGenerator
<snip/> > > 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. Regards, Jens -- jens.lorenz at interface-projects dot de interface:projects GmbH \\|// Tolkewitzer Strasse 49 (o o) 01277 Dresden ~~~~oOOo~(_)~oOOo~~~~ Germany --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]