Hi Tim,

have a look at spif:invoke:


   spif:invoke (spin:Function)

Calls another SPARQL function specified by a URI resource (?arg1), with additional arguments passed into from ?arg2 onwards. This can be used to dynamically call functions, the URI of which is now known statically. The result of the function call will be passed on as result of the invoke call. The function can also be a binary built-in SPARQL function using the SPIN function identifiers from the SPL ontology. For example, sp:gt will be executed as ?left > ?right.


     Arguments

*sp:arg1* (spin:Function): The URI resource defining the function to call.
*sp:arg2*: [Optional] The first argument of the function call.
*sp:arg3*: [Optional] The second argument of the function call.
*sp:arg4*: [Optional] The third argument of the function call.
*sp:arg5*: [Optional] The forth argument of the function call.



Cheers,
Holger


On 2/22/2013 12:30, Tim Smith wrote:
I have a use case where I'm processing a bunch of IDs from a relational database. For each ID, I must determine the class for which it is an instance by using a regex filter.

I've setup a "helper" class that defines (via instances) a number of processing parameters that are used to parse the ID and construct instances, etc...

In an instance of the helper class, I store the URI of of a SPIN function that is to be used, for example, to parse the ID into the relevant parts.

example:  help:instance1 help:idParser pgspin:parseID1

My question is:

Is it possible to use a variable to hold the URI for a SPIN function and still execute the function including the ability to pass arguments to the function?

Here's how I was thinking about this:

SELECT *
WHERE {
  ?x a help:IDHelper .
  ?x help:idParser ?parser .
  BIND (?parser("ID1234567") as ?parsedID)
}

Thanks in advance for your help,

Tim

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages 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 Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.



--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages 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 Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to