Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 43457 invoked from network); 1 Aug 2007 15:06:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Aug 2007 15:06:44 -0000 Received: (qmail 85499 invoked by uid 500); 1 Aug 2007 15:06:43 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 85474 invoked by uid 500); 1 Aug 2007 15:06:42 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 85465 invoked by uid 99); 1 Aug 2007 15:06:42 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2007 08:06:42 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [139.30.8.201] (HELO mailrelay1.uni-rostock.de) (139.30.8.201) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 01 Aug 2007 15:06:31 +0000 Received: from antivirus.exch.rz.uni-rostock.de (127.0.0.1) by antivirus.uni-rostock.de (127.0.0.1) with Microsoft SMTP Server id 8.0.730.1; Wed, 1 Aug 2007 17:06:14 +0200 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Clearswift SMTPRS 5.2.9) with ESMTP id for (AUTH = <>); Wed, 1 Aug 2007 17:06:14 +0200 Received: from mail.uni-rostock.de (139.30.8.11) by antivirus.exch.rz.uni-rostock.de (139.30.8.12) with Microsoft SMTP Server id 8.0.730.1; Wed, 1 Aug 2007 17:06:14 +0200 Received: from uni-rostock.de (localhost [127.0.0.1]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0JM300EP7OMDDS@mail.uni-rostock.de> for users@jackrabbit.apache.org; Wed, 01 Aug 2007 17:06:13 +0200 (MEST) Received: from [139.30.48.156] by mail2.uni-rostock.de (mshttpd); Wed, 01 Aug 2007 17:06:13 +0200 Date: Wed, 1 Aug 2007 17:06:13 +0200 From: Ralph Spickermann Subject: adapting Jackrabbit to an existing database? To: users@jackrabbit.apache.org Message-ID: MIME-Version: 1.0 X-Mailer: iPlanet Messenger Express 5.2 HotFix 2.14 (built Aug 8 2006) Content-Type: text/plain; charset="us-ascii" Content-Language: de Content-Transfer-Encoding: 7BIT Content-Disposition: inline X-Accept-Language: de Priority: normal X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am currently exploring if and how the JSR 170 and Jackrabbit could work together with an existing database. I have a DB2 database that stores collections of images along with structured information about the images in object-relational tables. For a simple example let's consider the following tables: Table Collection ( id Integer, name String) Table Image ( id Integer, parent Ref(Collection) content Blob, format String) Table Region ( id Integer, parent Ref(Image), area Double, averageColorR Integer, averageColorG Integer, averageColorB Integer) The mapping to a JSR tree is not that difficult. I have Collecions that contain Images that contain Regions, so I could access the property averageColorR via a hierarchy like /Collection1/Image1/Region1/averageColorR In Jackrabbit for database persistence the tables Node, Props, Refs and Binval are used, at least for DB2. In the table Node the NodeState is serialized and stored together with the NodeId. Now I am thinking about adapting the Jackrabbit functionality so that my scheme is used for storage. For example, if I create an image, it gets stored in the Image table together with the image properties. How would I start doing that? Extending the SimpleDbPersistenceManager for my needs? Is it even possible and how complex would it be? Another question concerns user defined functions that are stored in the database. Consider a function that computes the similarity between two regions by comparing area and averageColor. Is there a possibility to call that function in SQL or Xpath queries from Jackrabbit? So when I have a certain region I could search for similar regions. I know there are some functions like jcr:contains or jcr:score, could I implement other functions as well? I am not very familiar with JSR/Jackrabbit, maybe you could help me out a bit. Best regards, Ralph