jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabián Mandelbaum <fmandelb...@gmail.com>
Subject Arbitrary key:value property pairs node type
Date Tue, 23 Sep 2008 20:12:39 GMT
Hello there,

    I stumbled upon this requirement and it posed a problem to my
troubled brain:

    "I'd like to add arbitrary
tags/properties/attributes/whatever_you_want_to_call_em to a content
node (read: a file stored in JCR). For example I'd like to add property
project:A and property project:B to mean that my file belongs to both
project A and project B, in a way that I can list files of project B by
searching for all files with project:B property. I don't know in advance
if it will be project:A, project:B, project:XXX, project:whatever."

    Is there a way to do this? To make a node type that accepts
arbitrary (there may be other requirements besides projects, otherwise,
a multi-valued property named project would suffice) Java Map-like
property key:value pairs which is also searchable using standard JCR
XPath expressions (Like in gimme all nodes having key=value)?

    Or should I just make sure that all prossible properties are defined
for that node? If I do this, and in V2 of my app I find out that I need
more/less properties, will I have to write a tool to migrate data
between V1 and V2 repositories of my app?

    I hope I was clear enough, if I haven't been clear enough (I'm
sorry, but I myself am a bit confused about all this).

    Thanks in advance for your answers.

Mime
View raw message