jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <michael.wech...@wyona.com>
Subject getString for multi-valued properties
Date Sun, 27 Feb 2005 00:23:58 GMT
When using Property.getString() for multi-valued properties I receive

     [java] javax.jcr.ValueFormatException: 
/jcr:system/jcr:versionStorage/jcr:mixinTypes is multi-valued and can 
therefore only be retrieved as an array of values
     [java]     at 
org.apache.jackrabbit.core.PropertyImpl.getString(PropertyImpl.java:383)

Is this a feature or a bug?

As I workaround I do

if (p.getDefinition().isMultiple()) {
                Value[] values = p.getValues();


Is this the way how to do it?

Just being curious, why does Value or Property of the "cqfs" implementation
not implement the "toString()" method for convenience?

Thanks

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


Mime
View raw message