cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Defining Source Interfaces
Date Mon, 06 Jan 2003 14:59:59 GMT
Carsten Ziegeler wrote:

>I think it's time to define the WriteableSource etc. interfaces
>for the excalibur source package and move them out of Cocoon.
>What do you think about this? This would move the responsibility
>to excalibur :)

I guess you're joking, but is this good or bad ? Who else beside Cocoon 
is using the source package in Excalibur ?

>I added before christmas the possibility to retrieve children
>of a source to the Source interface in excalibur and started
>with the ModifiableSource interface (= WriteableSource).
>What else do we need? I think we have a buch of extensions
>to the Source interface.

Well, look in the 2.1 scratchpad where there's a lot of yummy stuff : 
TraversableSource, VersionableSource, LockableSource, etc.

While working on sources recently (the CVSSource I'm about to publish), 
I found the current definition of TraversableSource not intuitive, and 
modified it so it's more like to :

public interface TraversableSource extends Source {

    /** Is the source a directory or a collection ? */
    public boolean isSourceCollection() throws ProcessingException, 

    /** Returns the collection of child sources. */
    public Collection getChildren() throws ProcessingException, IOException;
    /** Returns the local name of this source */
    public String getName() throws ProcessingException, IOException;

    /** Return the parent source. Returns null if the source hasn't a 
parent. */
    public Source getParentSource() throws ProcessingException, IOException;

Stephan, others, what about these changes ?

Carsten, I also some remarks/questions about your changes in Excalibur :
- should parent/child traversal be defined on Source. IMO, a Source 
should be kept very simple and basic as not all sources are traversable,
- why does getChildrenLocation return an Iterator (and not a Collection) 
of URIs (and Sources) ?


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

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

View raw message