cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject Re: [PROPOSAL] Sources, the next generation RE: Speedup *DirectoryGenerator
Date Sat, 22 Jun 2002 20:56:16 GMT


On Sat, 22 Jun 2002, Stephan Michels wrote:

>
>
> On Fri, 21 Jun 2002, Jens Lorenz wrote:
>
> > ----- Original Message -----
> > From: "Stephan Michels" <stephan@apache.org>
> > To: "cocoon-dev" <cocoon-dev@xml.apache.org>
> > 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
>
> 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.
>
> > Document
> > 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


Mime
View raw message