jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: problem with imported multiple value properties
Date Thu, 17 Aug 2006 19:46:51 GMT
afaik, roundtripping of mv values is only supported in system view.
regards, toby

On 8/17/06, Doug Douglass <douglass.doug@gmail.com> wrote:
> I've got a unit testing setup where a previously exported document view XML
> file is used to reset Jackrabbits content to a known, testable state prior
> to each test. This is not unlike how dbunit works. I haven't yet stepped up
> to proper transactions, but that's a different topic.
>
> My problem is I have a multiple value property in a node definition that
> works fine when a node is created and the property added, but not when the
> node has been imported. When trying to access the property values (
> Property.getValues()) on the imported node, only one value is returned
> containing a space-separated list of all the values.
>
> Here's as snip of the node type definition:
> ...
> [compass:productImage]
> ...
> - compass:designOption (STRING) multiple
> ...
>
> Here's a document view exported on one such node (skipBinary = true,
> noRecurse = true):
>
> <?xml version="1.0" encoding="UTF-8" ?>
>    <uAzbBgZFiiizOGyYJvBcocSCqpqJjzlu jcr:primaryType="*compass:productImage*
> " jcr:uuid="*becf2c86-203a-4cda-8d44-47d9f8ff3fbb*" jcr:isCheckedOut="*true*
> " jcr:versionHistory="*a1ce5dae-de79-4870-8095-a0c65491280d*"compass:accessStatus
> ="*PENDING*" jcr:created="*2006-08-17T12:48:21.843-06:00*" jcr:baseVersion="
> *4e46d7d3-4c83-45e6-b4b4-3f7d35aa8120*"
> compass:brandCollection="*duette*"compass:designOption
> ="*angletop octagon*" jcr:predecessors="*
> 4e46d7d3-4c83-45e6-b4b4-3f7d35aa8120*" xmlns:jcr="*
> http://www.jcp.org/jcr/1.0*"
> xmlns:mix="*http://www.jcp.org/jcr/mix/1.0*"xmlns:compass
> ="*http://www.hunterdouglas.com/compass/content/1.0*"
> xmlns:rep="*internal*"xmlns:nt
> ="*http://www.jcp.org/jcr/nt/1.0*" xmlns:xs="*
> http://www.w3.org/2001/XMLSchema*" xmlns:fn="*
> http://www.w3.org/2004/10/xpath-functions*" xmlns:sv="*
> http://www.jcp.org/jcr/sv/1.0*" xmlns="" />
>
> Here's a snip of code where the property values are accessed:
>
>    Value[] values = node.getProperty("compass:designOption").getValues();
>
>    for (Value value : values) {
>       set.add(dao.findByShortName(value.getString()));
>    }
>
>
> In the above code, the values array always contains one value, which equals
> "angletop octagon".
>
> So, is there a bug in the Jackrabbit import or export code for multiple
> valued properties? Or is there something I'm missing?
>
> TIA,
> Doug
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message