jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicholas_dipiazza <nicho...@xerceo.com>
Subject Problem with getting jcr:data from the jcr:frozenNode for a jcr:content node
Date Wed, 08 Oct 2008 14:17:30 GMT

When I get a frozen node from my version, it only has the following fields:

jcr:frozenUuid
jcr:uuid
jcr:frozenPrimaryType
jcr:frozenMixinTypes
jcr:primaryType


To show this in effect... I have lockable, referencable and versionable
jcr:content node created.

When I run this code:

Node node = getNodeByUUID(jcrSession, uuid);
            Version v = node.getVersionHistory().getVersionByLabel(label);
            if (!node.getBaseVersion().getName().equals(v.getName())) {
                Node frozenNode = v.getNode(JcrConstants.JCR_FROZENNODE);
                NodeIterator it = v.getNodes();

                if (it.hasNext()) {

                  Node no = it.nextNode();
                  System.out.println("Version saved on " + 
                     v.getCreated().getTime().toString() + 
                     " has the following message: ");
                }
                PropertyIterator pi = frozenNode.getProperties();
                while (pi.hasNext()) {
                    System.out.println(pi.nextProperty().getName());
                }
                NodeIterator ni = frozenNode.getNodes();
                while (ni.hasNext()) {
                    System.out.println(ni.nextNode().getName());
                }

I get these properties....

jcr:frozenUuid
jcr:uuid
jcr:frozenPrimaryType
jcr:frozenMixinTypes
jcr:primaryType


Why doesn't it have the other properties that I actually need???? What am I
doing wrong?

I've seen from other form posts that other people's frozen node's contain
jcr:data just fine.

Can anyone please help? Do I have to add fields to this versioning field?

I've tried both XML and Derby persistance both do the same thing!!

Thanks in advance!!!!!!
-- 
View this message in context: http://www.nabble.com/Problem-with-getting-jcr%3Adata-from-the-jcr%3AfrozenNode-for-a-jcr%3Acontent-node-tp19879699p19879699.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message