- From: Bernard Leach <leachbj@cs.latrobe.edu.au>
- Date: Wed, 04 Sep 1996 11:09:27 +1000
- To: www-jigsaw@w3.org
Anselm Baird-Smith wrote:
> Are you familiar with the way Jigsaw's indexer work ? WHat happens is
> the following: when a directory resource is queried for an URL it
> doesn't know about, it checks to see if an appropriate file exsist. If
> so, it hands it out to the resource indexer, that will return a
> suitable resource for that file (depending on extensions, if this is a
> file, or directory templates if it is a directory).
You make this sound quite simple but from what I've seen in the
source code its not so!
> One thing I could do (let me know if this would help you), is the
> following: make the ResourceIndexer an interface, and make the current
> resource indexer a SampleResourceIndexer, implementing that
> interface. I would then add a new property to Jigsaw in order to know
> what indexer class it should use as an indexer.
>
> If this makes sense (BTW to anyone) then the ResourceIndexer interface
> would probably look like:
>
> public interface ResourceIndexer {
> public Resource createDirectoryResource(File directory
> , String name
> , Hashtable defs);
>
> public Resource createFileResource(File file
> , String name
> , Hashtable defs);
>
> }
>
> The File parameter is the "object" to be indexed (it has to be refered
> to by something, in this case a File instance).
> The name is the identifier for the resource to be created (can be
> different from the file's name)
> The defs hashtable is a set of default attribute values for the
> resource to be created.
>
> If this would be of any use to anyone let me know. Note that you could
> implement such an interface, and "chain" indexer together. Say you
> implement the FancyResourceIndexer, if it doesn't know how to create a
> resource, it could forward the call to a "default"
> SampleResourceIndexer instance.
This sounds useful to me! I am interested in extending resource
indexing so that indexes would be replicated between a group of
servers.
To do this I would need to know when resources were created and
deleted. I've looked at adding this to the current indexing
mechanism but been buried under a pile of classes and interfaces!!
> I think I could find the time to make that change, but before going
> further, I want to make sure it will be usefull to anyone. So let me
> know.
>
> Anselm.
--
Bernard Leach La Trobe Uni Melbourne Australia
leachbj@cs.latrobe.edu.au http://www.cs.latrobe.edu.au/~leachbj/
Received on Thursday, 5 September 1996 12:40:35 UTC