jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Furst, Carl" <Carl.Fu...@mlb.com>
Subject RE: How to add the same node to many path?
Date Fri, 12 Aug 2011 14:59:05 GMT
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:danveno@163.com] 
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 



毛进 

Mime
View raw message