You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Jake Roberts <ja...@quantum4d.com> on 2007/10/11 23:12:57 UTC

Multi-Value Properies in SystemView XML

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? 

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?

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.


jackrabbit performance issues / JIRA 1050

Posted by as...@gmx.net.
Hi,

we are looking at options for resolving some performance issues (utilization of single db connection does not scale...) and want to try the patch provided by Padraic Hannon (see: http://issues.apache.org/jira/browse/JCR-1050) 

But we didnĀ“t have success applying the patch against the jackrabbit 1.3.1 source code. Against which code-base is the patch supposed to be applied?

thx

Philipp
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

Re: Multi-Value Properies in SystemView XML

Posted by Stefan Guggisberg <st...@gmail.com>.
hi jake

On 10/11/07, Jake Roberts <ja...@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.
nt:unstructured
provides 2 residual property definitions, one being singe-, the other
multi-valued.

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;).

e.g.

[myapp:book]
  - myapp:keywords (string) multiple
  - myapp:title (string)
  ...

cheers
stefan

>
> 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.
>
>