RE: [mdr-users] MDR can't read ArgoUML

"Pete Rivett" <[email protected]> Tue, 23 Aug 2005 10:10:13 -0400
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
This has come up a few times before I believe. In essence it's a bug in
Argo UML (and some other tools) in that they are not respecting the UML
1.3 metamodel in the XMI they produce.

In UML 1.3, Tagged values should not be nested inside the ModelElements
they apply to, but should be at the 'top level' and reference the
ModeElements they describe.
There is a XSLT transformation I wrote and sent to Martin a while back
to fix this sort of problem (it turns the file 'inside out' to move the
Tagged Values out). That's because we have had exactly this problem with
importing into our own enterprise-scale MOF repository product (Adaptive
Repository).

If the XSLT is not downloadable anywhere from the MDR site let me know
and I'll dig it out again (cannot right now - since I'm on a deadline!).
I'm quite happy for it to be redistributed.

Regards
Pete


Pete Rivett (mailto:[email protected]) 
CTO, Adaptive Inc. 
Dean Park House, 8-10 Dean Park Crescent, Bournemouth, BH1 1HL, UK 
Tel:  +44 (0)1202 449419 Fax: +44 (0)1202 449448 
http://www.adaptive.com 


 

> -----Original Message-----
> From: Jin Pan [mailto:[email protected]] 
> Sent: Tuesday, August 23, 2005 2:09 PM
> To: [email protected]
> Subject: [mdr-users] MDR can't read ArgoUML
> 
> Hi All,
> 
> I have created an ArgoUML model (UML1.3).
> 
> I exported this model to xmi format, but the MDR xmi reader 
> can't read this 
> xmi file.  I have used the same MDR xmi reader to read an xmi 
> file generated 
> from Rational Rose and it is successful.  What should I do in 
> order for MDR 
> to read ArgoUML xmi?
> 
> This is the MDR code:
> 
> // Get the default repository from the MDR manager
> rep = MDRManager.getDefault().getDefaultRepository();
> // Look up an implementation of XmiReader interface
> reader = (XmiReader) Lookup.getDefault().lookup(XmiReader.class);
> RefPackage ontology = null;
> String uri = new File(str).toURL().toString();
> reader.read(uri, ontology);(This is line caused error)
> 
> This is the error I got:
> 
> org.netbeans.lib.jmi.util.DebugException: Name cannot be resolved: 
> Foundation.Core.ModelElement.taggedValue
> 	at 
> org.netbeans.lib.jmi.xmi.XmiContext.resolveElementName(XmiCont
> ext.java:577)
> 	at 
> org.netbeans.lib.jmi.xmi.XmiElement$Instance.startSubElement(X
miElement.java:495)
> 	at 
> org.netbeans.lib.jmi.xmi.XmiSAXReader.startElement(XmiSAXReade
> r.java:217)
> 	at 
> org.apache.xerces.parsers.AbstractSAXParser.startElement(Unkno
> wn Source)
> 	at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStar
> tElement(Unknown 
> Source)
> 	at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragment
ContentDispatcher.dispatch(Unknown 
> Source)
> 	at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu
> ment(Unknown 
> Source)
> 	at 
> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at 
> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at 
> org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at javax.xml.parsers.SAXParser.parse(Unknown Source)
> 	at 
> org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:134)
> 	at 
> org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:106)
> 	at 
> org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImp
> l.java:58)
> 	at 
> org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImp
> l.java:51)
> 	at org.databinding.Transformer.main(Transformer.java:193)
> 
> I also have attatched the argouml xmi file.
> 
> Thanks,
> Pan Jin
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today 
> it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>