Hi Gokhan,

I think that's the problem - I have not defined my own SM properties in a java 
class - only in the rdf model.

Is there an example around that shows how to do that?

Something like "public static final com.hp.hpl.jena.rdf.model.Property 
targetUser;"?

I have imported the SM class as well as listed the appropriate dependencies.

Thanks,

Tim



> -----Original Message-----
> From: Gokhan Soydan [mailto:[email protected]]
> Sent: Friday, January 21, 2011 3:58 PM
> To: [email protected]
> Cc: Smith, Tim
> Subject: Re: [topbraid-users] Re: SPARQLMotion Module Devlopment
> question
> 
> Tim,
> 
> Did you have "org.topbraid.sparqlmotion.vocabulary.SM" imported into
> the
> Java class where you define your own SM properties like "SM.targetUser"
> ? In the Dependencies list of your plugin, did you include
> "org.topbraid.sparqlmotion" and any other related plugins like
> "org.topbraid.lib.jena"?
> 
> Gokhan
> 
> 
> On 1/21/2011 12:36 PM, Smith, Tim wrote:
> > Hi Scott,
> >
> > Thanks for the help.
> >
> > I had done what you suggested - I imported the model containing the
> properties I wanted to use into the new module model.  They were
> available to the Create from SPIN Template window.  I changed them to
> use the SM namespace but this did not solve the problem.
> >
> > The problem I'm running into is at the java level.  When I try to get
> the value pointed to by the given property, the compiler does not
> recognize SM.targetUser.
> >
> > It does recognize the built-in SM: values such as sm:outputVariable.
> This is because these values are declared in
> org.topbraid.sparqlmotion.vocabulary.SM.
> >
> > Do I need to create my own vocabulary class to use my properties at
> the java level?  If not, how do I determine the value pointed to by a
> property used in a SPIN constraint that is not part of a built-in
> vocabulary?
> >
> > Thanks,
> >
> > Tim
> >
> >
> >
> >
> >
> >> -----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

-- 
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

Reply via email to