You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by James_1 <po...@yahoo.com> on 2006/07/29 01:57:54 UTC

Orderable Child Nodes

Hi,

I'm new to Jackrabbit, so this question might be a total newbie question,
but here goes.

How are orderable child nodes implemented?  Is this something that
Jackrabbit handles automatically - through maybe the Lucene index?  Or is
this something that your PersistenceManager needs to understand and know how
to persist?  

For example, if I wanted to implement my own PersistenceManager which writes
to a database schema, does my schema need persist some kind of ordering
indexing for child nodes?  e.g. a NODE table which contains a CHILD_NODES
column whose value is an ordered list of the nodes' child IDs?  Or
alternatively, a more normalized approach, a CHILD_NODE table which contains
an INDEX and has a many-to-one relationship with NODE?

Definitely would appreciate any feedback.  Thanks!
-- 
View this message in context: http://www.nabble.com/Orderable-Child-Nodes-tf2018166.html#a5549127
Sent from the Jackrabbit - Users forum at Nabble.com.


Re: Orderable Child Nodes

Posted by James_1 <po...@yahoo.com>.
We have certain requirements for using a particular datastore, with a
predefined data schema.  Believe me, I would love to use one of Jackrabbit's
PersistenceManager implementations.  Thanks for the information.   After
reading your post and doing some additional reading, I understand the
problem a lot better now.  Now onto Versioning...
-- 
View this message in context: http://www.nabble.com/Orderable-Child-Nodes-tf2018166.html#a5561024
Sent from the Jackrabbit - Users forum at Nabble.com.


Re: Orderable Child Nodes

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 7/29/06, James_1 <po...@yahoo.com> wrote:
> How are orderable child nodes implemented?  Is this something that
> Jackrabbit handles automatically - through maybe the Lucene index?  Or is
> this something that your PersistenceManager needs to understand and know how
> to persist?

Jackrabbit handles this. For those that are interested, the actual
implementation can be found in the internal
org.apache.jackrabbit.core.state.NodeState class, which maintains a
specific data structure for the list of children of a given node. A
PersistenceManager is required to be able to persist and recreate this
data structure.

> For example, if I wanted to implement my own PersistenceManager which writes
> to a database schema, does my schema need persist some kind of ordering
> indexing for child nodes?  e.g. a NODE table which contains a CHILD_NODES
> column whose value is an ordered list of the nodes' child IDs?  Or
> alternatively, a more normalized approach, a CHILD_NODE table which contains
> an INDEX and has a many-to-one relationship with NODE?

Something like that would work, as long as you are able to store and
retrieve all the information in a NodeState instance. What's your use
case for a custom PersistenceManager? The PersistenceManagers in
Jackrabbit are much like table storage engines found in many
relational database systems, so there should generally be little need
to create a custom one unless you have specific performance,
scalability, or other requirements that can't be met by one of the
existing PersistenceManagers.

BR,

Jukka Zitting

-- 
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development