From graffito-dev-return-401-apmail-incubator-graffito-dev-archive=www.apache.org@incubator.apache.org Thu Aug 04 22:57:05 2005 Return-Path: Delivered-To: apmail-incubator-graffito-dev-archive@www.apache.org Received: (qmail 38043 invoked from network); 4 Aug 2005 22:57:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2005 22:57:05 -0000 Received: (qmail 66652 invoked by uid 500); 4 Aug 2005 22:57:05 -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 66631 invoked by uid 99); 4 Aug 2005 22:57:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2005 15:57:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of christophe.lombart@gmail.com designates 64.233.182.195 as permitted sender) Received: from [64.233.182.195] (HELO nproxy.gmail.com) (64.233.182.195) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2005 15:56:54 -0700 Received: by nproxy.gmail.com with SMTP id d4so105505nfe for ; Thu, 04 Aug 2005 15:57:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=usJMbAC4GqiFBZxb2FU3+dUWLigbsbm5eCE3nhTFJqICOkZIsSZ1aZqqtIDpa98zFTW3Ss1oXDbm9UhdnUxUkRfzWdk5NY8o8QWtfNBmSkkp+R99dS+yLrjJcSDFv85ncweTubcaiKv3zYZQlvM2yE2M9f1gRUbH+nLbZusyHB8= Received: by 10.48.43.20 with SMTP id q20mr77172nfq; Thu, 04 Aug 2005 15:57:01 -0700 (PDT) Received: by 10.48.249.5 with HTTP; Thu, 4 Aug 2005 15:57:01 -0700 (PDT) Message-ID: <3b728ee9050804155777bec5de@mail.gmail.com> Date: Fri, 5 Aug 2005 00:57:01 +0200 From: Christophe Lombart To: graffito-dev@incubator.apache.org Subject: Re: [jcr-mapping] persistence of the mapping model In-Reply-To: <42F290A9.5060806@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42E959B2.5030302@gmx.de> <3b728ee9050731134776c1cb62@mail.gmail.com> <42ED4ABD.8090109@gmx.de> <42EFAC51.2020104@gmx.de> <3b728ee90508021119215fd88a@mail.gmail.com> <42EFE7B6.6090801@gmx.de> <3b728ee9050803015769e479b8@mail.gmail.com> <42F290A9.5060806@gmx.de> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > Hello Christophe, >=20 > the general advantage I see is, that you can have a better error > handling in comparison to a DTD. > In my opinion: the earlier the user find an error in the XML file the > better is it. With the XML schema > you have more possibilities than with a DTD because it is a superset of > a DTD. You mean Xml schema is a superset of a DTD - of course but I found the proposed tools (XmlBean, JAXB, ...) not very usefull in our case. They add some complexity. Did you see the number of generated classes you have ?=20 I will have something 5 classes with 2/5 attributes in each of them. I'm not sure it is quite complex to write by hand (with eclipse). > Beside obvious advantages (like XML schema uses the XML syntax) as a > concrete example we can > use some build in data types like QName, ID, IDREF directly with the > schema. Or for the JCR > date types we can use the double, date, long, boolean schema types. > A binding framework can do the conversions. Which means, once we defined > a double or any other > datatype in the schema we don't need to deal with parsing, validation or > conversion from string > to the according data type. The type will simply be available in the > Java bean. See in my prototype, it is the same situation=20 > o writing Java objects as nodes to the repository > o loading nodes from the repository into Java objects > o generating node types out of Java classes > o generating Java classes out of node types > o ... I don't see why it is not possible in my case. Please, look at tools like OJB, Hibernate & Jackrabbit. Let me know why they are not using XMLSchema. They have the same problem. Look at my last commit and let me know what's is wrong in this prototype.= =20 I think it done with a small amount of code and without generated classes := =20 * DescriptorReader : read the mapping File by 5 using a small amount of classes (see in org.apache.portals.graffito.jcr.mapper.model). * See the GenericConverter to see how the mapping is done.