W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1996

Re: Clarification on the indexer

From: Anselm Baird-Smith <abaird@w3.org>
Date: Thu, 5 Sep 1996 12:58:53 +0500
Message-Id: <9609051658.AA10678@www18.w3.org>
To: Dave Makower <davemak@pencom.com>
Cc: www-jigsaw@w3.org, leon@pencom.com

Here is what the ResourceIndexer currently looks like (only in my
head, nothing implemented yet), speak up if this would be a problem to

package w3c.jigsaw.indexer;

public abstract class ResourceIndexer {
    ResourceIndexer forward = null;

    abstract public Resource localCreateResource(File file
                                                 , String name
                                                 , Hashtable defs
                                                 , Object arg) ;

    public Resource createResource(File file
                                   , String name
                                   , Hashtable defs
                                   , Object arg) {
        Resource resource = localCreateResource(file, name, defs, arg);
        if ((resource == null) && (forward != null))
            return forward.createResource(file, name, defs, arg);
        return null;

    public void initialize(httpd server, ResourceIndexer forward) {
        this.forward = forward;

    public void initialize(httpd server);

Note I am still unsure wether this should be an abstract class or an
interface. If it is an abstract class, then Jigsaw can provide the
basic mechanism for delegation among resource indexers. Otherwise this
would simply be an interface made of only the createResource and
initialize method. I am rather in favor of the bastract class, so that
Jigsaw comes with a consistent way of delegating resource creation
(otherwise everyone is going to implement its own way of dealing with
that, we mat end up in a mess).

To initialize the indexer there would be a new property
"w3c.jigsaw.indexers" that could take a list of resource inddexer that
would be chained together at creation time, eg:


would first create an instance of SampleresourceIndexer and call its


method, and then create an instance of myFancyIndexer initialized

initialize(server, sample_resource_indexer);

Hum, this seems quite nifty to me.

Received on Thursday, 5 September 1996 13:06:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:21 UTC