Frank, I don't see any failures with any of the other samples, but I'm still having a problem with the ObtainingDataGraphFromXml. I'm currently trying to understand why I get ....
************************************** SDO Sample ObtainingDataGraphFromXml *************************************** Demonstrates a vareity of methods available to obtain the root DataObject contained within an xml representation of a DataGraph. *************************************** Defining Types using XSD Type definition completed Using specification methods to obtain DataObject represeenting a datagraph from xml Obtained DataObject representing datagraph [EMAIL PROTECTED] (changeSummary: [EMAIL PROTECTED], anyAttribute: []) (any: [company:company= [EMAIL PROTECTED] (eClass: [EMAIL PROTECTED] (name: CompanyType) (instanceClassName: null) (abstract: false, interface: false))]) Obtained root DataObject from datagraph [EMAIL PROTECTED] (eClass: [EMAIL PROTECTED] (name: CompanyType) (instanceClassName: null) (abstract: false, interface: false)) org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Class 'company' not found. ( file:///C:/Development/JiraDev/M3Release/svn/M3ImplRelease/sample/all.datagraph, 23, 19) at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors( XMLLoadImpl.java:80) at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:190) at org.apache.tuscany.sdo.util.DataGraphResourceFactoryImpl$DataGraphResourceImpl$LoadImpl.load (DataGraphResourceFactoryImpl.java:455) at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad( XMLResourceImpl.java:179) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load( ResourceImpl.java:1094) at org.apache.tuscany.sdo.util.SDOUtil.loadDataGraph(SDOUtil.java:274)Sorry there was an error encountered org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Class 'company' not found. ( file:///C:/Development/JiraDev/M3Release/svn/M3ImplRelease/sample/all.datagraph, 23, 19) at org.apache.tuscany.samples.sdo.specCodeSnippets.ObtainingDataGraphFromXml.main (ObtainingDataGraphFromXml.java:171) at org.apache.tuscany.samples.sdo.ExecuteSamples.main( ExecuteSamples.java:126) Caused by: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'company' not found. ( file:///C:/Development/JiraDev/M3Release/svn/M3ImplRelease/sample/all.datagraph, 23, 19) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory( XMLHandler.java:2018) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory( XMLHandler.java:2009) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType( XMLHandler.java:1175) at org.apache.tuscany.sdo.util.DataGraphResourceFactoryImpl$1.handleFeature( DataGraphResourceFactoryImpl.java:566) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement( XMLHandler.java:884) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement( XMLHandler.java:863) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement( XMLHandler.java:627) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:180) ... 6 more Regards, Kelvin. On 24/03/07, Frank Budinsky <[EMAIL PROTECTED]> wrote:
I just fixed the ObtainingDataGraphFromXml sample and committed the fix. Are there any other SDO sample problems that anyone knows of? Thanks, Frank. Frank Budinsky/Toronto/[EMAIL PROTECTED] wrote on 03/23/2007 10:01:47 PM: > I don't understand why 2-2.1 or 2-2.2 is needed. > > I just want to load the XML with XMLHelper. It will create > DataGraphTypeImpl - that's fine - it doesn't matter that it does not > implement the DataGraph interface. You can still get to the company object > after loading it. That's all I want for now. Doesn't that work? > > In the future, DataGraphTypeImpl will implement the DataGraph interface, > but for now it doesn't matter. > > Frank. > > "Yang ZHONG" <[EMAIL PROTECTED]> wrote on 03/23/2007 06:08:13 > PM: > > > XMLHelper uses registered model to instantiate DataObject, which is > > DataGraphTypeImpl corresponding to sdo:datagraph. > > > > DataGraphTypeImpl does *not* implement DataGraph interface. > > Our DataGraph implementation is DataGraphImpl instead, which does *not* > > implement DataObject interface required by XMLHelper. > > > > Yes, it's still possible. 2-2.1 and 2-2.2 may be easier to implement if > we > > want to support loading DataGraph by XMLHelper. Which one do you prefer? > Or > > alternative? > > > > On 3/23/07, Frank Budinsky <[EMAIL PROTECTED]> wrote: > > > > > > Yang, the sample used to show how to load the datagraph XML with the > > > XMLHelper and then pull the "data graph" (i.e., graph of DataObject's) > out > > > of it. This didn't create a "DataGraph", but it was still an > interesting > > > example. That should still be possible, isn't it? > > > > > > Frank. > > > > > > > > > "Yang ZHONG" <[EMAIL PROTECTED]> wrote on 03/23/2007 > 05:12:27 > > > PM: > > > > > > > Thanks to Frank; I'll remove using XMLHelper to load DataGraph from > the > > > > samples (of the Release Candidate). > > > > > > > > On 3/23/07, Frank Budinsky <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Yang, > > > > > > > > > > XMLHelper doesn't need to support saving and loading DataGraph at > this > > > > > point. In the future, we are going to replace the implementation > of > > > > > DataGraph to one that "is a" DataObject, so then it will serialize > > > without > > > > > any special code. That's the direction the SDO spec is going on > this > > > > > issue. > > > > > > > > > > Frank. > > > > > > > > > > > > > > > > > > > > > > > > > "Yang ZHONG" <[EMAIL PROTECTED]> > > > > > 03/23/2007 03:55 PM > > > > > Please respond to > > > > > [email protected] > > > > > > > > > > > > > > > To > > > > > [email protected] > > > > > cc > > > > > > > > > > Subject > > > > > Should XMLHelper support DataGraph and how > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 2-1. Should XMLHelper support both saving and loading DataGraph? > > > > > > > > > > Spec 2.1 page 11 (2 Architecture) says > > > > > "Data graphs can be serialized to XML, typically by the > XMLHelper > > > or > > > > > by > > > > > an XML DAS." > > > > > It may imply XMLHelper should support saving DataGraph. > > > > > > > > > > At the same time, spec 2.1 page 45 (3.11 XMLHelper) says > > > > > "An XMLHelper converts XML streams to and from graphs of > > > DataObjects." > > > > > There might be readers intepreting that XMLHelper should support > > > loading > > > > > DataGraph. > > > > > > > > > > 2-2. How to support DataGraph if XMLHelper should? > > > > > > > > > > Currently, we use SDOXMLResourceImpl to save/load DataObject and > > > > > DataGraphResourceFactoryImpl.DataGraphResourceImpl to save/load > > > DataGraph. > > > > > It's trivial for XMLHelper to pick a ResourceImpl to save > > > corresponding to > > > > > input object. > > > > > However, it's not trivial for XMLHelper to pick a ResourceImpl to > load > > > > > corresponding to input stream. > > > > > I have 2 solutions; let me know your preference; alternatives will > be > > > > > appreciated. > > > > > > > > > > 2-2.1. Merge DataGraphResourceImpl capability into > SDOXMLResourceImpl > > > > > > > > > > It takes longer to implement. However, we can eliminate > > > > > DataGraphResourceFactoryImpl afterwards. > > > > > > > > > > 2-2.2. Parse stream portion and use corresponding ResourceImpl > > > > > > > > > > It takes shorter to implement. However, the solution isn't trivial > > > since > > > > > stream may not support reset, where the parsed portion has to be > > > recorded > > > > > and played back. > > > > > > > > > > -- > > > > > > > > > > Yang ZHONG > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Yang ZHONG > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > > > Yang ZHONG > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
