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