jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernando Cabredo <fcabred...@yahoo.com>
Subject Retrieving Property Values
Date Tue, 24 Feb 2009 15:10:23 GMT
Hi,

I am a developer based here in the Philippines and I am new to Apache Jackrabbit. 

I would like to retrieve some property values such as File Size, Date Last Modified, etc.

You may take a look at the following code fragments which I am using for retrieving the property
values:

         PropertyIterator propIter = n.getProperties();
            while(propIter.hasNext()){
                    Property prop = propIter.nextProperty();
                    NodeProperty nodeproperty = new NodeProperty();
                    nodeproperty.setPropertyname(prop.getName());
                    nodeproperty.setPropertyvalue(prop.getValue().getString());
                    System.out.println("Property Name --->"+nodeproperty.getPropertyname());
                    System.out.println("Property Value --->"+nodeproperty.getPropertyvalue());
                    aList.add(nodeproperty);
            }

Output:

    Property Name --->jcr:created
    Property Value --->2009-02-24T19:51:44.765+08:00

    Property Name --->jcr:primaryType
    Property Value --->nt:file
    
I was expecting to find in the above code the properties I was looking for but only found
two properties. These are the jcr:created and jcr:properties as shown in my sample output.

I hope somebody may help me on this. Thank you very much.


Fernando Cabredo



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