Return-Path: Delivered-To: apmail-ws-tuscany-user-archive@locus.apache.org Received: (qmail 24032 invoked from network); 17 Jan 2007 14:38:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jan 2007 14:38:34 -0000 Received: (qmail 90247 invoked by uid 500); 17 Jan 2007 14:38:40 -0000 Delivered-To: apmail-ws-tuscany-user-archive@ws.apache.org Received: (qmail 90225 invoked by uid 500); 17 Jan 2007 14:38:40 -0000 Mailing-List: contact tuscany-user-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tuscany-user@ws.apache.org Delivered-To: mailing list tuscany-user@ws.apache.org Received: (qmail 90216 invoked by uid 99); 17 Jan 2007 14:38:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2007 06:38:40 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [68.142.198.106] (HELO web31311.mail.mud.yahoo.com) (68.142.198.106) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 17 Jan 2007 06:38:30 -0800 Received: (qmail 13591 invoked by uid 60001); 17 Jan 2007 14:38:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2On767aHLPNgXkc5U5sxEP4wuLMXo4SJwsNf9DXXZfOK1WXL9G4eceeh5IJ0LlzHROZzv8wbzvD7q6dpZp7EHGxeQ49SqJhn7/kRjwkQTz5ZhIl8Ith8JrmNHxCEnEAk8W1+vFm6qxMW7JNl6fsuRmx973GxM13ylIwJPeIpJo0=; X-YMail-OSG: gxKTubUVM1mx0uGZYyyYn6SkzHAqnASqTbame0eukkN3MnBrfulQFd446wDHMC4XmKvWU4k4mLaHozONSg251L7R4p5d.xk4Mu8MLlLMNYsV.CxiSbkcUKhtCWhtr4N8rtbQ3LxjAAxo1aJFUFinuD_fx2Xvp2ZNm.9mAEyxT_IidA9W2cCWNv9kxckF Received: from [63.239.69.1] by web31311.mail.mud.yahoo.com via HTTP; Wed, 17 Jan 2007 06:38:08 PST X-Mailer: YahooMailRC/368.3 YahooMailWebService/0.6.132.7 Date: Wed, 17 Jan 2007 06:38:08 -0800 (PST) From: Ron Gavlin Subject: Re: Problem w/SDO xsd:dateTime value being validated using EMF Diagnostician.validate() To: tuscany-user@ws.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <761409.12732.qm@web31311.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the reply, Frank.=0A=0AI believe in EMF SDO 1, loading a DataGra= ph with an invalid xsd:dateTime value behaved much like loading a DataGraph= with an invalid xsd:integer. Here, xsd:dateTime fields were parsed into EM= F XMLCalendar instances and therefore parsing errors were reported at load = time. Tuscany SDO does not behave this way. Does the fact that the SDO spec= states that xsd:dateTime gets rendered as a String imply that parsing shou= ld not be performed at load time and therefore invalid xsd:dateTime values = ignored? =0A=0ADoes the SDO spec plan to address validation in a later revi= sion? If Tuscany SDO were to support validation, do you think Tuscany would= roll its own validation, use the validation capabilities built-in to EMF, = or use the EMFT Validation Framework? Would it be appropriate for me to cre= ate a JIRA to document this enhancement request?=0A=0AI was thinking of wri= ting a ModelValidator that is responsible for validating the types defined = in ModelPackageImpl. It would delegate to EMF's DynamicEDataValidator for s= ome types and implement custom validation for others like DateTime. In orde= r to implement this capability, I would register the ModelPackageImpl and M= odelValidator with the EMF EValidatorRegistry. Does this seem like a reason= able approach? Where do you think it would make most sense to perform this = registration? =0A=0A- Ron =0A=0A----- Original Message ----=0AFrom: Frank B= udinsky =0ATo: tuscany-user@ws.apache.org=0ASent: Tuesda= y, January 16, 2007 3:24:59 PM=0ASubject: Re: Problem w/SDO xsd:dateTime va= lue being validated using EMF Diagnostician.validate()=0A=0A=0AI don't know= if it worked in SDO 1 either, but a big change in this area =0Ais that the= xsd types now map to commonj.sdo types as descirbed in the SDO =0A2 spec. = In SDO 1, they mapped to types in the EMF XMLTypePackage. =0A=0AIn SDO 2 (T= uscany), xsd:dateTime maps to this type (defined in =0AsdoModel.xsd):=0A=0A= =0A =0A=0A=0AIt= , along with all of the commonj types, is generated in class =0Aorg.apache.= tuscany.sdo.model.impl.ModelFactoryImpl. I don't know how the =0AEMF valida= tor will handle this type.=0A=0AFrank.=0A=0A=0A=0A=0ARon Gavlin =0A01/16/2007 01:05 PM=0APlease respond to=0Atuscany-user@ws.apach= e.org=0A=0A=0ATo=0Atuscany-user tuscany-user = =0Acc=0A=0ASubject=0AProblem w/SDO xsd:dateTime value being validated using= EMF =0ADiagnostician.validate()=0A=0A=0A=0A=0A=0A=0AGreetings,=0A=0AI have= an xsd:dateTime child element in an XML Schema that I use to =0Astatically= generate Tuscany SDO classes. Since Tuscany does not currently =0Aprovide = a schema validation API, I have been using EMF to accomplish this =0Atask u= sing the following code:=0A=0A...=0ADiagnostic diagnostic =3D =0A Diagnos= tician.INSTANCE.validate((EObject) =0AmyDataObjectwithDateTimeChildProperty= );=0Aif (diagnostic.getSeverity() =3D=3D Diagnostic.ERROR)=0A{=0A throw = new Exception(diagnostic.getChildren().toString());=0A}=0A=0AThis technique= works fine for most schema validation issues, like min/max =0Afacet length= enforcement for child xsd:strings, etc. However, EMF is =0Aperforming no v= alidation against my Tuscany DateTime field (I can supply a =0Abogus dateTi= me and no diagnostic error is generated). Is this an EMF =0Aproblem or a Tu= scany/EMF integration problem? I thought this used to work =0Awith the Ecli= pse EMF-based SDO 1.0 implementation but I may be wrong. Any =0Asuggestions= would be greatly appreciated.=0A=0AThanks in advance,=0A=0A- Ron=0A=0A----= -----------------------------------------------------------------=0ATo unsu= bscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org=0AFor additional co= mmands, e-mail: tuscany-user-help@ws.apache.org=0A=0A=0A=0A=0A-------------= --------------------------------------------------------=0ATo unsubscribe, = e-mail: tuscany-user-unsubscribe@ws.apache.org=0AFor additional commands, e= -mail: tuscany-user-help@ws.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org For additional commands, e-mail: tuscany-user-help@ws.apache.org