jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: Writing a SPI Connector to an existing PostgreSQL database using JackRabbit SPI
Date Wed, 21 May 2008 07:06:56 GMT
hi pierre

> As databases have a structured (non hierarchical) conceptual model, I was
> thinking on the better way to implement concepts like 'root', which don't
> have any equivalent in a structured conceptual model.
> The solution I was considering involved additional tables for storing this
> kind of information. What do you think about that ?
> Does anyone already try and success in making a usable SPI connector to a
> PostgreSQL database ? 

i don't know of any.

> As my first idea was to make only in a first time a level 1 (read only)
> repository, 

makes sense.

> I was searching some information about which interfaces of the
> SPI I have to implement (reading the spi2jcr source code and finding it
> myself is a very difficult task) ?

in a first step you need to provide an implementation for the
following interfaces:

- SessionInfo
- RepositoryService
   the following methods are needed for read-only
   > getIdFactory
   > getNameFactory
   > getPathFactory
   > getQValueFactory
   > getRepositoryDescriptors
   > obtain
   > dispose
   > getWorkspaceNames
   > isGranted
   > getNodeDefinition
   > getPropertyDefinition
   > getNodeInfo
   > getItemInfos
   > getChildInfos
   > getPropertyInfo

the following interfaces are used for read-only but spi-commons
provides basic implementations which you can use:

- ItemInfo and its subinterfaces.
- IdFactory, ItemId and its subinterfaces
- NameFactory and Name
- PathFactory and Path
- QValueFactory and QValue
- QItemDefinition and subinterfaces
- QNodeTypeDefinition

finally: if you want to provide query functionality you
would in addition need to implement: QueryInfo, QueryResultRow
and the corresponding methods on RepositoryService

> Now from the point of view of the implementation of the SPI interfaces in
> itself, I was wondering on how to access the database data. Do I have to use
> JDBC directly or to use a built-in functionality ?

the SPI makes no assumption regarding the nature or structure
of the underlying data store. or was your question pointing
in a different direction?


View raw message