jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandru Popescu <the.mindstorm.mailingl...@gmail.com>
Subject Re: Bug with multi-valued properties when exporting repository content?
Date Tue, 15 Nov 2005 13:39:56 GMT
#: Stefan Guggisberg changed the world a bit at a time by saying on  11/15/2005 3:04 PM :#
> On 11/15/05, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
>> #: Stefan Guggisberg changed the world a bit at a time by saying on  11/15/2005 1:36
PM :#
>> > On 11/15/05, Martin Perez <mpermar@gmail.com> wrote:
>> >> Ok Stefan.
>> >>
>> >> But I think that the problem happens also with more than one property, i.e.
>> >> :
>> >>
>> >> Property p1 = node1.setProperty("someName", new String[]
>> >> {"someValue1","someValue2"});
>> >>
>> >> I don't know if your explanation covers this case.
>> >
>> > sorry, what problem occurs if you reimport the above property?
>> >
>> > i would expect that for the reimported property p1:
>> >
>> > p1.getDefinition().isMultiple()==true
>> >
>> > is this not the case?
>> >
>>
>> It looks like it is not the case
>>
>> [quote]
>> Here is
>> the surprise: now that simple property has a values attribute composed by a
>> Value[1] array (ok) but multivalued attribute is false !!!
>>
>> I tested this with a property with two values, and in this case all works
>> correctly, so it seems that the problem is with multi-valued properties with
>> only one Value in their values array.
>> [/quote]
> 
> thanks, i can read. let's martin answer the question.
> 

sorry, no intention to hurt :-S.

./alex
--
.w( the_mindstorm )p.

>>
>> ./alex
>> --
>> .w( the_mindstorm )p.
>>
>> >>
>> >> Regards.
>> >>
>> >> Martin
>> >>
>> >> On 11/15/05, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
>> >> >
>> >> > On 11/14/05, Martin Perez <mpermar@gmail.com> wrote:
>> >> > > Stefan, you were right, my message was a little unclear.
>> >> > >
>> >> > > With the "multivalued attribute is false" and "has a values attribute"
>> >> > > phrases I meant that the PropertyImpl state object has those values
in
>> >> > those
>> >> > > attributes. So, in this case the property is supposed to be not
>> >> > multivalued
>> >> > > but has multiple values.
>> >> > >
>> >> > > And, yes, I was using exportSystemView with skipBinary=false and
>> >> > > noRecurse=false.
>> >> > >
>> >> > > If it is not clear I can try to explain better ( I must improve
my
>> >> > english
>> >> > > ), but basically the problem is that an exported multivalued property
is
>> >> > > imported as a single-valued property, but the internal Value[]
array
>> >> > remains
>> >> > > the same in both cases.
>> >> >
>> >> > no problem martin, i got it now :-)
>> >> >
>> >> > let's assume the following:
>> >> >
>> >> > Property p1 = node1.setProperty("someName", new String[] {"someValue"});
>> >> > Property p2 = node2.setProperty("someName", "someValue");
>> >> >
>> >> > the problem is that in system view xml format both properties are
>> >> > identical, i.e. the 'multiValued' information is not explicitly recorded:
>> >> >
>> >> > <sv:property sv:name="someName" sv:type="String">
>> >> > <sv:value>someValue</sv:value>
>> >> > </sv:property>
>> >> >
>> >> > if on reimport the parent node's node type contains both single- and
>> >> > multivalued
>> >> > definitions that would be applicable the former is taken. nt:unstructured
>> >> > is an
>> >> > example for a node type containing both single- and multivalued residual
>> >> > property definitions.
>> >> >
>> >> > please note that this is not a bug in jackrabbit but a issue of the
>> >> > system view xml format as specified in 6.4.1 System View XML Mapping
>> >> > of jsr 170.
>> >> >
>> >> > cheers
>> >> > stefan
>> >> >
>> >> >
>> >> > >
>> >> > > Regards,
>> >> > >
>> >> > > Martin
>> >> > >
>> >> > > On 11/14/05, Stefan Guggisberg <stefan.guggisberg@gmail.com>
wrote:
>> >> > > >
>> >> > > > hi martin,
>> >> > > >
>> >> > > > On 11/12/05, Martin Perez <mpermar@gmail.com> wrote:
>> >> > > > > Hi.
>> >> > > > >
>> >> > > > > I finished my holidays and so I expect to spam again
this list with
>> >> > a
>> >> > > > bunch
>> >> > > > > of questions and possible bug reports :)
>> >> > > > >
>> >> > > > > First of all, I'm using a two weeks ago version of jackrabbit.
So
>> >> > > > forgive me
>> >> > > > > if this bug has already been resolved.
>> >> > > > >
>> >> > > > > Now, the bug: I created a node with only one multi-valued
property.
>> >> > The
>> >> > > > > property also only has a single value. But, even as
the property has
>> >> > one
>> >> > > > > value, the property is multivalued and has a values
attribute
>> >> > composed
>> >> > > > by a
>> >> > > > > Value[1] array and its multivalued attribute is true.
All is fine..
>> >> > > > >
>> >> > > > > Now, I export that simple repository, and after this
I import it.
>> >> > Here
>> >> > > > is
>> >> > > > > the surprise: now that simple property has a values
attribute
>> >> > composed
>> >> > > > by a
>> >> > > > > Value[1] array (ok) but multivalued attribute is false
!!!
>> >> > > >
>> >> > > > what do you mean with "multivalued attribute is false" and
"has a
>> >> > > > values attribute"?
>> >> > > >
>> >> > > > >
>> >> > > > > I tested this with a property with two values, and in
this case all
>> >> > > > works
>> >> > > > > correctly, so it seems that the problem is with multi-valued
>> >> > properties
>> >> > > > with
>> >> > > > > only one Value in their values array.
>> >> > > > >
>> >> > > > > Do you think that this could be a bug ? or maybe I'm
missing
>> >> > > > something...
>> >> > > >
>> >> > > > what export format did you choose? document view or system
view?
>> >> > > > note that the document view export format is not guaranteed
to be
>> >> > fully
>> >> > > > roundtrippable as some information is inevitably lost in
order to make
>> >> > > > the output more human readable.
>> >> > > >
>> >> > > > if you need to reimport the exported data you should use
the system
>> >> > view
>> >> > > > format.
>> >> > > >
>> >> > > > 6.4.2 Document View XML Mapping (ff.) of the jsr 170 specification
>> >> > > > provides
>> >> > > > more detailed information on this topic.
>> >> > > >
>> >> > > > cheers
>> >> > > > stefan
>> >> > > >
>> >> > > >
>> >> > > > >
>> >> > > > > Thanks,
>> >> > > > >
>> >> > > > > Martin
>> >> > > > >
>> >> > > > >
>> >> > > >
>> >> > >
>> >> > >
>> >> >
>> >>
>> >>
>> >
>>
>>
> 


Mime
View raw message