Yes, I think I see the problem now. The sample file you referred to
does indeed load and produce the expected triples. The problem is
that MagicDraw adds additional content, including xmi:Extension tags
that end up littered throughout the UML file:
<xmi:Extension extender='MagicDraw UML 16.6'>
<moduleExtension ignoredInModule='true'/>
</xmi:Extension>
Such elements throw errors when I attempt to run my script:
15:33:31.936: Compiling script...
15:33:31.936: Executing script...
15:33:31.937: - Import java objects from EMFFile_1
Error: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
$1DiagnosticWrappedException:
org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
'Extension' not found. (file:/C:/Users/Ryan/workspace/Ontologies/
Security/foobar.mdxml, 9, 52)
Since all my UML is being generated in MagicDraw, I think I'll just
run down the XPath route instead of writing code to strip out the
offending elements.
On May 24, 2:52 pm, Scott Henninger <[email protected]>
wrote:
> Ryan, was Step 1 of the blog, "Eclipse is able to load .uml files into
> a MOF-based Java object model called EMF", successful?
> If you want to see an example UML file that will import some class
> definitions, look at Composer Help > Import and Export > Import
> external information > Import UML, and you can save the
> ExtendedPO2.uml file and use it in your script.
>
> -- Scott
>
> On May 24, 7:49 am, Ryan <[email protected]> wrote:
>
>
>
>
>
> > I'm trying to import an Ecore UML file (generated from MagicDraw)
> > using the method described
> > athttp://composing-the-semantic-web.blogspot.com/2010/03/converting-uml...
> > . Below are the OWL and UML files that I'm working with. The script
> > executes without errors, resulting in this console output:
>
> > 08:39:16.225: Preparing execution (collecting garbage)...
> > 08:39:17.193: Compiling script...
> > 08:39:17.193: Executing script...
> > 08:39:17.193: - import ecore
> > 08:39:17.520: - convert to rdf
> > 08:39:17.520: Finished executing SPARQLMotion script.
>
> > Result variables of convert to rdf:
> > - uml = [org.eclipse.emf.ecore.impl.epackagei...@981055 (name:
> > Security 2) (nsURI: null, nsPrefix: null)]
>
> > However, no triples are generated, as verified in the 'SPARQLMotion
> > Results' pane and the 'Classes' pane. What am I missing here?
>
> --
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group
> athttp://groups.google.com/group/topbraid-users?hl=en
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en