jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Umashanthi Pavalanathan <umashant...@gmail.com>
Subject Re: Linking JCR Nodes
Date Wed, 16 Feb 2011 05:03:07 GMT
On Wed, Feb 16, 2011 at 9:28 AM, Rakesh Vidyadharan <rakesh@sptci.com>wrote:

> On 15 Feb 2011, at 20:33, Umashanthi Pavalanathan wrote:
> > Hi ,
> >
> > Jackrabbit's JCR implementation is used in the project I am working on.
> > I have got a question about linking two JCR nodes; is there any concept
> of
> > association/link between two nodes?
> > The basic requirement is to create a conceptual connection between two
> nodes
> > and should be able to retrieve all nodes associated with a node (not the
> > case of parent-child nodes; but mostly sibling nodes). I would like to
> know
> > whether there's any such concept in JCR/Jackrabbit implementation. If
> there
> > is such feature, I would be glad if you can provide me some links to
> > resources.
> I am not too sure about what you are trying to achieve, but you can store
> properties in your nodes that can be used to very efficiently retrieve
> matching nodes.  If you have custom node types, these properties can be auto
> created as well.
> Another way of linking is to store node references as path, weakreference
> or even a hard reference in your nodes.

My requirement is like this. I represent  a *Person *by a node. There are
many such *Person *nodes connected with a single *Person* node ( say for eg:
friends for that person). I want to build such a relationship/association
with the *Person *type nodes.

As I understood, keeping a list of node references of other nodes is one
option. But I am not sure how much feasible it will since that list might
grow and shrink vastly.

Can you please explain about the concept of Reference and WeakReferences
[1][2] ?



> Rakesh

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message