You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Nikolay Georgiev <ge...@gmail.com> on 2011/08/30 10:29:32 UTC

Jackrabbit Metadata + Inheritance

Hello,

I would like to implement 2 things and maybe you can give me some
advice how to do it:

1) I want to add Metadata to every node.
Possible solution: add a node called metaData and and the metaData as
properties belonging to this node. What do you think? Or are there
better ways?

2) Some specific nodes should inherit other nodes, in a way that the
metaData in the super node is also metaData in the subnode. How can I
implement this?

Thank you,

Nikolay

Re: Jackrabbit Metadata + Inheritance

Posted by Stefan Guggisberg <st...@gmail.com>.
On Thu, Sep 1, 2011 at 9:55 AM, Nikolay Georgiev
<ge...@gmail.com> wrote:
> Hi Stefan,
>
> what would be the advantage of meta data saved as Mixin over just a node.
> Can I search Mixings thourh XPath?

yes, see [0].

cheers
stefan

[0] http://www.day.com/specs/jcr/1.0/6.6.3.2_Type_Constraint.html

>
> Thanks,
> Nikolay
>
> On 08/31/2011 10:40 AM, Stefan Guggisberg wrote:
>>
>> hi nikolay
>>
>> On Tue, Aug 30, 2011 at 10:29 AM, Nikolay Georgiev
>> <ge...@gmail.com>  wrote:
>>>
>>> Hello,
>>>
>>> I would like to implement 2 things and maybe you can give me some
>>> advice how to do it:
>>>
>>> 1) I want to add Metadata to every node.
>>> Possible solution: add a node called metaData and and the metaData as
>>> properties belonging to this node. What do you think? Or are there
>>> better ways?
>>
>> you could e.g. define  a custom mixin node type and assign it to specific
>> nodes
>> by calling Node.addMixin().
>>
>>> 2) Some specific nodes should inherit other nodes, in a way that the
>>> metaData in the super node is also metaData in the subnode. How can I
>>> implement this?
>>
>> if the 'super node' is always a parent of the 'derived' node you could
>> write some custom code which does traverse the parent hierarchy until it
>> finds the 'meta data'.
>>
>> cheers
>> stefan
>>
>>> Thank you,
>>>
>>> Nikolay
>>>
>

Re: Jackrabbit Metadata + Inheritance

Posted by Nikolay Georgiev <ge...@gmail.com>.
Hi Stefan,

what would be the advantage of meta data saved as Mixin over just a 
node. Can I search Mixings thourh XPath?

Thanks,
Nikolay

On 08/31/2011 10:40 AM, Stefan Guggisberg wrote:
> hi nikolay
>
> On Tue, Aug 30, 2011 at 10:29 AM, Nikolay Georgiev
> <ge...@gmail.com>  wrote:
>> Hello,
>>
>> I would like to implement 2 things and maybe you can give me some
>> advice how to do it:
>>
>> 1) I want to add Metadata to every node.
>> Possible solution: add a node called metaData and and the metaData as
>> properties belonging to this node. What do you think? Or are there
>> better ways?
> you could e.g. define  a custom mixin node type and assign it to specific nodes
> by calling Node.addMixin().
>
>> 2) Some specific nodes should inherit other nodes, in a way that the
>> metaData in the super node is also metaData in the subnode. How can I
>> implement this?
> if the 'super node' is always a parent of the 'derived' node you could
> write some custom code which does traverse the parent hierarchy until it
> finds the 'meta data'.
>
> cheers
> stefan
>
>> Thank you,
>>
>> Nikolay
>>

Re: Jackrabbit Metadata + Inheritance

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

On Tue, Aug 30, 2011 at 10:29 AM, Nikolay Georgiev
<ge...@gmail.com> wrote:
> Hello,
>
> I would like to implement 2 things and maybe you can give me some
> advice how to do it:
>
> 1) I want to add Metadata to every node.
> Possible solution: add a node called metaData and and the metaData as
> properties belonging to this node. What do you think? Or are there
> better ways?

you could e.g. define  a custom mixin node type and assign it to specific nodes
by calling Node.addMixin().

>
> 2) Some specific nodes should inherit other nodes, in a way that the
> metaData in the super node is also metaData in the subnode. How can I
> implement this?

if the 'super node' is always a parent of the 'derived' node you could
write some custom code which does traverse the parent hierarchy until it
finds the 'meta data'.

cheers
stefan

>
> Thank you,
>
> Nikolay
>