Importing SPARQLMotion Scripts as RDF Graphs

The output of all SPARQLMotion scripts is a set of RDF triples. For example, a script could load some files, run a couple of SPARQL Construct queries on them and then run an inference engine over the constructed triples. TopBraid Composer can treat such executed SPARQLMotion scripts as a RDF triple source, so that they can be imported into another ontology in the workspace.

In order to make a script importable, it needs to be represented by an .smg file that has the same name as the script, but with the additional ending .smg. The only contents of this .smg file is the base URI under which the script can be imported by other graphs. The easiest way to create such a file is through the context menu action Resource > Generate importable .smg file... which will prompt for the base URI and then create the file in the workspace. You can then import the resulting RDF triples into any other model, for example by dragging the .smg file into the Imports View.

Note that this capability is only supported for SPARQLMotion scripts that do not take any user input and do not create any other output than RDF.