jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Spickermann <ralph.spickerm...@uni-rostock.de>
Subject adapting Jackrabbit to an existing database?
Date Wed, 01 Aug 2007 15:06:13 GMT

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 

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

View raw message