-----Original Message-----
From: [email protected] [mailto:topbraid-
[email protected]] On Behalf Of Scott Henninger
Sent: Friday, January 21, 2011 12:17 PM
To: TopBraid Suite Users
Subject: [topbraid-users] Re: SPARQLMotion Module Devlopment question
Tim; In the initial step "Declaring the new Module", add your
arguments (using the proper URIs) or import your model into the new
module model. The properties you define are then available when using
the "Create from SPIN template" step to create arguments. I'd suggest
using the sm namespace, i.e. sm:targetURL and sm:targetUser. This
will re-use the existing infrastructure without having to declare new
Java classes.
-- Scott
On Jan 21, 9:22 am, "Smith, Tim"<[email protected]> wrote:
Hi,
I'm developing an SM module that requires several items as input.
These items are bound variables coming into my module.
I would like the user of the module to be able set the variable names
that contain the values needed. For example, I need to pass a URL and
user name to the module.
I thought I could use a spin constraint to define the property that
will hold the name of the variable, following the example of "Hello
World" found in the "Adding a SPARQLMotion Module with Java" help
page.
The Hello World example uses the sm:outputvariable property to pass
the name of the output variable into the module using a spin
constraint. The value of the property is retrieved inside the module
using:
String varName = getConfigString(SM.outputVariable, true);
I was hoping to use more informative, existing property names in the
spin constraint to define the variables such as PG:targetURL an
PG:targetUser.
However, I do not know how to access these properties inside the
module since Java does not know about them. i.e. I cannot use String
varName = getConfigString(PG.targetURL, true);
Do I need to stick with the vocabulary defined by SM or can I use my
own properties in this manner? If so, how do I define them? Just
declare them in the java code to be a
com.hp.hpl.jena.rdf.model.Property?
Thanks for your help,
Tim
--
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