JCR 2 added the ability to clone within a workspace. It's referred to as corresponding nodes: http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.10 Corresponding Nodes
But I'm not sure that's the right content model. There's not a lot of detail in the original post, but I would suggest using a different pattern for the path (organize by date, user, etc.) and then represent category as a multi-valued property. Justin 2011/8/12 Furst, Carl <[email protected]>: > Maybe clone the node? > > I'm assuming that each category is a separate workspace. I'm not sure if you > could do this if there was any possibility of adding clones to the same > workspace > > > So maybe something like: > > Node n = root.addNode("some/path"); > ItemImpl n1 = new ItemImpl(); > Node n2 = n1.clone(n, n.getName()); > anotherWorkspaceRoot.addNode(n2); > > > HTH, > Carl Furst > > -----Original Message----- > From: 毛进 [mailto:[email protected]] > Sent: Friday, August 12, 2011 6:32 AM > To: users > Subject: How to add the same node to many path? > > > Hello everyone: > Question One: > i have a need: add one picture node to many categories. The category system > is stored within Jackrabbit. And i want to add one picuture node to more > than one categories so that this picture node is distinct in the whole > repository. It is different from many picture nodes with the same > metadata. Because, in this case, if i modify one picture node , others are > not modified, which is not i want. > cata--->Pnode > catb--->Pnode > and the Pnode is unique node, not two. > > Question Two: > Now, i use the reference to add a ref node under different categories, which > can implement this requirement. However, i need to implement full-text > search with category. So, my solution now is USE SQL-2 to join the ref node > and the unique node. BUT, it cost too much time to feedback the results. > eg: > SELECT * FROM [resref] as ref left outer join [nt:unstructured] as res on > ref.resRef=res.[jcr:uuid] where .... > > > Can anyone give me some suggestion? > > > > 2011-08-12 > > > > 毛进 > > > > > > > ********************************************************** > > MLB.com: Where Baseball is Always On > >
