From graffito-dev-return-1439-apmail-incubator-graffito-dev-archive=www.apache.org@incubator.apache.org Tue Oct 17 10:49:29 2006 Return-Path: Delivered-To: apmail-incubator-graffito-dev-archive@www.apache.org Received: (qmail 90238 invoked from network); 17 Oct 2006 10:49:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Oct 2006 10:49:29 -0000 Received: (qmail 21721 invoked by uid 500); 17 Oct 2006 10:49:29 -0000 Mailing-List: contact graffito-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: graffito-dev@incubator.apache.org Delivered-To: mailing list graffito-dev@incubator.apache.org Received: (qmail 21710 invoked by uid 99); 17 Oct 2006 10:49:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Oct 2006 03:49:29 -0700 X-ASF-Spam-Status: No, hits=3.1 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_00_10,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of fmeschbe@gmail.com designates 64.233.166.182 as permitted sender) Received: from [64.233.166.182] (HELO py-out-1112.google.com) (64.233.166.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Oct 2006 03:49:27 -0700 Received: by py-out-1112.google.com with SMTP id c30so3149510pyc for ; Tue, 17 Oct 2006 03:49:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=SvyZeXFEUrMrQ24sa6WN26ESjvwtv435OcG4u+0sOhEAL0pbtWX1WklBmjj1uTU1FfG+ortz4qqBXdrP5c4fOwWKLtmLq+T2K6BkmihEcEIgkwnf5FlpheREyRxVn7rFO4Iz0CP1clBZtv6JYZ0JrKeJ8qPz17t/hQMJBvGHkfo= Received: by 10.65.156.10 with SMTP id i10mr11959258qbo; Tue, 17 Oct 2006 03:49:05 -0700 (PDT) Received: by 10.65.253.9 with HTTP; Tue, 17 Oct 2006 03:49:05 -0700 (PDT) Message-ID: Date: Tue, 17 Oct 2006 12:49:05 +0200 From: "Felix Meschberger" Sender: fmeschbe@gmail.com To: graffito-dev@incubator.apache.org Subject: JCR-Mapping: Mapping multiple properties or child nodes to a single field MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_45357_31204115.1161082145906" X-Google-Sender-Auth: 198a661c47158021 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_45357_31204115.1161082145906 Content-Type: multipart/alternative; boundary="----=_Part_45358_25359602.1161082145906" ------=_Part_45358_25359602.1161082145906 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, While working on our project, I encountered the need to map multiple properties (or child nodes) to a single field. I think, such a mapping can be implemented using a CollectionDescriptor whose name is a pattern suitable for the Node.getProperties(String pattern) and Node.getNodes(String pattern), resp. Of course, best would be to base such an implementing on a Map type field. Hence I implemented a ResidualPropertiesCollectionConverterImpl mapping multiple properties and a ResidualNodesCollectionConverterImpl mapping multiple child nodes as well as ManagedHashMap to support both classes. I could imagine, that such functionality could be of use for others, too. Therefore I am willing to give them to the project. Attached, you will find the three classes. NB: Currently the classes are in our own package, which would of course should be fixed when integrating with the JCR-Mapping project. What do you think ? Regards Felix ------=_Part_45358_25359602.1161082145906 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all,

While working on our project, I encountered the need to map multiple properties (or child nodes) to a single field. I think, such a mapping can be implemented using a CollectionDescriptor whose name is a pattern suitable for the Node.getProperties(String pattern) and Node.getNodes(String pattern), resp. Of course, best would be to base such an implementing on a Map type field.

Hence I implemented a ResidualPropertiesCollectionConverterImpl mapping multiple properties and a ResidualNodesCollectionConverterImpl mapping multiple child nodes as well as ManagedHashMap to support both classes.

I could imagine, that such functionality could be of use for others, too. Therefore I am willing to give them to the project. Attached, you will find the three classes. NB: Currently the classes are in our own package, which would of course should be fixed when integrating with the JCR-Mapping project.

What do you think ?

Regards
Felix
------=_Part_45358_25359602.1161082145906-- ------=_Part_45357_31204115.1161082145906--