W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1996

extending DirectoryResource

From: <nemo@dnrc.bell-labs.com>
Date: Thu, 25 Jul 1996 17:10:45 -0400 (EDT)
Message-Id: <199607252110.RAA24829@couch.dnrc.bell-labs.com>
To: www-jigsaw@w3.org

Hello,

I've come across the following Jigsaw puzzle ;) 

I have a class ManagedFileResource extends FileResource, which
works fine, i.e. it does what I want it to do when I go and manually
add files via the AddingResources form .

Now I want to have directories where all the files in that directory
are automatically attached to a ManagedFileResource. Shouldn't I be
able to this by just having a class ManagedDirectoryResource extends
DirectoryResource and only overriding createDefaultResource().

That' what I would like to (and I'm trying) to do.

But what troubles me is I see that
DirectoryResource.createDefaultResource() calls
ResourceIndexer.createResource(). Why should the ResourceIndexer be
the one creating? The ResourceIndexer shouldn't need to know what
classes I feel like using for my files... If I have to go through the
Indexer then I need to subclass that too to handle my kind of
resources?  If so, then where do I tell the server to use a different
Indexer...


	-nemo-
Received on Thursday, 25 July 1996 17:11:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT