[Zope] Re: DocumentLbrary with databases

Ken firerooster@netscape.net
Mon, 7 Oct 2002 20:56:16 +0200 (CEST)


Bonjour Fabien,

I am completely ignorant about relational databases external to Zope, but I think that if your database entries can be called with a URL, and can be displayed as html or text, pdf etc, then you can store them in DocumentLibrary. I presume you have a reason to want to do this, such as the really cool facilities offered by DocumentLibrary! Perhaps, like me, you want to mix these data files in with other file types, such as pdfs which you need to index.

I have stored nodes of an XML Document, by iterating over them and inserting their attributes into the inputs of a customized document_submit method to give the metadata, and appended a simple render method to the absolute_url of each node to provide the URL to for DocumentLibrary to actually fetch. Sounds complicated, but it took five minutes to input 200 files that way. 

But I was wondering about something:

DocumentLibrary is said to be a cross between a BTree Folder and a ZCatalog. Document Files derive from the Metatype 'File'. 

I am using DocumentLibrary as a search engine, indexing remote pages and returning results pointing to the page on the remote server (the 'source' property). Thus, once the page is indexed I could delete it (as long as there is no need to reindex). But can I delete the original document and keep only the catalogued 'brain'?

Anyone?

TIA,

Ken