jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Multi-Value Properies in SystemView XML
Date Fri, 12 Oct 2007 12:05:37 GMT
hi jake

On 10/11/07, Jake Roberts <jake@quantum4d.com> wrote:
> Apologies if this question has been answered elsewhere; I've poked around and
> haven't seen anything. I feel like I'm missing something basic.
> I'm trying to round-trip repository data to and from System View XML. But
> there's a problem: When a multi-valued property that happens to have only
> one value is exported to XML (System View), it becomes a single-valued
> property on re-import of the same file.
> Consulting the JCR spec, it looks like no provision is made for recording
> the multiplicity of a property in System View XML. You get the name, the
> type, and the values and that's it.
> When I import the same XML file, it appears that the importer decides
> whether a property is single or multi-valued based on the number of value
> elements present for that property in XML. And as far as I can tell, there's
> no other way it could work. The information necessary to tell a
> single-valued property from a multi-valued property with a single value
> isn't present. Or am I confused?

no, you're absolutely right. i assume you're using nt:unstructured.
provides 2 residual property definitions, one being singe-, the other

on re-import there's no way to detect whether a property with a single v alue
was declared as a multi-value property.

> In any case, the practical upshot is that I get ValueFormatExceptions on
> properties that my application expects to be multi-valued, as they were
> prior to export and re-import. Any suggestions on how to correctly handle
> round-tripping of multi-valued props via System View XML?

by using custom node types you should be able to correctly round-trip
single-valued multi-value properties (phew;).


  - myapp:keywords (string) multiple
  - myapp:title (string)


> Thanks,
>  - Jake
> --
> View this message in context: http://www.nabble.com/Multi-Value-Properies-in-SystemView-XML-tf4610005.html#a13164867
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message