Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 20620 invoked by uid 500); 22 Jun 2002 20:58:53 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 20608 invoked from network); 22 Jun 2002 20:58:53 -0000 X-Authentication-Warning: vern.chem.tu-berlin.de: stephan owned process doing -bs Date: Sat, 22 Jun 2002 22:56:16 +0200 (CEST) From: Stephan Michels X-X-Sender: To: Subject: Re: [PROPOSAL] Sources, the next generation RE: Speedup *DirectoryGenerator In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sat, 22 Jun 2002, Stephan Michels wrote: > > > On Fri, 21 Jun 2002, Jens Lorenz wrote: > > > ----- 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 > > *DirectoryGenerator > > > > > > > > > > > > I think it should work like this: > > > > > > Source source =3D resolver.resolveURI("dav://mydir/mydir2/"); > > > if (source instanceof TraversableSource) { > > > TraversableSource tsource =3D (TraversableSource) source; > > > > > > Source parent =3D resolver.resolveURI(tsource.getParentSource()); > > > Source child =3D resolver.resolveURI(tsource.getChildSource(0)); > > > } > > > > > > > Just wanted to mention, that there document stores, where one > > TraversableSource can have multiple ParentSources. For example > > unix hardlinks > > I think a link, and the document, which the link points to, has only one > parent. > > > /dir/link -> /file > parent: /dir > > /file > parent: / > > > > document managment systems with some sort of collections. > > and one document being in more than one collection. > > That can be. > > >=A0Document > > having meaning of a single file and Collection having the > > meaning of folder which has files. > > Thats the reason for: > TranverableSource: > boolean isCollection() > > > (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. > > I would you agree, if there wasn't the problem of meaning of > 'traversable'. If a source has more than one parent, how would > you tranverse such a trajectory? Upps, I mean 'traverse'. > > Difficult ;-) > > Thanks for your comment, Stephan Michels. --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org