Cosmas, have you taken a look at
http://www.topquadrant.com/swp/ ? There's a getting started
guide, user guide, etc. The SPARQL Web Pages in TopBraid
(http://www.topquadrant.com/swp/swp-in-topbraid.html) may be
particularly helpful.
-- Scott
On 11/8/2012 2:50 AM, cosmas haryawan
wrote:
Thank you Holger,
I've tried several techniques based on your response but I'm
afraid it has not been able to solve my problem. I think, SPIN-API
is more appropriate to resolve that, because I can use variable to
create query or handle the result, and can process using all
control structure (i.e if, for, while) and data type (i.e array),
but I'm not sure if SPIN-API is suitable to use using JSP and
Netbeans IDE ?
Pada Rabu, 07 November 2012 6:59:23 UTC+7, Holger Knublauch
menulis:
Ok, this
can be done, but PHP is probably neither needed nor the most
elegant solution. One way to implement this would be (based on
your
example):
<ui:group>
<ui:if ui:condition="{= ?param = 'person' }">
<my:Helper arg:resultSet="{# SELECT ?x WHERE { ?x a
kennedys:Person } }"/>
</ui:if>
<ui:else>
<my:Helper arg:resultSet="{# SELECT ?x WHERE { ?x a
kennedys:College } }"/>
</ui:else>
</ui:group>
where my:Helper is a user-defined element class that takes a
resultSet
as argument and lists it as output. (arg:resultSet above would
be a
subproperty of ui:resultSet.)
http://uispin.org/ui.html#classes
For the example above there are more elegant approaches, such as
using
ui:call with a template that is selected by a SPIN function, or
make the
class (Person/College) a variable that is computed by a SPIN
function.
If all you need from PHP is the control logic (e.g. if) then SWP
can be
used just as well. If you really need PHP, I believe you would
need to
generate temp PHP files on the server in one transaction, and
then call
that PHP script in a second step, using Ajax.
Holger
--
-- 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
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
|