jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: XPATH on versions of deleted nodes?
Date Wed, 06 Feb 2008 18:23:52 GMT
Hi Sridhar,

that should work. when I run the following test:

     Node n = testRootNode.addNode("n");
     n.setProperty("prop", 1);
     n.addMixin(mixVersionable);
     testRootNode.save();
     String uuid = n.getUUID();
     System.out.println("created node with uuid: " + uuid);
     n.checkin();
     n.checkout();
     n.setProperty("prop", 2);
     n.save();
     n.checkin();
     n.checkout();
     n.remove();
     testRootNode.save();
     String stmt = "//element(*, nt:frozenNode)[@jcr:frozenUuid='" + uuid + "']";
     QueryResult result = executeQuery(stmt);
     for (NodeIterator it = result.getNodes(); it.hasNext(); ) {
         System.out.println(it.nextNode().getPath());
     }

it produces:

created node with uuid: 53e4b2ad-b69b-406a-945d-359cc2828923
/jcr:system/jcr:versionStorage/53/e4/b2/53e4b2ad-b69b-406a-945d-359cc2828923/jcr:rootVersion/jcr:frozenNode
/jcr:system/jcr:versionStorage/53/e4/b2/53e4b2ad-b69b-406a-945d-359cc2828923/1.0/jcr:frozenNode
/jcr:system/jcr:versionStorage/53/e4/b2/53e4b2ad-b69b-406a-945d-359cc2828923/1.1/jcr:frozenNode

can you please verify that the repository.xml contains a SearchIndex element as 
a direct child of Repository element? This is usually at the very end of the 
configuration file.

regards
  marcel


Sridhar Raman wrote:
> This his how my XPATH statement looks like:
> //element(*,
> nt:frozenNode)[@jcr:frozenUuid='02133790-c6ed-4669-a11d-c7ecd18874b5']
> 
> where 02133790-c6ed-4669-a11d-c7ecd18874b5 is the UUID of the node that was
> deleted.
> 
> Am I doing something wrong?
> 
> On Feb 6, 2008 1:45 PM, Marcel Reutegger <marcel.reutegger@gmx.net> wrote:
> 
>> Sridhar Raman wrote:
>>> Would it possible for me to perform an XPATH query into the version
>> storage
>>> nodes, and try to obtain the frozen child node copy of a deleted node by
>>> using the jcr:frozenUuid property, if I knew the UUID of the node that
>> had
>>> been deleted.
>>>
>>> I tried the above, and it returned no results.  Any particular reason
>> why I
>>> am facing this problem?
>> how does your xpath statement look like?
>>
>> regards
>>  marcel
>>
> 


Mime
View raw message